import 'package:hive/hive.dart'; part 'skip_segment.g.dart'; @HiveType(typeId: 2) class SkipSegment { @HiveField(0) final int start; @HiveField(1) final int end; SkipSegment(this.start, this.end); static const boxName = "oss.krtirtho.spotube.skip_segments"; static LazyBox get box => Hive.lazyBox(boxName); SkipSegment.fromJson(Map json) : start = json['start'], end = json['end']; Map toJson() => { 'start': start, 'end': end, }; }