使用 Hive Object

This commit is contained in:
Junyuan Feng
2022-11-05 23:08:56 +08:00
parent c036b78708
commit 398c49bb99
20 changed files with 504 additions and 102 deletions

View File

@@ -1,7 +1,14 @@
import 'dart:convert';
import 'package:hive_flutter/hive_flutter.dart';
part 'snippet.g.dart';
@HiveType(typeId: 2)
class Snippet {
@HiveField(0)
late String name;
@HiveField(1)
late String script;
Snippet(this.name, this.script);