read method

  1. @override
TimeOfDay read(
  1. BinaryReader reader
)
override

Is called when a value has to be decoded.

Implementation

@override
TimeOfDay read(BinaryReader reader) {
  final totalMinutes = reader.readInt();
  return TimeOfDay(hour: totalMinutes ~/ 60, minute: totalMinutes % 60);
}