Skip to content

Instantly share code, notes, and snippets.

@JEuler
Created March 15, 2020 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JEuler/483028b9d4b9bba75d511e634ae1f226 to your computer and use it in GitHub Desktop.
Save JEuler/483028b9d4b9bba75d511e634ae1f226 to your computer and use it in GitHub Desktop.
Hive class of User model
import 'package:hive/hive.dart';
part 'db_user.g.dart';
// ignore_for_file: public_member_api_docs
@HiveType(typeId: 1)
class DBUser {
DBUser(this.id, this.name);
@HiveField(0)
final String id;
@HiveField(1)
final String name;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment