feat: complete centralized error handling system with documentation
This commit is contained in:
@@ -180,9 +180,16 @@ class _BillingViewState extends State<BillingView> {
|
||||
}
|
||||
|
||||
if (state.status == BillingStatus.failure) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(content: Text(translateErrorKey(state.errorMessage!))),
|
||||
);
|
||||
});
|
||||
return Center(
|
||||
child: Text(
|
||||
state.errorMessage ?? 'An error occurred',
|
||||
state.errorMessage != null
|
||||
? translateErrorKey(state.errorMessage!)
|
||||
: 'An error occurred',
|
||||
style: UiTypography.body1r.textError,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user