mirror of
https://github.com/git-touch/git-touch
synced 2024-12-22 13:25:13 +01:00
41 lines
1.0 KiB
Dart
41 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class ErrorReload extends StatelessWidget {
|
|
final String text;
|
|
final Function onTap;
|
|
|
|
ErrorReload({@required this.text, @required this.onTap});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
padding: EdgeInsets.symmetric(vertical: 30, horizontal: 20),
|
|
child: Column(
|
|
children: <Widget>[
|
|
Text(
|
|
'Woops, something bad happened. Error message:',
|
|
style: TextStyle(fontSize: 16),
|
|
),
|
|
Padding(padding: EdgeInsets.only(top: 10)),
|
|
Text(
|
|
text,
|
|
style: TextStyle(
|
|
fontSize: 14,
|
|
fontWeight: FontWeight.w300,
|
|
color: Colors.redAccent,
|
|
),
|
|
),
|
|
Padding(padding: EdgeInsets.only(top: 10)),
|
|
GestureDetector(
|
|
child: Text(
|
|
'Reload',
|
|
style: TextStyle(fontSize: 20, color: Colors.blueAccent),
|
|
),
|
|
onTap: onTap,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|