Catcher class

Mixed in types

Constructors

Catcher({Widget? rootWidget, void runAppFunction()?, CatcherOptions? releaseConfig, CatcherOptions? debugConfig, CatcherOptions? profileConfig, bool enableLogger = true, bool ensureInitialized = false, GlobalKey<NavigatorState>? navigatorKey})
Builds catcher instance

Properties

debugConfig CatcherOptions?
Instance of catcher config used in debug mode
getter/setter pair
enableLogger bool
Should catcher logs be enabled
final
ensureInitialized bool
Should catcher run WidgetsFlutterBinding.ensureInitialized() during initialization.
final
hashCode int
The hash code for this object.
no setterinherited
profileConfig CatcherOptions?
Instance of catcher config used in profile mode
getter/setter pair
releaseConfig CatcherOptions?
Instance of catcher config used in release mode
getter/setter pair
rootWidget Widget?
Root widget which will be ran
final
runAppFunction → (void Function()?)
Run app function which will be ran
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenshotManager CatcherScreenshotManager
getter/setter pair

Methods

getCurrentConfig() CatcherOptions?
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({CatcherOptions? debugConfig, CatcherOptions? profileConfig, CatcherOptions? 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() Catcher
Get current Catcher instance.
reportCheckedError(dynamic error, dynamic stackTrace) → void
Report checked error (error caught in try-catch block). Catcher will treat this as normal exception and pass it to handlers.
sendTestException() → void
Send text exception. Used to test Catcher configuration.