Search
 
SCRIPT & CODE EXAMPLE
 

DART

date now dart

import 'package:intl/intl.dart';
static final DateTime now = DateTime.now();

Want to format?

static final DateFormat formatter = DateFormat('yyyy-MM-dd');
  final String formatted = formatter.format(now);
  
OR

DateTime dateToday = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day) ;
Comment

dart date

import 'package:intl/intl.dart';

main() {
  var now = new DateTime.now();
  var formatter = new DateFormat('yyyy-MMM-dd');
  String formatted = formatter.format(now);
  print(formatted); // something like 2019-Jun-20
}
Comment

get current date in dart

DateTime now = DateTime.now();
Comment

PREVIOUS NEXT
Code Example
Dart :: refresh indicator flutter 
Dart :: check if isempty TextEditingController flutter 
Dart :: flutter check if key exists 
Dart :: remove menu icon from appbar flutter 
Dart :: how to change legend colour in SfCircularChart in flutter 
Dart :: string to double dart 
Dart :: raisedbutton flutter 
Dart :: flutter snackbar width 
Dart :: flutter url image 
Dart :: flutter use png as icon 
Dart :: flutter screen size 
Dart :: sort list descending from spesific maps key in dart 
Dart :: flutter flotingactionbutton extend 
Dart :: flutter delay a function 
Dart :: make text filed round flutter 
Dart :: convert a list to string in flutter 
Dart :: how to create timer in flutter 
Dart :: elevatebutton in flutter 
Dart :: dart exception 
Dart :: flutter layout builder 
Dart :: dart foreach 
Dart :: dart list remove item 
Dart :: flutter check if drawer is open 
Dart :: flutter color hex 
Dart :: convert string date to datetime and format 
Dart :: const vs final flutter 
Dart :: text substring dart 
Dart :: flutter disable touch 
Dart :: how to subtract he height of appbar in flutter 
Dart :: prevent media query from rebuilding flutter widget 
ADD CONTENT
Topic
Content
Source link
Name
5+7 =