start method
flutter engine 启动初始化
Implementation
void start({required OnInitializeListener listener}) async {
WidgetsFlutterBinding.ensureInitialized();
Logger.instance.builder?.setLogListener(LogHandler()).setPrintLog(true);
EyFlutter.instance.setStartTime(time: System.currentTimeMillis);
listener.startSyncCall(syncCall: () {
MediaUtils.instance.initialize(375);
LangStorage.instance.loadLang();
overlayStyle();
listener.startCall(complete: () {
var appWidget = listener.buildAppWidget();
CrashHandler.instance.build(OKToast(child: appWidget),
report: (crashInfo) {
listener.crashReportCall(crashInfo);
},
environment: listener.environment(),
completedCall: () {
listener.crashCompletedCall();
});
});
});
}