Add TV update flow in Tentang and fix startup zone
This commit is contained in:
@@ -13,38 +13,39 @@ import 'core/sacred_tokens.dart';
|
||||
import 'data/local/models.dart';
|
||||
import 'features/home/home_view.dart';
|
||||
|
||||
void main() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
FlutterError.onError = (details) {
|
||||
FlutterError.presentError(details);
|
||||
debugPrint('[Fatal][FlutterError] ${details.exceptionAsString()}');
|
||||
};
|
||||
PlatformDispatcher.instance.onError = (error, stack) {
|
||||
debugPrint('[Fatal][PlatformDispatcher] $error');
|
||||
debugPrintStack(stackTrace: stack);
|
||||
return true;
|
||||
};
|
||||
ErrorWidget.builder = (details) {
|
||||
return const Material(
|
||||
color: SacredColors.background,
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(32),
|
||||
child: Text(
|
||||
'Terjadi gangguan tampilan.\nAplikasi tetap berjalan dalam mode aman.',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: SacredColors.onSurface,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w700,
|
||||
void main() {
|
||||
runZonedGuarded(() async {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
FlutterError.onError = (details) {
|
||||
FlutterError.presentError(details);
|
||||
debugPrint('[Fatal][FlutterError] ${details.exceptionAsString()}');
|
||||
};
|
||||
PlatformDispatcher.instance.onError = (error, stack) {
|
||||
debugPrint('[Fatal][PlatformDispatcher] $error');
|
||||
debugPrintStack(stackTrace: stack);
|
||||
return true;
|
||||
};
|
||||
ErrorWidget.builder = (details) {
|
||||
return const Material(
|
||||
color: SacredColors.background,
|
||||
child: Center(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.all(32),
|
||||
child: Text(
|
||||
'Terjadi gangguan tampilan.\nAplikasi tetap berjalan dalam mode aman.',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: SacredColors.onSurface,
|
||||
fontSize: 24,
|
||||
fontWeight: FontWeight.w700,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
};
|
||||
);
|
||||
};
|
||||
|
||||
await runZonedGuarded(() async {
|
||||
await _bootstrapAndRun();
|
||||
}, (error, stack) {
|
||||
debugPrint('[Fatal][Zone] $error');
|
||||
|
||||
Reference in New Issue
Block a user