flutterdartflutter-layoutflutter-dependenciesflutter-cupertino

how to increase cupertino time picker range more than 24h flutter


I tried to increase the range of Cupertino pickers of more than 24h but didn’t get any success enter image description here

I am surprised if there is any way to increase the range to more than 24 as only 12 or 24h format is available. I need Valuable suggestions


Solution

  • You can try creating custom picker with CupertinoPicker.

    SizedBox(
      width: 200,
      height: 200,
      child: CupertinoPicker(
        itemExtent: 33,
        onSelectedItemChanged: (value) {},
        children: List.generate(
          34,
          (index) => Text("$index"),
        ),
      ),
    ),