I wanted to change the colour of showDateRangePicker view. ( please refer to the following code ). But unfortunately, it's not working properly. what I missed in my code?
I'm using package:flutter/src/material/date_picker.dart. and flutter 3.13.3
code as follows,
var pickedDate = await showDateRangePicker(
context: context,
initialDateRange: DateTimeRange(
start: widget.selectedDate!, end: widget.selectedDate!),
firstDate: DateTime.now().subtract(Duration(days: 0)),
lastDate: DateTime(2100),
builder: (BuildContext context, Widget? child) {
return Theme(
data: ThemeData.light().copyWith(
colorScheme: ColorScheme.fromSwatch(
primarySwatch: Colors.teal,
accentColor: Colors.teal,
),
dialogBackgroundColor:Colors.white,
),
child: child!,
);
},
);

I have solved those issues in this way:
I hope this will help you.