27 lines
589 B
Dart
27 lines
589 B
Dart
import 'package:hive/hive.dart';
|
|
part 'user.g.dart';
|
|
|
|
@HiveType(typeId: 1)
|
|
class User {
|
|
@HiveField(0)
|
|
final String vorname;
|
|
@HiveField(1)
|
|
final String nachname;
|
|
@HiveField(2)
|
|
final int gewicht;
|
|
@HiveField(3)
|
|
final int groesse;
|
|
@HiveField(4)
|
|
final int alter;
|
|
@HiveField(5)
|
|
final int kalorien;
|
|
|
|
User(this.vorname, this.nachname, this.gewicht, this.groesse, this.alter,
|
|
this.kalorien);
|
|
|
|
@override
|
|
String toString() {
|
|
return 'User{vorname: $vorname, nachname: $nachname, gewicht: $gewicht, groesse: $groesse, alter: $alter, kalorien: $kalorien}';
|
|
}
|
|
}
|