mirror of
https://github.com/venera-app/venera.git
synced 2025-09-27 07:47:24 +00:00
Show read button if loading fails.
This commit is contained in:
@@ -7,6 +7,7 @@ class NetworkError extends StatelessWidget {
|
||||
this.retry,
|
||||
this.withAppbar = true,
|
||||
this.buttonText,
|
||||
this.action,
|
||||
});
|
||||
|
||||
final String message;
|
||||
@@ -17,6 +18,8 @@ class NetworkError extends StatelessWidget {
|
||||
|
||||
final String? buttonText;
|
||||
|
||||
final Widget? action;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
var cfe = CloudflareException.fromString(message);
|
||||
@@ -67,9 +70,16 @@ class NetworkError extends StatelessWidget {
|
||||
child: Text('Verify'.tl),
|
||||
)
|
||||
else
|
||||
FilledButton(
|
||||
onPressed: retry,
|
||||
child: Text(buttonText ?? 'Retry'.tl),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
if (action != null)
|
||||
action!.paddingRight(8),
|
||||
FilledButton(
|
||||
onPressed: retry,
|
||||
child: Text(buttonText ?? 'Retry'.tl),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
|
Reference in New Issue
Block a user