You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Export CalendarDateRangePicker class at material public api #65108
My design created his own style range date picker, but since CalendarDateRangePicker class is not exported /material/pickers/pickers.dart (only the function showDateRangePicker) we can use this as a widget, so we can customize, com compose anything with this function.
Proposal
at /material/pickers/pickers.dart
add CalendarDateRangePicker together with showDateRangePicker dart export 'date_range_picker_dialog.dart' show showDateRangePicker, CalendarDateRangePicker;
Please don't import anything under a src directory directly. Those are internal implementation files and may change out from underneath you. The supported APIs are accessed by using import 'package:flutter/material.dart'. See the lib directory section of the packages guide for more detail.
I am currently working on a PR that will restructure the date picker code and will be moving this file out of this location (see #69939 for more info). This or a subsequent PR will expose the CalendarDateRangePicker component as part of the public API with proper tests. If you import the current implementation from src, your app will break when this lands.
Please don't import anything under a src directory directly. Those are internal implementation files and may change out from underneath you. The supported APIs are accessed by using import 'package:flutter/material.dart'. See the lib directory section of the packages guide for more detail.
I am currently working on a PR that will restructure the date picker code and will be moving this file out of this location (see #69939 for more info). This or a subsequent PR will expose the CalendarDateRangePicker component as part of the public API with proper tests. If you import the current implementation from src, your app will break when this lands.
Now that #69939 has landed this is a bigger issue than it used to be. The new options for a builder and custom text in showDateRangePicker are nice, but it still doesn't provide the ability to do a custom transition or style the close/save buttons yourself. My app has a custom animation and container for dialogs and I would like to make the date range picker match the rest of the dialogs in my app.
Understood. I have it almost ready, but I ran into an issue with parameter updates that I found when writing unit tests. I have been meaning to get back to this and finish it up, but have had other priority issues. I will make an effort to get this in as soon as possible. Thanks for your patience.
Activity
thecalamiity commentedon Sep 4, 2020
Just import 'calendar_date_range_picker.dart'. Not sure what the issue here is?
moodstubos commentedon Oct 16, 2020
@jhionan simply use this import line:
import 'package:flutter/src/material/pickers/calendar_date_range_picker.dart';jhionan commentedon Oct 16, 2020
When I propose this, calendar_date_range_picker was no accessible in public api of Flutter. It was inside the
date_range_picker_dialog.In another issue asking why this was not public Darren Austin said duo deadlines it was not ready, and asked to create this issue.
But I just test its solved.
darrenaustin commentedon Nov 15, 2020
Please don't import anything under a
srcdirectory directly. Those are internal implementation files and may change out from underneath you. The supported APIs are accessed by usingimport 'package:flutter/material.dart'. See the lib directory section of the packages guide for more detail.I am currently working on a PR that will restructure the date picker code and will be moving this file out of this location (see #69939 for more info). This or a subsequent PR will expose the CalendarDateRangePicker component as part of the public API with proper tests. If you import the current implementation from
src, your app will break when this lands.fer-ri commentedon Jan 1, 2021
Any update for this? already 2021.
Thanks
pcsosinski commentedon Jan 13, 2021
@darrenaustin are you planning to land this in 1.26? if not can you update the milestone please?
brent-moffit commentedon Mar 4, 2021
Now that #69939 has landed this is a bigger issue than it used to be. The new options for a builder and custom text in showDateRangePicker are nice, but it still doesn't provide the ability to do a custom transition or style the close/save buttons yourself. My app has a custom animation and container for dialogs and I would like to make the date range picker match the rest of the dialogs in my app.
darrenaustin commentedon Mar 4, 2021
Understood. I have it almost ready, but I ran into an issue with parameter updates that I found when writing unit tests. I have been meaning to get back to this and finish it up, but have had other priority issues. I will make an effort to get this in as soon as possible. Thanks for your patience.
cedvdb commentedon May 16, 2022
@darrenaustin That PR has passed but it is not part of the public API. Is it still on the plate ?
The date widgets are really limiting in their api surface.