import 'package:hive/hive.dart'; import 'package:uuid/v4.dart'; part 'mod.g.dart'; @HiveType(typeId: 2) class Mod { @HiveField(0, defaultValue: "") String mod_name = ""; @HiveField(1, defaultValue: 0) int mod_id = 0; @HiveField(2, defaultValue: "") String mod_pak = ""; @HiveField(3, defaultValue: "") String mod_hash = ""; bool newMod = false; String _id = ""; String mod_instance_id() { if (_id.isEmpty) { _id = UuidV4().generate(); } return _id; } Mod( {this.mod_name = "undef", this.mod_id = 0, this.newMod = false, this.mod_pak = "Not Initialized", this.mod_hash = ""}); }