Flutter-Ernaehrungsapp/lib/android/models/user.dart

27 lines
589 B
Dart
Raw Permalink Normal View History

2023-05-31 23:22:38 +02:00
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}';
}
}