Fixed Android issues
This commit is contained in:
35
lib/widgets/error_widget.dart
Normal file
35
lib/widgets/error_widget.dart
Normal file
@ -0,0 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
|
||||
class CustomErrorWidget extends StatelessWidget {
|
||||
final String errorMessage;
|
||||
final VoidCallback onRetry;
|
||||
|
||||
const CustomErrorWidget({
|
||||
Key? key,
|
||||
required this.errorMessage,
|
||||
required this.onRetry,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
const Text(
|
||||
'エラーが発生しました',
|
||||
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
|
||||
),
|
||||
const SizedBox(height: 8),
|
||||
Text(errorMessage),
|
||||
const SizedBox(height: 16),
|
||||
ElevatedButton(
|
||||
onPressed: onRetry,
|
||||
child: const Text('再試行'),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user