import 'package:flutter/material.dart'; class PermissionErrorWidget extends StatelessWidget { final VoidCallback onRetry; const PermissionErrorWidget({Key? key, required this.onRetry}) : super(key: key); @override Widget build(BuildContext context) { return Scaffold( backgroundColor: Colors.white, body: Padding( padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 40.0), child: Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ const Text( 'Location permission is required to use the map or unable to fetch the location.', textAlign: TextAlign.center, style: TextStyle( fontSize: 16, fontWeight: FontWeight.normal, fontFamily: 'Poppins', ), ), const SizedBox(height: 20), ElevatedButton( onPressed: onRetry, style: ElevatedButton.styleFrom( backgroundColor: const Color(0xFF5B259F), // Button color padding: const EdgeInsets.symmetric(horizontal: 24, vertical: 12), shape: RoundedRectangleBorder( borderRadius: BorderRadius.circular(8), ), ), child: const Text( 'Retry', style: TextStyle( fontSize: 16, fontWeight: FontWeight.bold, color: Colors.white, ), ), ), ], ), ), ); } }