CustomError class
A class for managing custom errors.
Constructors
- CustomError({bool? showDialogOnError})
- Default constructor for the CustomError class.
Properties
-
errors
↔ List<
Map< String, dynamic> > -
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showDialogOnError ↔ bool?
-
getter/setter pair
Methods
-
addError(
int errorCode, String errorMsg) → void -
Add a new error with the specified
errorCodeanderrorMsg. -
findErrorByCode(
int targetCode) → List< Map< String, dynamic> > -
getAllErrors(
) → List< Map< String, dynamic> > -
getError(
) → String - Get the error message.
-
getErrorCode(
) → int - Get the error code.
-
getLatestError(
) → Map< String, dynamic> ? -
hasAnError(
) → bool -
Check if an error exists. Returns
trueif an error exists; otherwise,false. -
isAnError(
) → bool -
Check if an error exists. Returns
trueif an error exists; otherwise,false. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setError(
int errorCode, String errorMsg) → void -
Set the error message to
errorMsgand error code toerrorCode. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited