-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Implemented Date range picker demo #351
Conversation
lib/demos/material/picker_demo.dart
Outdated
@@ -74,6 +85,19 @@ class _PickerDemoState extends State<PickerDemo> { | |||
} | |||
} | |||
|
|||
Future<void> _showDateRangePicker() async { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this will present the full screen dialog over top of the entire gallery. If its not too much to ask, could you rework the demo a bit to have its own Navigator
, like the dialog demo does. That way the picker dialogs will be displayed over top of the demo area only rather than the whole app.
See https://github.com/flutter/gallery/blob/master/lib/demos/material/dialog_demo.dart#L127 for an example of what I mean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rami-a ,Is there any different way to show picker in demo area? , I tried adding Navigator in picker demo but it's still showing in fullscreen furthermore and dialougs in dialog demo are all also showing in fullscreen .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you add a navigator and then also pass useRootNavigator
as false in the showDateRangePicker
function does that work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rami-a , Cool it worked, i didn't knew about it , should I make userootnavigator false in all picker?.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! And yes, please make that change for all pickers so they have similar behavior. Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've made necessary changes please have a look .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM except for one small change
lib/demos/material/picker_demo.dart
Outdated
final picked = await showDatePicker( | ||
useRootNavigator: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So I tested this out and for some reason it uses the landscape layout inside and looks a bit cramped, so actually let's remove this here.
lib/demos/material/picker_demo.dart
Outdated
final picked = await showTimePicker( | ||
useRootNavigator: false, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above comment, let's remove this
Thanks for all your helpful contributions so far @Alabhya268 ! |
@rami-a Glad to help, I hope I'm not asking too much but can you please also a look at this Pull Request in flutter/samples repository? as I've made it few days ago but there is still no review on it yet . |
I've requested reviews from a couple of the maintainers of the flutter/samples repo. They should hopefully take a look soon :) |
Thanks very much . |
Gallery side - Closes #134
let me know if there is anything that needs to be changed.