feat: all address book logic

Signed-off-by: Kingtous <kingtous@qq.com>
This commit is contained in:
kingtous 2022-07-26 17:03:19 +08:00 committed by Kingtous
parent 1eaa9ae125
commit d0e55f6f81
5 changed files with 564 additions and 154 deletions

View File

@ -1,6 +1,7 @@
import 'dart:async'; import 'dart:async';
import 'dart:convert'; import 'dart:convert';
import 'package:contextmenu/contextmenu.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_hbb/utils/multi_window_manager.dart'; import 'package:flutter_hbb/utils/multi_window_manager.dart';
import 'package:get/get.dart'; import 'package:get/get.dart';
@ -302,22 +303,39 @@ class _ConnectionPageState extends State<ConnectionPage> {
return Image.asset('assets/$platform.png', height: 50); return Image.asset('assets/$platform.png', height: 50);
} }
bool hitTag(List<dynamic> selectedTags, List<dynamic> idents) {
if (selectedTags.isEmpty) {
return true;
}
if (idents.isEmpty) {
return false;
}
for (final tag in selectedTags) {
if (!idents.contains(tag)) {
return false;
}
}
return true;
}
/// Get all the saved peers. /// Get all the saved peers.
Future<Widget> getPeers({RemoteType rType = RemoteType.recently}) async { Future<Widget> getPeers({RemoteType rType = RemoteType.recently}) async {
final space = 8.0; final space = 8.0;
final cards = <Widget>[]; final cards = <Widget>[];
var peers; List<Peer> peers;
switch (rType) { switch (rType) {
case RemoteType.recently: case RemoteType.recently:
peers = gFFI.peers(); peers = gFFI.peers();
break; break;
case RemoteType.favorite: case RemoteType.favorite:
peers = await gFFI.bind.mainGetFav().then((peers) async { peers = await gFFI.bind.mainGetFav().then((peers) async {
final peersEntities = await Future.wait(peers.map((id) => gFFI.bind.mainGetPeers(id: id)).toList(growable: false)) final peersEntities = await Future.wait(peers
.then((peers_str){ .map((id) => gFFI.bind.mainGetPeers(id: id))
.toList(growable: false))
.then((peers_str) {
final len = peers_str.length; final len = peers_str.length;
final ps = List<Peer>.empty(growable: true); final ps = List<Peer>.empty(growable: true);
for(var i = 0; i< len ; i++){ for (var i = 0; i < len; i++) {
print("${peers[i]}: ${peers_str[i]}"); print("${peers[i]}: ${peers_str[i]}");
ps.add(Peer.fromJson(peers[i], jsonDecode(peers_str[i])['info'])); ps.add(Peer.fromJson(peers[i], jsonDecode(peers_str[i])['info']));
} }
@ -333,7 +351,6 @@ class _ConnectionPageState extends State<ConnectionPage> {
}); });
break; break;
case RemoteType.addressBook: case RemoteType.addressBook:
await gFFI.abModel.getAb();
peers = gFFI.abModel.peers.map((e) { peers = gFFI.abModel.peers.map((e) {
return Peer.fromJson(e['id'], e); return Peer.fromJson(e['id'], e);
}).toList(); }).toList();
@ -343,97 +360,107 @@ class _ConnectionPageState extends State<ConnectionPage> {
var deco = Rx<BoxDecoration?>(BoxDecoration( var deco = Rx<BoxDecoration?>(BoxDecoration(
border: Border.all(color: Colors.transparent, width: 1.0), border: Border.all(color: Colors.transparent, width: 1.0),
borderRadius: BorderRadius.circular(20))); borderRadius: BorderRadius.circular(20)));
cards.add(Container( cards.add(Obx(
width: 225, () => Offstage(
height: 150, offstage: !hitTag(gFFI.abModel.selectedTags, p.tags) &&
child: Card( rType == RemoteType.addressBook,
shape: RoundedRectangleBorder( child: Container(
borderRadius: BorderRadius.circular(20)), width: 225,
child: MouseRegion( height: 150,
onEnter: (evt) { child: Card(
deco.value = BoxDecoration( shape: RoundedRectangleBorder(
border: Border.all(color: Colors.blue, width: 1.0), borderRadius: BorderRadius.circular(20)),
borderRadius: BorderRadius.circular(20)); child: MouseRegion(
}, onEnter: (evt) {
onExit: (evt) { deco.value = BoxDecoration(
deco.value = BoxDecoration( border: Border.all(color: Colors.blue, width: 1.0),
border: Border.all(color: Colors.transparent, width: 1.0), borderRadius: BorderRadius.circular(20));
borderRadius: BorderRadius.circular(20)); },
}, onExit: (evt) {
child: Obx( deco.value = BoxDecoration(
() => Container( border:
decoration: deco.value, Border.all(color: Colors.transparent, width: 1.0),
child: Column( borderRadius: BorderRadius.circular(20));
mainAxisSize: MainAxisSize.min, },
mainAxisAlignment: MainAxisAlignment.center, child: Obx(
children: [ () => Container(
Expanded( decoration: deco.value,
child: Container( child: Column(
decoration: BoxDecoration( mainAxisSize: MainAxisSize.min,
color: str2color('${p.id}${p.platform}', 0x7f), mainAxisAlignment: MainAxisAlignment.center,
borderRadius: BorderRadius.only( children: [
topLeft: Radius.circular(20), Expanded(
topRight: Radius.circular(20), child: Container(
), decoration: BoxDecoration(
), color:
child: Row( str2color('${p.id}${p.platform}', 0x7f),
children: [ borderRadius: BorderRadius.only(
Expanded( topLeft: Radius.circular(20),
child: Column( topRight: Radius.circular(20),
crossAxisAlignment: ),
CrossAxisAlignment.center, ),
children: [ child: Row(
Container( children: [
padding: const EdgeInsets.all(6), Expanded(
child: child: Column(
getPlatformImage('${p.platform}'), crossAxisAlignment:
), CrossAxisAlignment.center,
Row(
children: [ children: [
Expanded( Container(
child: Tooltip( padding: const EdgeInsets.all(6),
message: child: getPlatformImage(
'${p.username}@${p.hostname}', '${p.platform}'),
child: Text( ),
'${p.username}@${p.hostname}', Row(
style: TextStyle( children: [
color: Colors.white70, Expanded(
fontSize: 12), child: Tooltip(
textAlign: TextAlign.center, message:
overflow: TextOverflow.ellipsis, '${p.username}@${p.hostname}',
child: Text(
'${p.username}@${p.hostname}',
style: TextStyle(
color: Colors.white70,
fontSize: 12),
textAlign: TextAlign.center,
overflow:
TextOverflow.ellipsis,
),
),
), ),
), ],
), ),
], ],
), ).paddingAll(4.0),
], ),
).paddingAll(4.0), ],
), ),
], ),
), ),
), Row(
), mainAxisAlignment: MainAxisAlignment.spaceBetween,
Row( children: [
mainAxisAlignment: MainAxisAlignment.spaceBetween, Text("${p.id}"),
children: [ InkWell(
Text("${p.id}"), child: Icon(Icons.more_vert),
InkWell( onTapDown: (e) {
child: Icon(Icons.more_vert), final x = e.globalPosition.dx;
onTapDown: (e) { final y = e.globalPosition.dy;
final x = e.globalPosition.dx; _menuPos =
final y = e.globalPosition.dy; RelativeRect.fromLTRB(x, y, x, y);
_menuPos = RelativeRect.fromLTRB(x, y, x, y); },
}, onTap: () {
onTap: () { showPeerMenu(context, p.id, rType);
showPeerMenu(context, p.id, rType); }),
}), ],
).paddingSymmetric(vertical: 8.0, horizontal: 12.0)
], ],
).paddingSymmetric(vertical: 8.0, horizontal: 12.0) ),
], ),
), ),
), ))),
), ),
)))); ));
}); });
return SingleChildScrollView( return SingleChildScrollView(
child: Wrap(children: cards, spacing: space, runSpacing: space)); child: Wrap(children: cards, spacing: space, runSpacing: space));
@ -450,7 +477,11 @@ class _ConnectionPageState extends State<ConnectionPage> {
PopupMenuItem<String>( PopupMenuItem<String>(
child: Text(translate('TCP Tunneling')), value: 'tcp-tunnel'), child: Text(translate('TCP Tunneling')), value: 'tcp-tunnel'),
PopupMenuItem<String>(child: Text(translate('Rename')), value: 'rename'), PopupMenuItem<String>(child: Text(translate('Rename')), value: 'rename'),
PopupMenuItem<String>(child: Text(translate('Remove')), value: 'remove'), rType == RemoteType.addressBook
? PopupMenuItem<String>(
child: Text(translate('Remove')), value: 'ab-delete')
: PopupMenuItem<String>(
child: Text(translate('Remove')), value: 'remove'),
PopupMenuItem<String>( PopupMenuItem<String>(
child: Text(translate('Unremember Password')), child: Text(translate('Unremember Password')),
value: 'unremember-password'), value: 'unremember-password'),
@ -459,9 +490,13 @@ class _ConnectionPageState extends State<ConnectionPage> {
items.add(PopupMenuItem<String>( items.add(PopupMenuItem<String>(
child: Text(translate('Remove from Favorites')), child: Text(translate('Remove from Favorites')),
value: 'remove-fav')); value: 'remove-fav'));
} else } else if (rType != RemoteType.addressBook) {
items.add(PopupMenuItem<String>( items.add(PopupMenuItem<String>(
child: Text(translate('Add to Favorites')), value: 'add-fav')); child: Text(translate('Add to Favorites')), value: 'add-fav'));
} else {
items.add(PopupMenuItem<String>(
child: Text(translate('Edit Tag')), value: 'ab-edit-tag'));
}
var value = await showMenu( var value = await showMenu(
context: context, context: context,
position: this._menuPos, position: this._menuPos,
@ -475,7 +510,16 @@ class _ConnectionPageState extends State<ConnectionPage> {
}(); }();
} else if (value == 'file') { } else if (value == 'file') {
connect(id, isFileTransfer: true); connect(id, isFileTransfer: true);
} else if (value == 'add-fav') {} } else if (value == 'add-fav') {
} else if (value == 'connect') {
connect(id, isFileTransfer: false);
} else if (value == 'ab-delete') {
gFFI.abModel.deletePeer(id);
await gFFI.abModel.updateAb();
setState(() {});
} else if (value == 'ab-edit-tag') {
abEditTag(id);
}
} }
var svcStopped = false.obs; var svcStopped = false.obs;
@ -572,7 +616,7 @@ class _ConnectionPageState extends State<ConnectionPage> {
); );
} else if (model.abError.isNotEmpty) { } else if (model.abError.isNotEmpty) {
return Center( return Center(
child: CircularProgressIndicator(), child: Text(translate("${model.abError}")),
); );
} else { } else {
return Offstage(); return Offstage();
@ -601,7 +645,21 @@ class _ConnectionPageState extends State<ConnectionPage> {
Text(translate('Tags')), Text(translate('Tags')),
InkWell( InkWell(
child: PopupMenuButton( child: PopupMenuButton(
itemBuilder: (context) => [], itemBuilder: (context) => [
PopupMenuItem(
child: Text(translate("Add ID")),
value: 'add-id',
),
PopupMenuItem(
child: Text(translate("Add Tag")),
value: 'add-tag',
),
PopupMenuItem(
child: Text(translate("Unselect all tags")),
value: 'unset-all-tag',
),
],
onSelected: handleAbOp,
child: Icon(Icons.more_vert_outlined)), child: Icon(Icons.more_vert_outlined)),
) )
], ],
@ -612,9 +670,20 @@ class _ConnectionPageState extends State<ConnectionPage> {
height: double.infinity, height: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
border: Border.all(color: MyTheme.darkGray)), border: Border.all(color: MyTheme.darkGray)),
child: Wrap( child: Obx(
children: () => Wrap(
gFFI.abModel.tags.map((e) => buildTag(e)).toList(), children: gFFI.abModel.tags
.map((e) => buildTag(e, gFFI.abModel.selectedTags,
onTap: () {
//
if (gFFI.abModel.selectedTags.contains(e)) {
gFFI.abModel.selectedTags.remove(e);
} else {
gFFI.abModel.selectedTags.add(e);
}
}))
.toList(),
),
), ),
).marginSymmetric(vertical: 8.0), ).marginSymmetric(vertical: 8.0),
) )
@ -622,33 +691,266 @@ class _ConnectionPageState extends State<ConnectionPage> {
), ),
), ),
).marginOnly(right: 8.0), ).marginOnly(right: 8.0),
Column( Expanded(
children: [ child: FutureBuilder<Widget>(
FutureBuilder<Widget>( future: getPeers(rType: RemoteType.addressBook),
future: getPeers(rType: RemoteType.addressBook), builder: (context, snapshot) {
builder: (context, snapshot) { if (snapshot.hasData) {
if (snapshot.hasData) { return Column(
return snapshot.data!; crossAxisAlignment: CrossAxisAlignment.start,
} else { children: [Expanded(child: snapshot.data!)],
return Center(child: CircularProgressIndicator()); );
} } else if (snapshot.hasError) {
}), return Container(
], alignment: Alignment.center,
child: Text('${snapshot.error}'));
} else {
return Container(
alignment: Alignment.center,
child: CircularProgressIndicator());
}
}),
) )
], ],
); );
} }
Widget buildTag(String tagName) { Widget buildTag(String tagName, RxList<dynamic> rxTags, {Function()? onTap}) {
return Container( return ContextMenuArea(
decoration: BoxDecoration( width: 100,
border: Border.all(color: MyTheme.darkGray), builder: (context) => [
borderRadius: BorderRadius.circular(10)), ListTile(
margin: EdgeInsets.symmetric(horizontal: 4.0, vertical: 8.0), title: Text(translate("Delete")),
padding: EdgeInsets.symmetric(vertical: 2.0, horizontal: 8.0), onTap: () {
child: Text(tagName), gFFI.abModel.deleteTag(tagName);
gFFI.abModel.updateAb();
Future.delayed(Duration.zero, () => Get.back());
},
)
],
child: GestureDetector(
onTap: onTap,
child: Obx(
() => Container(
decoration: BoxDecoration(
color: rxTags.contains(tagName) ? Colors.blue : null,
border: Border.all(color: MyTheme.darkGray),
borderRadius: BorderRadius.circular(10)),
margin: EdgeInsets.symmetric(horizontal: 4.0, vertical: 8.0),
padding: EdgeInsets.symmetric(vertical: 2.0, horizontal: 8.0),
child: Text(
tagName,
style: TextStyle(
color: rxTags.contains(tagName) ? MyTheme.white : null),
),
),
),
),
); );
} }
/// tag operation
void handleAbOp(String value) {
if (value == 'add-id') {
abAddId();
} else if (value == 'add-tag') {
abAddTag();
} else if (value == 'unset-all-tag') {
gFFI.abModel.unsetSelectedTags();
}
}
void abAddId() async {
var field = "";
var msg = "";
var isInProgress = false;
DialogManager.show((setState, close) {
return CustomAlertDialog(
title: Text(translate("Add ID")),
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(translate("whitelist_sep")),
SizedBox(
height: 8.0,
),
Row(
children: [
Expanded(
child: TextField(
onChanged: (s) {
field = s;
},
maxLines: null,
decoration: InputDecoration(
border: OutlineInputBorder(),
errorText: msg.isEmpty ? null : translate(msg),
),
controller: TextEditingController(text: field),
),
),
],
),
SizedBox(
height: 4.0,
),
Offstage(offstage: !isInProgress, child: LinearProgressIndicator())
],
),
actions: [
TextButton(
onPressed: () {
close();
},
child: Text(translate("Cancel"))),
TextButton(
onPressed: () async {
setState(() {
msg = "";
isInProgress = true;
});
field = field.trim();
if (field.isEmpty) {
// pass
} else {
final ids = field.trim().split(RegExp(r"[\s,;\n]+"));
field = ids.join(',');
for (final newId in ids) {
if (gFFI.abModel.idContainBy(newId)) {
continue;
}
gFFI.abModel.addId(newId);
}
await gFFI.abModel.updateAb();
this.setState(() {});
// final currentPeers
}
close();
},
child: Text(translate("OK"))),
],
);
});
}
void abAddTag() async {
var field = "";
var msg = "";
var isInProgress = false;
DialogManager.show((setState, close) {
return CustomAlertDialog(
title: Text(translate("Add Tag")),
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(translate("whitelist_sep")),
SizedBox(
height: 8.0,
),
Row(
children: [
Expanded(
child: TextField(
onChanged: (s) {
field = s;
},
maxLines: null,
decoration: InputDecoration(
border: OutlineInputBorder(),
errorText: msg.isEmpty ? null : translate(msg),
),
controller: TextEditingController(text: field),
),
),
],
),
SizedBox(
height: 4.0,
),
Offstage(offstage: !isInProgress, child: LinearProgressIndicator())
],
),
actions: [
TextButton(
onPressed: () {
close();
},
child: Text(translate("Cancel"))),
TextButton(
onPressed: () async {
setState(() {
msg = "";
isInProgress = true;
});
field = field.trim();
if (field.isEmpty) {
// pass
} else {
final tags = field.trim().split(RegExp(r"[\s,;\n]+"));
field = tags.join(',');
for (final tag in tags) {
gFFI.abModel.addTag(tag);
}
await gFFI.abModel.updateAb();
// final currentPeers
}
close();
},
child: Text(translate("OK"))),
],
);
});
}
void abEditTag(String id) {
var isInProgress = false;
final tags = List.of(gFFI.abModel.tags);
var selectedTag = gFFI.abModel.getPeerTags(id).obs;
DialogManager.show((setState, close) {
return CustomAlertDialog(
title: Text(translate("Edit Tag")),
content: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0),
child: Wrap(
children: tags
.map((e) => buildTag(e, selectedTag, onTap: () {
if (selectedTag.contains(e)) {
selectedTag.remove(e);
} else {
selectedTag.add(e);
}
}))
.toList(growable: false),
),
),
Offstage(offstage: !isInProgress, child: LinearProgressIndicator())
],
),
actions: [
TextButton(
onPressed: () {
close();
},
child: Text(translate("Cancel"))),
TextButton(
onPressed: () async {
setState(() {
isInProgress = true;
});
gFFI.abModel.changeTagForPeer(id, selectedTag);
await gFFI.abModel.updateAb();
close();
},
child: Text(translate("OK"))),
],
);
});
}
} }
class AddressBookPage extends StatefulWidget { class AddressBookPage extends StatefulWidget {

View File

@ -2,13 +2,16 @@ import 'dart:convert';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_hbb/models/model.dart'; import 'package:flutter_hbb/models/model.dart';
import 'package:get/get.dart';
import 'package:http/http.dart' as http; import 'package:http/http.dart' as http;
class AbModel with ChangeNotifier { class AbModel with ChangeNotifier {
var abLoading = false; var abLoading = false;
var abError = ""; var abError = "";
var tags = []; var tags = [].obs;
var peers = []; var peers = [].obs;
var selectedTags = List<String>.empty(growable: true).obs;
WeakReference<FFI> parent; WeakReference<FFI> parent;
@ -21,7 +24,6 @@ class AbModel with ChangeNotifier {
notifyListeners(); notifyListeners();
// request // request
final api = "${await getApiServer()}/api/ab/get"; final api = "${await getApiServer()}/api/ab/get";
debugPrint("request $api with post ${await _getHeaders()}");
final resp = await http.post(Uri.parse(api), headers: await _getHeaders()); final resp = await http.post(Uri.parse(api), headers: await _getHeaders());
abLoading = false; abLoading = false;
Map<String, dynamic> json = jsonDecode(resp.body); Map<String, dynamic> json = jsonDecode(resp.body);
@ -32,8 +34,8 @@ class AbModel with ChangeNotifier {
// "peers":[{"id":"aa1234","username":"selfd", // "peers":[{"id":"aa1234","username":"selfd",
// "hostname":"PC","platform":"Windows","tags":["aaa"]}]} // "hostname":"PC","platform":"Windows","tags":["aaa"]}]}
final data = jsonDecode(json['data']); final data = jsonDecode(json['data']);
tags = data['tags']; tags.value = data['tags'];
peers = data['peers']; peers.value = data['peers'];
} }
print(json); print(json);
notifyListeners(); notifyListeners();
@ -53,4 +55,86 @@ class AbModel with ChangeNotifier {
Future<Map<String, String>>? _getHeaders() { Future<Map<String, String>>? _getHeaders() {
return _ffi?.getHttpHeaders(); return _ffi?.getHttpHeaders();
} }
///
void addId(String id) async {
if (idContainBy(id)) {
return;
}
peers.add({"id": id});
notifyListeners();
}
void addTag(String tag) async {
if (tagContainBy(tag)) {
return;
}
tags.add(tag);
notifyListeners();
}
void changeTagForPeer(String id, List<dynamic> tags) {
final it = peers.where((element) => element['id'] == id);
if (it.isEmpty) {
return;
}
it.first['tags'] = tags;
}
Future<void> updateAb() async {
abLoading = true;
notifyListeners();
final api = "${await getApiServer()}/api/ab";
var authHeaders = await _getHeaders() ?? Map<String, String>();
authHeaders['Content-Type'] = "application/json";
final body = jsonEncode({
"data": jsonEncode({"tags": tags, "peers": peers})
});
final resp =
await http.post(Uri.parse(api), headers: authHeaders, body: body);
abLoading = false;
await getAb();
notifyListeners();
debugPrint("resp: ${resp.body}");
}
bool idContainBy(String id) {
return peers.where((element) => element['id'] == id).isNotEmpty;
}
bool tagContainBy(String tag) {
return tags.where((element) => element == tag).isNotEmpty;
}
void deletePeer(String id) {
peers.removeWhere((element) => element['id'] == id);
notifyListeners();
}
void deleteTag(String tag) {
tags.removeWhere((element) => element == tag);
for (var peer in peers) {
if (peer['tags'] == null) {
continue;
}
if (((peer['tags']) as List<dynamic>).contains(tag)) {
((peer['tags']) as List<dynamic>).remove(tag);
}
}
notifyListeners();
}
void unsetSelectedTags() {
selectedTags.clear();
notifyListeners();
}
List<dynamic> getPeerTags(String id) {
final it = peers.where((p0) => p0['id'] == id);
if (it.isEmpty) {
return [];
} else {
return it.first['tags'] ?? [];
}
}
} }

View File

@ -1112,12 +1112,14 @@ class Peer {
final String username; final String username;
final String hostname; final String hostname;
final String platform; final String platform;
final List<dynamic> tags;
Peer.fromJson(String id, Map<String, dynamic> json) Peer.fromJson(String id, Map<String, dynamic> json)
: id = id, : id = id,
username = json['username'], username = json['username'] ?? '',
hostname = json['hostname'], hostname = json['hostname'] ?? '',
platform = json['platform']; platform = json['platform'] ?? '',
tags = json['tags'] ?? [];
} }
class Display { class Display {

View File

@ -7,21 +7,35 @@ packages:
name: _fe_analyzer_shared name: _fe_analyzer_shared
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "40.0.0" version: "43.0.0"
after_layout:
dependency: transitive
description:
name: after_layout
url: "https://pub.flutter-io.cn"
source: hosted
version: "1.2.0"
analyzer: analyzer:
dependency: transitive dependency: transitive
description: description:
name: analyzer name: analyzer
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "4.1.0" version: "4.3.1"
animations:
dependency: transitive
description:
name: animations
url: "https://pub.flutter-io.cn"
source: hosted
version: "2.0.3"
archive: archive:
dependency: transitive dependency: transitive
description: description:
name: archive name: archive
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.3.0" version: "3.3.1"
args: args:
dependency: transitive dependency: transitive
description: description:
@ -56,7 +70,7 @@ packages:
name: build_config name: build_config
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.0.0" version: "1.1.0"
build_daemon: build_daemon:
dependency: transitive dependency: transitive
description: description:
@ -77,7 +91,7 @@ packages:
name: build_runner name: build_runner
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.1.11" version: "2.2.0"
build_runner_core: build_runner_core:
dependency: transitive dependency: transitive
description: description:
@ -98,7 +112,7 @@ packages:
name: built_value name: built_value
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "8.3.2" version: "8.4.0"
characters: characters:
dependency: transitive dependency: transitive
description: description:
@ -141,6 +155,13 @@ packages:
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.16.0" version: "1.16.0"
contextmenu:
dependency: "direct main"
description:
name: contextmenu
url: "https://pub.flutter-io.cn"
source: hosted
version: "3.0.0"
convert: convert:
dependency: transitive dependency: transitive
description: description:
@ -282,42 +303,42 @@ packages:
name: firebase_analytics name: firebase_analytics
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "9.1.9" version: "9.3.0"
firebase_analytics_platform_interface: firebase_analytics_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_analytics_platform_interface name: firebase_analytics_platform_interface
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.1.7" version: "3.3.0"
firebase_analytics_web: firebase_analytics_web:
dependency: transitive dependency: transitive
description: description:
name: firebase_analytics_web name: firebase_analytics_web
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.4.0+14" version: "0.4.2"
firebase_core: firebase_core:
dependency: transitive dependency: transitive
description: description:
name: firebase_core name: firebase_core
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.17.1" version: "1.20.0"
firebase_core_platform_interface: firebase_core_platform_interface:
dependency: transitive dependency: transitive
description: description:
name: firebase_core_platform_interface name: firebase_core_platform_interface
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "4.4.0" version: "4.5.0"
firebase_core_web: firebase_core_web:
dependency: transitive dependency: transitive
description: description:
name: firebase_core_web name: firebase_core_web
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.6.4" version: "1.7.1"
fixnum: fixnum:
dependency: transitive dependency: transitive
description: description:
@ -357,7 +378,7 @@ packages:
name: flutter_plugin_android_lifecycle name: flutter_plugin_android_lifecycle
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.6" version: "2.0.7"
flutter_rust_bridge: flutter_rust_bridge:
dependency: "direct main" dependency: "direct main"
description: description:
@ -373,7 +394,7 @@ packages:
name: flutter_smart_dialog name: flutter_smart_dialog
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "4.5.3+2" version: "4.5.3+7"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -390,14 +411,14 @@ packages:
name: freezed name: freezed
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.3+1" version: "2.1.0+1"
freezed_annotation: freezed_annotation:
dependency: "direct main" dependency: "direct main"
description: description:
name: freezed_annotation name: freezed_annotation
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.3" version: "2.1.0"
frontend_server_client: frontend_server_client:
dependency: transitive dependency: transitive
description: description:
@ -418,7 +439,7 @@ packages:
name: glob name: glob
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.2" version: "2.1.0"
graphs: graphs:
dependency: transitive dependency: transitive
description: description:
@ -439,7 +460,7 @@ packages:
name: http_multi_server name: http_multi_server
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "3.2.0" version: "3.2.1"
http_parser: http_parser:
dependency: transitive dependency: transitive
description: description:
@ -467,7 +488,7 @@ packages:
name: image_picker_android name: image_picker_android
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.8.5" version: "0.8.5+1"
image_picker_for_web: image_picker_for_web:
dependency: transitive dependency: transitive
description: description:
@ -481,7 +502,7 @@ packages:
name: image_picker_ios name: image_picker_ios
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "0.8.5+5" version: "0.8.5+6"
image_picker_platform_interface: image_picker_platform_interface:
dependency: transitive dependency: transitive
description: description:
@ -516,7 +537,7 @@ packages:
name: json_annotation name: json_annotation
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "4.5.0" version: "4.6.0"
logging: logging:
dependency: transitive dependency: transitive
description: description:
@ -572,7 +593,7 @@ packages:
name: package_config name: package_config
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.2" version: "2.1.0"
package_info_plus: package_info_plus:
dependency: "direct main" dependency: "direct main"
description: description:
@ -635,14 +656,14 @@ packages:
name: path_provider_android name: path_provider_android
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.14" version: "2.0.16"
path_provider_ios: path_provider_ios:
dependency: transitive dependency: transitive
description: description:
name: path_provider_ios name: path_provider_ios
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.9" version: "2.0.10"
path_provider_linux: path_provider_linux:
dependency: transitive dependency: transitive
description: description:
@ -705,7 +726,7 @@ packages:
name: pool name: pool
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.5.0" version: "1.5.1"
process: process:
dependency: transitive dependency: transitive
description: description:
@ -819,14 +840,14 @@ packages:
name: shelf name: shelf
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.3.0" version: "1.3.1"
shelf_web_socket: shelf_web_socket:
dependency: transitive dependency: transitive
description: description:
name: shelf_web_socket name: shelf_web_socket
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "1.0.1" version: "1.0.2"
shortid: shortid:
dependency: transitive dependency: transitive
description: description:
@ -943,7 +964,7 @@ packages:
name: url_launcher name: url_launcher
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "6.1.3" version: "6.1.5"
url_launcher_android: url_launcher_android:
dependency: transitive dependency: transitive
description: description:
@ -978,14 +999,14 @@ packages:
name: url_launcher_platform_interface name: url_launcher_platform_interface
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.5" version: "2.1.0"
url_launcher_web: url_launcher_web:
dependency: transitive dependency: transitive
description: description:
name: url_launcher_web name: url_launcher_web
url: "https://pub.flutter-io.cn" url: "https://pub.flutter-io.cn"
source: hosted source: hosted
version: "2.0.11" version: "2.0.12"
url_launcher_windows: url_launcher_windows:
dependency: transitive dependency: transitive
description: description:

View File

@ -67,6 +67,7 @@ dependencies:
freezed_annotation: ^2.0.3 freezed_annotation: ^2.0.3
tray_manager: 0.1.7 tray_manager: 0.1.7
get: ^4.6.5 get: ^4.6.5
contextmenu: ^3.0.0
dev_dependencies: dev_dependencies:
flutter_launcher_icons: ^0.9.1 flutter_launcher_icons: ^0.9.1