Answers for "types of data bases in flutter"

0

types of data bases in flutter

var box = await Hive.openBox('testBox');


import 'package:hive/hive.dart';

void main() async {
 var box = await Hive.openBox('testBox');

 box.put('name', 'David');

 print('Name: ${box.get('name')}');
}

import 'package:hive/hive.dart';
part 'person.g.dart';
@HiveType()
class Person
{
@HiveField(0) String name;
@HiveField(1) int age;
@HiveField(2) List<Person> friends;
}
Posted by: Guest on November-26-2020

Code answers related to "Dart"

Browse Popular Code Answers by Language