Temporary setup of alternative to advertisements
This commit is contained in:
parent
ad2d932842
commit
57a9793a40
14 changed files with 653 additions and 56 deletions
14
lib/app_navigator.dart
Normal file
14
lib/app_navigator.dart
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:flutter/material.dart';
|
||||
|
||||
/// A stable handle on the app's navigator, for the few places that need to
|
||||
/// put something on screen from outside a widget's own build method:
|
||||
///
|
||||
/// - [AppState.onAdWatched]'s "remove ads for a year" upsell, which fires
|
||||
/// from deep inside a background sync rather than from a widget.
|
||||
/// - `showAdPlaceholder`, called by [AdService], which owns no
|
||||
/// [BuildContext] of its own (real ads are native overlays that never
|
||||
/// needed one).
|
||||
///
|
||||
/// Lives here rather than in `main.dart` so services and widgets can reach
|
||||
/// it without importing the app's entry point.
|
||||
final navigatorKey = GlobalKey<NavigatorState>();
|
||||
Loading…
Add table
Add a link
Reference in a new issue