diff --git a/lib/calculator/widgets/sheet_settings.dart b/lib/calculator/widgets/sheet_settings.dart index cf39c55..5284773 100644 --- a/lib/calculator/widgets/sheet_settings.dart +++ b/lib/calculator/widgets/sheet_settings.dart @@ -110,35 +110,32 @@ class _SheetSettingsViewState extends State { void showConfirmRemovalDialog(BuildContext context, Sheet sheet) { final calcCubit = context.read(); - Future.delayed( - const Duration(seconds: 0), - () => showDialog( - context: context, - builder: (context) { - return AlertDialog( - content: Text('Remove sheet "${sheet.name}?"'), - actions: [ - TextButton( - onPressed: () { - calcCubit.removeSheet(sheet); - Navigator.pushNamedAndRemoveUntil( - context, - CalculatorPage.id, - (route) => false, - ); - }, - child: const Text( - 'REMOVE', - style: TextStyle(color: Colors.red), - ), - ), - TextButton( - onPressed: () => Navigator.pop(context), - child: const Text('CLOSE'), + showDialog( + context: context, + builder: (context) { + return AlertDialog( + content: Text('Remove sheet "${sheet.name}?"'), + actions: [ + TextButton( + onPressed: () { + calcCubit.removeSheet(sheet); + Navigator.pushNamedAndRemoveUntil( + context, + CalculatorPage.id, + (route) => false, + ); + }, + child: const Text( + 'REMOVE', + style: TextStyle(color: Colors.red), ), - ], - ); - }, - ), + ), + TextButton( + onPressed: () => Navigator.pop(context), + child: const Text('CLOSE'), + ), + ], + ); + }, ); }