mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-13 11:53:41 +00:00
feat: migrate shared_preferences to hive (#343)
This commit is contained in:
15 files changed
+247
-143
No files matched your search
@@ -0,0 +1,37 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'entity.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class StartConfigEntity {
|
||||
String network;
|
||||
String address;
|
||||
String apiToken;
|
||||
|
||||
StartConfigEntity({
|
||||
required this.network,
|
||||
required this.address,
|
||||
required this.apiToken,
|
||||
});
|
||||
|
||||
factory StartConfigEntity.fromJson(Map<String, dynamic> json) =>
|
||||
_$StartConfigEntityFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$StartConfigEntityToJson(this);
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class WindowStateEntity {
|
||||
bool? isMaximized;
|
||||
double? width;
|
||||
double? height;
|
||||
|
||||
WindowStateEntity({
|
||||
this.isMaximized,
|
||||
this.width,
|
||||
this.height,
|
||||
});
|
||||
|
||||
factory WindowStateEntity.fromJson(Map<String, dynamic> json) =>
|
||||
_$WindowStateEntityFromJson(json);
|
||||
Map<String, dynamic> toJson() => _$WindowStateEntityToJson(this);
|
||||
}
|
||||
Reference in new issue
Block a user