import 'package:flutter/material.dart'; import '../custom_text.dart'; class GoOnlineConfirmationWidget extends StatelessWidget { final VoidCallback onYesPressed; final VoidCallback onNoPressed; const GoOnlineConfirmationWidget({ Key? key, required this.onYesPressed, required this.onNoPressed, }) : super(key: key); @override Widget build(BuildContext context) { return Column( mainAxisAlignment: MainAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center, children: [ // Warning Icon Container( padding: const EdgeInsets.all(20.0), decoration: const BoxDecoration( color: Color(0xFF5E259E), // Purple color for the icon background shape: BoxShape.circle, ), child: const Icon( Icons.error_outline, color: Colors.white, size: 40, ), ), const SizedBox(height: 16.0), // Title asking to go online const Txt( text: "Go online again?", style: TextStyle( fontFamily: 'Poppins', fontSize: 22, fontWeight: FontWeight.bold, color: Colors.black, ), textAlign: TextAlign.center, ), const SizedBox(height: 8.0), // Supporting text const Txt( text: "After going online you will start receiving new ride requests.", style: TextStyle( fontFamily: 'Poppins', fontSize: 14, fontWeight: FontWeight.normal, color: Colors.grey, ), textAlign: TextAlign.center, ), const SizedBox(height: 24.0), // Yes and No Buttons Row( mainAxisAlignment: MainAxisAlignment.spaceEvenly, children: [ // Yes Button GestureDetector( onTap: onYesPressed, child: Container( padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 30.0), decoration: BoxDecoration( color: const Color(0xFF5E259E), // Purple color for 'Yes' button borderRadius: BorderRadius.circular(20.0), ), child: const Text( "Yes", style: TextStyle( color: Colors.white, fontSize: 16, fontFamily: 'Poppins', fontWeight: FontWeight.bold, ), ), ), ), // No Button GestureDetector( onTap: onNoPressed, child: Container( padding: const EdgeInsets.symmetric(vertical: 10.0, horizontal: 30.0), decoration: BoxDecoration( color: Color(0xFFD9CFE7), // Light purple color for 'No' button borderRadius: BorderRadius.circular(20.0), ), child: const Text( "No", style: TextStyle( color: Color(0xFF5E259E), // Purple text color for 'No' button fontSize: 16, fontFamily: 'Poppins', fontWeight: FontWeight.bold, ), ), ), ), ], ), ], ); } }