mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
使用 Hive Object
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user