diff --git a/CHANGELOG.md b/CHANGELOG.md index 85f4409..7ea3c27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # 0.9.0 - feat: add `NesIcons.expand` + - fix: `NesDialog` allows a generic to be informed. # 0.8.0 - feat: add `NesIcons.leftHand` diff --git a/example/lib/gallery/sections/dialogs.dart b/example/lib/gallery/sections/dialogs.dart index 3533163..a89bbbd 100644 --- a/example/lib/gallery/sections/dialogs.dart +++ b/example/lib/gallery/sections/dialogs.dart @@ -21,7 +21,7 @@ class DialogsSection extends StatelessWidget { type: NesButtonType.normal, child: const Text('Plain'), onPressed: () { - NesDialog.show( + NesDialog.show( context: context, builder: (_) => const Text('Hello World'), ); diff --git a/lib/src/widgets/dialogs/nes_dialog.dart b/lib/src/widgets/dialogs/nes_dialog.dart index 83556dd..35ec4c3 100644 --- a/lib/src/widgets/dialogs/nes_dialog.dart +++ b/lib/src/widgets/dialogs/nes_dialog.dart @@ -17,11 +17,11 @@ class NesDialog extends StatelessWidget { final Widget child; /// A shortcut method that can be used to show this dialog. - static Future show({ + static Future show({ required BuildContext context, required WidgetBuilder builder, }) { - return showGeneralDialog( + return showGeneralDialog( context: context, transitionBuilder: (context, animation, secondaryAnimation, child) { return Transform.scale( diff --git a/test/src/widgets/dialogs/nes_dialog_test.dart b/test/src/widgets/dialogs/nes_dialog_test.dart index ccbe955..ccb9e54 100644 --- a/test/src/widgets/dialogs/nes_dialog_test.dart +++ b/test/src/widgets/dialogs/nes_dialog_test.dart @@ -14,7 +14,7 @@ extension NesDialogTest on WidgetTester { return NesButton( type: NesButtonType.normal, onPressed: () async { - final value = await NesDialog.show( + final value = await NesDialog.show( context: context, builder: (_) => const Text('Hello World'), );