how to show date only in flutter
import 'package:intl/intl.dart';
String now = DateFormat("yyyy-MM-dd").format(DateTime.now());
how to show date only in flutter
import 'package:intl/intl.dart';
String now = DateFormat("yyyy-MM-dd").format(DateTime.now());
how to show date only in flutter
import 'package:flutter/material.dart';
import 'package:intl/intl.dart';
void main() => runApp(App());
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Current Date Example',
home: DateExample(),
);
}
}
class DateExample extends StatelessWidget {
const DateExample({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Scaffold(
body: Center(child: Text(DateFormat("yyyy-MM-dd").format(DateTime.now()))),
);
}
}
how to show date only in flutter
dependencies:
flutter:
sdk: flutter
intl: ^0.16.1
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