Member-only story

Cupertino DateTime Picker

Greg Perry
9 min readMar 6, 2020

--

Easily pick a Date or a Time in your Flutter app

I wrote a routine to quickly and easily pick a date or time in your Flutter app. It wasn’t an original concept but based on the work by developer, Miguel Ruivo. While working on my latest project, you see, I was looking for a means to pick a date and a time using Cupertino (iOS-style) widgets. That’s when I stumbled upon Miguel’s NativeCupertinoPicker.dart. It works with the CupertinoDatePicker class which supplies an iOS-style DateTime picker.

If I didn’t have Miguel’s work as a foundation of my own work, I wouldn’t have the time now to write about it here and share it with you. See how this works? I openly credit Miguel Ruivo here and now for my own contribution.

That’s the power of open source in this day and age. For example, we’re a fledgling community of developers, and our shared efforts contribute to that community as a whole. I’ll pay it forward now and offer the routine, showCupertinoDatePicker.dart, to our fledging Flutter community. Like Ruivo’s routine, my routine also utilizes the CupertinoDatePicker class which, in turn, works with the showCupertinoModalPopup function to display a circular ‘spinner’ at the bottom of the screen of your mobile app.

Many of you will now take a copy of this routine and get on with your day. You’ve got deadlines, and besides, your manager will be coming around your desk shortly. Yes, take it and make it your own. I’ll invite the rest of you to stick around, and I’ll explain how to use this routine…

--

--

Greg Perry
Greg Perry

No responses yet