Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
18 changes: 9 additions & 9 deletions example/lib/ui/bottom_sheets/notice_sheet/notice_sheet.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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),
),
),
);
}
}
12 changes: 6 additions & 6 deletions example/lib/ui/dialogs/info_alert/info_alert_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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(
Expand All @@ -83,10 +87,6 @@ class InfoAlertDialog extends StatelessWidget {
fontSize: 16,
),
),
decoration: BoxDecoration(
color: Colors.black,
borderRadius: BorderRadius.circular(10),
),
),
)
],
Expand Down
6 changes: 3 additions & 3 deletions example/lib/ui/views/home/home_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:stacked_hooks_example/ui/common/ui_helpers.dart';
import 'home_viewmodel.dart';

class HomeView extends StackedView<HomeViewModel> {
const HomeView({Key? key}) : super(key: key);
const HomeView({super.key});

@override
Widget builder(BuildContext context, HomeViewModel viewModel, Widget? child) {
Expand Down Expand Up @@ -38,23 +38,23 @@ class HomeView extends StackedView<HomeViewModel> {
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,
),
],
)
Expand Down
2 changes: 1 addition & 1 deletion example/lib/ui/views/startup/startup_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:stacked_hooks_example/ui/common/ui_helpers.dart';
import 'startup_viewmodel.dart';

class StartupView extends StackedView<StartupViewModel> {
const StartupView({Key? key}) : super(key: key);
const StartupView({super.key});

@override
Widget builder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:stacked_hooks/stacked_hooks.dart';
import 'with_stacked_hook_viewmodel.dart';

class WithStackedHookView extends StackedView<WithStackedHookViewModel> {
const WithStackedHookView({Key? key}) : super(key: key);
const WithStackedHookView({super.key});

@override
Widget builder(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:stacked/stacked.dart';
import 'without_stacked_hook_viewmodel.dart';

class WithoutStackedHookView extends StackedView<WithoutStackedHookViewModel> {
const WithoutStackedHookView({Key? key}) : super(key: key);
const WithoutStackedHookView({super.key});

@override
Widget builder(
Expand Down
4 changes: 2 additions & 2 deletions lib/src/_stacked_hook_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import 'package:provider/provider.dart';
/// build
abstract class StackedHookView<T> 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(
Expand All @@ -21,7 +21,7 @@ abstract class StackedHookView<T> extends HookWidget {
'This widget will be removed by March 2023, please use the StackedHookView instead')
abstract class HookViewModelWidget<T> 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(
Expand Down
10 changes: 5 additions & 5 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -11,19 +11,19 @@ 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

# For information on the generic Dart part of this file, see the
# 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
Expand Down
Loading