11 lines
499 B
Dart
11 lines
499 B
Dart
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
|
import 'package:hive/hive.dart';
|
|
|
|
void storeUserData(String sname, String fname, int weight, int height, int calories) async {
|
|
final userBox = Hive.box(dotenv.env['USER_BOX']!);
|
|
userBox.put(dotenv.env['FIRST_NAME_FIELD']!, sname);
|
|
userBox.put(dotenv.env['SECOND_NAME_FIELD']!, fname);
|
|
userBox.put(dotenv.env['WEIGHT_FIELD']!, weight);
|
|
userBox.put(dotenv.env['HEIGHT_FIELD']!, height);
|
|
userBox.put(dotenv.env['CALORIES_FIELD']!, calories);
|
|
} |