Questions tagged [cupertinopicker]

Cupertino Picker is a class for an iOS styled picker for date, time, etc.

50 questions
22
votes
2 answers

Set selected initial CupertinoPicker chosen index

I am new in Flutter development, I'm trying to CupertinoPicker inside showCupertinoModalPopup which triggered by clicking CupertinoButton. After choosing the Provinsi (Province), I can repick the Province by clicking again on the button, but It…
Ampersanda
  • 2,016
  • 3
  • 21
  • 36
9
votes
3 answers

Flutter : Change Text Color CupertinoDatePicker in mode Dark Mode

I have CupertinoDatePicker in my application to selected date and time with this code : formatColumn( widget: Consumer( builder: (_, mcProvider, __) => SizedBox( height: sizes.height(context) / 3.5, child:…
Zeffry Reynando
  • 3,445
  • 12
  • 49
  • 89
9
votes
4 answers

Flutter: CupertinoPicker BottomSheet listener for onClose?

I'm looking through the Flutter Gallery for the code related to the CupertinoPicker. Here is the relevant code extract: child: new GestureDetector( // Blocks taps from propagating to the modal sheet and popping. // onTap:…
Simon
  • 19,658
  • 27
  • 149
  • 217
7
votes
2 answers

Flutter: Possible to position item in CupertinoPicker in the center between the two lines?

Is it possible to change the default position of the item within a CupertinoPicker to the center between the two lines? The default position seems to be rather towards the upper line. This is the code to reproduce the CupertinoPicker import…
Jonathan Rhein
  • 1,616
  • 3
  • 23
  • 47
6
votes
3 answers

CupertinoPicker textStyle flutter

I'm new to flutter and I need help. I'm creating an app where the user can select data through a CupertinoPicker. The picker works fine, but I would like to change its style. Currently the style is like that, but I want it to be like…
6
votes
2 answers

Set width and height for Cupertino Picker

Cupertino Picker in flutter takes 100% width. How do we give it custom styling? Height, Width, Borders? I tried putting it inside a container with width and all, didn't work.Instead there was a weird soft edged background when I gave container a…
Pushan Gupta
  • 3,697
  • 5
  • 23
  • 39
4
votes
1 answer

Flutter - CupertinoDatePicker initialDateTime updates only once

I've created a CupertinoDatePicker widget, with an initial value set to a variable. I want to update the selected value in the picker to that variable value when the user clicks on another widget in the screen - but it doesn't work (although the…
user6097845
  • 1,257
  • 1
  • 15
  • 33
4
votes
1 answer

How to Update/Refresh CupertinoPicker List Data while onSelectedItemChanged() called from another Cupertino Picker

I have 2 CupertinoPicker inside BottomSheet, the data comes from Firestore when I am changing selected Item in governorate it updates the List data of locations in the another cupertinopicker Here picture you will see 4 Cupertino picker in Row but…
4
votes
2 answers

flutter how to make a dynamic multi-column cupertinoPicker?

enter image description here In the gallery of flutter, there is a CupertinoDatePicker which can select multi-column, how to make a custom multi-column CupertinoPicker? And is it possible make the CupertinoPicker be dynamic. For example, there are…
Hanggi
  • 625
  • 1
  • 8
  • 10
3
votes
1 answer

How to limit the timing that can be picked from Cupertino date picker in Flutter?

Currently, this is how my Cupertino date picker look like My code is as shown: CupertinoDatePicker( initialDateTime: DateTime.now(), onDateTimeChanged: (val) { setState(() { …
scott lee
  • 546
  • 5
  • 23
3
votes
1 answer

How to create Cupertino picker that has both kg and lbs option in Flutter

I'm trying to create a Cupertino Picker that will show weight and other option like kg and lb. Ive tried to work it out. It working for "kg" but how can i display for "lb" and also how to get after selecting 55 kg and display same 121.245 lb vice…
3
votes
1 answer

IOS Date picker in Flutter

I want to make only a date picker using Cupertino. something like below but all I am able to do is this... can anyone help? Container( height: MediaQuery.of(context).copyWith().size.height / 3, child: CupertinoDatePicker( …
palak
  • 381
  • 7
  • 20
3
votes
0 answers

Is there a better way of async loading data into CupertinoPicker?

Is there a better way of async on-demand loading data into CupertinoPicker? What I basically do is listen to scroll event and detecting if CupertinoPicker is scrolled beyond the start and show a spinner for the duration of the loading of "data". I…
ristiisa
  • 101
  • 6
3
votes
1 answer

CupertinoDatePicker disable hours and minutes before the current time

** In the minimumDate param, we can't control the minimum time. ` CupertinoDatePickerTest( onDateTimeChanged: (DateTime newdate) { print(newdate); }, use24hFormat: false, maximumDate:…
2
votes
2 answers

How to add text beside hour and minute in CupertinoDatePicker

I am using CupertinoDatePicker to allow user to select specific time in the current day, but i want to show text beside the selected hour and selected minute, is there any way to do this ? This is what i am expecting This is what i…
naser
  • 33
  • 4
1
2 3 4