init method

dynamic init()

Implementation

init(){
  //全局忽略UI异常
  FlutterError.onError = (FlutterErrorDetails details) {
    if (FFEmpty.stringIsEmpty(details.library)) {
      return;
    }

    //忽略UI沉浸异常
    if (details.library?.endsWith("library") == true) {
      print('YCGlobalManger library = ${details.library} , main catch a exception ${details.exception.toString()}');
      return;
    }

    print('YCGlobalManger library = ${details.library} , main catch a exception ${details.exception.toString()}');
    //上报
    FlutterError.dumpErrorToConsole(details);
  };
}