Created
July 10, 2021 02:09
-
-
Save brasizza/b1f6bc0a4622578a90cb81ecd4452005 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:json_annotation/json_annotation.dart'; | |
import 'package:hive/hive.dart'; | |
part 'map_location.g.dart'; | |
@HiveType(typeId: 0) | |
class MapLocation extends HiveObject { | |
@HiveField(0) | |
late String id; | |
@JsonKey(name: 'location_name') | |
@HiveField(1) | |
late String locatioName; | |
@JsonKey(name: 'location_description') | |
@HiveField(2) | |
late String locationDescription; | |
@JsonKey(name: 'location_image') | |
@HiveField(3) | |
late String locationImage; | |
@JsonKey() | |
@HiveField(4) | |
late double latitude; | |
@JsonKey() | |
@HiveField(5) | |
late double longitude; | |
// Hive fields go here | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment