there are not much documentation on how to use the date picker package in flutter, for some reason however the calender is not showing up, is there a way to be able to make a date range picker?
main.dart
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
SystemChrome.setEnabledSystemUIMode(SystemUiMode.manual, overlays: []);
return MaterialApp(
theme: ThemeData(
platform: TargetPlatform.iOS,
),
home: HomeScreen(),
localizationsDelegates: [
GlobalMaterialLocalizations.delegate,
MonthYearPickerLocalizations.delegate,
],
);
}
}
child: IconButton(
icon: Icon(Icons.calendar_month),
onPressed: () {
SfDateRangePicker(
view: DateRangePickerView.year,
selectionMode: DateRangePickerSelectionMode.range,
);
},
),
You can use package date_time_picker:
Now you can put this container widget in your widget tree to get the result something like below