Catcher2 class
- Implemented types
Constructors
- Catcher2({Widget? rootWidget, void runAppFunction()?, Catcher2Options? releaseConfig, Catcher2Options? debugConfig, Catcher2Options? profileConfig, bool enableLogger = true, bool ensureInitialized = false, })
- Builds catcher 2 instance
Properties
- debugConfig ↔ Catcher2Options?
-
Instance of catcher 2 config used in debug mode
getter/setter pair
- enableLogger → bool
-
Should catcher 2 logs be enabled
final
- ensureInitialized → bool
-
Should catcher 2 run WidgetsFlutterBinding.ensureInitialized() during
initialization.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- profileConfig ↔ Catcher2Options?
-
Instance of catcher 2 config used in profile mode
getter/setter pair
- releaseConfig ↔ Catcher2Options?
-
Instance of catcher 2 config used in release mode
getter/setter pair
- rootWidget → Widget?
-
Root widget that is run using runApp, see also runAppFunction if you
want to customise how the widget is run
final
- runAppFunction → void Function()?
-
The function to be executed after setup, should at least call runApp.
See also rootWidget if no special configuration is necessary and only a
call to runApp is enough.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenshotManager ↔ Catcher2ScreenshotManager
-
getter/setter pair
Methods
-
getCurrentConfig(
) → Catcher2Options? - Get currently used config.
-
isReportHandlerSupportedInPlatform(
Report report, ReportHandler reportHandler) → bool - Checks is report handler is supported in given platform. Only supported report handlers in given platform can be used.
-
isReportModeSupportedInPlatform(
Report report, ReportMode reportMode) → bool - Check if given report mode is enabled in current platform. Only supported handlers in given report mode can be used.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onActionConfirmed(
Report report) → void -
Code which should be triggered if report mode has been confirmed
override
-
onActionRejected(
Report report) → void -
Code which should be triggered if report mode has been rejected
override
-
toString(
) → String -
A string representation of this object.
inherited
-
updateConfig(
{Catcher2Options? debugConfig, Catcher2Options? profileConfig, Catcher2Options? releaseConfig}) → void - Update config after initialization
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
-
Instance of navigator key
no setter
Static Methods
-
addDefaultErrorWidget(
{bool showStacktrace = true, String title = 'An application error has occurred', String description = 'There was unexpected situation in application. Application has been ' 'able to recover from error state.', double maxWidthForSmallMode = 150}) → void - Add default error widget which replaces red screen of death (RSOD).
-
getInstance(
) → Catcher2 - Get current Catcher 2 instance.
-
reportCheckedError(
dynamic error, dynamic stackTrace) → void - Report checked error (error caught in try-catch block). Catcher 2 will treat this as normal exception and pass it to handlers.
-
sendTestException(
) → void - Send text exception. Used to test Catcher 2 configuration.