flutter_exception_ui_custom

Use coustom Ui to show uncatch exception

Getting Started

This project is a starting point for a Flutter,When an error occurs, replace the original red error reporting interface with the custom UI interface.

##Simple Use

ExceptionCatchUtil.init(() {
      runApp(MaterialApp());
    });

##Custom Error UI

Widget widget = Scaffold(
    body: Center(
      child: Text("Custom Error UI"),
    ),
  );

ExceptionCatchUtil.init(() {
      runApp(MaterialApp());
    },customErrorUI: widget);

##Custom Error UI and print error

Widget widget = Scaffold(
    body: Center(
      child: Text("Custom Error UI"),
    ),
  );

ExceptionCatchUtil.init(() {
      runApp(MaterialApp());
    },customErrorUI: widget,errorCallback: (Object error, StackTrace stackTrace){
      print("error "+error.toString());
      print("stackTrace "+stackTrace.toString());
    });

Libraries

flutter_exception_ui_custom