Skip to content

Commit

Permalink
ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
fremartini committed Sep 28, 2023
1 parent 881e212 commit a7400a8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
3 changes: 2 additions & 1 deletion lib/core/widgets/pages/splash/splash_error_page.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:coffeecard/core/ignore_value.dart';
import 'package:coffeecard/core/strings.dart';
import 'package:coffeecard/core/styles/app_colors.dart';
import 'package:coffeecard/core/styles/app_text_styles.dart';
Expand Down Expand Up @@ -43,7 +44,7 @@ class _SplashErrorPageState extends State<SplashErrorPage> {
onPressed: () async {
final environmentLoaded =
context.read<EnvironmentCubit>().getConfig();
LoadingOverlay.show(context).ignore();
ignoreValue(LoadingOverlay.show(context));
// Delay since it is otherwise not obvious
// a load is happening with no internet
final _ = await Future.delayed(const Duration(milliseconds: 200));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:coffeecard/core/ignore_value.dart';
import 'package:coffeecard/core/strings.dart';
import 'package:coffeecard/core/widgets/components/dialog.dart';
import 'package:coffeecard/core/widgets/components/loading_overlay.dart';
Expand Down Expand Up @@ -68,7 +69,7 @@ class _LoginPagePasscodeState extends State<LoginPagePasscode> {
previous is LoginLoading || current is LoginLoading,
listener: (context, state) {
if (state is LoginLoading) {
LoadingOverlay.show(context).ignore();
ignoreValue(LoadingOverlay.show(context));
} else {
LoadingOverlay.hide(context);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class BuyTicketsPage extends StatelessWidget {
final updateReceiptsRequest =
context.read<ReceiptCubit>().fetchReceipts();

ReceiptOverlay.show(
final _ = ReceiptOverlay.show(
isTestEnvironment:
envState is EnvironmentLoaded && envState.env.isTest,
status: Strings.purchased,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:coffeecard/core/ignore_value.dart';
import 'package:coffeecard/core/strings.dart';
import 'package:coffeecard/core/validator/input_validator.dart';
import 'package:coffeecard/core/widgets/components/dialog.dart';
Expand Down Expand Up @@ -40,9 +41,9 @@ class _RegisterNameFormState extends State<RegisterNameForm> {
}

Future<void> _showTerms(BuildContext context, String name) async {
LoadingOverlay.show(context).ignore();
ignoreValue(LoadingOverlay.show(context));
// Allow keyboard to disappear before showing dialog
final _ = await Future.delayed(const Duration(milliseconds: 350));
ignoreValue(await Future.delayed(const Duration(milliseconds: 350)));
if (!mounted) return;

// Shows the terms to the user before proceeding with the registration.
Expand Down
4 changes: 2 additions & 2 deletions lib/features/ticket/presentation/widgets/tickets_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class TicketSection extends StatelessWidget {
Navigator.of(context, rootNavigator: true).pop();
}

LoadingOverlay.show(context).ignore();
final _ = LoadingOverlay.show(context);
}
if (state is TicketUsed) {
// Refresh or load user info (for updated rank stats)
Expand All @@ -46,7 +46,7 @@ class TicketSection extends StatelessWidget {

final envState = context.read<EnvironmentCubit>().state;
LoadingOverlay.hide(context);
ReceiptOverlay.show(
final _ = ReceiptOverlay.show(
isTestEnvironment:
envState is EnvironmentLoaded && envState.env.isTest,
status: state.receipt is PurchaseReceipt
Expand Down

0 comments on commit a7400a8

Please sign in to comment.