showLocationBottomsheet method
void
showLocationBottomsheet({
- required BuildContext context,
- required VoidCallback onEnableLocationTap,
Implementation
void showLocationBottomsheet({
required BuildContext context,
required VoidCallback onEnableLocationTap,
}) {
showModalBottomSheet(
context: context,
shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.vertical(
top: Radius.circular(20),
),
),
builder: (context) {
return Stack(
children: [
Padding(
padding: const EdgeInsets.all(24),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
const Icon(
Icons.location_on,
size: 56,
color: Colors.red,
),
const SizedBox(height: 16),
const Text(
"Location Required",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(height: 12),
const Text(
"To continue, please enable location access. "
"Your current location is required to proceed.",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 15,
height: 1.5,
),
),
const SizedBox(height: 24),
CustomButton(
onTap: onEnableLocationTap,
buttonText: "Enable Location",
),
],
),
),
Positioned(
right: 10,
child: IconButton(
onPressed: () {
context.pop();
},
icon: Icon(
Icons.clear,
),
),
),
],
);
},
);
}