diff --git a/examples/todo_list/lib/main.dart b/examples/todo_list/lib/main.dart index 36639870f..ae006738d 100644 --- a/examples/todo_list/lib/main.dart +++ b/examples/todo_list/lib/main.dart @@ -1,8 +1,6 @@ -import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; import 'package:mix/mix.dart'; - -import 'pages/todo_list_page.dart'; -import 'style/design_tokens.dart'; +import 'package:remix/remix.dart'; void main() { runApp(const MyApp()); @@ -13,11 +11,136 @@ class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { - return MixTheme( - data: lightTheme, - child: const MaterialApp( - home: TodoListPage(), + return const RemixApp( + home: Scaffold(body: SelectPage()), + ); + } +} + +class SelectPage extends StatefulWidget { + const SelectPage({super.key}); + + @override + State createState() => _SelectPageState(); +} + +class _SelectPageState extends State { + String? value; + final items = ['Item 1', 'Item 2', 'Item 3']; + + @override + Widget build(BuildContext context) { + return Center( + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + SizedBox( + width: 200, + child: Select( + style: const SelectOnceUI(), + value: value, + onChanged: (v) { + setState(() { + value = v; + }); + }, + button: (spec) => spec( + text: value ?? 'Select an Item', + ), + items: items + .map( + (e) => SelectMenuItem( + value: e, + childBuilder: (spec) => spec( + title: e, + subtitle: 'Subtitle', + // leadingWidgetBuilder: (spec) => + // spec(m.Icons.ac_unit_rounded), + ), + ), + ) + .toList(), + ), + ), + const SizedBox(width: 32), + SizedBox( + width: 200, + child: Select( + value: value, + onChanged: (v) { + setState(() { + value = v; + }); + }, + button: (spec) => spec( + text: value ?? 'Select an Item', + ), + items: items + .map( + (e) => SelectMenuItem( + value: e, + childBuilder: (spec) => spec( + title: e, + subtitle: 'Subtitle', + ), + ), + ) + .toList(), + ), + ), + ], ), ); } } + +class SelectOnceUI extends SelectStyle { + const SelectOnceUI(); + + @override + Style makeStyle(SpecConfiguration spec) { + final $ = spec.utilities; + final on = spec.on; + + final button = Style.create([ + $.button.container.chain + ..padding(16) + ..borderRadius(16) + ..border.width(1) + ..border.color.grey.shade300() + ..color.grey.shade100(), + ]); + + final menu = Style.create([ + $.menu.container.chain + ..color.white() + ..shadow.blurRadius.zero() + ..borderRadius(16), + ]); + + final item = Style.create([ + $.item.outerContainer.chain + ..padding.horizontal(12) + ..padding.vertical(10) + ..borderRadius(12), + on.selected( + $.item.outerContainer.chain..color.grey.shade200(), + ), + ]); + + final onHover = Style.create([ + on.hover( + $.item.outerContainer.chain..color.grey.shade300(), + $.button.container.chain..color.grey.shade300(), + ) + ]); + + return Style( + super.makeStyle(spec).call(), + button(), + menu(), + item(), + onHover(), + ).animate(); + } +} diff --git a/examples/todo_list/macos/Runner/AppDelegate.swift b/examples/todo_list/macos/Runner/AppDelegate.swift index d53ef6437..8e02df288 100644 --- a/examples/todo_list/macos/Runner/AppDelegate.swift +++ b/examples/todo_list/macos/Runner/AppDelegate.swift @@ -1,7 +1,7 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true diff --git a/examples/todo_list/pubspec.yaml b/examples/todo_list/pubspec.yaml index 6f3a2dbef..f231e019f 100644 --- a/examples/todo_list/pubspec.yaml +++ b/examples/todo_list/pubspec.yaml @@ -14,6 +14,8 @@ dependencies: sdk: flutter mix: path: ../../packages/mix + remix: + path: ../../packages/remix custom_lint: ^0.6.4 google_fonts: ^6.0.0 diff --git a/packages/remix/demo/lib/components/accordion_use_case.dart b/packages/remix/demo/lib/components/accordion_use_case.dart index 3328fbb12..3717fb0ba 100644 --- a/packages/remix/demo/lib/components/accordion_use_case.dart +++ b/packages/remix/demo/lib/components/accordion_use_case.dart @@ -16,7 +16,7 @@ Widget buildAccordionUseCase(BuildContext context) { child: SizedBox( width: 300, child: Accordion( - header: (spec) => XAccordionHeaderSpecWidget( + header: (spec) => AccordionHeaderSpecWidget( title: context.knobs.string( label: 'Title', initialValue: 'Title', diff --git a/packages/remix/demo/lib/components/button_use_case.dart b/packages/remix/demo/lib/components/button_use_case.dart index d935669c0..9b3a1d7dc 100644 --- a/packages/remix/demo/lib/components/button_use_case.dart +++ b/packages/remix/demo/lib/components/button_use_case.dart @@ -16,32 +16,44 @@ Widget buildButtonUseCase(BuildContext context) { key: _key, child: Scaffold( body: Center( - child: Button( - variants: [ - context.knobs.variant(FortalezaButtonStyle.variants), - ], - label: context.knobs.string( - label: 'Title', - initialValue: 'Button', - ), - onPressed: () {}, - disabled: context.knobs.boolean( - label: 'Disabled', - initialValue: false, - ), - loading: context.knobs.boolean( - label: 'loading', - initialValue: false, - ), - iconLeft: context.knobs.iconData( - label: 'Icon left', - initialValue: null, - ), - iconRight: context.knobs.iconData( - label: 'Icon right', - initialValue: null, - ), - ), + child: Builder(builder: (context) { + return Button( + variants: [ + context.knobs.variant(FortalezaButtonStyle.variants), + ], + label: context.knobs.string( + label: 'Title', + initialValue: 'Button', + ), + onPressed: () { + showToast( + context: context, + entry: ToastEntry( + showDuration: const Duration(milliseconds: 800), + builder: (context, actions) => const Toast( + title: 'Button pressed', + ), + ), + ); + }, + disabled: context.knobs.boolean( + label: 'Disabled', + initialValue: false, + ), + loading: context.knobs.boolean( + label: 'loading', + initialValue: false, + ), + iconLeft: context.knobs.iconData( + label: 'Icon left', + initialValue: null, + ), + iconRight: context.knobs.iconData( + label: 'Icon right', + initialValue: null, + ), + ); + }), ), ), ); diff --git a/packages/remix/demo/lib/components/checkbox_use_case.dart b/packages/remix/demo/lib/components/checkbox_use_case.dart index 30629ce31..002ff388d 100644 --- a/packages/remix/demo/lib/components/checkbox_use_case.dart +++ b/packages/remix/demo/lib/components/checkbox_use_case.dart @@ -19,6 +19,7 @@ Widget buildCheckboxUseCase(BuildContext context) { key: _key, child: Center( child: Checkbox( + label: context.knobs.string(label: 'Label', initialValue: 'Label'), variants: [context.knobs.variant(FortalezaCheckboxStyle.variants)], disabled: context.knobs.boolean(label: 'Disabled', initialValue: false), diff --git a/packages/remix/demo/lib/components/icon_button_use_case.dart b/packages/remix/demo/lib/components/icon_button_use_case.dart index 479c7fb8d..a47573669 100644 --- a/packages/remix/demo/lib/components/icon_button_use_case.dart +++ b/packages/remix/demo/lib/components/icon_button_use_case.dart @@ -4,6 +4,7 @@ import 'package:flutter/widgets.dart'; import 'package:remix/remix.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; + import '../helpers/knob_builder.dart'; final _key = GlobalKey(); @@ -17,21 +18,32 @@ Widget buildButtonUseCase(BuildContext context) { key: _key, child: Scaffold( body: Center( - child: IconButton( - m.Icons.add, - variants: [ - context.knobs.variant(FortalezaIconButtonStyle.variants), - ], - onPressed: () {}, - disabled: context.knobs.boolean( - label: 'Disabled', - initialValue: false, - ), - loading: context.knobs.boolean( - label: 'loading', - initialValue: false, - ), - ), + child: Builder(builder: (context) { + return IconButton( + m.Icons.add, + variants: [ + context.knobs.variant(FortalezaIconButtonStyle.variants), + ], + onPressed: () { + showToast( + context: context, + entry: ToastEntry( + showDuration: const Duration(milliseconds: 800), + builder: (context, actions) => + const Toast(title: 'Button pressed'), + ), + ); + }, + disabled: context.knobs.boolean( + label: 'Disabled', + initialValue: false, + ), + loading: context.knobs.boolean( + label: 'loading', + initialValue: false, + ), + ); + }), ), ), ); diff --git a/packages/remix/demo/lib/components/menu_item_use_case.dart b/packages/remix/demo/lib/components/menu_item_use_case.dart index 5c8d4eb52..b5fe9e222 100644 --- a/packages/remix/demo/lib/components/menu_item_use_case.dart +++ b/packages/remix/demo/lib/components/menu_item_use_case.dart @@ -1,4 +1,3 @@ -import 'package:demo/helpers/knob_builder.dart'; import 'package:flutter/material.dart' hide Scaffold; import 'package:remix/remix.dart'; import 'package:widgetbook/widgetbook.dart'; @@ -18,9 +17,6 @@ Widget buildButtonUseCase(BuildContext context) { child: SizedBox( width: 350, child: MenuItem( - variants: [ - context.knobs.variant(FortalezaButtonStyle.variants), - ], title: context.knobs.string( label: 'Title', initialValue: 'Menu Item', diff --git a/packages/remix/demo/lib/components/radio_use_case.dart b/packages/remix/demo/lib/components/radio_use_case.dart index 6ee59e3ff..cb8972112 100644 --- a/packages/remix/demo/lib/components/radio_use_case.dart +++ b/packages/remix/demo/lib/components/radio_use_case.dart @@ -5,12 +5,10 @@ import 'package:remix/remix.dart'; import 'package:widgetbook/widgetbook.dart'; import 'package:widgetbook_annotation/widgetbook_annotation.dart' as widgetbook; -final _key = GlobalKey(); - enum Theme { dark, light, - system, + system; } @widgetbook.UseCase( @@ -18,57 +16,51 @@ enum Theme { type: Radio, ) Widget buildRadioUseCase(BuildContext context) { - return const Scaffold( + return Scaffold( body: Center( - child: RadioExample(), + child: ListenableBuilder( + listenable: _state, + builder: (context, child) { + return Column( + mainAxisAlignment: MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: Theme.values + .map( + (theme) => Padding( + padding: const EdgeInsets.all(4.0), + child: Radio( + value: theme, + disabled: context.knobs.boolean( + label: 'Disabled', + initialValue: false, + ), + groupValue: _state.value, + onChanged: (value) { + _state.update(value!); + }, + variants: [ + context.knobs.variant(FortalezaRadioStyle.variants) + ], + label: theme.name.capitalize(), + ), + ), + ) + .toList(), + ); + }, + ), ), ); } -class RadioExample extends StatefulWidget { - const RadioExample({super.key}); - - @override - State createState() => _RadioExampleState(); -} +class _ThemeState extends ValueNotifier { + _ThemeState(super.value); -class _RadioExampleState extends State { - Theme _theme = Theme.dark; - - @override - Widget build(BuildContext context) { - return SizedBox( - width: 200, - child: Column( - mainAxisSize: MainAxisSize.min, - key: _key, - children: [ - for (var theme in Theme.values) ...[ - Row( - children: [ - Radio( - variants: [ - context.knobs.variant(FortalezaRadioStyle.variants) - ], - value: theme, - groupValue: _theme, - onChanged: (Theme? value) { - setState(() { - _theme = value!; - }); - }, - disabled: context.knobs.boolean( - label: 'Disabled', - initialValue: false, - ), - text: theme.name.capitalize(), - ), - ], - ), - const SizedBox(height: 8), - ] - ], - ), - ); + void update(Theme value) { + this.value = value; + notifyListeners(); } } + +_ThemeState _state = _ThemeState(Theme.dark); diff --git a/packages/remix/demo/lib/components/segmented_control_use_case.dart b/packages/remix/demo/lib/components/segmented_control_use_case.dart index edcb83443..dfdf48543 100644 --- a/packages/remix/demo/lib/components/segmented_control_use_case.dart +++ b/packages/remix/demo/lib/components/segmented_control_use_case.dart @@ -28,13 +28,13 @@ class _WidgetDemoState extends State<_WidgetDemo> { return SegmentedControl( index: index, buttons: const [ - XSegmentButton( + SegmentButton( text: 'Apple', ), - XSegmentButton( + SegmentButton( text: 'Pear', ), - XSegmentButton( + SegmentButton( text: 'Banana', ), ], diff --git a/packages/remix/demo/lib/components/select_use_case.dart b/packages/remix/demo/lib/components/select_use_case.dart index 428d29b45..e536e8b31 100644 --- a/packages/remix/demo/lib/components/select_use_case.dart +++ b/packages/remix/demo/lib/components/select_use_case.dart @@ -53,8 +53,8 @@ class _SelectDemoState extends State { items.length, (index) => SelectMenuItem( value: items[index], - child: XSelectMenuItemWidget( - text: items[index], + childBuilder: (spec) => spec( + title: items[index], ), ), ), diff --git a/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist b/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist index 8e38daa77..da4e17eeb 100644 --- a/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist +++ b/packages/remix/demo/macos/Flutter/ephemeral/FlutterInputs.xcfilelist @@ -1,28 +1,28 @@ -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-72.0.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/accessibility_tools.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/accessibility_issue.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/accessibility_tools.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checker_manager.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/checker_base.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/flex_overflow_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/image_label_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/input_label_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/minimum_tap_area_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/mixin.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/checkers/semantic_label_checker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/enums/buttons_alignment.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/floating_action_buttons.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/color_mode_simulation.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/info_button.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/multi_value_toggle.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/slider_toggle.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/switch_toggle.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/test_environment.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/testing_tools_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.2/lib/src/testing_tools/testing_tools_wrapper.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/analyzer-6.7.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/args-2.5.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/_fe_analyzer_shared-67.0.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/accessibility_tools.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/accessibility_issue.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/accessibility_tools.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/checker_manager.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/checkers/checker_base.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/checkers/flex_overflow_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/checkers/image_label_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/checkers/input_label_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/checkers/minimum_tap_area_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/checkers/mixin.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/checkers/semantic_label_checker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/enums/buttons_alignment.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/floating_action_buttons.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/testing_tools/color_mode_simulation.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/testing_tools/info_button.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/testing_tools/multi_value_toggle.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/testing_tools/slider_toggle.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/testing_tools/switch_toggle.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/testing_tools/test_environment.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/testing_tools/testing_tools_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/accessibility_tools-2.2.1/lib/src/testing_tools/testing_tools_wrapper.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/analyzer-6.4.1/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/args-2.6.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/async-2.11.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/async-2.11.0/lib/async.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/async-2.11.0/lib/src/async_cache.dart @@ -85,10 +85,10 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/boolean_selector-2.1.1/lib/src/visitor.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/build-2.4.1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/build_config-1.1.1/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/build_daemon-4.0.2/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/build_daemon-4.0.1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/build_resolvers-2.4.2/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/build_runner-2.4.13/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/build_runner_core-7.3.2/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/build_runner-2.4.9/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/build_runner_core-7.3.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/built_collection-5.1.1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/built_value-8.9.2/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/characters-1.3.0/LICENSE @@ -133,103 +133,103 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/src/utils.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/collection-1.18.0/lib/src/wrappers.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/convert-3.1.1/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/crypto-3.0.5/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/crypto-3.0.3/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/cupertino_icons-1.0.8/assets/CupertinoIcons.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/dart_style-2.3.7/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/device_frame.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/devices.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/oneplus_8_pro/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/oneplus_8_pro/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/oneplus_8_pro/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_a50/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_a50/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_a50/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_note20/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_note20/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_note20/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_note20_ultra/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_note20_ultra/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_note20_ultra/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_s20/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_s20/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/samsung_galaxy_s20/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/sony_xperia_1_ii/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/sony_xperia_1_ii/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/android/sony_xperia_1_ii/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/devices.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/generic/base/draw_extensions.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/generic/desktop_monitor/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/generic/desktop_monitor/frame.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/generic/laptop/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/generic/laptop/frame.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/generic/phone/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/generic/phone/frame.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/generic/tablet/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/generic/tablet/frame.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/devices.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_air_4/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_air_4/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_air_4/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_pro_11inches/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_pro_11inches/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_pro_11inches/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_pro_12Inches_gen2/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_pro_12Inches_gen2/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_pro_12Inches_gen2/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_pro_12Inches_gen4/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_pro_12Inches_gen4/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/ipad_pro_12Inches_gen4/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_12/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_12/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_12/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_12_mini/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_12_mini/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_12_mini/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_12_pro_max/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_12_pro_max/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_12_pro_max/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_13/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_13/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_13/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_13_mini/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_13_mini/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_13_mini/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_13_pro_max/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_13_pro_max/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_13_pro_max/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_se/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_se/frame.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/ios/iphone_se/screen.g.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/linux/devices.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/macos/devices.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/macos/macbook_pro/device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/macos/macbook_pro/frame.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/devices/windows/devices.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/frame.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/info/device_type.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/info/identifier.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/info/info.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/info/info.freezed.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/keyboard/button.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/keyboard/virtual_keyboard.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/theme.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.2.0/lib/src/theme.freezed.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/dart_style-2.3.6/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/device_frame.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/devices.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/oneplus_8_pro/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/oneplus_8_pro/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/oneplus_8_pro/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_a50/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_a50/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_a50/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_note20/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_note20/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_note20/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_note20_ultra/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_note20_ultra/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_note20_ultra/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_s20/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_s20/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/samsung_galaxy_s20/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/sony_xperia_1_ii/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/sony_xperia_1_ii/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/android/sony_xperia_1_ii/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/devices.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/generic/base/draw_extensions.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/generic/desktop_monitor/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/generic/desktop_monitor/frame.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/generic/laptop/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/generic/laptop/frame.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/generic/phone/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/generic/phone/frame.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/generic/tablet/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/generic/tablet/frame.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/devices.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_air_4/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_air_4/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_air_4/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_pro_11inches/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_pro_11inches/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_pro_11inches/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_pro_12Inches_gen2/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_pro_12Inches_gen2/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_pro_12Inches_gen2/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_pro_12Inches_gen4/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_pro_12Inches_gen4/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/ipad_pro_12Inches_gen4/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_12/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_12/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_12/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_12_mini/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_12_mini/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_12_mini/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_12_pro_max/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_12_pro_max/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_12_pro_max/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_13/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_13/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_13/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_13_mini/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_13_mini/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_13_mini/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_13_pro_max/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_13_pro_max/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_13_pro_max/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_se/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_se/frame.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/ios/iphone_se/screen.g.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/linux/devices.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/macos/devices.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/macos/macbook_pro/device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/macos/macbook_pro/frame.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/devices/windows/devices.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/frame.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/info/device_type.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/info/identifier.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/info/info.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/info/info.freezed.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/keyboard/button.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/keyboard/virtual_keyboard.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/theme.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/device_frame-1.1.0/lib/src/theme.freezed.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/fake_async-1.3.1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/fake_async-1.3.1/lib/fake_async.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/file-7.0.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/fixnum-1.1.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/file-7.0.1/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/fixnum-1.1.1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/flutter_lints-4.0.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/freezed_annotation-2.4.4/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/freezed_annotation-2.4.4/lib/freezed_annotation.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/freezed_annotation-2.4.4/lib/freezed_annotation.g.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/frontend_server_client-4.0.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/glob-2.1.2/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/graphs-2.3.2/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/graphs-2.3.1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/http_multi_server-3.2.1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/http_parser-4.0.2/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/inspector-2.1.0/LICENSE @@ -307,7 +307,6 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/leak_tracker_testing-3.0.1/lib/src/matchers.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/lints-4.0.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/logging-1.2.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/macros-0.1.2-main.4/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/lib/expect.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/matcher-0.12.16+1/lib/matcher.dart @@ -382,7 +381,7 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/meta-1.15.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/meta-1.15.0/lib/meta.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/meta-1.15.0/lib/meta_meta.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/mime-2.0.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/mime-1.0.6/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/nested-1.0.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/nested-1.0.0/lib/nested.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/package_config-2.1.0/LICENSE @@ -415,7 +414,7 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/resizable_widget-1.0.5/lib/src/separator_controller.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/resizable_widget-1.0.5/lib/src/widget_size_info.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/shelf-1.4.1/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/shelf_web_socket-2.0.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/shelf_web_socket-1.0.4/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/source_gen-1.5.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/source_span-1.10.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/source_span-1.10.0/lib/source_span.dart @@ -543,185 +542,184 @@ /Users/lucasoliveira/.pub-cache/hosted/pub.dev/vm_service-14.2.5/lib/vm_service.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/vm_service-14.2.5/lib/vm_service_io.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/watcher-1.1.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/web-1.1.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/web_socket-0.1.6/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/web_socket_channel-3.0.1/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/LICENSE -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Black.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-BlackItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Bold.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-BoldItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraBold.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraLight.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Italic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Light.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-LightItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Medium.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-MediumItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Regular.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-SemiBold.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-Thin.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/fonts/Poppins/Poppins-ThinItalic.ttf -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/assets/logo.png -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/next.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/accessibility_addon/accessibility_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/accessibility_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/addons.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/alignment_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/alignment_addon/alignment_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/builder_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/builder_addon/builder_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/common/common.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/common/multi_addon_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/common/widgetbook_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/device_frame_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/device_frame_setting.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/device_frame_addon/none_device.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/grid_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/grid_addon/grid_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/inspector_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/inspector_addon/inspector_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/localization_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/localization_addon/localization_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/text_scale_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/text_scale_addon/text_scale_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/cupertino_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/material_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/theme_addon/widgetbook_theme.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/time_dilation_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/time_dilation_addon/time_dilation_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/zoom_addon/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/addons/zoom_addon/zoom_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/boolean_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/color_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/color_space.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/hex_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/hsl_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/number_text_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/opaque_color.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/opaque_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/color_field/rgb_color_picker.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/date_time_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/double_input_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/double_slider_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/duration_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/field_codec.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/field_type.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/fields.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/fields_composable.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/int_input_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/int_slider_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/list_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/num_input_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/num_slider_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/fields/string_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/integrations.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/widgetbook_cloud_integration/no_messaging.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/widgetbook_cloud_integration/widgetbook_cloud_integration.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/integrations/widgetbook_integration.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/boolean_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/double_knobs_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/int_knobs_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/knobs_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/builders/knobs_extension.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/color_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/date_time_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/double_input_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/double_slider_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/duration_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/int_input_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/int_slider_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/knobs.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/knobs_registry.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/list_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/knobs/string_knob.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/base_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/desktop_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/mobile_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/layout/responsive_layout.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/component_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/expander_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/icons.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/resolve_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/icons/use_case_icon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/navigation.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/nodes.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_category.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_component.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_folder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_leaf_component.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_node.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_package.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_root.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/nodes/widgetbook_use_case.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/navigation_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/navigation_tree_node.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/navigation_tree_tile.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/search_field.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/navigation/widgets/widgets.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/accessibility_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/alignment_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/builder_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/experimental_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/mode.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/base/mode_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/cupertino_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/device_frame_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/grid_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/inspector_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/localization_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/material_theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/text_scale_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/theme_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/time_dilation_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/addons/zoom_addon.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/bool_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/builder_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/color_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/const_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/double_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/duration_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/enum_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/int_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/single_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/story_args.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/args/string_arg.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/component.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/experimental_badge.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/meta.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/scenario.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/next/story.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_route_config.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_route_parser.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_router.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/app_router_delegate.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/routing/routing.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/mobile_settings_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/nullable_setting.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/setting.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/settings.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/settings/settings_panel.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/default_app_builders.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/state.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/widgetbook_scope.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/state/widgetbook_state.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/themes.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/widgetbook.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/workbench/safe_boundaries.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/workbench/use_case_builder.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/src/workbench/workbench.dart -/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.9.0/lib/widgetbook.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/web-0.5.1/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/web_socket_channel-2.4.5/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/LICENSE +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Black.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-BlackItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Bold.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-BoldItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraBold.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraBoldItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraLight.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ExtraLightItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Italic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Light.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-LightItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Medium.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-MediumItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Regular.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-SemiBold.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-SemiBoldItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-Thin.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/fonts/Poppins/Poppins-ThinItalic.ttf +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/assets/logo.png +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/next.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/accessibility_addon/accessibility_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/accessibility_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/addons.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/alignment_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/alignment_addon/alignment_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/builder_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/builder_addon/builder_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/common/common.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/common/multi_addon_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/common/widgetbook_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/device_frame_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/device_frame_setting.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/device_frame_addon/none_device.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/grid_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/grid_addon/grid_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/inspector_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/inspector_addon/inspector_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/localization_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/localization_addon/localization_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/text_scale_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/text_scale_addon/text_scale_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/cupertino_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/material_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/theme_addon/widgetbook_theme.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/time_dilation_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/time_dilation_addon/time_dilation_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/zoom_addon/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/addons/zoom_addon/zoom_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/boolean_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/color_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/color_space.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/hex_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/hsl_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/number_text_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/opaque_color.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/opaque_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/color_field/rgb_color_picker.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/date_time_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/double_input_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/double_slider_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/duration_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/field_codec.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/field_type.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/fields.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/fields_composable.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/int_input_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/int_slider_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/list_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/num_input_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/num_slider_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/fields/string_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/integrations.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/widgetbook_cloud_integration/no_messaging.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/widgetbook_cloud_integration/widgetbook_cloud_integration.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/integrations/widgetbook_integration.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/boolean_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/double_knobs_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/int_knobs_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/knobs_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/builders/knobs_extension.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/color_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/date_time_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/double_input_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/double_slider_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/duration_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/int_input_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/int_slider_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/knobs.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/knobs_registry.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/list_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/knobs/string_knob.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/base_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/desktop_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/mobile_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/layout/responsive_layout.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/component_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/expander_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/icons.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/resolve_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/icons/use_case_icon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/navigation.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/nodes.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_category.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_component.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_folder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_leaf_component.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_node.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_package.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_root.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/nodes/widgetbook_use_case.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/navigation_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/navigation_tree_node.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/navigation_tree_tile.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/search_field.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/navigation/widgets/widgets.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/accessibility_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/alignment_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/builder_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/experimental_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/mode.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/base/mode_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/cupertino_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/device_frame_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/grid_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/inspector_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/localization_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/material_theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/text_scale_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/theme_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/time_dilation_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/addons/zoom_addon.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/bool_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/builder_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/color_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/const_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/double_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/duration_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/enum_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/int_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/single_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/story_args.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/args/string_arg.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/component.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/experimental_badge.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/meta.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/scenario.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/next/story.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_route_config.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_route_parser.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_router.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/app_router_delegate.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/routing/routing.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/mobile_settings_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/nullable_setting.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/setting.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/settings.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/settings/settings_panel.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/default_app_builders.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/state.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/widgetbook_scope.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/state/widgetbook_state.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/themes.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/widgetbook.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/workbench/safe_boundaries.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/workbench/use_case_builder.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/src/workbench/workbench.dart +/Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook-3.10.0/lib/widgetbook.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/LICENSE /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/lib/src/addon_config.dart /Users/lucasoliveira/.pub-cache/hosted/pub.dev/widgetbook_annotation-3.2.0/lib/src/addons_configs.dart @@ -896,13 +894,16 @@ /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/callout_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/card_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/checkbox_use_case.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/chip_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/dialog_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/divider_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/icon_button_use_case.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/menu_item_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/progress_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/radio_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/segmented_control_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/select_use_case.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/slider.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/spinner_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/switch_use_case.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/demo/lib/components/toast_use_case.dart @@ -952,7 +953,11 @@ /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox_style.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox_theme.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox/checkbox_widget.dart -/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/checkbox_group/checkbox_group.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip.g.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip_style.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip_theme.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/chip/chip_widget.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog.g.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/dialog/dialog_style.dart @@ -968,6 +973,11 @@ /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button_style.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button_theme.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/icon_button/icon_button_widget.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item.g.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item_style.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item_theme.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/menu_item/menu_item_widget.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress.g.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/progress/progress_style.dart @@ -999,6 +1009,11 @@ /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select_style.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select_theme.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/select/select_widget.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider.g.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider_style.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider_theme.dart +/Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/slider/slider_widget.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner.g.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/components/spinner/spinner_painter.dart @@ -1030,7 +1045,6 @@ /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/tokens/space_tokens.dart /Users/lucasoliveira/Developer/Mix/mix/packages/remix/lib/src/theme/tokens/text_style_tokens.dart /Users/lucasoliveira/fvm/versions/stable/bin/cache/artifacts/material_fonts/MaterialIcons-Regular.otf -/Users/lucasoliveira/fvm/versions/stable/bin/cache/dart-sdk/pkg/_macros/LICENSE /Users/lucasoliveira/fvm/versions/stable/bin/cache/pkg/sky_engine/LICENSE /Users/lucasoliveira/fvm/versions/stable/bin/internal/engine.version /Users/lucasoliveira/fvm/versions/stable/packages/flutter/LICENSE diff --git a/packages/remix/lib/remix.dart b/packages/remix/lib/remix.dart index c7287df13..898d3a6c9 100644 --- a/packages/remix/lib/remix.dart +++ b/packages/remix/lib/remix.dart @@ -1,15 +1,15 @@ -/// /\\\\ /\\\\ /\\\\\\\\\\\ /\\\ /\\\ -/// \/\\\\\\ /\\\\\\ \/////\\\/// \///\\\ /\\\/ -/// \/\\\//\\\ /\\\//\\\ \/\\\ \///\\\\\\/ -/// \/\\\\///\\\/\\\/ \/\\\ \/\\\ \//\\\\ -/// \/\\\ \///\\\/ \/\\\ \/\\\ \/\\\\ -/// \/\\\ \/// \/\\\ \/\\\ /\\\\\\ -/// \/\\\ \/\\\ \/\\\ /\\\////\\\ -/// \/\\\ \/\\\ /\\\\\\\\\\\ /\\\/ \///\\\ -/// \/// \/// \/////////// \/// \/// +/// /\\\\ /\\\\ /\\\\\\\\\\\ /\\\ /\\\ +/// \/\\\\\\ /\\\\\\ \/////\\\/// \///\\\ /\\\/ +/// \/\\\//\\\ /\\\//\\\ \/\\\ \///\\\\\\/ +/// \/\\\\///\\\/\\\/ \/\\\ \/\\\ \//\\\\ +/// \/\\\ \///\\\/ \/\\\ \/\\\ \/\\\\ +/// \/\\\ \/// \/\\\ \/\\\ /\\\\\\ +/// \/\\\ \/\\\ \/\\\ /\\\////\\\ +/// \/\\\ \/\\\ /\\\\\\\\\\\ /\\\/ \///\\\ +/// \/// \/// \/////////// \/// \/// +/// +/// https://fluttermix.com /// -/// https://fluttermix.com -/// /// /\///////////////////////////////////////////////////\ /// \/\ ***** GENERATED CODE ***** \ \ /// \/\ ** DO NOT EDIT THIS FILE ** \ \ @@ -20,6 +20,7 @@ library remix; /// APP export 'src/app/remix_app.dart'; + /// COMPONENTS export 'src/components/accordion/accordion.dart'; export 'src/components/avatar/avatar.dart'; @@ -28,7 +29,6 @@ export 'src/components/button/button.dart'; export 'src/components/callout/callout.dart'; export 'src/components/card/card.dart'; export 'src/components/checkbox/checkbox.dart'; -export 'src/components/checkbox_group/checkbox_group.dart'; export 'src/components/chip/chip.dart'; export 'src/components/dialog/dialog.dart'; export 'src/components/divider/divider.dart'; @@ -43,6 +43,7 @@ export 'src/components/slider/slider.dart'; export 'src/components/spinner/spinner.dart'; export 'src/components/switch/switch.dart'; export 'src/components/toast/toast.dart'; + /// HELPERS export 'src/helpers/color_palette.dart'; export 'src/helpers/color_utils.dart'; @@ -50,6 +51,7 @@ export 'src/helpers/component_builder.dart'; export 'src/helpers/context_ext.dart'; export 'src/helpers/spec/composited_transform_follower_spec.dart'; export 'src/helpers/utility_extension.dart'; + /// THEME export 'src/theme/remix_theme.dart'; export 'src/theme/remix_tokens.dart'; diff --git a/packages/remix/lib/src/components/accordion/accordion.dart b/packages/remix/lib/src/components/accordion/accordion.dart index 24ccce9f2..3a4c3197b 100644 --- a/packages/remix/lib/src/components/accordion/accordion.dart +++ b/packages/remix/lib/src/components/accordion/accordion.dart @@ -23,7 +23,7 @@ base class AccordionSpec extends Spec with _$AccordionSpec { final FlexSpec flex; final TextSpec textContent; - /// {@macro avatar_spec_of} + /// {@macro accordion_spec_of} static const of = _$AccordionSpec.of; static const from = _$AccordionSpec.from; diff --git a/packages/remix/lib/src/components/accordion/header/accordion_header_spec_widget.dart b/packages/remix/lib/src/components/accordion/header/accordion_header_spec_widget.dart index 786dec5f1..db02b5ae9 100644 --- a/packages/remix/lib/src/components/accordion/header/accordion_header_spec_widget.dart +++ b/packages/remix/lib/src/components/accordion/header/accordion_header_spec_widget.dart @@ -1,7 +1,7 @@ part of '../accordion.dart'; -class XAccordionHeaderSpecWidget extends StatelessWidget { - const XAccordionHeaderSpecWidget({ +class AccordionHeaderSpecWidget extends StatelessWidget { + const AccordionHeaderSpecWidget({ super.key, this.leadingIcon, required this.title, diff --git a/packages/remix/lib/src/components/avatar/avatar_widget.dart b/packages/remix/lib/src/components/avatar/avatar_widget.dart index fcdebb0a2..ed090b5e9 100644 --- a/packages/remix/lib/src/components/avatar/avatar_widget.dart +++ b/packages/remix/lib/src/components/avatar/avatar_widget.dart @@ -9,9 +9,30 @@ class Avatar extends StatelessWidget { this.style, }); - final WidgetSpecBuilder fallbackBuilder; + /// The image to display in the avatar. final ImageProvider? image; + + /// A builder for the fallback widget. + /// + /// This builder creates a widget to display when the image + /// fails to load or isn't provided. While commonly used for initials, + /// it can render any widget, offering versatile fallback options. + /// + /// {@macro remix.widget_spec_builder.text_spec} + /// + /// ```dart + /// Avatar( + /// fallbackBuilder: (spec) => spec( + /// 'LF', + /// ), + /// ); + /// ``` + final WidgetSpecBuilder fallbackBuilder; + + /// {@macro remix.component.variants} final List variants; + + /// {@macro remix.component.style} final AvatarStyle? style; @override diff --git a/packages/remix/lib/src/components/badge/badge_widget.dart b/packages/remix/lib/src/components/badge/badge_widget.dart index d34723cea..a89c4e2d1 100644 --- a/packages/remix/lib/src/components/badge/badge_widget.dart +++ b/packages/remix/lib/src/components/badge/badge_widget.dart @@ -8,8 +8,13 @@ class Badge extends StatelessWidget { this.variants = const [], }); + /// The label to display in the badge. final String label; + + /// {@macro remix.component.style} final BadgeStyle? style; + + /// {@macro remix.component.variants} final List variants; @override diff --git a/packages/remix/lib/src/components/button/button.dart b/packages/remix/lib/src/components/button/button.dart index 486d3e131..a0e10d517 100644 --- a/packages/remix/lib/src/components/button/button.dart +++ b/packages/remix/lib/src/components/button/button.dart @@ -16,8 +16,8 @@ part 'button_widget.dart'; @MixableSpec() class ButtonSpec extends Spec with _$ButtonSpec, Diagnosticable { - final FlexSpec flex; final BoxSpec container; + final FlexSpec layout; final IconSpec icon; final TextSpec label; @@ -31,41 +31,18 @@ class ButtonSpec extends Spec with _$ButtonSpec, Diagnosticable { const ButtonSpec({ BoxSpec? container, - FlexSpec? flex, + FlexSpec? layout, IconSpec? icon, TextSpec? label, super.modifiers, SpinnerSpec? spinner, super.animated, - }) : flex = flex ?? const FlexSpec(), + }) : layout = layout ?? const FlexSpec(), container = container ?? const BoxSpec(), icon = icon ?? const IconSpec(), label = label ?? const TextSpec(), spinner = spinner ?? const SpinnerSpec(); - Widget call({ - Key? key, - required String label, - bool disabled = false, - bool loading = false, - IconData? iconLeft, - IconData? iconRight, - WidgetSpecBuilder? spinnerBuilder, - required void Function() onPressed, - }) { - return ButtonSpecWidget( - key: key, - label: label, - disabled: disabled, - loading: loading, - iconLeft: iconLeft, - iconRight: iconRight, - spinnerBuilder: spinnerBuilder, - onPressed: onPressed, - spec: this, - ); - } - @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); diff --git a/packages/remix/lib/src/components/button/button.g.dart b/packages/remix/lib/src/components/button/button.g.dart index 27b9cd3e2..ce8e3a353 100644 --- a/packages/remix/lib/src/components/button/button.g.dart +++ b/packages/remix/lib/src/components/button/button.g.dart @@ -34,7 +34,7 @@ mixin _$ButtonSpec on Spec { @override ButtonSpec copyWith({ BoxSpec? container, - FlexSpec? flex, + FlexSpec? layout, IconSpec? icon, TextSpec? label, WidgetModifiersData? modifiers, @@ -43,7 +43,7 @@ mixin _$ButtonSpec on Spec { }) { return ButtonSpec( container: container ?? _$this.container, - flex: flex ?? _$this.flex, + layout: layout ?? _$this.layout, icon: icon ?? _$this.icon, label: label ?? _$this.label, modifiers: modifiers ?? _$this.modifiers, @@ -64,7 +64,7 @@ mixin _$ButtonSpec on Spec { /// interpolation method: /// /// - [BoxSpec.lerp] for [container]. - /// - [FlexSpec.lerp] for [flex]. + /// - [FlexSpec.lerp] for [layout]. /// - [IconSpec.lerp] for [icon]. /// - [TextSpec.lerp] for [label]. @@ -80,7 +80,7 @@ mixin _$ButtonSpec on Spec { return ButtonSpec( container: _$this.container.lerp(other.container, t), - flex: _$this.flex.lerp(other.flex, t), + layout: _$this.layout.lerp(other.layout, t), icon: _$this.icon.lerp(other.icon, t), label: _$this.label.lerp(other.label, t), modifiers: other.modifiers, @@ -96,7 +96,7 @@ mixin _$ButtonSpec on Spec { @override List get props => [ _$this.container, - _$this.flex, + _$this.layout, _$this.icon, _$this.label, _$this.modifiers, @@ -110,7 +110,7 @@ mixin _$ButtonSpec on Spec { properties.add( DiagnosticsProperty('container', _$this.container, defaultValue: null)); properties - .add(DiagnosticsProperty('flex', _$this.flex, defaultValue: null)); + .add(DiagnosticsProperty('layout', _$this.layout, defaultValue: null)); properties .add(DiagnosticsProperty('icon', _$this.icon, defaultValue: null)); properties @@ -134,14 +134,14 @@ mixin _$ButtonSpec on Spec { class ButtonSpecAttribute extends SpecAttribute with Diagnosticable { final BoxSpecAttribute? container; - final FlexSpecAttribute? flex; + final FlexSpecAttribute? layout; final IconSpecAttribute? icon; final TextSpecAttribute? label; final SpinnerSpecAttribute? spinner; const ButtonSpecAttribute({ this.container, - this.flex, + this.layout, this.icon, this.label, super.modifiers, @@ -161,7 +161,7 @@ class ButtonSpecAttribute extends SpecAttribute ButtonSpec resolve(MixData mix) { return ButtonSpec( container: container?.resolve(mix), - flex: flex?.resolve(mix), + layout: layout?.resolve(mix), icon: icon?.resolve(mix), label: label?.resolve(mix), modifiers: modifiers?.resolve(mix), @@ -184,7 +184,7 @@ class ButtonSpecAttribute extends SpecAttribute return ButtonSpecAttribute( container: container?.merge(other.container) ?? other.container, - flex: flex?.merge(other.flex) ?? other.flex, + layout: layout?.merge(other.layout) ?? other.layout, icon: icon?.merge(other.icon) ?? other.icon, label: label?.merge(other.label) ?? other.label, modifiers: modifiers?.merge(other.modifiers) ?? other.modifiers, @@ -200,7 +200,7 @@ class ButtonSpecAttribute extends SpecAttribute @override List get props => [ container, - flex, + layout, icon, label, modifiers, @@ -213,7 +213,7 @@ class ButtonSpecAttribute extends SpecAttribute super.debugFillProperties(properties); properties .add(DiagnosticsProperty('container', container, defaultValue: null)); - properties.add(DiagnosticsProperty('flex', flex, defaultValue: null)); + properties.add(DiagnosticsProperty('layout', layout, defaultValue: null)); properties.add(DiagnosticsProperty('icon', icon, defaultValue: null)); properties.add(DiagnosticsProperty('label', label, defaultValue: null)); properties @@ -233,8 +233,8 @@ class ButtonSpecUtility /// Utility for defining [ButtonSpecAttribute.container] late final container = BoxSpecUtility((v) => only(container: v)); - /// Utility for defining [ButtonSpecAttribute.flex] - late final flex = FlexSpecUtility((v) => only(flex: v)); + /// Utility for defining [ButtonSpecAttribute.layout] + late final layout = FlexSpecUtility((v) => only(layout: v)); /// Utility for defining [ButtonSpecAttribute.icon] late final icon = IconSpecUtility((v) => only(icon: v)); @@ -263,7 +263,7 @@ class ButtonSpecUtility @override T only({ BoxSpecAttribute? container, - FlexSpecAttribute? flex, + FlexSpecAttribute? layout, IconSpecAttribute? icon, TextSpecAttribute? label, WidgetModifiersDataDto? modifiers, @@ -272,7 +272,7 @@ class ButtonSpecUtility }) { return builder(ButtonSpecAttribute( container: container, - flex: flex, + layout: layout, icon: icon, label: label, modifiers: modifiers, diff --git a/packages/remix/lib/src/components/button/button_style.dart b/packages/remix/lib/src/components/button/button_style.dart index 9d8c69f97..930031d07 100644 --- a/packages/remix/lib/src/components/button/button_style.dart +++ b/packages/remix/lib/src/components/button/button_style.dart @@ -7,8 +7,8 @@ class ButtonStyle extends SpecStyle { Style makeStyle(SpecConfiguration spec) { final $ = spec.utilities; - final flexStyle = [ - $.flex.chain + final layoutStyle = [ + $.layout.chain ..mainAxisAlignment.center() ..crossAxisAlignment.center() ..mainAxisSize.min() @@ -41,14 +41,14 @@ class ButtonStyle extends SpecStyle { final containerStyle = [ $.container.chain ..borderRadius(6) - ..color.black() + ..color.red() ..padding.vertical(8) ..padding.horizontal(12), spec.on.disabled($.container.color.grey.shade400()), ]; return Style.create([ - ...flexStyle, + ...layoutStyle, ...iconStyle, ...labelStyle, ...containerStyle, diff --git a/packages/remix/lib/src/components/button/button_theme.dart b/packages/remix/lib/src/components/button/button_theme.dart index a4f63570c..0ba47bd61 100644 --- a/packages/remix/lib/src/components/button/button_theme.dart +++ b/packages/remix/lib/src/components/button/button_theme.dart @@ -20,7 +20,7 @@ class FortalezaButtonStyle extends ButtonStyle { $.container.chain ..padding.vertical.$space(2) ..padding.horizontal.$space(3), - $.flex.gap.$space(2), + $.layout.gap.$space(2), $.label.style.$text(2), $.icon.size(14), $.spinner.size(14), diff --git a/packages/remix/lib/src/components/button/button_widget.dart b/packages/remix/lib/src/components/button/button_widget.dart index 1c397ede1..c9bd3607c 100644 --- a/packages/remix/lib/src/components/button/button_widget.dart +++ b/packages/remix/lib/src/components/button/button_widget.dart @@ -1,19 +1,5 @@ part of 'button.dart'; -/// A customizable button component with various styling options. -/// -/// The [Button] allows you to create buttons with different variants, sizes, -/// and icons. You can also disable the button or show a loading state. -/// -/// Example usage: -/// -/// ```dart -/// RxButton( -/// label: 'Click me', -/// onPressed: () {}, -/// iconLeft: Icons.add, -/// ) -/// ``` class Button extends StatelessWidget { const Button({ super.key, @@ -23,82 +9,61 @@ class Button extends StatelessWidget { this.iconLeft, this.iconRight, this.spinnerBuilder, - this.variant, this.variants = const [], required this.onPressed, this.style, }); + /// The text content displayed in the center of the button. final String label; + + /// {@template remix.component.disabled} + /// When disabled, the component will not respond to user interaction and will + /// appear visually distinct to indicate its disabled state. + /// {@endtemplate} final bool disabled; + + /// {@template remix.component.loading} + /// When loading, the component will display a spinner and disable user + /// interaction. The component's content will be hidden but maintain its + /// space to prevent layout shifts. + /// {@endtemplate} final bool loading; + + /// The icon displayed in the left side of the button. final IconData? iconLeft; + + /// The icon displayed in the right side of the button. final IconData? iconRight; + + /// {@template remix.component.onPressed} + /// Called when the component is tapped. + /// If null or if [disabled] is true, the component will be disabled and won't + /// respond to touch. + /// {@endtemplate} final VoidCallback? onPressed; + + /// A builder that returns a [Widget] for the button's spinner. + /// + /// This builder creates a widget to display when the button is loading. + /// + /// {@macro remix.widget_spec_builder.text_spec} + /// + /// ```dart + /// Button( + /// label: 'Click me', + /// onPressed: () {}, + /// spinnerBuilder: (spec) => spec(), + /// ); + /// ``` final WidgetSpecBuilder? spinnerBuilder; - final Variant? variant; + /// {@macro remix.component.variants} final List variants; - /// Additional custom styling for the button. - /// - /// This allows you to override or extend the default button styling. + /// {@macro remix.component.style} final ButtonStyle? style; - @override - Widget build(BuildContext context) { - final isDisabled = disabled || loading; - - final style = this.style ?? context.remix.components.button; - final configuration = SpecConfiguration(context, ButtonSpecUtility.self); - - return Pressable( - enabled: !isDisabled, - onPress: disabled || loading ? null : onPressed, - child: SpecBuilder( - style: style.makeStyle(configuration).applyVariants([ - ...variants, - if (variant != null) variant!, - ]), - builder: (context) { - return ButtonSpecWidget( - label: label, - disabled: disabled, - loading: loading, - iconLeft: iconLeft, - iconRight: iconRight, - spinnerBuilder: spinnerBuilder, - onPressed: onPressed, - spec: ButtonSpec.of(context), - ); - }, - ), - ); - } -} - -class ButtonSpecWidget extends StatelessWidget { - const ButtonSpecWidget({ - super.key, - required this.label, - this.disabled = false, - this.loading = false, - this.iconLeft, - this.iconRight, - this.spinnerBuilder, - required this.onPressed, - this.spec, - }); - - final String label; - final bool disabled; - final bool loading; - final IconData? iconLeft; - final IconData? iconRight; - final VoidCallback? onPressed; - final WidgetSpecBuilder? spinnerBuilder; - final ButtonSpec? spec; - bool get _hasIcon => iconLeft != null || iconRight != null; Widget _buildLoadingOverlay(ButtonSpec spec, Widget child) { @@ -113,7 +78,7 @@ class ButtonSpecWidget extends StatelessWidget { } Widget _buildChildren(ButtonSpec spec) { - final flexWidget = spec.flex( + final flexWidget = spec.layout( direction: Axis.horizontal, children: [ if (iconLeft != null) spec.icon(iconLeft), @@ -128,8 +93,22 @@ class ButtonSpecWidget extends StatelessWidget { @override Widget build(BuildContext context) { - final spec = this.spec ?? const ButtonSpec(); + final isDisabled = disabled || loading; + + final style = this.style ?? context.remix.components.button; + final configuration = SpecConfiguration(context, ButtonSpecUtility.self); + + return Pressable( + enabled: !isDisabled, + onPress: disabled || loading ? null : onPressed, + child: SpecBuilder( + style: style.makeStyle(configuration).applyVariants(variants), + builder: (context) { + final spec = ButtonSpec.of(context); - return spec.container(child: _buildChildren(spec)); + return spec.container(child: _buildChildren(spec)); + }, + ), + ); } } diff --git a/packages/remix/lib/src/components/callout/callout_widget.dart b/packages/remix/lib/src/components/callout/callout_widget.dart index 1ab33b6cb..1a2406a73 100644 --- a/packages/remix/lib/src/components/callout/callout_widget.dart +++ b/packages/remix/lib/src/components/callout/callout_widget.dart @@ -9,13 +9,16 @@ class Callout extends StatelessWidget { this.style, }); + /// The text content displayed in the callout. final String text; + + /// The icon displayed in the callout. final IconData? icon; + + /// {@macro remix.component.variants} final List variants; - /// Additional custom styling for the callout. - /// - /// This allows you to override or extend the default callout styling. + /// {@macro remix.component.style} final CalloutStyle? style; @override diff --git a/packages/remix/lib/src/components/card/card.dart b/packages/remix/lib/src/components/card/card.dart index b2641801a..f8a65e575 100644 --- a/packages/remix/lib/src/components/card/card.dart +++ b/packages/remix/lib/src/components/card/card.dart @@ -24,10 +24,6 @@ base class CardSpec extends Spec with _$CardSpec, Diagnosticable { const CardSpec({BoxSpec? container, super.modifiers, super.animated}) : container = container ?? const BoxSpec(); - Widget call({Key? key, required Widget child}) { - return CardSpecWidget(key: key, spec: this, child: child); - } - @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); diff --git a/packages/remix/lib/src/components/card/card_widget.dart b/packages/remix/lib/src/components/card/card_widget.dart index cab52786a..ca5d22a71 100644 --- a/packages/remix/lib/src/components/card/card_widget.dart +++ b/packages/remix/lib/src/components/card/card_widget.dart @@ -11,10 +11,10 @@ class Card extends StatelessWidget { /// The list of child widgets to be displayed inside the card. final Widget child; - /// Additional custom styling for the card. - /// - /// This allows you to override or extend the default card styling. + /// {@macro remix.component.style} final CardStyle? style; + + /// {@macro remix.component.variants} final List variants; @override @@ -28,20 +28,8 @@ class Card extends StatelessWidget { builder: (context) { final spec = CardSpec.of(context); - return CardSpecWidget(spec: spec, child: child); + return spec.container(child: child); }, ); } } - -class CardSpecWidget extends StatelessWidget { - const CardSpecWidget({super.key, required this.spec, required this.child}); - - final CardSpec? spec; - final Widget child; - - @override - Widget build(BuildContext context) { - return spec!.container(child: child); - } -} diff --git a/packages/remix/lib/src/components/checkbox/checkbox.dart b/packages/remix/lib/src/components/checkbox/checkbox.dart index c61257d01..bc3f6d950 100644 --- a/packages/remix/lib/src/components/checkbox/checkbox.dart +++ b/packages/remix/lib/src/components/checkbox/checkbox.dart @@ -14,21 +14,27 @@ part 'checkbox_widget.dart'; @MixableSpec() base class CheckboxSpec extends Spec with _$CheckboxSpec, Diagnosticable { - final BoxSpec container; - final IconSpec indicator; + final FlexSpec layout; + final BoxSpec indicatorContainer; + final IconSpec indicatorIcon; + final TextSpec label; - /// {@macro button_spec_of} + /// {@macro checkbox_spec_of} static const of = _$CheckboxSpec.of; static const from = _$CheckboxSpec.from; const CheckboxSpec({ - BoxSpec? container, - IconSpec? indicator, + BoxSpec? indicatorContainer, + IconSpec? indicatorIcon, + FlexSpec? layout, + TextSpec? label, super.modifiers, super.animated, - }) : container = container ?? const BoxSpec(), - indicator = indicator ?? const IconSpec(); + }) : indicatorContainer = indicatorContainer ?? const BoxSpec(), + indicatorIcon = indicatorIcon ?? const IconSpec(), + layout = layout ?? const FlexSpec(), + label = label ?? const TextSpec(); @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { diff --git a/packages/remix/lib/src/components/checkbox/checkbox.g.dart b/packages/remix/lib/src/components/checkbox/checkbox.g.dart index 6c2c2d79a..2e3b72c80 100644 --- a/packages/remix/lib/src/components/checkbox/checkbox.g.dart +++ b/packages/remix/lib/src/components/checkbox/checkbox.g.dart @@ -33,14 +33,18 @@ mixin _$CheckboxSpec on Spec { /// replaced with the new values. @override CheckboxSpec copyWith({ - BoxSpec? container, - IconSpec? indicator, + BoxSpec? indicatorContainer, + IconSpec? indicatorIcon, + FlexSpec? layout, + TextSpec? label, WidgetModifiersData? modifiers, AnimatedData? animated, }) { return CheckboxSpec( - container: container ?? _$this.container, - indicator: indicator ?? _$this.indicator, + indicatorContainer: indicatorContainer ?? _$this.indicatorContainer, + indicatorIcon: indicatorIcon ?? _$this.indicatorIcon, + layout: layout ?? _$this.layout, + label: label ?? _$this.label, modifiers: modifiers ?? _$this.modifiers, animated: animated ?? _$this.animated, ); @@ -57,8 +61,10 @@ mixin _$CheckboxSpec on Spec { /// The interpolation is performed on each property of the [CheckboxSpec] using the appropriate /// interpolation method: /// - /// - [BoxSpec.lerp] for [container]. - /// - [IconSpec.lerp] for [indicator]. + /// - [BoxSpec.lerp] for [indicatorContainer]. + /// - [IconSpec.lerp] for [indicatorIcon]. + /// - [FlexSpec.lerp] for [layout]. + /// - [TextSpec.lerp] for [label]. /// For [modifiers] and [animated], the interpolation is performed using a step function. /// If [t] is less than 0.5, the value from the current [CheckboxSpec] is used. Otherwise, the value @@ -71,8 +77,11 @@ mixin _$CheckboxSpec on Spec { if (other == null) return _$this; return CheckboxSpec( - container: _$this.container.lerp(other.container, t), - indicator: _$this.indicator.lerp(other.indicator, t), + indicatorContainer: + _$this.indicatorContainer.lerp(other.indicatorContainer, t), + indicatorIcon: _$this.indicatorIcon.lerp(other.indicatorIcon, t), + layout: _$this.layout.lerp(other.layout, t), + label: _$this.label.lerp(other.label, t), modifiers: other.modifiers, animated: t < 0.5 ? _$this.animated : other.animated, ); @@ -84,8 +93,10 @@ mixin _$CheckboxSpec on Spec { /// compare two [CheckboxSpec] instances for equality. @override List get props => [ - _$this.container, - _$this.indicator, + _$this.indicatorContainer, + _$this.indicatorIcon, + _$this.layout, + _$this.label, _$this.modifiers, _$this.animated, ]; @@ -93,10 +104,15 @@ mixin _$CheckboxSpec on Spec { CheckboxSpec get _$this => this as CheckboxSpec; void _debugFillProperties(DiagnosticPropertiesBuilder properties) { - properties.add( - DiagnosticsProperty('container', _$this.container, defaultValue: null)); - properties.add( - DiagnosticsProperty('indicator', _$this.indicator, defaultValue: null)); + properties.add(DiagnosticsProperty( + 'indicatorContainer', _$this.indicatorContainer, + defaultValue: null)); + properties.add(DiagnosticsProperty('indicatorIcon', _$this.indicatorIcon, + defaultValue: null)); + properties + .add(DiagnosticsProperty('layout', _$this.layout, defaultValue: null)); + properties + .add(DiagnosticsProperty('label', _$this.label, defaultValue: null)); properties.add( DiagnosticsProperty('modifiers', _$this.modifiers, defaultValue: null)); properties.add( @@ -113,12 +129,16 @@ mixin _$CheckboxSpec on Spec { /// the [CheckboxSpec] constructor. base class CheckboxSpecAttribute extends SpecAttribute with Diagnosticable { - final BoxSpecAttribute? container; - final IconSpecAttribute? indicator; + final BoxSpecAttribute? indicatorContainer; + final IconSpecAttribute? indicatorIcon; + final FlexSpecAttribute? layout; + final TextSpecAttribute? label; const CheckboxSpecAttribute({ - this.container, - this.indicator, + this.indicatorContainer, + this.indicatorIcon, + this.layout, + this.label, super.modifiers, super.animated, }); @@ -134,8 +154,10 @@ base class CheckboxSpecAttribute extends SpecAttribute @override CheckboxSpec resolve(MixData mix) { return CheckboxSpec( - container: container?.resolve(mix), - indicator: indicator?.resolve(mix), + indicatorContainer: indicatorContainer?.resolve(mix), + indicatorIcon: indicatorIcon?.resolve(mix), + layout: layout?.resolve(mix), + label: label?.resolve(mix), modifiers: modifiers?.resolve(mix), animated: animated?.resolve(mix) ?? mix.animation, ); @@ -154,8 +176,12 @@ base class CheckboxSpecAttribute extends SpecAttribute if (other == null) return this; return CheckboxSpecAttribute( - container: container?.merge(other.container) ?? other.container, - indicator: indicator?.merge(other.indicator) ?? other.indicator, + indicatorContainer: indicatorContainer?.merge(other.indicatorContainer) ?? + other.indicatorContainer, + indicatorIcon: + indicatorIcon?.merge(other.indicatorIcon) ?? other.indicatorIcon, + layout: layout?.merge(other.layout) ?? other.layout, + label: label?.merge(other.label) ?? other.label, modifiers: modifiers?.merge(other.modifiers) ?? other.modifiers, animated: animated?.merge(other.animated) ?? other.animated, ); @@ -167,8 +193,10 @@ base class CheckboxSpecAttribute extends SpecAttribute /// compare two [CheckboxSpecAttribute] instances for equality. @override List get props => [ - container, - indicator, + indicatorContainer, + indicatorIcon, + layout, + label, modifiers, animated, ]; @@ -176,10 +204,12 @@ base class CheckboxSpecAttribute extends SpecAttribute @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); - properties - .add(DiagnosticsProperty('container', container, defaultValue: null)); - properties - .add(DiagnosticsProperty('indicator', indicator, defaultValue: null)); + properties.add(DiagnosticsProperty('indicatorContainer', indicatorContainer, + defaultValue: null)); + properties.add(DiagnosticsProperty('indicatorIcon', indicatorIcon, + defaultValue: null)); + properties.add(DiagnosticsProperty('layout', layout, defaultValue: null)); + properties.add(DiagnosticsProperty('label', label, defaultValue: null)); properties .add(DiagnosticsProperty('modifiers', modifiers, defaultValue: null)); properties @@ -193,11 +223,18 @@ base class CheckboxSpecAttribute extends SpecAttribute /// Use the methods of this class to configure specific properties of a [CheckboxSpec]. class CheckboxSpecUtility extends SpecUtility { - /// Utility for defining [CheckboxSpecAttribute.container] - late final container = BoxSpecUtility((v) => only(container: v)); + /// Utility for defining [CheckboxSpecAttribute.indicatorContainer] + late final indicatorContainer = + BoxSpecUtility((v) => only(indicatorContainer: v)); + + /// Utility for defining [CheckboxSpecAttribute.indicatorIcon] + late final indicatorIcon = IconSpecUtility((v) => only(indicatorIcon: v)); + + /// Utility for defining [CheckboxSpecAttribute.layout] + late final layout = FlexSpecUtility((v) => only(layout: v)); - /// Utility for defining [CheckboxSpecAttribute.indicator] - late final indicator = IconSpecUtility((v) => only(indicator: v)); + /// Utility for defining [CheckboxSpecAttribute.label] + late final label = TextSpecUtility((v) => only(label: v)); /// Utility for defining [CheckboxSpecAttribute.modifiers] late final wrap = SpecModifierUtility((v) => only(modifiers: v)); @@ -216,14 +253,18 @@ class CheckboxSpecUtility /// Returns a new [CheckboxSpecAttribute] with the specified properties. @override T only({ - BoxSpecAttribute? container, - IconSpecAttribute? indicator, + BoxSpecAttribute? indicatorContainer, + IconSpecAttribute? indicatorIcon, + FlexSpecAttribute? layout, + TextSpecAttribute? label, WidgetModifiersDataDto? modifiers, AnimatedDataDto? animated, }) { return builder(CheckboxSpecAttribute( - container: container, - indicator: indicator, + indicatorContainer: indicatorContainer, + indicatorIcon: indicatorIcon, + layout: layout, + label: label, modifiers: modifiers, animated: animated, )); diff --git a/packages/remix/lib/src/components/checkbox/checkbox_style.dart b/packages/remix/lib/src/components/checkbox/checkbox_style.dart index d6534c0fe..f4ce858ee 100644 --- a/packages/remix/lib/src/components/checkbox/checkbox_style.dart +++ b/packages/remix/lib/src/components/checkbox/checkbox_style.dart @@ -8,25 +8,48 @@ class CheckboxStyle extends SpecStyle { final $ = spec.utilities; final containerStyle = [ - $.container.chain + $.indicatorContainer.chain ..borderRadius(4) ..border.all.color.black(), - spec.on.selected($.container.color.black()), - spec.on.disabled( - $.container.border.all.color.grey(), - spec.on.selected($.container.color.grey()), - ), + spec.on.selected($.indicatorContainer.color.black()), ]; final indicatorStyle = [ - $.indicator.chain + $.indicatorIcon.chain ..size(16) ..color.white() ..wrap.opacity(0), - spec.on.selected($.indicator.wrap.opacity(1), $.indicator.color.white()), + spec.on.selected( + $.indicatorIcon.wrap.opacity(1), + $.indicatorIcon.color.white(), + ), ]; - return Style.create([...containerStyle, ...indicatorStyle]); + final labelStyle = $.label.chain + ..style.color.black() + ..style.fontSize(14) + ..style.fontWeight.w500() + ..textHeightBehavior.heightToFirstAscent.off(); + + final layoutStyle = $.layout.chain + ..crossAxisAlignment.center() + ..mainAxisAlignment.start() + ..mainAxisSize.min() + ..gap(8); + + final disabledStyle = spec.on.disabled( + $.indicatorContainer.border.all.color.grey(), + $.label.style.color.grey(), + spec.on.selected($.indicatorContainer.color.grey()), + ); + + return Style.create([ + ...containerStyle, + ...indicatorStyle, + labelStyle, + layoutStyle, + disabledStyle, + ]); } } @@ -39,10 +62,12 @@ class CheckboxDarkStyle extends CheckboxStyle { return Style.create([ super.makeStyle(spec).call(), - $.container.border.all.color.white(), - $.indicator.color.black(), - spec.on.selected($.container.color.white()), - spec.on.selected($.indicator.color.black()), + $.indicatorContainer.border.all.color.white(), + $.indicatorIcon.color.black(), + spec.on.selected( + $.indicatorContainer.color.white(), + $.indicatorIcon.color.black(), + ), ]); } } diff --git a/packages/remix/lib/src/components/checkbox/checkbox_theme.dart b/packages/remix/lib/src/components/checkbox/checkbox_theme.dart index 0111e59ac..8a2962de3 100644 --- a/packages/remix/lib/src/components/checkbox/checkbox_theme.dart +++ b/packages/remix/lib/src/components/checkbox/checkbox_theme.dart @@ -13,36 +13,41 @@ class FortalezaCheckboxStyle extends CheckboxStyle { final baseStyle = super.makeStyle(spec); final baseOverrides = Style( - $.container.chain + $.indicatorContainer.chain ..border.all.width(0) ..border.all.style.none(), - $.indicator.chain + $.indicatorContainer.chain ..wrap.opacity(0) ..wrap.scale(0.5), - spec.on.selected($.indicator.wrap.opacity(1), $.indicator.wrap.scale(1)), + $.label.style.color.$neutral(12), + spec.on.selected( + $.indicatorContainer.wrap.opacity(1), + $.indicatorContainer.wrap.scale(1), + ), ); final surfaceVariant = Style( - $.container.chain + $.indicatorContainer.chain ..border.strokeAlign(BorderSide.strokeAlignInside) ..border.color.$neutral(9) ..border.style.solid(), - $.indicator.color.$white(), - spec.on.hover($.container.color.$neutral(3)), + $.indicatorIcon.color.$white(), + spec.on.hover($.indicatorContainer.color.$neutral(3)), spec.on.selected( - $.container.chain + $.indicatorContainer.chain ..color.transparent() ..border.width(0) ..border.style.none() ..color.$accent(9), ), - (spec.on.hover & spec.on.selected)($.container.color.$accent(11)), + (spec.on.hover & + spec.on.selected)($.indicatorContainer.color.$accent(11)), spec.on.disabled( - $.container.color.$neutral(3), - $.container.border.all.color.$neutral(9), + $.indicatorContainer.color.$neutral(3), + $.indicatorContainer.border.all.color.$neutral(9), spec.on.selected( - $.indicator.color.$neutral(8), - $.container.chain + $.indicatorIcon.color.$neutral(8), + $.indicatorContainer.chain ..color.$neutral(3) ..border.width(1) ..border.all.color.$neutral(8) @@ -52,27 +57,29 @@ class FortalezaCheckboxStyle extends CheckboxStyle { ); final softVariant = Style( - $.container.border.style.none(), - $.container.color.$accentAlpha(6), - $.indicator.color.$accentAlpha(11), - spec.on.hover($.container.color.$accentAlpha(5)), - (spec.on.hover & spec.on.selected)($.container.color.$accentAlpha(5)), + $.indicatorContainer.border.style.none(), + $.indicatorContainer.color.$accentAlpha(6), + $.indicatorIcon.color.$accentAlpha(11), + spec.on.hover($.indicatorContainer.color.$accentAlpha(5)), + (spec.on.hover & + spec.on.selected)($.indicatorContainer.color.$accentAlpha(5)), spec.on.selected( - $.container.color.$accentAlpha(6), - $.indicator.color.$accentAlpha(11), + $.indicatorContainer.color.$accentAlpha(6), + $.indicatorIcon.color.$accentAlpha(11), ), spec.on.disabled( - $.container.color.$neutral(4), - spec.on.selected($.container.color.$neutral(3)), - spec.on.selected($.container.border.style.none()), + $.indicatorContainer.color.$neutral(4), + spec.on.selected($.indicatorContainer.color.$neutral(3)), + spec.on.selected($.indicatorContainer.border.style.none()), ), ); final disabledVariant = Style( - $.container.chain + $.indicatorContainer.chain ..color.$neutral(3) ..border.color.$neutral(5), - $.indicator.color.$neutral(7), + $.indicatorIcon.color.$neutral(7), + $.label.style.color.$neutral(9), ); return Style.create( @@ -80,7 +87,7 @@ class FortalezaCheckboxStyle extends CheckboxStyle { baseStyle(), baseOverrides(), spec.on.disabled(disabledVariant()), - $.container.border.style.none(), + $.indicatorContainer.border.style.none(), surfaceVariant(), soft(softVariant()), ], diff --git a/packages/remix/lib/src/components/checkbox/checkbox_widget.dart b/packages/remix/lib/src/components/checkbox/checkbox_widget.dart index 6e828ff14..1cb641db4 100644 --- a/packages/remix/lib/src/components/checkbox/checkbox_widget.dart +++ b/packages/remix/lib/src/components/checkbox/checkbox_widget.dart @@ -10,16 +10,33 @@ class Checkbox extends StatefulWidget { this.iconUnchecked, this.style, this.variants = const [], + this.label, }); + /// Whether the checkbox is disabled. final bool disabled; + + /// Whether the checkbox is checked. final bool value; + + /// The icon to display when the checkbox is checked. final IconData iconChecked; + + /// The icon to display when the checkbox is unchecked. final IconData? iconUnchecked; + + /// The callback function that is called when the checkbox is tapped. final ValueChanged? onChanged; + + /// {@macro remix.component.style} final CheckboxStyle? style; + + /// {@macro remix.component.variants} final List variants; + /// An optional label that will be displayed next to the checkbox. + final String? label; + @override State createState() => _CheckboxState(); } @@ -76,15 +93,22 @@ class _CheckboxState extends State { builder: (context) { final spec = CheckboxSpec.of(context); - final ContainerWidget = spec.container; - final IconWidget = spec.indicator; + final ContainerWidget = spec.indicatorContainer; + final ContainerLayout = spec.layout; + final IconWidget = spec.indicatorIcon; - return ContainerWidget( - child: IconWidget( - widget.value - ? widget.iconChecked - : widget.iconUnchecked ?? widget.iconChecked, - ), + return ContainerLayout( + direction: Axis.horizontal, + children: [ + ContainerWidget( + child: IconWidget( + widget.value + ? widget.iconChecked + : widget.iconUnchecked ?? widget.iconChecked, + ), + ), + if (widget.label != null) spec.label(widget.label!), + ], ); }, ), diff --git a/packages/remix/lib/src/components/checkbox_group/checkbox_group.dart b/packages/remix/lib/src/components/checkbox_group/checkbox_group.dart deleted file mode 100644 index 39571a3cd..000000000 --- a/packages/remix/lib/src/components/checkbox_group/checkbox_group.dart +++ /dev/null @@ -1,68 +0,0 @@ -// import 'package:flutter/widgets.dart'; -// import 'package:mix/mix.dart'; -// import '../checkbox/checkbox.dart'; - -// class RxCheckboxGroup extends StatefulWidget { -// const RxCheckboxGroup({ -// super.key, -// required this.items, -// this.defaultValue = const [], -// this.onValueChange, -// this.size = CheckboxSize.medium, -// this.variant = CheckboxVariant.soft, -// }); - -// final List items; -// final List defaultValue; -// final ValueChanged>? onValueChange; -// final CheckboxSize size; -// final CheckboxVariant variant; - -// @override -// _RxCheckboxGroupState createState() => _RxCheckboxGroupState(); -// } - -// class _RxCheckboxGroupState extends State { -// late List _selectedValues; - -// @override -// void initState() { -// super.initState(); -// _selectedValues = List.of(widget.defaultValue); -// } - -// void _handleValueChange(String value, bool isSelected) { -// setState(() { -// if (isSelected) { -// _selectedValues.add(value); -// } else { -// _selectedValues.remove(value); -// } -// }); - -// widget.onValueChange?.call(_selectedValues); -// } - -// @override -// Widget build(BuildContext context) { -// return Column( -// children: widget.items.map((item) { -// final isSelected = _selectedValues.contains(item.value); - -// return RxCheckbox( -// value: isSelected, -// onChanged: (isSelected) => _handleValueChange(item.value, isSelected), -// style: item.style, -// size: widget.size, -// variant: widget.variant, -// ); -// }).toList(), -// ); -// } -// } - -// class RxCheckboxItem { -// final String value; -// final Style? style; -// const RxCheckboxItem({required this.value, this.style}); -// } diff --git a/packages/remix/lib/src/components/chip/chip.dart b/packages/remix/lib/src/components/chip/chip.dart index 38b8bf451..3a837a6d9 100644 --- a/packages/remix/lib/src/components/chip/chip.dart +++ b/packages/remix/lib/src/components/chip/chip.dart @@ -8,31 +8,30 @@ import '../../theme/remix_theme.dart'; import '../../theme/remix_tokens.dart'; part 'chip.g.dart'; - part 'chip_style.dart'; part 'chip_theme.dart'; part 'chip_widget.dart'; @MixableSpec() class ChipSpec extends Spec with _$ChipSpec, Diagnosticable { - final FlexSpec flex; + final FlexSpec layout; final BoxSpec container; final IconSpec icon; final TextSpec label; - /// {@macro button_spec_of} + /// {@macro chip_spec_of} static const of = _$ChipSpec.of; static const from = _$ChipSpec.from; const ChipSpec({ BoxSpec? container, - FlexSpec? flex, + FlexSpec? layout, IconSpec? icon, TextSpec? label, super.modifiers, super.animated, - }) : flex = flex ?? const FlexSpec(), + }) : layout = layout ?? const FlexSpec(), container = container ?? const BoxSpec(), icon = icon ?? const IconSpec(), label = label ?? const TextSpec(); diff --git a/packages/remix/lib/src/components/chip/chip.g.dart b/packages/remix/lib/src/components/chip/chip.g.dart index 0cce7d02c..796052837 100644 --- a/packages/remix/lib/src/components/chip/chip.g.dart +++ b/packages/remix/lib/src/components/chip/chip.g.dart @@ -34,7 +34,7 @@ mixin _$ChipSpec on Spec { @override ChipSpec copyWith({ BoxSpec? container, - FlexSpec? flex, + FlexSpec? layout, IconSpec? icon, TextSpec? label, WidgetModifiersData? modifiers, @@ -42,7 +42,7 @@ mixin _$ChipSpec on Spec { }) { return ChipSpec( container: container ?? _$this.container, - flex: flex ?? _$this.flex, + layout: layout ?? _$this.layout, icon: icon ?? _$this.icon, label: label ?? _$this.label, modifiers: modifiers ?? _$this.modifiers, @@ -62,7 +62,7 @@ mixin _$ChipSpec on Spec { /// interpolation method: /// /// - [BoxSpec.lerp] for [container]. - /// - [FlexSpec.lerp] for [flex]. + /// - [FlexSpec.lerp] for [layout]. /// - [IconSpec.lerp] for [icon]. /// - [TextSpec.lerp] for [label]. @@ -78,7 +78,7 @@ mixin _$ChipSpec on Spec { return ChipSpec( container: _$this.container.lerp(other.container, t), - flex: _$this.flex.lerp(other.flex, t), + layout: _$this.layout.lerp(other.layout, t), icon: _$this.icon.lerp(other.icon, t), label: _$this.label.lerp(other.label, t), modifiers: other.modifiers, @@ -93,7 +93,7 @@ mixin _$ChipSpec on Spec { @override List get props => [ _$this.container, - _$this.flex, + _$this.layout, _$this.icon, _$this.label, _$this.modifiers, @@ -106,7 +106,7 @@ mixin _$ChipSpec on Spec { properties.add( DiagnosticsProperty('container', _$this.container, defaultValue: null)); properties - .add(DiagnosticsProperty('flex', _$this.flex, defaultValue: null)); + .add(DiagnosticsProperty('layout', _$this.layout, defaultValue: null)); properties .add(DiagnosticsProperty('icon', _$this.icon, defaultValue: null)); properties @@ -127,13 +127,13 @@ mixin _$ChipSpec on Spec { /// the [ChipSpec] constructor. class ChipSpecAttribute extends SpecAttribute with Diagnosticable { final BoxSpecAttribute? container; - final FlexSpecAttribute? flex; + final FlexSpecAttribute? layout; final IconSpecAttribute? icon; final TextSpecAttribute? label; const ChipSpecAttribute({ this.container, - this.flex, + this.layout, this.icon, this.label, super.modifiers, @@ -152,7 +152,7 @@ class ChipSpecAttribute extends SpecAttribute with Diagnosticable { ChipSpec resolve(MixData mix) { return ChipSpec( container: container?.resolve(mix), - flex: flex?.resolve(mix), + layout: layout?.resolve(mix), icon: icon?.resolve(mix), label: label?.resolve(mix), modifiers: modifiers?.resolve(mix), @@ -174,7 +174,7 @@ class ChipSpecAttribute extends SpecAttribute with Diagnosticable { return ChipSpecAttribute( container: container?.merge(other.container) ?? other.container, - flex: flex?.merge(other.flex) ?? other.flex, + layout: layout?.merge(other.layout) ?? other.layout, icon: icon?.merge(other.icon) ?? other.icon, label: label?.merge(other.label) ?? other.label, modifiers: modifiers?.merge(other.modifiers) ?? other.modifiers, @@ -189,7 +189,7 @@ class ChipSpecAttribute extends SpecAttribute with Diagnosticable { @override List get props => [ container, - flex, + layout, icon, label, modifiers, @@ -201,7 +201,7 @@ class ChipSpecAttribute extends SpecAttribute with Diagnosticable { super.debugFillProperties(properties); properties .add(DiagnosticsProperty('container', container, defaultValue: null)); - properties.add(DiagnosticsProperty('flex', flex, defaultValue: null)); + properties.add(DiagnosticsProperty('layout', layout, defaultValue: null)); properties.add(DiagnosticsProperty('icon', icon, defaultValue: null)); properties.add(DiagnosticsProperty('label', label, defaultValue: null)); properties @@ -220,8 +220,8 @@ class ChipSpecUtility /// Utility for defining [ChipSpecAttribute.container] late final container = BoxSpecUtility((v) => only(container: v)); - /// Utility for defining [ChipSpecAttribute.flex] - late final flex = FlexSpecUtility((v) => only(flex: v)); + /// Utility for defining [ChipSpecAttribute.layout] + late final layout = FlexSpecUtility((v) => only(layout: v)); /// Utility for defining [ChipSpecAttribute.icon] late final icon = IconSpecUtility((v) => only(icon: v)); @@ -247,7 +247,7 @@ class ChipSpecUtility @override T only({ BoxSpecAttribute? container, - FlexSpecAttribute? flex, + FlexSpecAttribute? layout, IconSpecAttribute? icon, TextSpecAttribute? label, WidgetModifiersDataDto? modifiers, @@ -255,7 +255,7 @@ class ChipSpecUtility }) { return builder(ChipSpecAttribute( container: container, - flex: flex, + layout: layout, icon: icon, label: label, modifiers: modifiers, diff --git a/packages/remix/lib/src/components/chip/chip_style.dart b/packages/remix/lib/src/components/chip/chip_style.dart index def6f6fca..a800d28c1 100644 --- a/packages/remix/lib/src/components/chip/chip_style.dart +++ b/packages/remix/lib/src/components/chip/chip_style.dart @@ -7,8 +7,8 @@ class ChipStyle extends SpecStyle { Style makeStyle(SpecConfiguration spec) { final $ = spec.utilities; - final flexStyle = [ - $.flex.chain + final layoutStyle = [ + $.layout.chain ..mainAxisAlignment.center() ..crossAxisAlignment.center() ..mainAxisSize.min() @@ -17,7 +17,7 @@ class ChipStyle extends SpecStyle { final iconStyle = [ $.icon.chain - ..size(20) + ..size(18) ..color.black(), ]; @@ -40,17 +40,20 @@ class ChipStyle extends SpecStyle { ..padding.vertical(8) ..padding.horizontal(12), spec.on.selected($.container.color.grey.shade200()), - spec.on.disabled( - $.label.style.color.grey.shade800(), - spec.on.selected($.container.color.grey.shade300()), - ), ]; + final disabledStyle = spec.on.disabled( + $.label.style.color.grey.shade600(), + $.icon.color.grey.shade600(), + spec.on.selected($.container.color.grey.shade300()), + ); + return Style.create([ - ...flexStyle, + ...layoutStyle, ...iconStyle, ...labelStyle, ...containerStyle, + disabledStyle, ]); } } @@ -66,9 +69,11 @@ class ChipDarkStyle extends ChipStyle { $.container.chain ..border.all.color.grey.shade900() ..color.black(), + $.icon.color.white(), spec.on.selected($.container.color.grey.shade900()), spec.on.disabled( $.label.style.color.grey.shade600(), + $.icon.color.grey.shade600(), $.container.color.black(), spec.on.selected($.container.color.grey.shade900()), ), diff --git a/packages/remix/lib/src/components/chip/chip_theme.dart b/packages/remix/lib/src/components/chip/chip_theme.dart index debd7c299..4c55c6f94 100644 --- a/packages/remix/lib/src/components/chip/chip_theme.dart +++ b/packages/remix/lib/src/components/chip/chip_theme.dart @@ -11,7 +11,7 @@ class FortalezaChipStyle extends ChipStyle { Style makeStyle(SpecConfiguration spec) { final $ = spec.utilities; - final flexStyle = [$.flex.gap.$space(2)]; + final layoutStyle = [$.layout.gap.$space(2)]; final iconStyle = [$.icon.color.$accent()]; @@ -33,13 +33,13 @@ class FortalezaChipStyle extends ChipStyle { ]; final disabledStyle = [ - (spec.on.disabled)( + spec.on.disabled( $.container.border.color.$neutral(4), $.container.color.$neutral(2), $.label.style.color.$neutral(8), $.icon.color.$neutral(8), + spec.on.selected($.container.color.$neutral(4)), ), - (spec.on.disabled & spec.on.selected)($.container.color.$neutral(4)), ]; final ghostStyle = Style.create([ @@ -54,13 +54,13 @@ class FortalezaChipStyle extends ChipStyle { spec.on.disabled( $.container.color.$neutral(2), $.icon.color.$neutral(8), + (spec.on.selected)($.container.color.$neutral(4)), ), - (spec.on.disabled & spec.on.selected)($.container.color.$neutral(4)), ]); return Style.create([ super.makeStyle(spec).call(), - ...flexStyle, + ...layoutStyle, ...iconStyle, ...labelStyle, ...containerStyle, diff --git a/packages/remix/lib/src/components/chip/chip_widget.dart b/packages/remix/lib/src/components/chip/chip_widget.dart index 0c2af005a..46b52343d 100644 --- a/packages/remix/lib/src/components/chip/chip_widget.dart +++ b/packages/remix/lib/src/components/chip/chip_widget.dart @@ -13,13 +13,32 @@ class Chip extends StatefulWidget { this.style, }); + /// Whether the chip is selected or not. final bool value; + + /// The text content displayed in the center of the component. final String? label; + + /// The icon displayed in the left side of the component. final IconData? iconLeft; + + /// The icon displayed in the right side of the component. final IconData? iconRight; + + /// {@template remix.component.onChanged} + /// Called when the component is tapped. + /// If null or if [disabled] is true, the component will be disabled and won't + /// respond to touch. + /// {@endtemplate} final void Function(bool)? onChanged; + + /// {@macro remix.component.disabled} final bool disabled; + + /// {@macro remix.component.variants} final List variants; + + /// {@macro remix.component.style} final ChipStyle? style; @override @@ -74,7 +93,7 @@ class _ChipState extends State { final spec = ChipSpec.of(context); return spec.container( - child: spec.flex( + child: spec.layout( direction: Axis.horizontal, children: [ if (widget.iconLeft != null) spec.icon(widget.iconLeft), diff --git a/packages/remix/lib/src/components/dialog/dialog.dart b/packages/remix/lib/src/components/dialog/dialog.dart index 47a80ec92..3b0d2d684 100644 --- a/packages/remix/lib/src/components/dialog/dialog.dart +++ b/packages/remix/lib/src/components/dialog/dialog.dart @@ -86,8 +86,8 @@ class DialogSpec extends Spec with _$DialogSpec, Diagnosticable { final BoxSpec container; final TextSpec title; final TextSpec description; - final FlexSpec mainFlex; - final FlexSpec actionsFlex; + final FlexSpec containerLayout; + final FlexSpec actionsLayout; /// {@macro dialog_spec_of} static const of = _$DialogSpec.of; @@ -98,15 +98,15 @@ class DialogSpec extends Spec with _$DialogSpec, Diagnosticable { BoxSpec? container, TextSpec? title, TextSpec? description, - FlexSpec? mainFlex, - FlexSpec? actionsFlex, + FlexSpec? containerLayout, + FlexSpec? actionsLayout, super.modifiers, super.animated, }) : container = container ?? const BoxSpec(), title = title ?? const TextSpec(), description = description ?? const TextSpec(), - mainFlex = mainFlex ?? const FlexSpec(), - actionsFlex = actionsFlex ?? const FlexSpec(); + containerLayout = containerLayout ?? const FlexSpec(), + actionsLayout = actionsLayout ?? const FlexSpec(); @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { diff --git a/packages/remix/lib/src/components/dialog/dialog.g.dart b/packages/remix/lib/src/components/dialog/dialog.g.dart index 9e9eea992..23532ee59 100644 --- a/packages/remix/lib/src/components/dialog/dialog.g.dart +++ b/packages/remix/lib/src/components/dialog/dialog.g.dart @@ -36,8 +36,8 @@ mixin _$DialogSpec on Spec { BoxSpec? container, TextSpec? title, TextSpec? description, - FlexSpec? mainFlex, - FlexSpec? actionsFlex, + FlexSpec? containerLayout, + FlexSpec? actionsLayout, WidgetModifiersData? modifiers, AnimatedData? animated, }) { @@ -45,8 +45,8 @@ mixin _$DialogSpec on Spec { container: container ?? _$this.container, title: title ?? _$this.title, description: description ?? _$this.description, - mainFlex: mainFlex ?? _$this.mainFlex, - actionsFlex: actionsFlex ?? _$this.actionsFlex, + containerLayout: containerLayout ?? _$this.containerLayout, + actionsLayout: actionsLayout ?? _$this.actionsLayout, modifiers: modifiers ?? _$this.modifiers, animated: animated ?? _$this.animated, ); @@ -65,7 +65,7 @@ mixin _$DialogSpec on Spec { /// /// - [BoxSpec.lerp] for [container]. /// - [TextSpec.lerp] for [title] and [description]. - /// - [FlexSpec.lerp] for [mainFlex] and [actionsFlex]. + /// - [FlexSpec.lerp] for [containerLayout] and [actionsLayout]. /// For [modifiers] and [animated], the interpolation is performed using a step function. /// If [t] is less than 0.5, the value from the current [DialogSpec] is used. Otherwise, the value @@ -81,8 +81,8 @@ mixin _$DialogSpec on Spec { container: _$this.container.lerp(other.container, t), title: _$this.title.lerp(other.title, t), description: _$this.description.lerp(other.description, t), - mainFlex: _$this.mainFlex.lerp(other.mainFlex, t), - actionsFlex: _$this.actionsFlex.lerp(other.actionsFlex, t), + containerLayout: _$this.containerLayout.lerp(other.containerLayout, t), + actionsLayout: _$this.actionsLayout.lerp(other.actionsLayout, t), modifiers: other.modifiers, animated: t < 0.5 ? _$this.animated : other.animated, ); @@ -97,8 +97,8 @@ mixin _$DialogSpec on Spec { _$this.container, _$this.title, _$this.description, - _$this.mainFlex, - _$this.actionsFlex, + _$this.containerLayout, + _$this.actionsLayout, _$this.modifiers, _$this.animated, ]; @@ -112,9 +112,10 @@ mixin _$DialogSpec on Spec { .add(DiagnosticsProperty('title', _$this.title, defaultValue: null)); properties.add(DiagnosticsProperty('description', _$this.description, defaultValue: null)); - properties.add( - DiagnosticsProperty('mainFlex', _$this.mainFlex, defaultValue: null)); - properties.add(DiagnosticsProperty('actionsFlex', _$this.actionsFlex, + properties.add(DiagnosticsProperty( + 'containerLayout', _$this.containerLayout, + defaultValue: null)); + properties.add(DiagnosticsProperty('actionsLayout', _$this.actionsLayout, defaultValue: null)); properties.add( DiagnosticsProperty('modifiers', _$this.modifiers, defaultValue: null)); @@ -135,15 +136,15 @@ class DialogSpecAttribute extends SpecAttribute final BoxSpecAttribute? container; final TextSpecAttribute? title; final TextSpecAttribute? description; - final FlexSpecAttribute? mainFlex; - final FlexSpecAttribute? actionsFlex; + final FlexSpecAttribute? containerLayout; + final FlexSpecAttribute? actionsLayout; const DialogSpecAttribute({ this.container, this.title, this.description, - this.mainFlex, - this.actionsFlex, + this.containerLayout, + this.actionsLayout, super.modifiers, super.animated, }); @@ -162,8 +163,8 @@ class DialogSpecAttribute extends SpecAttribute container: container?.resolve(mix), title: title?.resolve(mix), description: description?.resolve(mix), - mainFlex: mainFlex?.resolve(mix), - actionsFlex: actionsFlex?.resolve(mix), + containerLayout: containerLayout?.resolve(mix), + actionsLayout: actionsLayout?.resolve(mix), modifiers: modifiers?.resolve(mix), animated: animated?.resolve(mix) ?? mix.animation, ); @@ -185,8 +186,10 @@ class DialogSpecAttribute extends SpecAttribute container: container?.merge(other.container) ?? other.container, title: title?.merge(other.title) ?? other.title, description: description?.merge(other.description) ?? other.description, - mainFlex: mainFlex?.merge(other.mainFlex) ?? other.mainFlex, - actionsFlex: actionsFlex?.merge(other.actionsFlex) ?? other.actionsFlex, + containerLayout: containerLayout?.merge(other.containerLayout) ?? + other.containerLayout, + actionsLayout: + actionsLayout?.merge(other.actionsLayout) ?? other.actionsLayout, modifiers: modifiers?.merge(other.modifiers) ?? other.modifiers, animated: animated?.merge(other.animated) ?? other.animated, ); @@ -201,8 +204,8 @@ class DialogSpecAttribute extends SpecAttribute container, title, description, - mainFlex, - actionsFlex, + containerLayout, + actionsLayout, modifiers, animated, ]; @@ -215,10 +218,10 @@ class DialogSpecAttribute extends SpecAttribute properties.add(DiagnosticsProperty('title', title, defaultValue: null)); properties.add( DiagnosticsProperty('description', description, defaultValue: null)); - properties - .add(DiagnosticsProperty('mainFlex', mainFlex, defaultValue: null)); - properties.add( - DiagnosticsProperty('actionsFlex', actionsFlex, defaultValue: null)); + properties.add(DiagnosticsProperty('containerLayout', containerLayout, + defaultValue: null)); + properties.add(DiagnosticsProperty('actionsLayout', actionsLayout, + defaultValue: null)); properties .add(DiagnosticsProperty('modifiers', modifiers, defaultValue: null)); properties @@ -241,11 +244,11 @@ class DialogSpecUtility /// Utility for defining [DialogSpecAttribute.description] late final description = TextSpecUtility((v) => only(description: v)); - /// Utility for defining [DialogSpecAttribute.mainFlex] - late final mainFlex = FlexSpecUtility((v) => only(mainFlex: v)); + /// Utility for defining [DialogSpecAttribute.containerLayout] + late final containerLayout = FlexSpecUtility((v) => only(containerLayout: v)); - /// Utility for defining [DialogSpecAttribute.actionsFlex] - late final actionsFlex = FlexSpecUtility((v) => only(actionsFlex: v)); + /// Utility for defining [DialogSpecAttribute.actionsLayout] + late final actionsLayout = FlexSpecUtility((v) => only(actionsLayout: v)); /// Utility for defining [DialogSpecAttribute.modifiers] late final wrap = SpecModifierUtility((v) => only(modifiers: v)); @@ -267,8 +270,8 @@ class DialogSpecUtility BoxSpecAttribute? container, TextSpecAttribute? title, TextSpecAttribute? description, - FlexSpecAttribute? mainFlex, - FlexSpecAttribute? actionsFlex, + FlexSpecAttribute? containerLayout, + FlexSpecAttribute? actionsLayout, WidgetModifiersDataDto? modifiers, AnimatedDataDto? animated, }) { @@ -276,8 +279,8 @@ class DialogSpecUtility container: container, title: title, description: description, - mainFlex: mainFlex, - actionsFlex: actionsFlex, + containerLayout: containerLayout, + actionsLayout: actionsLayout, modifiers: modifiers, animated: animated, )); diff --git a/packages/remix/lib/src/components/dialog/dialog_style.dart b/packages/remix/lib/src/components/dialog/dialog_style.dart index 4d93b6543..d559174eb 100644 --- a/packages/remix/lib/src/components/dialog/dialog_style.dart +++ b/packages/remix/lib/src/components/dialog/dialog_style.dart @@ -14,13 +14,13 @@ class DialogStyle extends SpecStyle { ..constraints.minWidth(300) ..constraints.maxWidth(500); - final mainFlex = $.mainFlex.chain + final containerLayout = $.containerLayout.chain ..mainAxisSize.min() ..gap(4) ..crossAxisAlignment.start() ..direction.vertical(); - final actionsFlex = $.actionsFlex.chain + final actionsLayout = $.actionsLayout.chain ..mainAxisSize.max() ..mainAxisAlignment.end() ..gap(12) @@ -40,10 +40,10 @@ class DialogStyle extends SpecStyle { [ $with.align(alignment: Alignment.center), containerStyle, - mainFlex, + containerLayout, titleStyle, descriptionStyle, - actionsFlex, + actionsLayout, ], ); } diff --git a/packages/remix/lib/src/components/dialog/dialog_widget.dart b/packages/remix/lib/src/components/dialog/dialog_widget.dart index d56fbe535..c4bf87196 100644 --- a/packages/remix/lib/src/components/dialog/dialog_widget.dart +++ b/packages/remix/lib/src/components/dialog/dialog_widget.dart @@ -22,17 +22,47 @@ class Dialog extends StatelessWidget { this.variants = const [], }); - /// The list of child widgets to be displayed inside the card. - + /// A builder that returns a [Widget] for the dialog's title. + /// + /// This builder is used to create a custom title widget for the dialog. + /// If null, the default title will be used. final WidgetSpecBuilder? titleBuilder; + + /// A builder that returns a [Widget] for the dialog's description. + /// final WidgetSpecBuilder? descriptionBuilder; + + /// The content widget to be displayed in the dialog. + /// + /// This widget is placed below the title and description, and above the actions. + /// If null, no additional content will be displayed. + /// Use this to add custom widgets or more complex content to your dialog. + /// + /// Example: + /// ```dart + /// Dialog( + /// title: 'Confirmation', + /// description: 'Are you sure you want to proceed?', + /// content: Image.asset('assets/warning_icon.png'), + /// actions: [ + /// Button(onPressed: () {}, child: Text('Cancel')), + /// Button(onPressed: () {}, child: Text('Confirm')), + /// ], + /// ) + /// ``` final Widget? content; - final List? actions; - /// Additional custom styling for the card. + /// A list of widgets to display as actions in the dialog. /// - /// This allows you to override or extend the default card styling. + /// Typically, these are buttons that allow the user to confirm, cancel, + /// or take other actions related to the dialog's content. + /// If null, no actions will be displayed. + final List? actions; + + /// {@macro remix.component.style} final DialogStyle? style; + + /// {@macro remix.component.variants} final List variants; @override @@ -47,7 +77,7 @@ class Dialog extends StatelessWidget { final spec = DialogSpec.of(context); return spec.container( - child: spec.mainFlex( + child: spec.containerLayout( direction: Axis.vertical, children: [ if (titleBuilder != null) titleBuilder!(spec.title), @@ -55,7 +85,7 @@ class Dialog extends StatelessWidget { descriptionBuilder!(spec.description), content ?? const SizedBox.shrink(), if (actions != null) - spec.actionsFlex( + spec.actionsLayout( direction: Axis.horizontal, children: actions!, ), diff --git a/packages/remix/lib/src/components/divider/divider.dart b/packages/remix/lib/src/components/divider/divider.dart index 971e5a5f5..386d3fd4c 100644 --- a/packages/remix/lib/src/components/divider/divider.dart +++ b/packages/remix/lib/src/components/divider/divider.dart @@ -16,7 +16,7 @@ base class DividerSpec extends Spec with _$DividerSpec, Diagnosticable { final BoxSpec container; - /// {@macro progress_spec_of} + /// {@macro divider_spec_of} static const of = _$DividerSpec.of; static const from = _$DividerSpec.from; diff --git a/packages/remix/lib/src/components/divider/divider_widget.dart b/packages/remix/lib/src/components/divider/divider_widget.dart index 5c15b82c2..1e744b5b4 100644 --- a/packages/remix/lib/src/components/divider/divider_widget.dart +++ b/packages/remix/lib/src/components/divider/divider_widget.dart @@ -8,8 +8,13 @@ class Divider extends StatelessWidget { this.axis = Axis.horizontal, }); + /// {@macro remix.component.style} final DividerStyle? style; + + /// The axis along which the divider will be displayed. final Axis axis; + + /// {@macro remix.component.variants} final List variants; @override diff --git a/packages/remix/lib/src/components/icon_button/icon_button.dart b/packages/remix/lib/src/components/icon_button/icon_button.dart index bcbc30df0..1d2d0b228 100644 --- a/packages/remix/lib/src/components/icon_button/icon_button.dart +++ b/packages/remix/lib/src/components/icon_button/icon_button.dart @@ -22,7 +22,7 @@ class IconButtonSpec extends Spec @MixableProperty(dto: MixableFieldDto(type: 'SpinnerSpecAttribute')) final SpinnerSpec spinner; - /// {@macro button_spec_of} + /// {@macro icon_button_spec_of} static const of = _$IconButtonSpec.of; static const from = _$IconButtonSpec.from; diff --git a/packages/remix/lib/src/components/icon_button/icon_button_widget.dart b/packages/remix/lib/src/components/icon_button/icon_button_widget.dart index 05fc28b39..51f425804 100644 --- a/packages/remix/lib/src/components/icon_button/icon_button_widget.dart +++ b/packages/remix/lib/src/components/icon_button/icon_button_widget.dart @@ -1,19 +1,5 @@ part of 'icon_button.dart'; -/// A customizable button component with various styling options. -/// -/// The [Button] allows you to create buttons with different variants, sizes, -/// and icons. You can also disable the button or show a loading state. -/// -/// Example usage: -/// -/// ```dart -/// RxButton( -/// label: 'Click me', -/// onPressed: () {}, -/// iconLeft: Icons.add, -/// ) -/// ``` class IconButton extends StatelessWidget { const IconButton( this.icon, { @@ -26,16 +12,37 @@ class IconButton extends StatelessWidget { this.style, }); + /// {@macro remix.component.disabled} final bool disabled; + + /// {@macro remix.component.loading} final bool loading; + + /// The icon displayed in the IconButton. final IconData? icon; + + /// {@macro remix.component.onPressed} final VoidCallback? onPressed; + + /// A builder that returns a [Widget] for the IconButton's spinner. + /// + /// This builder creates a widget to display when the IconButton is loading. + /// + /// {@macro remix.widget_spec_builder.spinner_builder} + /// + /// ```dart + /// IconButton( + /// icon: Icons.add, + /// onPressed: () {}, + /// spinnerBuilder: (spec) => spec(), + /// ); + /// ``` final WidgetSpecBuilder? spinnerBuilder; + + /// {@macro remix.component.variants} final List variants; - /// Additional custom styling for the button. - /// - /// This allows you to override or extend the default button styling. + /// {@macro remix.component.style} final IconButtonStyle? style; @override diff --git a/packages/remix/lib/src/components/menu_item/menu_item.dart b/packages/remix/lib/src/components/menu_item/menu_item.dart index 358dee982..0a5d51467 100644 --- a/packages/remix/lib/src/components/menu_item/menu_item.dart +++ b/packages/remix/lib/src/components/menu_item/menu_item.dart @@ -22,7 +22,7 @@ class MenuItemSpec extends Spec final TextSpec title; final TextSpec subtitle; - /// {@macro button_spec_of} + /// {@macro menu_item_spec_of} static const of = _$MenuItemSpec.of; static const from = _$MenuItemSpec.from; @@ -43,6 +43,20 @@ class MenuItemSpec extends Spec title = title ?? const TextSpec(), subtitle = subtitle ?? const TextSpec(); + Widget call({ + required String title, + String? subtitle, + WidgetSpecBuilder? leadingWidgetBuilder, + WidgetSpecBuilder? trailingWidgetBuilder, + }) => + MenuItemSpecWidget( + spec: this, + leadingWidgetBuilder: leadingWidgetBuilder, + title: title, + subtitle: subtitle, + trailingWidgetBuilder: trailingWidgetBuilder, + ); + @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { super.debugFillProperties(properties); diff --git a/packages/remix/lib/src/components/menu_item/menu_item_widget.dart b/packages/remix/lib/src/components/menu_item/menu_item_widget.dart index 7f83ed2e1..257665e05 100644 --- a/packages/remix/lib/src/components/menu_item/menu_item_widget.dart +++ b/packages/remix/lib/src/components/menu_item/menu_item_widget.dart @@ -13,13 +13,50 @@ class MenuItem extends StatelessWidget { this.disabled = false, }); + /// The primary text displayed in the menu item. final String title; + + /// Optional secondary text displayed below the title. final String? subtitle; + + /// {@macro remix.component.onPressed} final VoidCallback? onPress; + + /// A builder that returns a [Widget] for the menu item's leading icon. + /// + /// This builder creates a widget to display at the start of the menu item. + /// + /// {@macro remix.widget_spec_builder.icon_spec} + /// + /// ```dart + /// MenuItem( + /// title: 'Settings', + /// leadingWidgetBuilder: (spec) => spec(Icons.settings), + /// ); + /// ``` final WidgetSpecBuilder? leadingWidgetBuilder; + + /// A builder that returns a [Widget] for the menu item's trailing icon. + /// + /// This builder creates a widget to display at the end of the menu item. + /// + /// {@macro remix.widget_spec_builder.icon_spec} + /// + /// ```dart + /// MenuItem( + /// title: 'Next', + /// trailingWidgetBuilder: (spec) => spec(Icons.chevron_right), + /// ); + /// ``` final WidgetSpecBuilder? trailingWidgetBuilder; + + /// {@macro remix.component.disabled} final bool disabled; + + /// {@macro remix.component.variants} final List variants; + + /// {@macro remix.component.style} final MenuItemStyle? style; @override @@ -35,26 +72,52 @@ class MenuItem extends StatelessWidget { builder: (context) { final spec = MenuItemSpec.of(context); - return spec.outerContainer( - child: spec.contentLayout( - direction: Axis.horizontal, - children: [ - if (leadingWidgetBuilder != null) - leadingWidgetBuilder!(spec.icon), - spec.titleSubtitleLayout( - direction: Axis.vertical, - children: [ - spec.title(title), - if (subtitle != null) spec.subtitle(subtitle!), - ], - ), - if (trailingWidgetBuilder != null) - trailingWidgetBuilder!(spec.icon), - ], - ), + return MenuItemSpecWidget( + spec: spec, + leadingWidgetBuilder: leadingWidgetBuilder, + title: title, + subtitle: subtitle, + trailingWidgetBuilder: trailingWidgetBuilder, ); }, ), ); } } + +class MenuItemSpecWidget extends StatelessWidget { + const MenuItemSpecWidget({ + super.key, + required this.spec, + required this.leadingWidgetBuilder, + required this.title, + required this.subtitle, + required this.trailingWidgetBuilder, + }); + + final MenuItemSpec spec; + final WidgetSpecBuilder? leadingWidgetBuilder; + final String title; + final String? subtitle; + final WidgetSpecBuilder? trailingWidgetBuilder; + + @override + Widget build(BuildContext context) { + return spec.outerContainer( + child: spec.contentLayout( + direction: Axis.horizontal, + children: [ + if (leadingWidgetBuilder != null) leadingWidgetBuilder!(spec.icon), + spec.titleSubtitleLayout( + direction: Axis.vertical, + children: [ + spec.title(title), + if (subtitle != null) spec.subtitle(subtitle!), + ], + ), + if (trailingWidgetBuilder != null) trailingWidgetBuilder!(spec.icon), + ], + ), + ); + } +} diff --git a/packages/remix/lib/src/components/progress/progress_widget.dart b/packages/remix/lib/src/components/progress/progress_widget.dart index e6ade46e5..4a4042de5 100644 --- a/packages/remix/lib/src/components/progress/progress_widget.dart +++ b/packages/remix/lib/src/components/progress/progress_widget.dart @@ -11,8 +11,16 @@ class Progress extends StatelessWidget { 'Progress value must be between 0 and 1', ); + /// {@macro remix.component.style} final ProgressStyle? style; + + /// The progress value between 0 and 1. + /// + /// This value determines how much of the progress bar is filled. + /// A value of 0 means empty, while 1 means completely filled. final double value; + + /// {@macro remix.component.variants} final List variants; @override diff --git a/packages/remix/lib/src/components/radio/radio.dart b/packages/remix/lib/src/components/radio/radio.dart index 997c6f039..598d834bc 100644 --- a/packages/remix/lib/src/components/radio/radio.dart +++ b/packages/remix/lib/src/components/radio/radio.dart @@ -16,7 +16,7 @@ part 'radio_widget.dart'; base class RadioSpec extends Spec with _$RadioSpec, Diagnosticable { final BoxSpec container; final BoxSpec indicator; - final FlexSpec flex; + final FlexSpec layout; final TextSpec text; /// {@macro radio_spec_of} @@ -27,14 +27,14 @@ base class RadioSpec extends Spec with _$RadioSpec, Diagnosticable { const RadioSpec({ BoxSpec? container, BoxSpec? indicator, - FlexSpec? flex, + FlexSpec? layout, TextSpec? text, super.modifiers, super.animated, }) : container = container ?? const BoxSpec(), indicator = indicator ?? const BoxSpec(), text = text ?? const TextSpec(), - flex = flex ?? const FlexSpec(); + layout = layout ?? const FlexSpec(); @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { diff --git a/packages/remix/lib/src/components/radio/radio.g.dart b/packages/remix/lib/src/components/radio/radio.g.dart index 872b7160f..e12a5f8e7 100644 --- a/packages/remix/lib/src/components/radio/radio.g.dart +++ b/packages/remix/lib/src/components/radio/radio.g.dart @@ -35,7 +35,7 @@ mixin _$RadioSpec on Spec { RadioSpec copyWith({ BoxSpec? container, BoxSpec? indicator, - FlexSpec? flex, + FlexSpec? layout, TextSpec? text, WidgetModifiersData? modifiers, AnimatedData? animated, @@ -43,7 +43,7 @@ mixin _$RadioSpec on Spec { return RadioSpec( container: container ?? _$this.container, indicator: indicator ?? _$this.indicator, - flex: flex ?? _$this.flex, + layout: layout ?? _$this.layout, text: text ?? _$this.text, modifiers: modifiers ?? _$this.modifiers, animated: animated ?? _$this.animated, @@ -62,7 +62,7 @@ mixin _$RadioSpec on Spec { /// interpolation method: /// /// - [BoxSpec.lerp] for [container] and [indicator]. - /// - [FlexSpec.lerp] for [flex]. + /// - [FlexSpec.lerp] for [layout]. /// - [TextSpec.lerp] for [text]. /// For [modifiers] and [animated], the interpolation is performed using a step function. @@ -78,7 +78,7 @@ mixin _$RadioSpec on Spec { return RadioSpec( container: _$this.container.lerp(other.container, t), indicator: _$this.indicator.lerp(other.indicator, t), - flex: _$this.flex.lerp(other.flex, t), + layout: _$this.layout.lerp(other.layout, t), text: _$this.text.lerp(other.text, t), modifiers: other.modifiers, animated: t < 0.5 ? _$this.animated : other.animated, @@ -93,7 +93,7 @@ mixin _$RadioSpec on Spec { List get props => [ _$this.container, _$this.indicator, - _$this.flex, + _$this.layout, _$this.text, _$this.modifiers, _$this.animated, @@ -107,7 +107,7 @@ mixin _$RadioSpec on Spec { properties.add( DiagnosticsProperty('indicator', _$this.indicator, defaultValue: null)); properties - .add(DiagnosticsProperty('flex', _$this.flex, defaultValue: null)); + .add(DiagnosticsProperty('layout', _$this.layout, defaultValue: null)); properties .add(DiagnosticsProperty('text', _$this.text, defaultValue: null)); properties.add( @@ -128,13 +128,13 @@ base class RadioSpecAttribute extends SpecAttribute with Diagnosticable { final BoxSpecAttribute? container; final BoxSpecAttribute? indicator; - final FlexSpecAttribute? flex; + final FlexSpecAttribute? layout; final TextSpecAttribute? text; const RadioSpecAttribute({ this.container, this.indicator, - this.flex, + this.layout, this.text, super.modifiers, super.animated, @@ -153,7 +153,7 @@ base class RadioSpecAttribute extends SpecAttribute return RadioSpec( container: container?.resolve(mix), indicator: indicator?.resolve(mix), - flex: flex?.resolve(mix), + layout: layout?.resolve(mix), text: text?.resolve(mix), modifiers: modifiers?.resolve(mix), animated: animated?.resolve(mix) ?? mix.animation, @@ -175,7 +175,7 @@ base class RadioSpecAttribute extends SpecAttribute return RadioSpecAttribute( container: container?.merge(other.container) ?? other.container, indicator: indicator?.merge(other.indicator) ?? other.indicator, - flex: flex?.merge(other.flex) ?? other.flex, + layout: layout?.merge(other.layout) ?? other.layout, text: text?.merge(other.text) ?? other.text, modifiers: modifiers?.merge(other.modifiers) ?? other.modifiers, animated: animated?.merge(other.animated) ?? other.animated, @@ -190,7 +190,7 @@ base class RadioSpecAttribute extends SpecAttribute List get props => [ container, indicator, - flex, + layout, text, modifiers, animated, @@ -203,7 +203,7 @@ base class RadioSpecAttribute extends SpecAttribute .add(DiagnosticsProperty('container', container, defaultValue: null)); properties .add(DiagnosticsProperty('indicator', indicator, defaultValue: null)); - properties.add(DiagnosticsProperty('flex', flex, defaultValue: null)); + properties.add(DiagnosticsProperty('layout', layout, defaultValue: null)); properties.add(DiagnosticsProperty('text', text, defaultValue: null)); properties .add(DiagnosticsProperty('modifiers', modifiers, defaultValue: null)); @@ -224,8 +224,8 @@ class RadioSpecUtility /// Utility for defining [RadioSpecAttribute.indicator] late final indicator = BoxSpecUtility((v) => only(indicator: v)); - /// Utility for defining [RadioSpecAttribute.flex] - late final flex = FlexSpecUtility((v) => only(flex: v)); + /// Utility for defining [RadioSpecAttribute.layout] + late final layout = FlexSpecUtility((v) => only(layout: v)); /// Utility for defining [RadioSpecAttribute.text] late final text = TextSpecUtility((v) => only(text: v)); @@ -249,7 +249,7 @@ class RadioSpecUtility T only({ BoxSpecAttribute? container, BoxSpecAttribute? indicator, - FlexSpecAttribute? flex, + FlexSpecAttribute? layout, TextSpecAttribute? text, WidgetModifiersDataDto? modifiers, AnimatedDataDto? animated, @@ -257,7 +257,7 @@ class RadioSpecUtility return builder(RadioSpecAttribute( container: container, indicator: indicator, - flex: flex, + layout: layout, text: text, modifiers: modifiers, animated: animated, diff --git a/packages/remix/lib/src/components/radio/radio_style.dart b/packages/remix/lib/src/components/radio/radio_style.dart index 5d9baeee1..e9356a1a4 100644 --- a/packages/remix/lib/src/components/radio/radio_style.dart +++ b/packages/remix/lib/src/components/radio/radio_style.dart @@ -34,17 +34,21 @@ class RadioStyle extends SpecStyle { ..style.fontWeight.w500() ..textHeightBehavior.heightToFirstAscent.off(); - final flexStyle = $.flex.chain + final layoutStyle = $.layout.chain ..row() + ..mainAxisSize.min() ..mainAxisAlignment.start() ..crossAxisAlignment.center() ..gap(8); + final disabledStyle = spec.on.disabled($.text.style.color.grey()); + return Style.create([ ...containerStyle, ...indicatorStyle, textStyle, - flexStyle, + layoutStyle, + disabledStyle, ]).animate( duration: const Duration(milliseconds: 100), curve: Curves.easeInOutQuad, diff --git a/packages/remix/lib/src/components/radio/radio_theme.dart b/packages/remix/lib/src/components/radio/radio_theme.dart index db2b1b97e..9f16a52ed 100644 --- a/packages/remix/lib/src/components/radio/radio_theme.dart +++ b/packages/remix/lib/src/components/radio/radio_theme.dart @@ -20,6 +20,7 @@ class FortalezaRadioStyle extends RadioStyle { ..border.width(1) ..border.color.$neutral(8), $.indicator.chain..color.$white(), + $.text.style.color.$neutral(12), spec.on.hover( $.container.chain ..color.$accentAlpha(4) diff --git a/packages/remix/lib/src/components/radio/radio_widget.dart b/packages/remix/lib/src/components/radio/radio_widget.dart index fe576e541..78aed24b0 100644 --- a/packages/remix/lib/src/components/radio/radio_widget.dart +++ b/packages/remix/lib/src/components/radio/radio_widget.dart @@ -9,15 +9,33 @@ class Radio extends StatefulWidget { this.disabled = false, this.style, this.variants = const [], - required this.text, + required this.label, }); + /// The value associated with this radio button. + /// + /// This value is compared against [groupValue] to determine if this radio button + /// is selected. final T value; + + /// {@macro remix.component.onChanged} final ValueChanged onChanged; + + /// The currently selected value for a group of radio buttons. + /// + /// When [value] matches [groupValue], this radio button is considered selected. final T? groupValue; - final String text; + + /// The label text displayed next to the radio button. + final String label; + + /// {@macro remix.component.disabled} final bool disabled; + + /// {@macro remix.component.style} final RadioStyle? style; + + /// {@macro remix.component.variants} final List variants; bool get _selected => value == groupValue; @@ -76,14 +94,14 @@ class _RadioState extends State> { final ContainerWidget = spec.container; final IndicatorWidget = spec.indicator; - final FlexWidget = spec.flex; + final FlexWidget = spec.layout; final TextWidget = spec.text; return FlexWidget( direction: Axis.horizontal, children: [ ContainerWidget(child: IndicatorWidget()), - TextWidget(widget.text), + TextWidget(widget.label), ], ); }, diff --git a/packages/remix/lib/src/components/scaffold/scaffold_widget.dart b/packages/remix/lib/src/components/scaffold/scaffold_widget.dart index be8ca07b6..ba51d4c2b 100644 --- a/packages/remix/lib/src/components/scaffold/scaffold_widget.dart +++ b/packages/remix/lib/src/components/scaffold/scaffold_widget.dart @@ -1,5 +1,28 @@ part of 'scaffold.dart'; +/// A widget that provides a basic structure for a page or screen. +/// +/// It consists of a single [body] widget that is wrapped in a +/// container with styling applied. +/// +/// The [style] parameter allows you to customize the appearance of the scaffold +/// using a [ScaffoldStyle]. If no style is provided, the default style from the +/// theme will be used. +/// +/// The [variants] parameter allows you to apply style variants to modify the +/// appearance of the scaffold. +/// +/// When a Scaffold is added to the widget tree, it automatically applies a +/// [ToastLayer] that enables the display of [Toast] components within its scope. +/// +/// Example: +/// ```dart +/// Scaffold( +/// body: Center( +/// child: Text('Hello World'), +/// ), +/// ) +/// ``` class Scaffold extends StatelessWidget { const Scaffold({ super.key, @@ -8,8 +31,13 @@ class Scaffold extends StatelessWidget { this.variants = const [], }); + /// The primary content of the scaffold. final Widget body; + + /// {@macro remix.component.style} final ScaffoldStyle? style; + + /// {@macro remix.component.variants} final List variants; @override diff --git a/packages/remix/lib/src/components/segmented_control/button/segmented_control_button.dart b/packages/remix/lib/src/components/segmented_control/button/segmented_control_button.dart index 349f3cb1f..65f7325bb 100644 --- a/packages/remix/lib/src/components/segmented_control/button/segmented_control_button.dart +++ b/packages/remix/lib/src/components/segmented_control/button/segmented_control_button.dart @@ -8,7 +8,7 @@ class SegmentButtonSpec extends Spec final IconSpec icon; final TextSpec label; - /// {@macro button_spec_of} + /// {@macro segment_button_spec_of} static const of = _$SegmentButtonSpec.of; static const from = _$SegmentButtonSpec.from; diff --git a/packages/remix/lib/src/components/segmented_control/button/segmented_control_button_widget.dart b/packages/remix/lib/src/components/segmented_control/button/segmented_control_button_widget.dart index e7ab2ec86..5ee341f2e 100644 --- a/packages/remix/lib/src/components/segmented_control/button/segmented_control_button_widget.dart +++ b/packages/remix/lib/src/components/segmented_control/button/segmented_control_button_widget.dart @@ -1,10 +1,42 @@ part of '../segmented_control.dart'; -class XSegmentButton extends StatelessWidget { - const XSegmentButton({super.key, IconData? icon, this.text}) - : iconData = icon; +/// A button widget used within [SegmentedControl] to represent a single segment. +/// +/// The [SegmentButton] is designed to be used as a child of [SegmentedControl] and +/// represents one selectable segment within the control. It can display an optional +/// icon and/or text label. +/// +/// The button's appearance are controlled by the [SegmentedControlSpec] +/// provided by the parent [SegmentedControl]. This includes styling for the container, +/// flex layout, icon, and text label. +/// +/// Example usage: +/// ```dart +/// SegmentedControl( +/// buttons: [ +/// SegmentButton( +/// icon: Icons.home, +/// text: 'Home', +/// ), +/// SegmentButton( +/// icon: Icons.settings, +/// text: 'Settings', +/// ), +/// ], +/// onIndexChanged: (index) { +/// // Handle segment selection +/// }, +/// ) +/// ``` +class SegmentButton extends StatelessWidget { + const SegmentButton({super.key, IconData? icon, this.text}) : iconData = icon; + /// The icon data to display in the segment button. + /// If null, no icon will be shown. final IconData? iconData; + + /// The text label to display in the segment button. + /// If null, no text will be shown. final String? text; @override diff --git a/packages/remix/lib/src/components/segmented_control/segmented_control.dart b/packages/remix/lib/src/components/segmented_control/segmented_control.dart index e954dd5c7..d6ec17429 100644 --- a/packages/remix/lib/src/components/segmented_control/segmented_control.dart +++ b/packages/remix/lib/src/components/segmented_control/segmented_control.dart @@ -9,8 +9,8 @@ import '../../theme/remix_tokens.dart'; part 'button/segmented_control_button.dart'; part 'button/segmented_control_button_widget.dart'; part 'segmented_control.g.dart'; -part 'segmented_control_theme.dart'; part 'segmented_control_style.dart'; +part 'segmented_control_theme.dart'; part 'segmented_control_widget.dart'; final $segmentedControl = SegmentedControlSpecUtility.self; @@ -19,26 +19,27 @@ final $segmentedControl = SegmentedControlSpecUtility.self; class SegmentedControlSpec extends Spec with _$SegmentedControlSpec, Diagnosticable { final BoxSpec container; - final FlexSpec flex; - final bool showDivider; + final FlexSpec layout; final BoxSpec divider; + final bool showDivider; @MixableProperty(dto: MixableFieldDto(type: 'SegmentButtonSpecAttribute')) final SegmentButtonSpec item; + /// {@macro segmented_control_spec_of} static const of = _$SegmentedControlSpec.of; static const from = _$SegmentedControlSpec.from; const SegmentedControlSpec({ BoxSpec? container, - FlexSpec? flex, + FlexSpec? layout, bool? showDivider, BoxSpec? divider, SegmentButtonSpec? item, super.modifiers, super.animated, - }) : flex = flex ?? const FlexSpec(), + }) : layout = layout ?? const FlexSpec(), container = container ?? const BoxSpec(), showDivider = showDivider ?? false, item = item ?? const SegmentButtonSpec(), diff --git a/packages/remix/lib/src/components/segmented_control/segmented_control.g.dart b/packages/remix/lib/src/components/segmented_control/segmented_control.g.dart index b24f591a1..17c27c0eb 100644 --- a/packages/remix/lib/src/components/segmented_control/segmented_control.g.dart +++ b/packages/remix/lib/src/components/segmented_control/segmented_control.g.dart @@ -34,7 +34,7 @@ mixin _$SegmentedControlSpec on Spec { @override SegmentedControlSpec copyWith({ BoxSpec? container, - FlexSpec? flex, + FlexSpec? layout, bool? showDivider, BoxSpec? divider, SegmentButtonSpec? item, @@ -43,7 +43,7 @@ mixin _$SegmentedControlSpec on Spec { }) { return SegmentedControlSpec( container: container ?? _$this.container, - flex: flex ?? _$this.flex, + layout: layout ?? _$this.layout, showDivider: showDivider ?? _$this.showDivider, divider: divider ?? _$this.divider, item: item ?? _$this.item, @@ -64,7 +64,7 @@ mixin _$SegmentedControlSpec on Spec { /// interpolation method: /// /// - [BoxSpec.lerp] for [container] and [divider]. - /// - [FlexSpec.lerp] for [flex]. + /// - [FlexSpec.lerp] for [layout]. /// For [showDivider] and [item] and [modifiers] and [animated], the interpolation is performed using a step function. /// If [t] is less than 0.5, the value from the current [SegmentedControlSpec] is used. Otherwise, the value @@ -78,7 +78,7 @@ mixin _$SegmentedControlSpec on Spec { return SegmentedControlSpec( container: _$this.container.lerp(other.container, t), - flex: _$this.flex.lerp(other.flex, t), + layout: _$this.layout.lerp(other.layout, t), showDivider: t < 0.5 ? _$this.showDivider : other.showDivider, divider: _$this.divider.lerp(other.divider, t), item: _$this.item.lerp(other.item, t), @@ -94,7 +94,7 @@ mixin _$SegmentedControlSpec on Spec { @override List get props => [ _$this.container, - _$this.flex, + _$this.layout, _$this.showDivider, _$this.divider, _$this.item, @@ -108,7 +108,7 @@ mixin _$SegmentedControlSpec on Spec { properties.add( DiagnosticsProperty('container', _$this.container, defaultValue: null)); properties - .add(DiagnosticsProperty('flex', _$this.flex, defaultValue: null)); + .add(DiagnosticsProperty('layout', _$this.layout, defaultValue: null)); properties.add(DiagnosticsProperty('showDivider', _$this.showDivider, defaultValue: null)); properties.add( @@ -132,14 +132,14 @@ mixin _$SegmentedControlSpec on Spec { class SegmentedControlSpecAttribute extends SpecAttribute with Diagnosticable { final BoxSpecAttribute? container; - final FlexSpecAttribute? flex; + final FlexSpecAttribute? layout; final bool? showDivider; final BoxSpecAttribute? divider; final SegmentButtonSpecAttribute? item; const SegmentedControlSpecAttribute({ this.container, - this.flex, + this.layout, this.showDivider, this.divider, this.item, @@ -159,7 +159,7 @@ class SegmentedControlSpecAttribute extends SpecAttribute SegmentedControlSpec resolve(MixData mix) { return SegmentedControlSpec( container: container?.resolve(mix), - flex: flex?.resolve(mix), + layout: layout?.resolve(mix), showDivider: showDivider, divider: divider?.resolve(mix), item: item?.resolve(mix), @@ -183,7 +183,7 @@ class SegmentedControlSpecAttribute extends SpecAttribute return SegmentedControlSpecAttribute( container: container?.merge(other.container) ?? other.container, - flex: flex?.merge(other.flex) ?? other.flex, + layout: layout?.merge(other.layout) ?? other.layout, showDivider: other.showDivider ?? showDivider, divider: divider?.merge(other.divider) ?? other.divider, item: item?.merge(other.item) ?? other.item, @@ -199,7 +199,7 @@ class SegmentedControlSpecAttribute extends SpecAttribute @override List get props => [ container, - flex, + layout, showDivider, divider, item, @@ -212,7 +212,7 @@ class SegmentedControlSpecAttribute extends SpecAttribute super.debugFillProperties(properties); properties .add(DiagnosticsProperty('container', container, defaultValue: null)); - properties.add(DiagnosticsProperty('flex', flex, defaultValue: null)); + properties.add(DiagnosticsProperty('layout', layout, defaultValue: null)); properties.add( DiagnosticsProperty('showDivider', showDivider, defaultValue: null)); properties.add(DiagnosticsProperty('divider', divider, defaultValue: null)); @@ -233,8 +233,8 @@ class SegmentedControlSpecUtility /// Utility for defining [SegmentedControlSpecAttribute.container] late final container = BoxSpecUtility((v) => only(container: v)); - /// Utility for defining [SegmentedControlSpecAttribute.flex] - late final flex = FlexSpecUtility((v) => only(flex: v)); + /// Utility for defining [SegmentedControlSpecAttribute.layout] + late final layout = FlexSpecUtility((v) => only(layout: v)); /// Utility for defining [SegmentedControlSpecAttribute.showDivider] late final showDivider = BoolUtility((v) => only(showDivider: v)); @@ -263,7 +263,7 @@ class SegmentedControlSpecUtility @override T only({ BoxSpecAttribute? container, - FlexSpecAttribute? flex, + FlexSpecAttribute? layout, bool? showDivider, BoxSpecAttribute? divider, SegmentButtonSpecAttribute? item, @@ -272,7 +272,7 @@ class SegmentedControlSpecUtility }) { return builder(SegmentedControlSpecAttribute( container: container, - flex: flex, + layout: layout, showDivider: showDivider, divider: divider, item: item, diff --git a/packages/remix/lib/src/components/segmented_control/segmented_control_style.dart b/packages/remix/lib/src/components/segmented_control/segmented_control_style.dart index 0e66e528f..066ffa52e 100644 --- a/packages/remix/lib/src/components/segmented_control/segmented_control_style.dart +++ b/packages/remix/lib/src/components/segmented_control/segmented_control_style.dart @@ -25,8 +25,8 @@ class SegmentedControlStyle extends SpecStyle { $.showDivider.off(), ]; - final flexStyle = [ - $.flex.chain + final layoutStyle = [ + $.layout.chain ..row() ..mainAxisSize.min(), ]; @@ -58,7 +58,7 @@ class SegmentedControlStyle extends SpecStyle { return Style.create([ ...containerStyle, ...dividerStyle, - ...flexStyle, + ...layoutStyle, ...itemStyle, ]); } diff --git a/packages/remix/lib/src/components/segmented_control/segmented_control_widget.dart b/packages/remix/lib/src/components/segmented_control/segmented_control_widget.dart index 0234439a0..ae7e9575b 100644 --- a/packages/remix/lib/src/components/segmented_control/segmented_control_widget.dart +++ b/packages/remix/lib/src/components/segmented_control/segmented_control_widget.dart @@ -5,7 +5,6 @@ const selectedItem = Variant('selectedItem'); class SegmentedControl extends StatefulWidget { const SegmentedControl({ super.key, - this.isEnabled = true, this.index = 0, this.variants = const [], this.style, @@ -13,12 +12,22 @@ class SegmentedControl extends StatefulWidget { required this.onIndexChanged, }); + /// The currently selected index. final int index; + + /// Callback that is called when a segment is selected. + /// The index of the selected segment is passed as an argument. final ValueChanged onIndexChanged; - final bool isEnabled; + + /// {@macro remix.component.style} final SegmentedControlStyle? style; + + /// {@macro remix.component.variants} final List variants; - final List buttons; + + /// The list of widgets to display as segments. + /// Each widget represents one segment in the control. + final List buttons; @override State createState() => _SegmentedControlState(); @@ -57,7 +66,7 @@ class _SegmentedControlState extends State { child: Stack( alignment: Alignment.centerLeft, children: [ - spec.flex( + spec.layout( direction: Axis.vertical, children: [ for (int i = 0; i < widget.buttons.length; i++) diff --git a/packages/remix/lib/src/components/select/button/select_button.dart b/packages/remix/lib/src/components/select/button/select_button.dart index 0eca6fc65..4f9f48733 100644 --- a/packages/remix/lib/src/components/select/button/select_button.dart +++ b/packages/remix/lib/src/components/select/button/select_button.dart @@ -4,28 +4,29 @@ part of '../select.dart'; class SelectButtonSpec extends Spec with _$SelectButtonSpec, Diagnosticable { final BoxSpec container; - final FlexSpec flex; + final FlexSpec layout; final TextSpec label; final IconSpec icon; + /// {@macro select_button_spec_of} static const of = _$SelectButtonSpec.of; static const from = _$SelectButtonSpec.from; const SelectButtonSpec({ BoxSpec? container, - FlexSpec? flex, + FlexSpec? layout, IconSpec? icon, TextSpec? label, super.modifiers, super.animated, - }) : flex = flex ?? const FlexSpec(), + }) : layout = layout ?? const FlexSpec(), container = container ?? const BoxSpec(), icon = icon ?? const IconSpec(), label = label ?? const TextSpec(); - Widget call({required String text, required IconData trailingIcon}) => - XSelectButtonSpecWidget( + Widget call({required String text, IconData? trailingIcon}) => + SelectButtonSpecWidget( spec: this, text: text, trailingIcon: trailingIcon, diff --git a/packages/remix/lib/src/components/select/button/select_button_widget.dart b/packages/remix/lib/src/components/select/button/select_button_widget.dart index 98d63cd23..095efff86 100644 --- a/packages/remix/lib/src/components/select/button/select_button_widget.dart +++ b/packages/remix/lib/src/components/select/button/select_button_widget.dart @@ -1,16 +1,16 @@ part of '../select.dart'; -class XSelectButtonSpecWidget extends StatelessWidget { - const XSelectButtonSpecWidget({ +class SelectButtonSpecWidget extends StatelessWidget { + const SelectButtonSpecWidget({ super.key, required this.spec, required this.text, - required this.trailingIcon, + this.trailingIcon, }); final SelectButtonSpec spec; final String text; - final IconData trailingIcon; + final IconData? trailingIcon; @override Widget build(BuildContext context) { @@ -22,12 +22,15 @@ class XSelectButtonSpecWidget extends StatelessWidget { final container = button.container; final label = button.label; final icon = button.icon; - final flex = button.flex; + final flex = button.layout; return container( child: flex( direction: Axis.horizontal, - children: [label(text), icon(trailingIcon)], + children: [ + label(text), + if (trailingIcon != null) icon(trailingIcon), + ], ), ); }, diff --git a/packages/remix/lib/src/components/select/item/select_menu.dart b/packages/remix/lib/src/components/select/item/select_menu.dart index 2772c3db4..05cbd40e1 100644 --- a/packages/remix/lib/src/components/select/item/select_menu.dart +++ b/packages/remix/lib/src/components/select/item/select_menu.dart @@ -6,7 +6,7 @@ base class SelectMenuItemSpec extends Spec final IconSpec icon; final TextSpec text; final BoxSpec container; - final FlexSpec flex; + final FlexSpec layout; static const of = _$SelectMenuItemSpec.of; @@ -16,13 +16,13 @@ base class SelectMenuItemSpec extends Spec IconSpec? icon, TextSpec? text, BoxSpec? container, - FlexSpec? flex, + FlexSpec? layout, super.modifiers, super.animated, }) : icon = icon ?? const IconSpec(), text = text ?? const TextSpec(), container = container ?? const BoxSpec(), - flex = flex ?? const FlexSpec(); + layout = layout ?? const FlexSpec(); @override void debugFillProperties(DiagnosticPropertiesBuilder properties) { diff --git a/packages/remix/lib/src/components/select/item/select_menu_widget.dart b/packages/remix/lib/src/components/select/item/select_menu_widget.dart index 3e4fb6a4d..fedcfae53 100644 --- a/packages/remix/lib/src/components/select/item/select_menu_widget.dart +++ b/packages/remix/lib/src/components/select/item/select_menu_widget.dart @@ -1,37 +1,61 @@ -part of '../select.dart'; +// part of '../select.dart'; -class XSelectMenuItemWidget extends StatelessWidget { - const XSelectMenuItemWidget({ - super.key, - IconData? icon, - required this.text, - }) : iconData = icon; +// /// A widget that represents an individual item in a [Select] dropdown menu. +// /// +// /// This widget is used internally by the [Select] widget to render each [SelectMenuItem] +// /// in its dropdown. It applies styling and layout defined in the [SelectStyle]. +// /// +// /// Example usage within [Select]: +// /// ```dart +// /// Select( +// /// value: selectedValue, +// /// onChanged: (value) => setState(() => selectedValue = value), +// /// items: [ +// /// SelectMenuItem( +// /// value: 'profile', +// /// child: SelectMenuItemWidget( +// /// icon: Icons.person, +// /// text: 'Profile', +// /// ), +// /// ), +// /// ], +// /// ) +// /// ``` +// class SelectMenuItemWidget extends StatelessWidget { +// const SelectMenuItemWidget({ +// super.key, +// IconData? icon, +// required this.text, +// }) : iconData = icon; - final IconData? iconData; - final String text; +// /// The optional icon data to display before the text. +// final IconData? iconData; - @override - Widget build(BuildContext context) { - return SpecBuilder( - inherit: true, - builder: (context) { - final item = SelectSpec.of(context).item; +// /// The text label to display for this menu item. +// final String text; - final container = item.container; - final flex = item.flex; - final icon = item.icon; - final text = item.text; +// @override +// Widget build(BuildContext context) { +// return SpecBuilder( +// inherit: true, +// builder: (context) { +// final item = SelectSpec.of(context).item; - return container( - child: flex( - direction: Axis.horizontal, - children: [ - if (iconData != null) icon(iconData), - text(this.text), - ], - ), - ); - }, - ); - } -} +// final container = item.container; +// final layout = item.layout; +// final icon = item.icon; +// final text = item.text; + +// return container( +// child: layout( +// direction: Axis.horizontal, +// children: [ +// if (iconData != null) icon(iconData), +// text(this.text), +// ], +// ), +// ); +// }, +// ); +// } +// } diff --git a/packages/remix/lib/src/components/select/select.dart b/packages/remix/lib/src/components/select/select.dart index 6eb49df91..7935a433d 100644 --- a/packages/remix/lib/src/components/select/select.dart +++ b/packages/remix/lib/src/components/select/select.dart @@ -7,11 +7,12 @@ import '../../helpers/component_builder.dart'; import '../../helpers/spec/composited_transform_follower_spec.dart'; import '../../theme/remix_theme.dart'; import '../../theme/remix_tokens.dart'; +import '../menu_item/menu_item.dart'; part 'button/select_button.dart'; part 'button/select_button_widget.dart'; part 'item/select_menu.dart'; -part 'item/select_menu_widget.dart'; +// part 'item/select_menu_widget.dart'; part 'select.g.dart'; part 'select_style.dart'; part 'select_theme.dart'; @@ -27,14 +28,15 @@ class SelectSpec extends Spec with _$SelectSpec, Diagnosticable { @MixableProperty(dto: MixableFieldDto(type: 'SelectMenuSpecAttribute')) final SelectMenuSpec menu; - @MixableProperty(dto: MixableFieldDto(type: 'SelectMenuItemSpecAttribute')) - final SelectMenuItemSpec item; + @MixableProperty(dto: MixableFieldDto(type: 'MenuItemSpecAttribute')) + final MenuItemSpec item; @MixableProperty( dto: MixableFieldDto(type: 'CompositedTransformFollowerSpecAttribute'), ) final CompositedTransformFollowerSpec position; + /// {@macro select_spec_of} static const of = _$SelectSpec.of; static const from = _$SelectSpec.from; @@ -42,12 +44,12 @@ class SelectSpec extends Spec with _$SelectSpec, Diagnosticable { const SelectSpec({ SelectButtonSpec? button, SelectMenuSpec? menu, - SelectMenuItemSpec? item, + MenuItemSpec? item, CompositedTransformFollowerSpec? position, super.modifiers, super.animated, }) : button = button ?? const SelectButtonSpec(), - item = item ?? const SelectMenuItemSpec(), + item = item ?? const MenuItemSpec(), menu = menu ?? const SelectMenuSpec(), position = position ?? const CompositedTransformFollowerSpec(); @@ -65,6 +67,7 @@ base class SelectMenuSpec extends Spec final FlexSpec flex; final bool autoWidth; + /// {@macro select_menu_spec_of} static const of = _$SelectMenuSpec.of; static const from = _$SelectMenuSpec.from; diff --git a/packages/remix/lib/src/components/select/select.g.dart b/packages/remix/lib/src/components/select/select.g.dart index 55d8e346b..42ea02dd4 100644 --- a/packages/remix/lib/src/components/select/select.g.dart +++ b/packages/remix/lib/src/components/select/select.g.dart @@ -35,7 +35,7 @@ mixin _$SelectSpec on Spec { SelectSpec copyWith({ SelectButtonSpec? button, SelectMenuSpec? menu, - SelectMenuItemSpec? item, + MenuItemSpec? item, CompositedTransformFollowerSpec? position, WidgetModifiersData? modifiers, AnimatedData? animated, @@ -125,7 +125,7 @@ class SelectSpecAttribute extends SpecAttribute with Diagnosticable { final SelectButtonSpecAttribute? button; final SelectMenuSpecAttribute? menu; - final SelectMenuItemSpecAttribute? item; + final MenuItemSpecAttribute? item; final CompositedTransformFollowerSpecAttribute? position; const SelectSpecAttribute({ @@ -221,7 +221,7 @@ class SelectSpecUtility late final menu = SelectMenuSpecUtility((v) => only(menu: v)); /// Utility for defining [SelectSpecAttribute.item] - late final item = SelectMenuItemSpecUtility((v) => only(item: v)); + late final item = MenuItemSpecUtility((v) => only(item: v)); /// Utility for defining [SelectSpecAttribute.position] late final position = @@ -246,7 +246,7 @@ class SelectSpecUtility T only({ SelectButtonSpecAttribute? button, SelectMenuSpecAttribute? menu, - SelectMenuItemSpecAttribute? item, + MenuItemSpecAttribute? item, CompositedTransformFollowerSpecAttribute? position, WidgetModifiersDataDto? modifiers, AnimatedDataDto? animated, @@ -579,7 +579,7 @@ mixin _$SelectButtonSpec on Spec { @override SelectButtonSpec copyWith({ BoxSpec? container, - FlexSpec? flex, + FlexSpec? layout, IconSpec? icon, TextSpec? label, WidgetModifiersData? modifiers, @@ -587,7 +587,7 @@ mixin _$SelectButtonSpec on Spec { }) { return SelectButtonSpec( container: container ?? _$this.container, - flex: flex ?? _$this.flex, + layout: layout ?? _$this.layout, icon: icon ?? _$this.icon, label: label ?? _$this.label, modifiers: modifiers ?? _$this.modifiers, @@ -607,7 +607,7 @@ mixin _$SelectButtonSpec on Spec { /// interpolation method: /// /// - [BoxSpec.lerp] for [container]. - /// - [FlexSpec.lerp] for [flex]. + /// - [FlexSpec.lerp] for [layout]. /// - [IconSpec.lerp] for [icon]. /// - [TextSpec.lerp] for [label]. @@ -623,7 +623,7 @@ mixin _$SelectButtonSpec on Spec { return SelectButtonSpec( container: _$this.container.lerp(other.container, t), - flex: _$this.flex.lerp(other.flex, t), + layout: _$this.layout.lerp(other.layout, t), icon: _$this.icon.lerp(other.icon, t), label: _$this.label.lerp(other.label, t), modifiers: other.modifiers, @@ -638,7 +638,7 @@ mixin _$SelectButtonSpec on Spec { @override List get props => [ _$this.container, - _$this.flex, + _$this.layout, _$this.icon, _$this.label, _$this.modifiers, @@ -651,7 +651,7 @@ mixin _$SelectButtonSpec on Spec { properties.add( DiagnosticsProperty('container', _$this.container, defaultValue: null)); properties - .add(DiagnosticsProperty('flex', _$this.flex, defaultValue: null)); + .add(DiagnosticsProperty('layout', _$this.layout, defaultValue: null)); properties .add(DiagnosticsProperty('icon', _$this.icon, defaultValue: null)); properties @@ -673,13 +673,13 @@ mixin _$SelectButtonSpec on Spec { class SelectButtonSpecAttribute extends SpecAttribute with Diagnosticable { final BoxSpecAttribute? container; - final FlexSpecAttribute? flex; + final FlexSpecAttribute? layout; final IconSpecAttribute? icon; final TextSpecAttribute? label; const SelectButtonSpecAttribute({ this.container, - this.flex, + this.layout, this.icon, this.label, super.modifiers, @@ -698,7 +698,7 @@ class SelectButtonSpecAttribute extends SpecAttribute SelectButtonSpec resolve(MixData mix) { return SelectButtonSpec( container: container?.resolve(mix), - flex: flex?.resolve(mix), + layout: layout?.resolve(mix), icon: icon?.resolve(mix), label: label?.resolve(mix), modifiers: modifiers?.resolve(mix), @@ -720,7 +720,7 @@ class SelectButtonSpecAttribute extends SpecAttribute return SelectButtonSpecAttribute( container: container?.merge(other.container) ?? other.container, - flex: flex?.merge(other.flex) ?? other.flex, + layout: layout?.merge(other.layout) ?? other.layout, icon: icon?.merge(other.icon) ?? other.icon, label: label?.merge(other.label) ?? other.label, modifiers: modifiers?.merge(other.modifiers) ?? other.modifiers, @@ -735,7 +735,7 @@ class SelectButtonSpecAttribute extends SpecAttribute @override List get props => [ container, - flex, + layout, icon, label, modifiers, @@ -747,7 +747,7 @@ class SelectButtonSpecAttribute extends SpecAttribute super.debugFillProperties(properties); properties .add(DiagnosticsProperty('container', container, defaultValue: null)); - properties.add(DiagnosticsProperty('flex', flex, defaultValue: null)); + properties.add(DiagnosticsProperty('layout', layout, defaultValue: null)); properties.add(DiagnosticsProperty('icon', icon, defaultValue: null)); properties.add(DiagnosticsProperty('label', label, defaultValue: null)); properties @@ -766,8 +766,8 @@ class SelectButtonSpecUtility /// Utility for defining [SelectButtonSpecAttribute.container] late final container = BoxSpecUtility((v) => only(container: v)); - /// Utility for defining [SelectButtonSpecAttribute.flex] - late final flex = FlexSpecUtility((v) => only(flex: v)); + /// Utility for defining [SelectButtonSpecAttribute.layout] + late final layout = FlexSpecUtility((v) => only(layout: v)); /// Utility for defining [SelectButtonSpecAttribute.icon] late final icon = IconSpecUtility((v) => only(icon: v)); @@ -793,7 +793,7 @@ class SelectButtonSpecUtility @override T only({ BoxSpecAttribute? container, - FlexSpecAttribute? flex, + FlexSpecAttribute? layout, IconSpecAttribute? icon, TextSpecAttribute? label, WidgetModifiersDataDto? modifiers, @@ -801,7 +801,7 @@ class SelectButtonSpecUtility }) { return builder(SelectButtonSpecAttribute( container: container, - flex: flex, + layout: layout, icon: icon, label: label, modifiers: modifiers, @@ -864,7 +864,7 @@ mixin _$SelectMenuItemSpec on Spec { IconSpec? icon, TextSpec? text, BoxSpec? container, - FlexSpec? flex, + FlexSpec? layout, WidgetModifiersData? modifiers, AnimatedData? animated, }) { @@ -872,7 +872,7 @@ mixin _$SelectMenuItemSpec on Spec { icon: icon ?? _$this.icon, text: text ?? _$this.text, container: container ?? _$this.container, - flex: flex ?? _$this.flex, + layout: layout ?? _$this.layout, modifiers: modifiers ?? _$this.modifiers, animated: animated ?? _$this.animated, ); @@ -892,7 +892,7 @@ mixin _$SelectMenuItemSpec on Spec { /// - [IconSpec.lerp] for [icon]. /// - [TextSpec.lerp] for [text]. /// - [BoxSpec.lerp] for [container]. - /// - [FlexSpec.lerp] for [flex]. + /// - [FlexSpec.lerp] for [layout]. /// For [modifiers] and [animated], the interpolation is performed using a step function. /// If [t] is less than 0.5, the value from the current [SelectMenuItemSpec] is used. Otherwise, the value @@ -908,7 +908,7 @@ mixin _$SelectMenuItemSpec on Spec { icon: _$this.icon.lerp(other.icon, t), text: _$this.text.lerp(other.text, t), container: _$this.container.lerp(other.container, t), - flex: _$this.flex.lerp(other.flex, t), + layout: _$this.layout.lerp(other.layout, t), modifiers: other.modifiers, animated: t < 0.5 ? _$this.animated : other.animated, ); @@ -923,7 +923,7 @@ mixin _$SelectMenuItemSpec on Spec { _$this.icon, _$this.text, _$this.container, - _$this.flex, + _$this.layout, _$this.modifiers, _$this.animated, ]; @@ -938,7 +938,7 @@ mixin _$SelectMenuItemSpec on Spec { properties.add( DiagnosticsProperty('container', _$this.container, defaultValue: null)); properties - .add(DiagnosticsProperty('flex', _$this.flex, defaultValue: null)); + .add(DiagnosticsProperty('layout', _$this.layout, defaultValue: null)); properties.add( DiagnosticsProperty('modifiers', _$this.modifiers, defaultValue: null)); properties.add( @@ -958,13 +958,13 @@ base class SelectMenuItemSpecAttribute extends SpecAttribute final IconSpecAttribute? icon; final TextSpecAttribute? text; final BoxSpecAttribute? container; - final FlexSpecAttribute? flex; + final FlexSpecAttribute? layout; const SelectMenuItemSpecAttribute({ this.icon, this.text, this.container, - this.flex, + this.layout, super.modifiers, super.animated, }); @@ -983,7 +983,7 @@ base class SelectMenuItemSpecAttribute extends SpecAttribute icon: icon?.resolve(mix), text: text?.resolve(mix), container: container?.resolve(mix), - flex: flex?.resolve(mix), + layout: layout?.resolve(mix), modifiers: modifiers?.resolve(mix), animated: animated?.resolve(mix) ?? mix.animation, ); @@ -1006,7 +1006,7 @@ base class SelectMenuItemSpecAttribute extends SpecAttribute icon: icon?.merge(other.icon) ?? other.icon, text: text?.merge(other.text) ?? other.text, container: container?.merge(other.container) ?? other.container, - flex: flex?.merge(other.flex) ?? other.flex, + layout: layout?.merge(other.layout) ?? other.layout, modifiers: modifiers?.merge(other.modifiers) ?? other.modifiers, animated: animated?.merge(other.animated) ?? other.animated, ); @@ -1021,7 +1021,7 @@ base class SelectMenuItemSpecAttribute extends SpecAttribute icon, text, container, - flex, + layout, modifiers, animated, ]; @@ -1033,7 +1033,7 @@ base class SelectMenuItemSpecAttribute extends SpecAttribute properties.add(DiagnosticsProperty('text', text, defaultValue: null)); properties .add(DiagnosticsProperty('container', container, defaultValue: null)); - properties.add(DiagnosticsProperty('flex', flex, defaultValue: null)); + properties.add(DiagnosticsProperty('layout', layout, defaultValue: null)); properties .add(DiagnosticsProperty('modifiers', modifiers, defaultValue: null)); properties @@ -1056,8 +1056,8 @@ class SelectMenuItemSpecUtility /// Utility for defining [SelectMenuItemSpecAttribute.container] late final container = BoxSpecUtility((v) => only(container: v)); - /// Utility for defining [SelectMenuItemSpecAttribute.flex] - late final flex = FlexSpecUtility((v) => only(flex: v)); + /// Utility for defining [SelectMenuItemSpecAttribute.layout] + late final layout = FlexSpecUtility((v) => only(layout: v)); /// Utility for defining [SelectMenuItemSpecAttribute.modifiers] late final wrap = SpecModifierUtility((v) => only(modifiers: v)); @@ -1079,7 +1079,7 @@ class SelectMenuItemSpecUtility IconSpecAttribute? icon, TextSpecAttribute? text, BoxSpecAttribute? container, - FlexSpecAttribute? flex, + FlexSpecAttribute? layout, WidgetModifiersDataDto? modifiers, AnimatedDataDto? animated, }) { @@ -1087,7 +1087,7 @@ class SelectMenuItemSpecUtility icon: icon, text: text, container: container, - flex: flex, + layout: layout, modifiers: modifiers, animated: animated, )); diff --git a/packages/remix/lib/src/components/select/select_style.dart b/packages/remix/lib/src/components/select/select_style.dart index d6d725a44..951229e25 100644 --- a/packages/remix/lib/src/components/select/select_style.dart +++ b/packages/remix/lib/src/components/select/select_style.dart @@ -14,7 +14,7 @@ class SelectStyle extends SpecStyle { ]; final buttonStyle = [ - $.button.flex.mainAxisAlignment.spaceBetween(), + $.button.layout.mainAxisAlignment.spaceBetween(), $.button.container.chain ..color.white() ..padding.all(10) @@ -57,17 +57,23 @@ class SelectStyle extends SpecStyle { ]; final itemStyle = [ - $.item.container.chain + $.item.titleSubtitleLayout.chain + ..crossAxisAlignment.start() + ..gap(2), + $.item.outerContainer.chain ..borderRadius(6) ..padding.vertical(8) ..padding.horizontal(6) ..width.infinity(), - $.item.text.chain + $.item.title.chain ..style.color.black() ..style.fontSize(14), + $.item.subtitle.chain + ..style.color.black45() + ..style.fontSize(12), $.item.icon.size(20), - $.item.flex.gap(6), - spec.on.hover($.item.container.color.black12()), + $.item.contentLayout.gap(6), + spec.on.hover($.item.outerContainer.color.black12()), ]; return Style.create([ @@ -96,14 +102,14 @@ class SelectDarkStyle extends SelectStyle { ..color.black() ..border.all.color.white12(); - final itemStyle = $.item.text.style.color.white(); + final itemStyle = $.item.title.style.color.white(); return Style.create([ super.makeStyle(spec).call(), buttonStyle, menuStyle, itemStyle, - spec.on.hover($.item.container.color.white12()), + spec.on.hover($.item.outerContainer.color.white12()), spec.on.disabled($.button.container.color.white10()), ]); } diff --git a/packages/remix/lib/src/components/select/select_theme.dart b/packages/remix/lib/src/components/select/select_theme.dart index 8f87b085b..fdbf31c37 100644 --- a/packages/remix/lib/src/components/select/select_theme.dart +++ b/packages/remix/lib/src/components/select/select_theme.dart @@ -15,18 +15,19 @@ class FortalezaSelectStyle extends SelectStyle { final baseStyle = super.makeStyle(spec); final baseThemeOverrides = Style( - $.menu.autoWidth.off(), + $.menu.autoWidth.on(), $.menu.container.chain ..color.$neutral(1) - ..border.all.color.$neutral(5) + ..border.all.color.$neutral(6) ..wrap.intrinsicWidth() - ..elevation.e2() ..padding.all.$space(2), $.button.chain + ..container.border.all.color.$neutral(6) + ..container.color.$neutral(1) ..icon.color.$accentAlpha(12) - ..flex.gap.$space(1) - ..flex.mainAxisSize.min(), - $.item.container.padding.horizontal.$space(3), + ..layout.gap.$space(1) + ..layout.mainAxisSize.min(), + $.item.outerContainer.padding.horizontal.$space(3), spec.on.disabled( $.button.chain ..container.color.$neutral(2) @@ -36,8 +37,8 @@ class FortalezaSelectStyle extends SelectStyle { ), spec.on.hover( $.button.container.border.all.color.$neutral(8), - $.item.container.color.$accent(9), - $.item.text.style.color.$white(), + $.item.outerContainer.color.$accent(9), + $.item.title.style.color.$white(), ), ); @@ -46,12 +47,12 @@ class FortalezaSelectStyle extends SelectStyle { ..color.$accent(3) ..border.none(), $.button.label.style.color.$accent(12), - $.item.text.style.color.$accent(12), + $.item.title.style.color.$accent(12), spec.on.hover( $.button.container.color.$accent(4), $.item.chain - ..container.color.$accent(4) - ..text.style.color.$accent(12), + ..outerContainer.color.$accent(4) + ..title.style.color.$accent(12), ), ); @@ -62,8 +63,8 @@ class FortalezaSelectStyle extends SelectStyle { spec.on.hover( $.button.container.color.$accent(4), $.item.chain - ..container.color.$accent(4) - ..text.style.color.$accent(12), + ..outerContainer.color.$accent(4) + ..title.style.color.$accent(12), ), spec.on.disabled( $.button.chain @@ -99,7 +100,7 @@ class FortalezaDarkSelectStyle extends FortalezaSelectStyle { ..container.color.$neutral(1) ..container.border.all.color.$neutral(7), $.menu.container.color.$neutral(1), - $.item.text.style.color.$neutral(12), + $.item.title.style.color.$neutral(12), spec.on.hover($.button.container.border.all.color.$neutral(8)), ); @@ -109,7 +110,7 @@ class FortalezaDarkSelectStyle extends FortalezaSelectStyle { ..icon.color.$accent(12) ..container.color.transparent() ..container.border.all.color.$neutral(7), - $.item.text.style.color.$neutral(12), + $.item.title.style.color.$neutral(12), ); return Style.create([ diff --git a/packages/remix/lib/src/components/select/select_widget.dart b/packages/remix/lib/src/components/select/select_widget.dart index cf4305d8c..8d7a4b68a 100644 --- a/packages/remix/lib/src/components/select/select_widget.dart +++ b/packages/remix/lib/src/components/select/select_widget.dart @@ -1,10 +1,35 @@ part of 'select.dart'; +/// A menu item for use in a [Select] dropdown. +/// +/// Each menu item has a [value] that will be passed to the [Select.onChanged] +/// callback when selected, and a [childBuilder] that defines how the item is displayed. +/// +/// +/// Example: +/// ```dart +/// SelectMenuItem( +/// value: 'item1', +/// childBuilder: (spec) => spec( +/// title: 'Item 1', +/// subtitle: 'Description', +/// leadingWidgetBuilder: (spec) => spec(Icons.star), +/// ), +/// ) +/// ``` class SelectMenuItem { + /// The value associated with this menu item. + /// This value will be passed to [Select.onChanged] when the item is selected. final T value; - final Widget child; - const SelectMenuItem({required this.value, required this.child}); + /// A builder function that returns the widget to display for this menu item. + /// The builder receives a [MenuItemSpec] that can be used to customize the appearance. + final WidgetSpecBuilder childBuilder; + + /// Creates a menu item for a [Select] dropdown. + /// + /// The [value] and [childBuilder] parameters must not be null. + const SelectMenuItem({required this.value, required this.childBuilder}); } class Select extends StatefulWidget { @@ -19,13 +44,28 @@ class Select extends StatefulWidget { this.disabled = false, }); + /// The currently selected value in the select component. final T value; + + /// {@macro remix.component.style} final SelectStyle? style; + + /// {@macro remix.component.variants} final List variants; + + /// {@macro remix.component.onChanged} final ValueChanged onChanged; + + /// Builder function that creates the button portion of the select component. + /// When tapped, this button will display the dropdown menu. + /// This allows customizing how the button is displayed. final WidgetSpecBuilder button; + + /// {@macro remix.component.disabled} final bool disabled; + /// The list of items to display in the dropdown menu. + /// Each item contains a value and widget to display. final List> items; @override @@ -121,18 +161,26 @@ class SelectState extends State> child: Flex( direction: Axis.vertical, children: widget.items.map((item) { + final selectedItemStateController = + MixWidgetStateController()..selected = true; + return Pressable( onPress: () { widget.onChanged(item.value); hide(); }, + controller: (widget.value == item.value) + ? selectedItemStateController + : null, child: SpecBuilder( style: appliedStyle.animate( duration: _baseAnimation.duration, curve: _baseAnimation.curve, ), builder: (context) { - return item.child; + final itemSpec = SelectSpec.of(context).item; + + return item.childBuilder(itemSpec); }, ), ); diff --git a/packages/remix/lib/src/components/slider/slider_widget.dart b/packages/remix/lib/src/components/slider/slider_widget.dart index 89cfb2db5..1f19fce72 100644 --- a/packages/remix/lib/src/components/slider/slider_widget.dart +++ b/packages/remix/lib/src/components/slider/slider_widget.dart @@ -13,19 +13,42 @@ class Slider extends StatefulWidget { this.style, this.variants = const [], this.disabled = false, - }); + }) : assert( + value >= min && value <= max, + 'Slider value must be between min and max values', + ); + /// The minimum value the slider can have. final double min; + + /// The maximum value the slider can have. final double max; + + /// The number of discrete divisions the slider can move through. + /// If it's 0, the slider moves continuously. final int divisions; + + /// The current value of the slider. + /// Must be between [min] and [max]. final double value; + + /// {@macro remix.component.style} final SliderStyle? style; + + /// {@macro remix.component.variants} final List variants; + + /// {@macro remix.component.disabled} final bool disabled; + /// Called when the user starts dragging the slider. + final ValueChanged? onChangeStart; + + /// Called during drag with the new value. final ValueChanged? onChanged; + + /// Called when the user is done selecting a new value. final ValueChanged? onChangeEnd; - final ValueChanged? onChangeStart; @override State createState() => _SliderState(); diff --git a/packages/remix/lib/src/components/spinner/spinner.dart b/packages/remix/lib/src/components/spinner/spinner.dart index 5ed23d637..fb0159ef7 100644 --- a/packages/remix/lib/src/components/spinner/spinner.dart +++ b/packages/remix/lib/src/components/spinner/spinner.dart @@ -37,6 +37,7 @@ final class SpinnerSpec extends Spec final SpinnerTypeStyle style; + /// {@macro spinner_spec_of} static const of = _$SpinnerSpec.of; static const from = _$SpinnerSpec.from; diff --git a/packages/remix/lib/src/components/spinner/spinner_style.dart b/packages/remix/lib/src/components/spinner/spinner_style.dart index c64fc3876..eeb8f103b 100644 --- a/packages/remix/lib/src/components/spinner/spinner_style.dart +++ b/packages/remix/lib/src/components/spinner/spinner_style.dart @@ -16,7 +16,7 @@ class SpinnerStyle extends SpecStyle { ..size(24) ..strokeWidth(1.5) ..color.black() - ..style.solid(), + ..style.dotted(), ]; final solidVariant = $.style.solid(); diff --git a/packages/remix/lib/src/components/spinner/spinner_theme.dart b/packages/remix/lib/src/components/spinner/spinner_theme.dart index 6b65ded40..4524f4918 100644 --- a/packages/remix/lib/src/components/spinner/spinner_theme.dart +++ b/packages/remix/lib/src/components/spinner/spinner_theme.dart @@ -16,7 +16,7 @@ class FortalezaSpinnerStyle extends SpinnerStyle { final softVariant = Style($.color.$accent(8)); return Style.create( - [baseStyle(), $.color.$accent(), soft(softVariant())], + [baseStyle(), $.color.$accent(), $.style.solid(), soft(softVariant())], ); } } diff --git a/packages/remix/lib/src/components/spinner/spinner_widget.dart b/packages/remix/lib/src/components/spinner/spinner_widget.dart index 4f4b75a2e..0d5f8e67e 100644 --- a/packages/remix/lib/src/components/spinner/spinner_widget.dart +++ b/packages/remix/lib/src/components/spinner/spinner_widget.dart @@ -3,7 +3,10 @@ part of 'spinner.dart'; class Spinner extends StatelessWidget { const Spinner({super.key, this.style, this.variants = const []}); + /// {@macro remix.component.style} final SpinnerStyle? style; + + /// {@macro remix.component.variants} final List variants; @override diff --git a/packages/remix/lib/src/components/switch/switch.dart b/packages/remix/lib/src/components/switch/switch.dart index 68059ab02..1989d27c0 100644 --- a/packages/remix/lib/src/components/switch/switch.dart +++ b/packages/remix/lib/src/components/switch/switch.dart @@ -17,6 +17,7 @@ base class SwitchSpec extends Spec final BoxSpec container; final BoxSpec indicator; + /// {@macro switch_spec_of} static const of = _$SwitchSpec.of; static const from = _$SwitchSpec.from; diff --git a/packages/remix/lib/src/components/switch/switch_widget.dart b/packages/remix/lib/src/components/switch/switch_widget.dart index 86de7ff22..d833694f6 100644 --- a/packages/remix/lib/src/components/switch/switch_widget.dart +++ b/packages/remix/lib/src/components/switch/switch_widget.dart @@ -10,10 +10,19 @@ class Switch extends StatefulWidget { this.variants = const [], }); + /// Whether the switch is on or off. final bool value; + + /// {@macro remix.component.onChanged} final ValueChanged onChanged; + + /// {@macro remix.component.style} final SwitchStyle? style; + + /// {@macro remix.component.disabled} final bool disabled; + + /// {@macro remix.component.variants} final List variants; @override diff --git a/packages/remix/lib/src/components/toast/toast.dart b/packages/remix/lib/src/components/toast/toast.dart index 7de166103..afa11e8a5 100644 --- a/packages/remix/lib/src/components/toast/toast.dart +++ b/packages/remix/lib/src/components/toast/toast.dart @@ -17,8 +17,8 @@ part 'toast_widget.dart'; @MixableSpec() base class ToastSpec extends Spec with _$ToastSpec, Diagnosticable { final BoxSpec container; - final FlexSpec containerFlex; - final FlexSpec textContentFlex; + final FlexSpec layout; + final FlexSpec textLayout; final TextSpec title; final TextSpec description; @@ -29,15 +29,15 @@ base class ToastSpec extends Spec with _$ToastSpec, Diagnosticable { const ToastSpec({ BoxSpec? container, - FlexSpec? containerFlex, - FlexSpec? textContentFlex, + FlexSpec? layout, + FlexSpec? textLayout, TextSpec? title, TextSpec? description, super.modifiers, super.animated, }) : container = container ?? const BoxSpec(), - containerFlex = containerFlex ?? const FlexSpec(), - textContentFlex = textContentFlex ?? const FlexSpec(), + layout = layout ?? const FlexSpec(), + textLayout = textLayout ?? const FlexSpec(), title = title ?? const TextSpec(), description = description ?? const TextSpec(); diff --git a/packages/remix/lib/src/components/toast/toast.g.dart b/packages/remix/lib/src/components/toast/toast.g.dart index 06aa5c741..d0c7c36f1 100644 --- a/packages/remix/lib/src/components/toast/toast.g.dart +++ b/packages/remix/lib/src/components/toast/toast.g.dart @@ -34,8 +34,8 @@ mixin _$ToastSpec on Spec { @override ToastSpec copyWith({ BoxSpec? container, - FlexSpec? containerFlex, - FlexSpec? textContentFlex, + FlexSpec? layout, + FlexSpec? textLayout, TextSpec? title, TextSpec? description, WidgetModifiersData? modifiers, @@ -43,8 +43,8 @@ mixin _$ToastSpec on Spec { }) { return ToastSpec( container: container ?? _$this.container, - containerFlex: containerFlex ?? _$this.containerFlex, - textContentFlex: textContentFlex ?? _$this.textContentFlex, + layout: layout ?? _$this.layout, + textLayout: textLayout ?? _$this.textLayout, title: title ?? _$this.title, description: description ?? _$this.description, modifiers: modifiers ?? _$this.modifiers, @@ -64,7 +64,7 @@ mixin _$ToastSpec on Spec { /// interpolation method: /// /// - [BoxSpec.lerp] for [container]. - /// - [FlexSpec.lerp] for [containerFlex] and [textContentFlex]. + /// - [FlexSpec.lerp] for [layout] and [textLayout]. /// - [TextSpec.lerp] for [title] and [description]. /// For [modifiers] and [animated], the interpolation is performed using a step function. @@ -79,8 +79,8 @@ mixin _$ToastSpec on Spec { return ToastSpec( container: _$this.container.lerp(other.container, t), - containerFlex: _$this.containerFlex.lerp(other.containerFlex, t), - textContentFlex: _$this.textContentFlex.lerp(other.textContentFlex, t), + layout: _$this.layout.lerp(other.layout, t), + textLayout: _$this.textLayout.lerp(other.textLayout, t), title: _$this.title.lerp(other.title, t), description: _$this.description.lerp(other.description, t), modifiers: other.modifiers, @@ -95,8 +95,8 @@ mixin _$ToastSpec on Spec { @override List get props => [ _$this.container, - _$this.containerFlex, - _$this.textContentFlex, + _$this.layout, + _$this.textLayout, _$this.title, _$this.description, _$this.modifiers, @@ -108,10 +108,9 @@ mixin _$ToastSpec on Spec { void _debugFillProperties(DiagnosticPropertiesBuilder properties) { properties.add( DiagnosticsProperty('container', _$this.container, defaultValue: null)); - properties.add(DiagnosticsProperty('containerFlex', _$this.containerFlex, - defaultValue: null)); - properties.add(DiagnosticsProperty( - 'textContentFlex', _$this.textContentFlex, + properties + .add(DiagnosticsProperty('layout', _$this.layout, defaultValue: null)); + properties.add(DiagnosticsProperty('textLayout', _$this.textLayout, defaultValue: null)); properties .add(DiagnosticsProperty('title', _$this.title, defaultValue: null)); @@ -134,15 +133,15 @@ mixin _$ToastSpec on Spec { base class ToastSpecAttribute extends SpecAttribute with Diagnosticable { final BoxSpecAttribute? container; - final FlexSpecAttribute? containerFlex; - final FlexSpecAttribute? textContentFlex; + final FlexSpecAttribute? layout; + final FlexSpecAttribute? textLayout; final TextSpecAttribute? title; final TextSpecAttribute? description; const ToastSpecAttribute({ this.container, - this.containerFlex, - this.textContentFlex, + this.layout, + this.textLayout, this.title, this.description, super.modifiers, @@ -161,8 +160,8 @@ base class ToastSpecAttribute extends SpecAttribute ToastSpec resolve(MixData mix) { return ToastSpec( container: container?.resolve(mix), - containerFlex: containerFlex?.resolve(mix), - textContentFlex: textContentFlex?.resolve(mix), + layout: layout?.resolve(mix), + textLayout: textLayout?.resolve(mix), title: title?.resolve(mix), description: description?.resolve(mix), modifiers: modifiers?.resolve(mix), @@ -184,10 +183,8 @@ base class ToastSpecAttribute extends SpecAttribute return ToastSpecAttribute( container: container?.merge(other.container) ?? other.container, - containerFlex: - containerFlex?.merge(other.containerFlex) ?? other.containerFlex, - textContentFlex: textContentFlex?.merge(other.textContentFlex) ?? - other.textContentFlex, + layout: layout?.merge(other.layout) ?? other.layout, + textLayout: textLayout?.merge(other.textLayout) ?? other.textLayout, title: title?.merge(other.title) ?? other.title, description: description?.merge(other.description) ?? other.description, modifiers: modifiers?.merge(other.modifiers) ?? other.modifiers, @@ -202,8 +199,8 @@ base class ToastSpecAttribute extends SpecAttribute @override List get props => [ container, - containerFlex, - textContentFlex, + layout, + textLayout, title, description, modifiers, @@ -215,10 +212,9 @@ base class ToastSpecAttribute extends SpecAttribute super.debugFillProperties(properties); properties .add(DiagnosticsProperty('container', container, defaultValue: null)); - properties.add(DiagnosticsProperty('containerFlex', containerFlex, - defaultValue: null)); - properties.add(DiagnosticsProperty('textContentFlex', textContentFlex, - defaultValue: null)); + properties.add(DiagnosticsProperty('layout', layout, defaultValue: null)); + properties + .add(DiagnosticsProperty('textLayout', textLayout, defaultValue: null)); properties.add(DiagnosticsProperty('title', title, defaultValue: null)); properties.add( DiagnosticsProperty('description', description, defaultValue: null)); @@ -238,11 +234,11 @@ class ToastSpecUtility /// Utility for defining [ToastSpecAttribute.container] late final container = BoxSpecUtility((v) => only(container: v)); - /// Utility for defining [ToastSpecAttribute.containerFlex] - late final containerFlex = FlexSpecUtility((v) => only(containerFlex: v)); + /// Utility for defining [ToastSpecAttribute.layout] + late final layout = FlexSpecUtility((v) => only(layout: v)); - /// Utility for defining [ToastSpecAttribute.textContentFlex] - late final textContentFlex = FlexSpecUtility((v) => only(textContentFlex: v)); + /// Utility for defining [ToastSpecAttribute.textLayout] + late final textLayout = FlexSpecUtility((v) => only(textLayout: v)); /// Utility for defining [ToastSpecAttribute.title] late final title = TextSpecUtility((v) => only(title: v)); @@ -268,8 +264,8 @@ class ToastSpecUtility @override T only({ BoxSpecAttribute? container, - FlexSpecAttribute? containerFlex, - FlexSpecAttribute? textContentFlex, + FlexSpecAttribute? layout, + FlexSpecAttribute? textLayout, TextSpecAttribute? title, TextSpecAttribute? description, WidgetModifiersDataDto? modifiers, @@ -277,8 +273,8 @@ class ToastSpecUtility }) { return builder(ToastSpecAttribute( container: container, - containerFlex: containerFlex, - textContentFlex: textContentFlex, + layout: layout, + textLayout: textLayout, title: title, description: description, modifiers: modifiers, diff --git a/packages/remix/lib/src/components/toast/toast_style.dart b/packages/remix/lib/src/components/toast/toast_style.dart index 074cdf8c1..dfda28030 100644 --- a/packages/remix/lib/src/components/toast/toast_style.dart +++ b/packages/remix/lib/src/components/toast/toast_style.dart @@ -15,13 +15,13 @@ class ToastStyle extends SpecStyle { ..margin.all(20) ..constraints.minWidth(300); - final containerFlexStyle = $.containerFlex.chain + final layoutFlexStyle = $.layout.chain ..direction.horizontal() ..mainAxisAlignment.spaceBetween() ..mainAxisSize.min() ..gap(16); - final textContentFlexStyle = $.textContentFlex.chain + final textLayoutFlexStyle = $.textLayout.chain ..direction.vertical() ..crossAxisAlignment.start() ..gap(4) @@ -37,8 +37,8 @@ class ToastStyle extends SpecStyle { return Style.create([ containerStyle, - containerFlexStyle, - textContentFlexStyle, + layoutFlexStyle, + textLayoutFlexStyle, titleStyle, descriptionStyle, ]); diff --git a/packages/remix/lib/src/components/toast/toast_theme.dart b/packages/remix/lib/src/components/toast/toast_theme.dart index 58677634f..1e71f7fd6 100644 --- a/packages/remix/lib/src/components/toast/toast_theme.dart +++ b/packages/remix/lib/src/components/toast/toast_theme.dart @@ -14,9 +14,9 @@ class FortalezaToastStyle extends ToastStyle { ..padding.all.$space(4) ..margin.all.$space(4); - final containerFlexStyle = $.containerFlex.gap.$space(5); + final layoutStyle = $.layout.gap.$space(5); - final textContentFlexStyle = $.textContentFlex.gap.$space(1); + final textLayoutStyle = $.textLayout.gap.$space(1); final titleStyle = $.title.chain ..style.$text(2) @@ -29,8 +29,8 @@ class FortalezaToastStyle extends ToastStyle { return Style.create([ super.makeStyle(spec).call(), containerStyle, - containerFlexStyle, - textContentFlexStyle, + layoutStyle, + textLayoutStyle, titleStyle, descriptionStyle, ]); diff --git a/packages/remix/lib/src/components/toast/toast_widget.dart b/packages/remix/lib/src/components/toast/toast_widget.dart index 243b0a6d5..6ed0879cb 100644 --- a/packages/remix/lib/src/components/toast/toast_widget.dart +++ b/packages/remix/lib/src/components/toast/toast_widget.dart @@ -11,12 +11,22 @@ class Toast extends StatelessWidget { this.variants = const [], }); + /// The title text displayed in the toast. final String title; + + /// The description text displayed below the title. final String? description; + + /// Optional widget displayed on the right side of the toast. final Widget? trailing; + + /// Optional widget displayed on the left side of the toast. final Widget? leading; + /// {@macro remix.component.style} final ToastStyle? style; + + /// {@macro remix.component.variants} final List variants; @override @@ -30,11 +40,11 @@ class Toast extends StatelessWidget { final spec = ToastSpec.of(context); return spec.container( - child: spec.containerFlex( + child: spec.layout( direction: Axis.horizontal, children: [ if (leading != null) leading!, - spec.textContentFlex( + spec.textLayout( direction: Axis.vertical, children: [ spec.title(title), diff --git a/packages/remix/lib/src/helpers/docs.dart b/packages/remix/lib/src/helpers/docs.dart new file mode 100644 index 000000000..0531eadee --- /dev/null +++ b/packages/remix/lib/src/helpers/docs.dart @@ -0,0 +1,40 @@ +// ignore_for_file: unused_element + +library docs; + +/// {@template remix.widget_spec_builder.text_spec} +/// The builder offers a [TextSpec] which can be used to style the +/// text consistently with component's style. +/// {@endtemplate} +/// +/// {@template remix.widget_spec_builder.spinner_builder} +/// The builder offers a [SpinnerSpec] which can be used to style the +/// spinner consistently with component's style. +/// {@endtemplate} +/// +/// {@template remix.widget_spec_builder.icon_spec} +/// The builder offers a [IconSpec] which can be used to style the +/// icon consistently with component's style. +/// {@endtemplate} +/// +/// {@template remix.widget_spec_builder.text_spec.code} +/// ```dart +/// +/// ``` +/// {@endtemplate} +const _widgetSpecBuilder = ''; + +/// {@template remix.component.variants} +/// The variants to apply to the component's style. +/// +/// All specified variants will be applied to the component if they are defined +/// in the corresponding Style. This allows for flexible customization of the +/// component's appearance based on predefined style variations. +/// {@endtemplate} +/// +/// {@template remix.component.style} +/// Customizes the component's appearance, overriding the style from theme. +/// Use this to create unique variations or apply specific styling that +/// differs from the global theme. +/// {@endtemplate} +const _useStyleFromContext = ''; diff --git a/packages/remix/test/components/accordion/accordion_widget_test.dart b/packages/remix/test/components/accordion/accordion_widget_test.dart index 5cda7704f..814863db9 100644 --- a/packages/remix/test/components/accordion/accordion_widget_test.dart +++ b/packages/remix/test/components/accordion/accordion_widget_test.dart @@ -11,7 +11,7 @@ void main() { MaterialApp( home: Accordion( style: const AccordionStyle(), - header: (spec) => XAccordionHeaderSpecWidget( + header: (spec) => AccordionHeaderSpecWidget( title: 'Test Accordion', spec: spec, ), @@ -32,7 +32,7 @@ void main() { MaterialApp( home: Accordion( style: const AccordionStyle(), - header: (spec) => XAccordionHeaderSpecWidget( + header: (spec) => AccordionHeaderSpecWidget( title: 'Custom Icons', spec: spec, leadingIcon: Icons.star, @@ -72,7 +72,7 @@ void main() { await tester.pumpWidget( MaterialApp( home: Accordion( - header: (spec) => XAccordionHeaderSpecWidget( + header: (spec) => AccordionHeaderSpecWidget( spec: spec, title: 'Styled Accordion', trailingIcon: Icons.rocket_launch, diff --git a/packages/remix/test/components/checkbox/checkbox_widget_test.dart b/packages/remix/test/components/checkbox/checkbox_widget_test.dart index abe07f564..eeb6f6db0 100644 --- a/packages/remix/test/components/checkbox/checkbox_widget_test.dart +++ b/packages/remix/test/components/checkbox/checkbox_widget_test.dart @@ -111,7 +111,7 @@ class FakeCheckboxStyle extends r.CheckboxStyle { final baseStyle = super.makeStyle(spec); return Style.create([ baseStyle(), - $.container.color(color), + $.indicatorContainer.color(color), ]); } } diff --git a/packages/remix/test/components/radio/radio_widget_test.dart b/packages/remix/test/components/radio/radio_widget_test.dart index a66664609..ddf72bc56 100644 --- a/packages/remix/test/components/radio/radio_widget_test.dart +++ b/packages/remix/test/components/radio/radio_widget_test.dart @@ -18,7 +18,7 @@ void main() { groupValue: true, disabled: true, style: const RadioStyle(), - text: '', + label: '', ), ), ); @@ -43,7 +43,7 @@ void main() { disabled: false, onChanged: (_) {}, style: const FakeRadioStyle(color), - text: '', + label: '', ), ), ); @@ -67,7 +67,7 @@ void main() { value: value, groupValue: true, onChanged: (v) => changedValue = v, - text: '', + label: '', ), ), ); @@ -86,7 +86,7 @@ void main() { value: false, groupValue: true, onChanged: (_) {}, - text: testText, + label: testText, ), ), ); diff --git a/website/pages/docs/remix/checkbox.md b/website/pages/docs/remix/checkbox.md new file mode 100644 index 000000000..f442185c4 --- /dev/null +++ b/website/pages/docs/remix/checkbox.md @@ -0,0 +1,57 @@ +# Checkbox + +The `Checkbox` component is a widget that allows users to toggle an option on and off. + +## Usage + +{{A playground example}} + +```dart +//... +bool _value = false; +@override +Widget build(BuildContext context) { + + return Checkbox( + value: _value, + onChanged: (value) { + setState(() { + _value = value; + }); + }, + label: 'Remember me', + ); +} +``` + +## Properties + +| Property | Type | Description | +| -------- | -------- | -------- | +| `value` | `bool` | Whether the checkbox is checked. | +| `onChanged` | `ValueChanged?` | The callback function that is called when the checkbox is tapped. | +| `label` | `String?` | The label of the checkbox. | +| `disabled` | `bool` | Whether the checkbox is disabled. | +| `iconChecked` | `IconData` | The icon to display when the checkbox is checked. | +| `iconUnchecked` | `IconData?` | The icon to display when the checkbox is unchecked. | +| `style` | `CheckboxStyle?` | The style of the checkbox. | +| `variants` | `List` | The variants of the checkbox. | + +## Customization +As all remix's components, the `Checkbox` component can be customized using the `style` and `variants` properties. + +{{A customization example}} + +The attributes that can be customized are the following: + +### layout +This property controls the layout of the checkbox. It corresponds to the `FlexSpec` class, allowing you to utilize all the style properties available in `Flex` to customize the checkbox's layout. + +### indicatorContainer +This property controls the container that wraps the indicator of the checkbox. It corresponds to the `BoxSpec` class, allowing you to utilize all the style properties available in `Box` to customize the checkbox's indicator container. + +### indicatorIcon +This property controls the icon of the checkbox. It corresponds to the `IconSpec` class, allowing you to utilize all the style properties available in `StyledIcon` to customize the checkbox's indicator icon. + +### label +This property controls the label of the checkbox. It corresponds to the `TextSpec` class, allowing you to utilize all the style properties available in `StyledText` to customize the checkbox's label.