使用 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,7 @@
import 'dart:async';
import 'package:flutter/foundation.dart';
import 'package:hive/hive.dart';
import 'package:hive_flutter/hive_flutter.dart';
class PersistentStore<E> {
late Box<E> box;

View File

@@ -1,8 +1,13 @@
import 'dart:convert';
import 'package:hive_flutter/hive_flutter.dart';
part 'private_key_info.g.dart';
///
/// Code generated by jsonToDartModel https://ashamp.github.io/jsonToDartModel/
///
@HiveType(typeId: 1)
class PrivateKeyInfo {
/*
{
@@ -12,8 +17,11 @@ class PrivateKeyInfo {
}
*/
@HiveField(0)
late String id;
@HiveField(1)
late String privateKey;
@HiveField(2)
late String password;
PrivateKeyInfo(

View File

@@ -0,0 +1,47 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'private_key_info.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class PrivateKeyInfoAdapter extends TypeAdapter<PrivateKeyInfo> {
@override
final int typeId = 1;
@override
PrivateKeyInfo read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return PrivateKeyInfo(
fields[0] as String,
fields[1] as String,
fields[2] as String,
);
}
@override
void write(BinaryWriter writer, PrivateKeyInfo obj) {
writer
..writeByte(3)
..writeByte(0)
..write(obj.id)
..writeByte(1)
..write(obj.privateKey)
..writeByte(2)
..write(obj.password);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is PrivateKeyInfoAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}

View File

@@ -1,8 +1,13 @@
import 'dart:convert';
import 'package:hive_flutter/hive_flutter.dart';
part 'server_private_info.g.dart';
///
/// Code generated by jsonToDartModel https://ashamp.github.io/jsonToDartModel/
///
@HiveType(typeId: 3)
class ServerPrivateInfo {
/*
{
@@ -13,13 +18,21 @@ class ServerPrivateInfo {
}
*/
@HiveField(0)
late String name;
@HiveField(1)
late String ip;
@HiveField(2)
late int port;
@HiveField(3)
late String user;
@HiveField(4)
late String pwd;
@HiveField(5)
String? pubKeyId;
String get id => '$user@$ip:$port';
ServerPrivateInfo(
{required this.name,
required this.ip,

View File

@@ -0,0 +1,56 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'server_private_info.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class ServerPrivateInfoAdapter extends TypeAdapter<ServerPrivateInfo> {
@override
final int typeId = 3;
@override
ServerPrivateInfo read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return ServerPrivateInfo(
name: fields[0] as String,
ip: fields[1] as String,
port: fields[2] as int,
user: fields[3] as String,
pwd: fields[4] as String,
pubKeyId: fields[5] as String?,
);
}
@override
void write(BinaryWriter writer, ServerPrivateInfo obj) {
writer
..writeByte(6)
..writeByte(0)
..write(obj.name)
..writeByte(1)
..write(obj.ip)
..writeByte(2)
..write(obj.port)
..writeByte(3)
..write(obj.user)
..writeByte(4)
..write(obj.pwd)
..writeByte(5)
..write(obj.pubKeyId);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is ServerPrivateInfoAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}

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);

View File

@@ -0,0 +1,44 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'snippet.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class SnippetAdapter extends TypeAdapter<Snippet> {
@override
final int typeId = 2;
@override
Snippet read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return Snippet(
fields[0] as String,
fields[1] as String,
);
}
@override
void write(BinaryWriter writer, Snippet obj) {
writer
..writeByte(2)
..writeByte(0)
..write(obj.name)
..writeByte(1)
..write(obj.script);
}
@override
int get hashCode => typeId.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is SnippetAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}

View File

@@ -26,7 +26,7 @@ class PrivateKeyProvider extends BusyProvider {
void updateInfo(PrivateKeyInfo old, PrivateKeyInfo newInfo) {
final idx = _infos.indexWhere((e) => e.id == old.id);
_infos[idx] = newInfo;
locator<PrivateKeyStore>().update(old, newInfo);
locator<PrivateKeyStore>().put(newInfo);
notifyListeners();
}
}

View File

@@ -38,7 +38,7 @@ class SnippetProvider extends BusyProvider {
void update(Snippet old, Snippet newOne) {
if (!have(old)) return;
_snippets[index(old)] = newOne;
locator<SnippetStore>().update(old, newOne);
locator<SnippetStore>().put(newOne);
notifyListeners();
}

View File

@@ -2,9 +2,9 @@
class BuildData {
static const String name = "ServerBox";
static const int build = 155;
static const int build = 156;
static const String engine =
"Flutter 3.3.4 • channel stable • https://github.com/flutter/flutter.git\nFramework • revision eb6d86ee27 (4 weeks ago) • 2022-10-04 22:31:45 -0700\nEngine • revision c08d7d5efc\nTools • Dart 2.18.2 • DevTools 2.15.0\n";
static const String buildAt = "2022-11-05 21:49:47.105329";
static const int modifications = 0;
static const String buildAt = "2022-11-05 23:02:53.614616";
static const int modifications = 20;
}

View File

@@ -1,38 +1,28 @@
import 'dart:convert';
import 'package:toolbox/core/persistant_store.dart';
import 'package:toolbox/data/model/server/private_key_info.dart';
class PrivateKeyStore extends PersistentStore {
void put(PrivateKeyInfo info) {
final ss = fetch();
if (!have(info)) ss.add(info);
box.put('key', json.encode(ss));
box.put(info.id, info);
}
List<PrivateKeyInfo> fetch() {
return getPrivateKeyInfoList(
json.decode(box.get('key', defaultValue: '[]')!));
final keys = box.keys;
final ps = <PrivateKeyInfo>[];
for (final key in keys) {
final s = box.get(key);
if (s != null) {
ps.add(s);
}
}
return ps;
}
PrivateKeyInfo get(String id) {
final ss = fetch();
return ss.firstWhere((e) => e.id == id);
return box.get(id);
}
void delete(PrivateKeyInfo s) {
final ss = fetch();
ss.removeAt(index(s));
box.put('key', json.encode(ss));
box.delete(s.id);
}
void update(PrivateKeyInfo old, PrivateKeyInfo newInfo) {
final ss = fetch();
ss[index(old)] = newInfo;
box.put('key', json.encode(ss));
}
int index(PrivateKeyInfo s) => fetch().indexWhere((e) => e.id == s.id);
bool have(PrivateKeyInfo s) => index(s) != -1;
}

View File

@@ -1,38 +1,33 @@
import 'dart:convert';
import 'package:toolbox/core/persistant_store.dart';
import 'package:toolbox/data/model/server/server_private_info.dart';
class ServerStore extends PersistentStore {
void put(ServerPrivateInfo info) {
final ss = fetch();
if (!have(info)) ss.add(info);
box.put('servers', json.encode(ss));
box.put(info.id, info);
}
List<ServerPrivateInfo> fetch() {
return getServerInfoList(
json.decode(box.get('servers', defaultValue: '[]')!));
final ids = box.keys;
final List<ServerPrivateInfo> ss = [];
for (final id in ids) {
final s = box.get(id);
if (s != null) {
ss.add(s);
}
}
return ss;
}
void delete(ServerPrivateInfo s) {
final ss = fetch();
ss.removeAt(index(s));
box.put('servers', json.encode(ss));
box.delete(s.id);
}
void update(ServerPrivateInfo old, ServerPrivateInfo newInfo) {
final ss = fetch();
final idx = index(old);
if (idx < 0) {
throw RangeError.index(idx, ss);
if (!have(old)) {
throw Exception('Old ServerPrivateInfo not found');
}
ss[idx] = newInfo;
box.put('servers', json.encode(ss));
put(newInfo);
}
int index(ServerPrivateInfo s) => fetch()
.indexWhere((e) => e.ip == s.ip && e.port == s.port && e.user == e.user);
bool have(ServerPrivateInfo s) => index(s) != -1;
bool have(ServerPrivateInfo s) => box.get(s.id) != null;
}

View File

@@ -7,4 +7,7 @@ class SettingStore extends PersistentStore {
StoreProperty<int> get serverStatusUpdateInterval =>
property('serverStatusUpdateInterval', defaultValue: 2);
StoreProperty<int> get launchPage => property('launchPage', defaultValue: 0);
StoreProperty<int> get storeVersion =>
property('storeVersion', defaultValue: 0);
}

View File

@@ -1,32 +1,24 @@
import 'dart:convert';
import 'package:toolbox/core/persistant_store.dart';
import 'package:toolbox/data/model/server/snippet.dart';
class SnippetStore extends PersistentStore {
void put(Snippet snippet) {
final ss = fetch();
if (!have(snippet)) ss.add(snippet);
box.put('snippet', json.encode(ss));
box.put(snippet.name, snippet);
}
List<Snippet> fetch() {
return getSnippetList(json.decode(box.get('snippet', defaultValue: '[]')!));
final keys = box.keys;
final ss = <Snippet>[];
for (final key in keys) {
final s = box.get(key);
if (s != null) {
ss.add(s);
}
}
return ss;
}
void delete(Snippet s) {
final ss = fetch();
ss.removeAt(index(s));
box.put('snippet', json.encode(ss));
box.delete(s.name);
}
void update(Snippet old, Snippet newInfo) {
final ss = fetch();
ss[index(old)] = newInfo;
box.put('snippet', json.encode(ss));
}
int index(Snippet s) => fetch().indexWhere((e) => e.name == s.name);
bool have(Snippet s) => index(s) != -1;
}

View File

@@ -6,6 +6,10 @@ import 'package:logging/logging.dart';
import 'package:provider/provider.dart';
import 'package:toolbox/app.dart';
import 'package:toolbox/core/analysis.dart';
import 'package:toolbox/core/persistant_store.dart';
import 'package:toolbox/data/model/server/private_key_info.dart';
import 'package:toolbox/data/model/server/server_private_info.dart';
import 'package:toolbox/data/model/server/snippet.dart';
import 'package:toolbox/data/provider/app.dart';
import 'package:toolbox/data/provider/apt.dart';
import 'package:toolbox/data/provider/debug.dart';
@@ -14,11 +18,17 @@ import 'package:toolbox/data/provider/private_key.dart';
import 'package:toolbox/data/provider/server.dart';
import 'package:toolbox/data/provider/sftp_download.dart';
import 'package:toolbox/data/provider/snippet.dart';
import 'package:toolbox/data/store/private_key.dart';
import 'package:toolbox/data/store/server.dart';
import 'package:toolbox/data/store/setting.dart';
import 'package:toolbox/data/store/snippet.dart';
import 'package:toolbox/locator.dart';
Future<void> initApp() async {
await Hive.initFlutter();
await initHive();
await setupLocator();
await upgradeStore();
locator<SnippetProvider>().loadData();
locator<PrivateKeyProvider>().loadData();
@@ -30,6 +40,27 @@ Future<void> initApp() async {
});
}
Future<void> initHive() async {
await Hive.initFlutter();
Hive.registerAdapter(SnippetAdapter());
Hive.registerAdapter(PrivateKeyInfoAdapter());
Hive.registerAdapter(ServerPrivateInfoAdapter());
}
Future<void> upgradeStore() async {
final setting = locator<SettingStore>();
final version = setting.storeVersion.fetch();
if (version == 0) {
final snippet = locator<SnippetStore>();
final key = locator<PrivateKeyStore>();
final spi = locator<ServerStore>();
for (final s in <PersistentStore>[snippet, key, spi]) {
await s.box.deleteAll(s.box.keys);
}
setting.storeVersion.put(1);
}
}
void runInZone(dynamic Function() body) {
final zoneSpec = ZoneSpecification(
print: (Zone self, ZoneDelegate parent, Zone zone, String line) {

View File

@@ -1,7 +1,7 @@
import 'dart:convert';
import 'package:clipboard/clipboard.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:toolbox/core/utils.dart';
import 'package:toolbox/data/res/color.dart';
import 'package:toolbox/generated/l10n.dart';
@@ -123,10 +123,12 @@ class _ConvertPageState extends State<ConvertPage>
style: ButtonStyle(
foregroundColor: MaterialStateProperty.all(primaryColor)),
child: Icon(Icons.copy, semanticLabel: s.copy),
onPressed: () => FlutterClipboard.copy(
_textEditingControllerResult.text == ''
onPressed: () => Clipboard.setData(
ClipboardData(
text: _textEditingControllerResult.text == ''
? ' '
: _textEditingControllerResult.text),
),
)
],
),

View File

@@ -68,8 +68,12 @@ class _ServerDetailPageState extends State<ServerDetailPage>
Widget _buildLinuxIcon(String sysVer) {
final iconPath = linuxIcons.search(sysVer);
if (iconPath == null) return const SizedBox();
return SizedBox(
height: _media.size.height * 0.15, child: Image.asset(iconPath));
return ConstrainedBox(
constraints: BoxConstraints(
maxHeight: _media.size.height * 0.12,
maxWidth: _media.size.width * 0.6),
child: Image.asset(iconPath),
);
}
Widget _buildCPUView(ServerStatus ss) {

View File

@@ -4,7 +4,6 @@ import 'package:dropdown_button2/dropdown_button2.dart';
import 'package:flutter/material.dart';
import 'package:get_it/get_it.dart';
import 'package:provider/provider.dart';
import 'package:pull_to_refresh/pull_to_refresh.dart';
import 'package:toolbox/core/route.dart';
import 'package:toolbox/core/utils.dart';
import 'package:toolbox/data/model/app/menu_item.dart';
@@ -36,16 +35,17 @@ class _ServerPageState extends State<ServerPage>
late MediaQueryData _media;
late ThemeData _theme;
late Color _primaryColor;
late RefreshController _refreshController;
late ServerProvider _serverProvider;
late S s;
late bool autoUpdate;
@override
void initState() {
super.initState();
_serverProvider = locator<ServerProvider>();
_refreshController = RefreshController();
autoUpdate =
locator<SettingStore>().serverStatusUpdateInterval.fetch() != 0;
}
@override
@@ -60,8 +60,6 @@ class _ServerPageState extends State<ServerPage>
@override
Widget build(BuildContext context) {
super.build(context);
final autoUpdate =
locator<SettingStore>().serverStatusUpdateInterval.fetch() != 0;
final child = Consumer<ServerProvider>(builder: (_, pro, __) {
if (pro.servers.isEmpty) {
return Center(
@@ -89,13 +87,9 @@ class _ServerPageState extends State<ServerPage>
return Scaffold(
body: autoUpdate
? child
: SmartRefresher(
controller: _refreshController,
: RefreshIndicator(
child: child,
onRefresh: () async {
await _serverProvider.refreshData();
_refreshController.refreshCompleted();
},
onRefresh: () async => _serverProvider.refreshData(),
),
floatingActionButton: FloatingActionButton(
onPressed: () =>

View File

@@ -1,6 +1,13 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
_fe_analyzer_shared:
dependency: transitive
description:
name: _fe_analyzer_shared
url: "https://pub.dartlang.org"
source: hosted
version: "50.0.0"
after_layout:
dependency: "direct main"
description:
@@ -8,6 +15,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0"
analyzer:
dependency: transitive
description:
name: analyzer
url: "https://pub.dartlang.org"
source: hosted
version: "5.2.0"
archive:
dependency: transitive
description:
@@ -43,6 +57,62 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
build:
dependency: transitive
description:
name: build
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.1"
build_config:
dependency: transitive
description:
name: build_config
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
build_daemon:
dependency: transitive
description:
name: build_daemon
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
build_resolvers:
dependency: transitive
description:
name: build_resolvers
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
build_runner:
dependency: "direct dev"
description:
name: build_runner
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.2"
build_runner_core:
dependency: transitive
description:
name: build_runner_core
url: "https://pub.dartlang.org"
source: hosted
version: "7.2.7"
built_collection:
dependency: transitive
description:
name: built_collection
url: "https://pub.dartlang.org"
source: hosted
version: "5.1.1"
built_value:
dependency: transitive
description:
name: built_value
url: "https://pub.dartlang.org"
source: hosted
version: "8.4.2"
characters:
dependency: transitive
description:
@@ -50,6 +120,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
checked_yaml:
dependency: transitive
description:
name: checked_yaml
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.1"
circle_chart:
dependency: "direct main"
description:
@@ -59,13 +136,6 @@ packages:
url: "https://github.com/LollipopKit/circle_chart"
source: git
version: "0.0.3"
clipboard:
dependency: "direct main"
description:
name: clipboard
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
clock:
dependency: transitive
description:
@@ -73,6 +143,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.1"
code_builder:
dependency: transitive
description:
name: code_builder
url: "https://pub.dartlang.org"
source: hosted
version: "4.3.0"
collection:
dependency: transitive
description:
@@ -110,6 +187,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
dart_style:
dependency: transitive
description:
name: dart_style
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.4"
dartssh2:
dependency: "direct main"
description:
@@ -173,6 +257,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "6.1.2"
fixnum:
dependency: transitive
description:
name: fixnum
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
flutter:
dependency: "direct main"
description: flutter
@@ -228,6 +319,13 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
frontend_server_client:
dependency: transitive
description:
name: frontend_server_client
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.0"
get_it:
dependency: "direct main"
description:
@@ -235,8 +333,22 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "7.2.0"
glob:
dependency: transitive
description:
name: glob
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
graphs:
dependency: transitive
description:
name: graphs
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
hive:
dependency: "direct main"
dependency: transitive
description:
name: hive
url: "https://pub.dartlang.org"
@@ -249,6 +361,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0"
hive_generator:
dependency: "direct dev"
description:
name: hive_generator
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
http:
dependency: transitive
description:
@@ -263,6 +382,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.2"
http_multi_server:
dependency: transitive
description:
name: http_multi_server
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.1"
http_parser:
dependency: transitive
description:
@@ -284,6 +410,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.17.0"
io:
dependency: transitive
description:
name: io
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
js:
dependency: transitive
description:
@@ -291,6 +424,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.4"
json_annotation:
dependency: transitive
description:
name: json_annotation
url: "https://pub.dartlang.org"
source: hosted
version: "4.7.0"
lint:
dependency: transitive
description:
@@ -347,6 +487,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
package_config:
dependency: transitive
description:
name: package_config
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
path:
dependency: transitive
description:
@@ -445,6 +592,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.6.0"
pool:
dependency: transitive
description:
name: pool
url: "https://pub.dartlang.org"
source: hosted
version: "1.5.1"
process:
dependency: transitive
description:
@@ -459,13 +613,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "6.0.3"
pull_to_refresh:
dependency: "direct main"
pub_semver:
dependency: transitive
description:
name: pull_to_refresh
name: pub_semver
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
version: "2.1.2"
pubspec_parse:
dependency: transitive
description:
name: pubspec_parse
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.1"
r_upgrade:
dependency: "direct main"
description:
@@ -515,11 +676,39 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.0"
shelf:
dependency: transitive
description:
name: shelf
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
shelf_web_socket:
dependency: transitive
description:
name: shelf_web_socket
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.3"
sky_engine:
dependency: transitive
description: flutter
source: sdk
version: "0.0.99"
source_gen:
dependency: transitive
description:
name: source_gen
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.6"
source_helper:
dependency: transitive
description:
name: source_helper
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.3"
source_span:
dependency: transitive
description:
@@ -541,6 +730,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
stream_transform:
dependency: transitive
description:
name: stream_transform
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0"
string_scanner:
dependency: transitive
description:
@@ -562,6 +758,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.12"
timing:
dependency: transitive
description:
name: timing
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
typed_data:
dependency: transitive
description:
@@ -639,6 +842,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.2"
watcher:
dependency: transitive
description:
name: watcher
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.2"
web_socket_channel:
dependency: transitive
description:
name: web_socket_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.2.0"
win32:
dependency: transitive
description:
@@ -668,5 +885,5 @@ packages:
source: hosted
version: "3.1.1"
sdks:
dart: ">=2.17.0 <3.0.0"
dart: ">=2.18.0 <3.0.0"
flutter: ">=3.0.0"

View File

@@ -33,7 +33,6 @@ dependencies:
sdk: flutter
provider: ^6.0.0
get_it: ^7.2.0
hive: ^2.0.0
hive_flutter: ^1.0.0
dio: ^4.0.0
after_layout: ^1.1.0
@@ -51,9 +50,7 @@ dependencies:
url: https://github.com/LollipopKit/circle_chart
ref: main
# path: ../circle_chart
clipboard: ^0.1.3
r_upgrade: ^0.3.6
pull_to_refresh: ^2.0.0
dropdown_button2: ^1.1.1
flutter_advanced_drawer: ^1.3.0
path_provider: ^2.0.9
@@ -63,6 +60,8 @@ dependencies:
dev_dependencies:
flutter_native_splash: ^2.1.6
hive_generator: ^2.0.0
build_runner: ^2.3.2
flutter_test:
sdk: flutter