Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

how to format timeofday in custom format flutter

showTimePicker(
        context: context,
        initialTime: TimeOfDay.now(),
        builder: (context, _) {
          return MediaQuery(
              data: MediaQuery.of(context).copyWith(
                  // Using 24-Hour format
                  alwaysUse24HourFormat: true),
                  // If you want 12-Hour format, just change alwaysUse24HourFormat to false or remove all the builder argument
              child: _);
});
Source by www.kindacode.com #
 
PREVIOUS NEXT
Tagged: #format #timeofday #custom #format #flutter
ADD COMMENT
Topic
Name
1+1 =