You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
820 B
Dart
36 lines
820 B
Dart
|
|
import 'package:flutter/material.dart';
|
|
|
|
import '../../app_style/sizing.dart';
|
|
|
|
class FailedLoading extends StatelessWidget {
|
|
final String? message;
|
|
final VoidCallback? onReload;
|
|
|
|
const FailedLoading({
|
|
Key? key,
|
|
this.message,
|
|
this.onReload
|
|
}) : super(key: key);
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Center(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
Text(
|
|
message?? "Error Request Failed",
|
|
style: Theme.of(context).textTheme.subtitle1,
|
|
textScaleFactor: AppStyle.getScaleFactor(context),
|
|
),
|
|
SizedBox(height: 16,),
|
|
OutlinedButton(
|
|
child: Text("try again"),
|
|
onPressed: onReload,
|
|
)
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|