WayFar
Search…
KitShowError

Description

An illustration with an error message to show when an error is occured.

Preview

Code

show_error.dart
1
class KitShowError extends StatelessWidget {
2
final String message;
3
final Function()? onTryAgain;
4
final bool useTranslation;
5
const KitShowError({required this.message,this.onTryAgain,this.useTranslation = true, Key? key}) : super(key: key);
6
...
7
}
Copied!

API

Property
Description
Type
Default
message
The error message
String
-
onTryAgain
A callback function to trigger when 'Try again' button is pressed
Function()
-
useTranslation
Whether to translate the error message or not
bool
true
Copy link