by @kodeazy

flutter what is timestamp and how to get timestamp in dart file?

Home » flutter » flutter what is timestamp and how to get timestamp in dart file?
  • In this tutorial we will discuss about what is timestamp and how to get timestamp in flutter dart file
  • timestamp is used to note date and time of particular event occured.
  • new DateTime.now().millisecondsSinceEpoch is the method returns the number of milliseconds from midnight of january 1 st 1970 to specific date.

    void main() {
    print(new DateTime.now().millisecondsSinceEpoch);
    }

    Output:

    1629449224954