harndb 0.0.9 harndb: ^0.0.9 copied to clipboard
a simple key-value non-relational database engine for dart.
import 'package:flutter/material.dart';
import 'package:harndb_example/data.dart';
void main() {
WidgetsFlutterBinding.ensureInitialized();
db.initialize();
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
void test() async {
// User firstUser = User(name: "Andress", age: 33);
// await users.insert(firstUser);
print(users.find({}));
}
@override
Widget build(BuildContext context) {
return MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text('Plugin example app'),
),
body: Column(
children: [
Container(
height: 20,
),
ElevatedButton(onPressed: test, child: const Text("test")),
Container(
height: 20,
),
],
),
),
);
}
}