You can use DateFormat
from intl package.
import 'package:intl/intl.dart';
DateTime now = DateTime.now();
String formattedDate = DateFormat('yyyy-MM-dd – kk:mm').format(now);
More Related Contents:
- How to pass a message from Flutter to Native?
- how to open particular screen on clicking on push notification for flutter
- Flutter: go_router how to pass multiple parameters to other screen?
- How can I change the app display name build with Flutter?
- Flutter give container rounded border
- How to add a gradient to a Button in Flutter?
- How to handle app lifecycle with Flutter (on Android and iOS)?
- Go_Router Pass Object to new route
- Generate SHA-1 for Flutter/React-Native/Android-Native app
- Couldn’t locate lint-gradle-api-26.1.2.jar for Flutter project
- how to solve Execution failed for task ‘:app:compileFlutterBuildDebug’
- How to build signed apk from Android Studio for Flutter
- How to solve SocketException: Failed host lookup: ‘www.xyz.com’ (OS Error: No address associated with hostname, errno = 7)
- How to show/hide password in TextFormField?
- Flutter Keyboard makes textfield hide
- How to create Expandable ListView in Flutter
- How to build app compliant with Google Play 64-bit requirement?
- Flutter – How to pass custom arguments in firebase dynamic links for app invite feature?
- Flutter: How to fix “A RenderFlex overflowed by pixels ” error?
- When do I use setState in Flutter?
- Failed to launch emulator: Error: Emulator didn’t connect within 60 seconds
- Flutter : How can I add divider between each List Item in my code?
- How to set build and version number of Flutter app
- Flutter: Execution failed for task ‘:app:compileDebugKotlin’
- Flutter TabBar and SliverAppBar that hides when you scroll down
- Flutter – How to download files in WebView?
- HTML file input control with capture and accept attributes works wrong?
- scale fit mobile web content using viewport meta tag
- Official “Boost library” Support for Android and iOS? [closed]
- Android Studio (not installed) , when run flutter doctor while Android Studio installed on machine