flutter datetime format
import 'package:intl/intl.dart';
DateTime now = DateTime.now();
String formattedDate = DateFormat('yyyy-MM-dd – kk:mm').format(now);
flutter datetime format
import 'package:intl/intl.dart';
DateTime now = DateTime.now();
String formattedDate = DateFormat('yyyy-MM-dd – kk:mm').format(now);
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: _);
});
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us