flutter
Get current timestamp in flutter or dart
To get the current timestamp in Flutter or dart you can use DateTime.now().millisecondsSinceEpoch.
var timestamp = DateTime.now().millisecondsSinceEpoch.toString()
print(timestamp);
Output
1643916528027
Was this helpful?
Similar Posts
- Send HTTP Get request in Flutter or Dart
- Convert a double to an int in Dart or Flutter
- String to double conversion in flutter [Dart]
- Find number of days between two dates in Flutter or Dart
- Send HTTP POST request in Flutter or Dart
- Ternary Conditional operator in Flutter(Dart)
- Converting class objects to JSON string in Flutter