dart timestamp string to date code example
Example 1: dart convert string to datetime
var dateTime = DateTime.parse("dateTimeString");
Example 2: flutter date time to timestamp
DateTime currentPhoneDate = DateTime.now(); //DateTime
Timestamp myTimeStamp = Timestamp.fromDate(currentPhoneDate); //To TimeStamp
DateTime myDateTime = myTimeStamp.toDate(); // TimeStamp to DateTime
print("current phone data is: $currentPhoneDate");
print("current phone data is: $myDateTime");