main.dart 840 Bytes
import 'dart:async';

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:intl/date_symbol_data_local.dart';

import 'app/bootstrap/app_bootstrap.dart';
import 'app/double_feel_app.dart';
import 'core/theme/app_theme.dart';

Future<void> main() async {
  runZonedGuarded<Future<Null>>(
    () async {
      WidgetsFlutterBinding.ensureInitialized();
      FlutterError.onError = (errorDetails) {};
      PlatformDispatcher.instance.onError = (error, stack) {
        return true;
      };

      SystemChrome.setSystemUIOverlayStyle(AppTheme.systemUiOverlayStyle);

      await AppBootstrap.init();
      await initializeDateFormatting();
      runApp(const DoubleFeelApp());
    },
    (error, stackTrace) async {
      if (kDebugMode) {}
    },
  );
}