CustomErrorManager class
A class for managing dialogs based on CustomError instances.
- Implemented types
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
emailLog(
{required String message, required String recipient, required String appTitle}) → Future< void> - Sends a log message via email to the specified recipient.
-
log(
{String? e, String? w, String? i, String? d, String? t, String? f}) → void -
Log error, warning, info, debug, trace, and fatal messages.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
sendToServer(
{required String url, required String methodType, Map< String, String> ? headers, Object? body, Encoding? encoding}) → Future<void> -
Send error reports to a server.
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
showDialogIfError(
BuildContext context, CustomError customError, String title, String? message, List< Widget> ? actions) → void -
Shows a dialog if an error exists in the
customErrorobject. This method displays an NAlertDialog with the providedtitle,message, andactionswhen an error is detected in thecustomErrorobject. Ifmessageis not provided, it uses the error message fromcustomError. -
showSnackBarIfError(
BuildContext context, CustomError customError, {Color? backgroundColor, SnackBarBehavior? behavior}) → void -
Shows a SnackBar if an error exists in the
customErrorobject.