gm6534/adoptive_calendar

What is correct height width for show perfect in web

Closed this issue · 1 comments

Screenshot 2024-06-24 at 6 11 28 PM
Future<void> _selectDate(BuildContext context) async {
   final DateTime? pickedDate = await showDialog(
     context: context,
     builder: (BuildContext context) {
       return Dialog(
         shape: RoundedRectangleBorder(
           borderRadius: BorderRadius.circular(10.0),
         ),
         child: SizedBox(
           height: 600, 
           width: 450,
           child: AdoptiveCalendar(
             initialDate: DateTime.now(),
             backgroundColor: AppColor.white,
             fontColor: AppColor.black,
             backgroundEffects: AdoptiveBackground.summer,
             iconColor: AppColor.black,
             selectedColor: AppColor.kPrimary,
           ),
         ),
       );
     },
   );

hi @dennymoradiya,

I hope you are well. I noticed that you encountered an issue. Here is your latest code; please review and use it like this. Do not wrap it in any widget.

Future<void> _selectDate(BuildContext context) async { final DateTime? pickedDate = await showDialog( context: context, builder: (BuildContext context) { return AdoptiveCalendar( initialDate: DateTime.now(), backgroundColor: Colors.white, fontColor: Colors.black, backgroundEffects: AdoptiveBackground.summer, iconColor: Colors.black, selectedColor: Colors.blue, ); }, );}

image