Parse String into DateTime in Flutter dart
Author:
Omar Shamali
Writing Date:
To parse a string date into DateTime type in Flutter dart, you simply use parse:
var strDate = "2022-10-14 03:20:13";
var convertedDateTime = DateTime.parse(strDate));
print(convertedDateTime);