main function

dynamic main()

Implementation

main()
{
  ErrorWidget.builder = (FlutterErrorDetails details) {
    Log().error(details.exception.toString(), caller: 'ErrorWidget() : main.dart');
    // In debug mode shows the normal redscreen  error
    if (kDebugMode) {
      return ErrorWidget("${details.exception}\n${details.stack.toString()}");
    }
    // In release builds, shows a more user friendly interface
    return Container(
      color: Colors.white,
      alignment: Alignment.center,
      child: Text('⚠️\n${Phrases().somethingWentWrong}',
        style: const TextStyle(color: Colors.black),
        textAlign: TextAlign.center,
      ),
    );
  };
  runApp(Container(color: Colors.black, child: Splash(key: UniqueKey(), onInitializationComplete: runMainApp)));
}