Skip to content

Commit 13329ae

Browse files
committed
chore: upgrade Flutter dependencies to latest resolvable versions
1 parent 8f2c035 commit 13329ae

File tree

15 files changed

+98
-91
lines changed

15 files changed

+98
-91
lines changed

lib/logic/network/request.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class Request {
1616
}
1717

1818
Future<Response<dynamic>> get(
19-
url, {
19+
String url, {
2020
Map<String, dynamic>? queryParameters,
2121
Options? options,
2222
CancelToken? cancelToken,
@@ -31,7 +31,7 @@ class Request {
3131
}
3232

3333
Future<Response<dynamic>> post(
34-
url, {
34+
String url, {
3535
Object? data,
3636
Map<String, dynamic>? queryParameters,
3737
Options? options,

lib/pages/app/app_page.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,12 +197,14 @@ class _AppPageState extends State<AppPage> with TickerProviderStateMixin {
197197
onSelected: (AppMenuItem item) {
198198
switch (item) {
199199
case AppMenuItem.Copy:
200-
Utils.copyText(Utils.getShareUrl(
201-
controller.id!, ShareType.apk));
200+
Utils.copyText(Utils.getShareUri(
201+
controller.id!, ShareType.apk)
202+
.toString());
202203
break;
203204
case AppMenuItem.Share:
204-
Share.share(Utils.getShareUrl(
205-
controller.id!, ShareType.apk));
205+
SharePlus.instance.share(ShareParams(
206+
uri: Utils.getShareUri(
207+
controller.id!, ShareType.apk)));
206208
break;
207209
case AppMenuItem.Follow:
208210
if (GlobalData().isLogin) {

lib/pages/blacklist/black_list_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,12 +142,12 @@ class _BlackListPageState extends State<BlackListPage> {
142142
);
143143
} else {
144144
try {
145-
await Share.shareXFiles([
145+
await SharePlus.instance.share(ShareParams(files: [
146146
XFile.fromData(utf8.encode(data),
147147
mimeType: 'text/plain')
148148
], fileNameOverrides: [
149149
fileName
150-
]);
150+
]));
151151
SmartDialog.showToast('导出成功');
152152
} catch (e) {
153153
SmartDialog.showToast('导出失败');

lib/pages/chat/chat_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ class _ChatPageState extends State<ChatPage> {
428428
);
429429
}
430430

431-
updatePanelType(PanelType type) async {
431+
void updatePanelType(PanelType type) async {
432432
final isSwitchToKeyboard = PanelType.keyboard == type;
433433
final isSwitchToEmojiPanel = PanelType.emoji == type;
434434
bool isUpdated = false;
@@ -465,7 +465,7 @@ class _ChatPageState extends State<ChatPage> {
465465
}
466466
}
467467

468-
hidePanel() async {
468+
void hidePanel() async {
469469
if (_focusNode.hasFocus) {
470470
await Future.delayed(const Duration(milliseconds: 100));
471471
_focusNode.unfocus();

lib/pages/feed/feed_page.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -490,10 +490,12 @@ class _FeedPageState extends State<FeedPage> with TickerProviderStateMixin {
490490
switch (item) {
491491
case FeedMenuItem.Copy:
492492
Utils.copyText(
493-
Utils.getShareUrl(_id, ShareType.feed));
493+
Utils.getShareUri(_id, ShareType.feed)
494+
.toString());
494495
break;
495496
case FeedMenuItem.Share:
496-
Share.share(Utils.getShareUrl(_id, ShareType.feed));
497+
SharePlus.instance.share(ShareParams(
498+
uri: Utils.getShareUri(_id, ShareType.feed)));
497499
break;
498500
case FeedMenuItem.Fav:
499501
if (_feedController.isFav) {

lib/pages/feed/reply/reply_dialog.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,14 @@ class _ReplyDialogState extends State<ReplyDialog> with WidgetsBindingObserver {
9090
_focuslistener();
9191
}
9292

93-
_autoFocus() async {
93+
void _autoFocus() async {
9494
await Future.delayed(const Duration(milliseconds: 300));
9595
if (mounted) {
9696
_replyContentFocusNode.requestFocus();
9797
}
9898
}
9999

100-
_focuslistener() {
100+
void _focuslistener() {
101101
_replyContentFocusNode.addListener(() {
102102
if (_replyContentFocusNode.hasFocus) {
103103
// _keyBoardKey.currentState?.updateSelected(true);
@@ -632,7 +632,7 @@ class Debouncer {
632632

633633
Debouncer({this.milliseconds});
634634

635-
run(DebounceCallback callback) {
635+
void run(DebounceCallback callback) {
636636
if (_timer != null) {
637637
_timer!.cancel();
638638
}

lib/pages/feed/reply/reply_page.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ class _ReplyPageState extends State<ReplyPage>
477477
);
478478
}
479479

480-
updatePanelType(PanelType type) async {
480+
void updatePanelType(PanelType type) async {
481481
final isSwitchToKeyboard = PanelType.keyboard == type;
482482
final isSwitchToEmojiPanel = PanelType.emoji == type;
483483
bool isUpdated = false;
@@ -514,7 +514,7 @@ class _ReplyPageState extends State<ReplyPage>
514514
}
515515
}
516516

517-
hidePanel() async {
517+
void hidePanel() async {
518518
if (_focusNode.hasFocus) {
519519
await Future.delayed(const Duration(milliseconds: 100));
520520
_focusNode.unfocus();

lib/pages/history/history_controller.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class HistoryController extends GetxController {
5555
dataList.value = <Datum>[];
5656
}
5757

58-
onDeleteFeed(dynamic id) {
58+
void onDeleteFeed(dynamic id) {
5959
GStorage.onDeleteFeed(
6060
id.toString(),
6161
isHistory: type == HistoryType.History,

lib/pages/topic/topic_page.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,24 +208,25 @@ class _TopicPageState extends State<TopicPage> with TickerProviderStateMixin {
208208
onSelected: (TopicMenuItem item) {
209209
switch (item) {
210210
case TopicMenuItem.Copy:
211-
Utils.copyText(Utils.getShareUrl(
211+
Utils.copyText(Utils.getShareUri(
212212
_topicController.entityType == 'topic'
213213
? _topicController.title!
214214
: _topicController.id!,
215215
_topicController.entityType == 'topic'
216216
? ShareType.t
217217
: ShareType.product,
218-
));
218+
).toString());
219219
break;
220220
case TopicMenuItem.Share:
221-
Share.share(Utils.getShareUrl(
221+
SharePlus.instance.share(ShareParams(
222+
uri: Utils.getShareUri(
222223
_topicController.entityType == 'topic'
223224
? _topicController.title!
224225
: _topicController.id!,
225226
_topicController.entityType == 'topic'
226227
? ShareType.t
227228
: ShareType.product,
228-
));
229+
)));
229230
break;
230231
case TopicMenuItem.Sort:
231232
_showPopupMenu();

lib/pages/user/user_page.dart

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,12 +241,14 @@ class _UserPageState extends State<UserPage> {
241241
onSelected: (UserMenuItem item) {
242242
switch (item) {
243243
case UserMenuItem.Copy:
244-
Utils.copyText(Utils.getShareUrl(
245-
_userController.uid, ShareType.u));
244+
Utils.copyText(Utils.getShareUri(
245+
_userController.uid, ShareType.u)
246+
.toString());
246247
break;
247248
case UserMenuItem.Share:
248-
Share.share(Utils.getShareUrl(
249-
_userController.uid, ShareType.u));
249+
SharePlus.instance.share(ShareParams(
250+
uri: Utils.getShareUri(
251+
_userController.uid, ShareType.u)));
250252
break;
251253
case UserMenuItem.Block:
252254
GStorage.onBlock(

0 commit comments

Comments
 (0)