diff --git a/CHANGELOG.md b/CHANGELOG.md index e1f2915..a9e4f70 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.3.1 + +- Bumps packages to latest. +- `flutter_hooks: ^0.21.2` +- `provider: ^6.1.5` + ## 0.2.4 Bumps packages to latest. diff --git a/example/lib/main.dart b/example/lib/main.dart index 89a1f92..9c06555 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -16,7 +16,7 @@ void main() { } class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + const MyApp({super.key}); @override Widget build(BuildContext context) { diff --git a/example/lib/ui/bottom_sheets/notice_sheet/notice_sheet.dart b/example/lib/ui/bottom_sheets/notice_sheet/notice_sheet.dart index 5f11532..f8547d6 100644 --- a/example/lib/ui/bottom_sheets/notice_sheet/notice_sheet.dart +++ b/example/lib/ui/bottom_sheets/notice_sheet/notice_sheet.dart @@ -7,15 +7,22 @@ class NoticeSheet extends StatelessWidget { final Function(SheetResponse)? completer; final SheetRequest request; const NoticeSheet({ - Key? key, + super.key, required this.completer, required this.request, - }) : super(key: key); + }); @override Widget build(BuildContext context) { return Container( padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15), + decoration: const BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.only( + topLeft: Radius.circular(10), + topRight: Radius.circular(10), + ), + ), child: Column( crossAxisAlignment: CrossAxisAlignment.start, mainAxisSize: MainAxisSize.min, @@ -34,13 +41,6 @@ class NoticeSheet extends StatelessWidget { verticalSpaceLarge, ], ), - decoration: const BoxDecoration( - color: Colors.white, - borderRadius: BorderRadius.only( - topLeft: Radius.circular(10), - topRight: Radius.circular(10), - ), - ), ); } } diff --git a/example/lib/ui/dialogs/info_alert/info_alert_dialog.dart b/example/lib/ui/dialogs/info_alert/info_alert_dialog.dart index 278a97b..168a64d 100644 --- a/example/lib/ui/dialogs/info_alert/info_alert_dialog.dart +++ b/example/lib/ui/dialogs/info_alert/info_alert_dialog.dart @@ -10,10 +10,10 @@ class InfoAlertDialog extends StatelessWidget { final Function(DialogResponse) completer; const InfoAlertDialog({ - Key? key, + super.key, required this.request, required this.completer, - }) : super(key: key); + }); @override Widget build(BuildContext context) { @@ -75,6 +75,10 @@ class InfoAlertDialog extends StatelessWidget { height: 50, width: double.infinity, alignment: Alignment.center, + decoration: BoxDecoration( + color: Colors.black, + borderRadius: BorderRadius.circular(10), + ), child: const Text( 'Got it', style: TextStyle( @@ -83,10 +87,6 @@ class InfoAlertDialog extends StatelessWidget { fontSize: 16, ), ), - decoration: BoxDecoration( - color: Colors.black, - borderRadius: BorderRadius.circular(10), - ), ), ) ], diff --git a/example/lib/ui/views/home/home_view.dart b/example/lib/ui/views/home/home_view.dart index eb6c272..b9b42fd 100644 --- a/example/lib/ui/views/home/home_view.dart +++ b/example/lib/ui/views/home/home_view.dart @@ -6,7 +6,7 @@ import 'package:stacked_hooks_example/ui/common/ui_helpers.dart'; import 'home_viewmodel.dart'; class HomeView extends StackedView { - const HomeView({Key? key}) : super(key: key); + const HomeView({super.key}); @override Widget builder(BuildContext context, HomeViewModel viewModel, Widget? child) { @@ -38,23 +38,23 @@ class HomeView extends StackedView { children: [ MaterialButton( color: kcDarkGreyColor, + onPressed: viewModel.goToWithStackedHook, child: const Text( 'With Stacked Hook', style: TextStyle( color: Colors.white, ), ), - onPressed: viewModel.goToWithStackedHook, ), MaterialButton( color: kcDarkGreyColor, + onPressed: viewModel.goToWithoutStackedHook, child: const Text( 'Without Stacked Hook', style: TextStyle( color: Colors.white, ), ), - onPressed: viewModel.goToWithoutStackedHook, ), ], ) diff --git a/example/lib/ui/views/startup/startup_view.dart b/example/lib/ui/views/startup/startup_view.dart index 9ecaf26..7b03787 100644 --- a/example/lib/ui/views/startup/startup_view.dart +++ b/example/lib/ui/views/startup/startup_view.dart @@ -6,7 +6,7 @@ import 'package:stacked_hooks_example/ui/common/ui_helpers.dart'; import 'startup_viewmodel.dart'; class StartupView extends StackedView { - const StartupView({Key? key}) : super(key: key); + const StartupView({super.key}); @override Widget builder( diff --git a/example/lib/ui/views/with_stacked_hook/with_stacked_hook_view.dart b/example/lib/ui/views/with_stacked_hook/with_stacked_hook_view.dart index 45533ef..dcbf8aa 100644 --- a/example/lib/ui/views/with_stacked_hook/with_stacked_hook_view.dart +++ b/example/lib/ui/views/with_stacked_hook/with_stacked_hook_view.dart @@ -6,7 +6,7 @@ import 'package:stacked_hooks/stacked_hooks.dart'; import 'with_stacked_hook_viewmodel.dart'; class WithStackedHookView extends StackedView { - const WithStackedHookView({Key? key}) : super(key: key); + const WithStackedHookView({super.key}); @override Widget builder( diff --git a/example/lib/ui/views/without_stacked_hook/without_stacked_hook_view.dart b/example/lib/ui/views/without_stacked_hook/without_stacked_hook_view.dart index 0d2c2c4..8693f5b 100644 --- a/example/lib/ui/views/without_stacked_hook/without_stacked_hook_view.dart +++ b/example/lib/ui/views/without_stacked_hook/without_stacked_hook_view.dart @@ -4,7 +4,7 @@ import 'package:stacked/stacked.dart'; import 'without_stacked_hook_viewmodel.dart'; class WithoutStackedHookView extends StackedView { - const WithoutStackedHookView({Key? key}) : super(key: key); + const WithoutStackedHookView({super.key}); @override Widget builder( diff --git a/lib/src/_stacked_hook_view.dart b/lib/src/_stacked_hook_view.dart index 306c291..5dc8523 100644 --- a/lib/src/_stacked_hook_view.dart +++ b/lib/src/_stacked_hook_view.dart @@ -6,7 +6,7 @@ import 'package:provider/provider.dart'; /// build abstract class StackedHookView extends HookWidget { final bool reactive; - const StackedHookView({Key? key, this.reactive = true}) : super(key: key); + const StackedHookView({super.key, this.reactive = true}); @override Widget build(BuildContext context) => builder( @@ -21,7 +21,7 @@ abstract class StackedHookView extends HookWidget { 'This widget will be removed by March 2023, please use the StackedHookView instead') abstract class HookViewModelWidget extends HookWidget { final bool reactive; - const HookViewModelWidget({Key? key, this.reactive = true}) : super(key: key); + const HookViewModelWidget({super.key, this.reactive = true}); @override Widget build(BuildContext context) => buildViewModelWidget( diff --git a/pubspec.yaml b/pubspec.yaml index 0ea8489..a778b9a 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: stacked_hooks description: Classes that help you make use of hooks when using the stacked package -version: 0.2.4 +version: 0.3.1 homepage: https://stacked.filledstacks.com/ repository: https://github.com/Stacked-Org/hooks.git issue_tracker: https://github.com/Stacked-Org/framework/issues @@ -11,11 +11,11 @@ environment: dependencies: flutter: sdk: flutter - flutter_hooks: ^0.20.5 - provider: ^6.1.2 + flutter_hooks: ^0.21.2 + provider: ^6.1.5 dev_dependencies: - flutter_lints: ^5.0.0 + flutter_lints: ^6.0.0 flutter_test: sdk: flutter @@ -23,7 +23,7 @@ dev_dependencies: # following page: https://dart.dev/tools/pub/pubspec # The following section is specific to Flutter. -flutter: +# flutter: # To add assets to your package, add an assets section, like this: # assets: # - images/a_dot_burr.jpeg