datetimeflutterdatetimepicker

Flutter showTimePicker with specific 15 minute intervals


For the showTimePicker function in Flutter used to select a time, is it possible to set a defined time interval (such as 15 minutes) to prevent users from selecting any other timing?

Currently, this is the code I have for creating a default TimePicker.

showTimePicker(
      context: context,
      initialTime: TimeOfDay.now(),
    );

Solution

  • There is currently no way in the API, I have raised this issue: https://github.com/flutter/flutter/issues/60573