flutter best local database nosql code example
Example: 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;
}