27 lines
846 B
Dart
27 lines
846 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter/services.dart';
|
|
|
|
/// The native launch screen remains until runApp submits the initialized app.
|
|
/// Use normal bootstrap instead of a second splash or deferred warm-up frames.
|
|
Future<void> launchApplication({
|
|
required Future<void> ready,
|
|
required Widget child,
|
|
}) async {
|
|
try {
|
|
await ready;
|
|
} catch (_) {
|
|
// AppController exposes initialization failures in its recovery UI.
|
|
// Preserve access to that UI instead of leaving the native launch visible.
|
|
}
|
|
runApp(
|
|
AnnotatedRegion<SystemUiOverlayStyle>(
|
|
value: SystemUiOverlayStyle.dark.copyWith(
|
|
statusBarColor: Colors.transparent,
|
|
systemNavigationBarColor: const Color(0xFFF3F7FF),
|
|
systemNavigationBarIconBrightness: Brightness.dark,
|
|
),
|
|
child: child,
|
|
),
|
|
);
|
|
}
|