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('再試行'), ), ], ), ); } }