flutter datetime current locale code example
Example 1: flutter datetime format
import 'package:intl/intl.dart';
DateTime now = DateTime.now();
String formattedDate = DateFormat('yyyy-MM-dd – kk:mm').format(now);
Example 2: DateFormat local fr flutter
@override
void initState() {
super.initState();
initializeDateFormatting();
}
Example 3: DateFormat local fr flutter
import 'package:intl/intl.dart';
import 'package:intl/date_symbol_data_local.dart';