UnixTimestampConverter constructor

const UnixTimestampConverter()

Implements serialization and deserialization for DateTime from and to int.

Usage:

@JsonSerializable()
class MyClass {
  @JsonKey(name: 'timestamp')
  @UnixTimestampConverter()
  final DateTime timestamp;

  const MyClass(this.timestamp);
}

Implementation

const UnixTimestampConverter();