From 8870e981392484bf98467075ec36a446b3860865 Mon Sep 17 00:00:00 2001 From: Daniel Eshkeri Date: Mon, 28 Oct 2024 16:25:57 +0000 Subject: [PATCH] fix: widgetbook max lines avatar rail --- example/macos/Flutter/GeneratedPluginRegistrant.swift | 2 +- example/widgetbook/main.dart | 3 ++- .../pages/components/avatar_rail_widgetbook.dart | 7 +------ 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/example/macos/Flutter/GeneratedPluginRegistrant.swift b/example/macos/Flutter/GeneratedPluginRegistrant.swift index 8c72a8c7..63ad0d13 100644 --- a/example/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -7,7 +7,7 @@ import Foundation import path_provider_foundation import shared_preferences_foundation -import sqflite_darwin +import sqflite import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { diff --git a/example/widgetbook/main.dart b/example/widgetbook/main.dart index 6a5202c6..503b4753 100644 --- a/example/widgetbook/main.dart +++ b/example/widgetbook/main.dart @@ -253,7 +253,8 @@ class _HotReloadState extends State { ZetaAddon(), InspectorAddon(enabled: false), ZoomAddon(initialZoom: 1.0), - TextScaleAddon(min: 1, max: 2, divisions: 4, initialScale: 1), + // TextScaleAddon(min: 1, max: 2, divisions: 4, initialScale: 1), + TextScaleAddon(scales: [1, 1.25, 1.75, 2], initialScale: 1), ], ); } diff --git a/example/widgetbook/pages/components/avatar_rail_widgetbook.dart b/example/widgetbook/pages/components/avatar_rail_widgetbook.dart index 2a52f844..1b738085 100644 --- a/example/widgetbook/pages/components/avatar_rail_widgetbook.dart +++ b/example/widgetbook/pages/components/avatar_rail_widgetbook.dart @@ -10,6 +10,7 @@ Widget avatarRailUseCase(BuildContext context) { return WidgetbookScaffold( builder: (context, _) => ZetaAvatarRail( + labelMaxLines: context.knobs.int.slider(label: 'Label Max Lines', min: 1, max: 3, initialValue: 1), avatars: [ ZetaAvatar( image: context.knobs.boolean(label: 'Image') ? image : null, @@ -36,7 +37,6 @@ Widget avatarRailUseCase(BuildContext context) { backgroundColor: context.knobs.colorOrNull(label: 'Background color', initialValue: colors.purple.shade80), onTap: () => print('Avatar tapped'), label: context.knobs.stringOrNull(label: 'Label', initialValue: 'ABC'), - labelMaxLines: context.knobs.int.slider(label: 'Label Max Lines', min: 1, max: 3, initialValue: 1), ), ZetaAvatar( image: context.knobs.boolean(label: 'Image') ? image : null, @@ -63,7 +63,6 @@ Widget avatarRailUseCase(BuildContext context) { backgroundColor: context.knobs.colorOrNull(label: 'Background color', initialValue: colors.purple.shade80), onTap: () => print('Avatar tapped'), label: context.knobs.stringOrNull(label: 'Label', initialValue: 'ABC'), - labelMaxLines: context.knobs.int.slider(label: 'Label Max Lines', min: 1, max: 3, initialValue: 1), ), ZetaAvatar( image: context.knobs.boolean(label: 'Image') ? image : null, @@ -90,7 +89,6 @@ Widget avatarRailUseCase(BuildContext context) { backgroundColor: context.knobs.colorOrNull(label: 'Background color', initialValue: colors.purple.shade80), onTap: () => print('Avatar tapped'), label: context.knobs.stringOrNull(label: 'Label', initialValue: 'ABC'), - labelMaxLines: context.knobs.int.slider(label: 'Label Max Lines', min: 1, max: 3, initialValue: 1), ), ZetaAvatar( image: context.knobs.boolean(label: 'Image') ? image : null, @@ -117,7 +115,6 @@ Widget avatarRailUseCase(BuildContext context) { backgroundColor: context.knobs.colorOrNull(label: 'Background color', initialValue: colors.purple.shade80), onTap: () => print('Avatar tapped'), label: context.knobs.stringOrNull(label: 'Label', initialValue: 'ABC'), - labelMaxLines: context.knobs.int.slider(label: 'Label Max Lines', min: 1, max: 3, initialValue: 1), ), ZetaAvatar( image: context.knobs.boolean(label: 'Image') ? image : null, @@ -144,7 +141,6 @@ Widget avatarRailUseCase(BuildContext context) { backgroundColor: context.knobs.colorOrNull(label: 'Background color', initialValue: colors.purple.shade80), onTap: () => print('Avatar tapped'), label: context.knobs.stringOrNull(label: 'Label', initialValue: 'ABC'), - labelMaxLines: context.knobs.int.slider(label: 'Label Max Lines', min: 1, max: 3, initialValue: 1), ), ZetaAvatar( image: context.knobs.boolean(label: 'Image') ? image : null, @@ -171,7 +167,6 @@ Widget avatarRailUseCase(BuildContext context) { backgroundColor: context.knobs.colorOrNull(label: 'Background color', initialValue: colors.purple.shade80), onTap: () => print('Avatar tapped'), label: context.knobs.stringOrNull(label: 'Label', initialValue: 'ABC'), - labelMaxLines: context.knobs.int.slider(label: 'Label Max Lines', min: 1, max: 3, initialValue: 1), ), ], ),