From 3d8c0d03d918f837ed4fbcfb621d0a0267c4c67c Mon Sep 17 00:00:00 2001 From: Dominik Toton Date: Wed, 5 Jun 2024 11:38:36 +0200 Subject: [PATCH] docs: improve --- catalyst_voices/lib/configs/bootstrap.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/catalyst_voices/lib/configs/bootstrap.dart b/catalyst_voices/lib/configs/bootstrap.dart index 6ac5095971..1d66d4cdec 100644 --- a/catalyst_voices/lib/configs/bootstrap.dart +++ b/catalyst_voices/lib/configs/bootstrap.dart @@ -8,6 +8,8 @@ import 'package:go_router/go_router.dart'; import 'package:url_strategy/url_strategy.dart'; /// Initializes and runs the application provided by the [builder]. +/// +/// When updating see docs for [bootstrapForTests]. Future bootstrap(FutureOr Function() builder) async { WidgetsFlutterBinding.ensureInitialized(); @@ -32,6 +34,8 @@ Future bootstrap(FutureOr Function() builder) async { /// - Must not override [FlutterError.onError]. /// - Must be synced with [bootstrap], to run exactly the same /// initialization logic except for the above exclusions. +/// +/// Keep the function close to [bootstrap] so that they get updated together. Future bootstrapForTests() async { GoRouter.optionURLReflectsImperativeAPIs = true; setPathUrlStrategy();