Compare commits
59 Commits
v0.8.16-de
...
v0.8.15
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d2d9bdab02 | ||
|
|
d0f8444b6d | ||
|
|
fccabfbe27 | ||
|
|
e9bb97c6ce | ||
|
|
068fe14d89 | ||
|
|
43c397007c | ||
|
|
5e801d5f5e | ||
|
|
52d61b15fd | ||
|
|
fea3c14608 | ||
|
|
84be01a38a | ||
|
|
93da242148 | ||
|
|
bb7e44da30 | ||
|
|
01f1b2d72f | ||
|
|
3074b1299e | ||
|
|
bd5470b863 | ||
|
|
83fafa4b68 | ||
|
|
b7fb969301 | ||
|
|
3ef3190785 | ||
|
|
b1c763fcfa | ||
|
|
9452ffa514 | ||
|
|
c9291e5027 | ||
|
|
3ba86dc9c2 | ||
|
|
fd3040283c | ||
|
|
91d30c0f0e | ||
|
|
c4b470ffaf | ||
|
|
9a07c785f2 | ||
|
|
a134c32493 | ||
|
|
472cea9037 | ||
|
|
08d07498b9 | ||
|
|
d5aa09949a | ||
|
|
fd1dfe5c60 | ||
|
|
9f89fe8b29 | ||
|
|
78081a12e8 | ||
|
|
6896837f28 | ||
|
|
85eb903402 | ||
|
|
9aa9180f1f | ||
|
|
feb9688a29 | ||
|
|
5c71992174 | ||
|
|
74c3d0ae25 | ||
|
|
ecd1bcafd5 | ||
|
|
184d2d117a | ||
|
|
89e6f17794 | ||
|
|
aef50fe0e3 | ||
|
|
fc0767ed25 | ||
|
|
dbf1724cca | ||
|
|
909aa4038e | ||
|
|
2d0a7d8d46 | ||
|
|
ca96cd1d82 | ||
|
|
91ab1e5dac | ||
|
|
b3a5f74df8 | ||
|
|
1f98be8ad8 | ||
|
|
453c7c98d0 | ||
|
|
91faed35c0 | ||
|
|
07bbaf6b6f | ||
|
|
e8feb7c431 | ||
|
|
4d16820526 | ||
|
|
92294b49c6 | ||
|
|
8a188a37c9 | ||
|
|
48af16c265 |
7
.github/workflows/build.yml
vendored
7
.github/workflows/build.yml
vendored
@@ -3,7 +3,7 @@ name: build
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -17,8 +17,8 @@ jobs:
|
||||
os: windows-latest
|
||||
- platform: linux
|
||||
os: ubuntu-latest
|
||||
- platform: macos
|
||||
os: macos-13
|
||||
# - platform: macos
|
||||
# os: macos-13
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
@@ -82,7 +82,6 @@ jobs:
|
||||
|
||||
|
||||
upload-release:
|
||||
if: ${{ !endsWith(github.ref, '-debug') }}
|
||||
permissions: write-all
|
||||
needs: [ build ]
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
@@ -34,6 +34,8 @@ on Mobile:
|
||||
|
||||
💡 Based on Material You Design, [Surfboard](https://github.com/getsurfboard/surfboard)-like UI
|
||||
|
||||
☁️ Supports data sync via WebDAV
|
||||
|
||||
✨ Support subscription link, Dark mode
|
||||
|
||||
## Contact
|
||||
|
||||
@@ -34,6 +34,8 @@ on Mobile:
|
||||
|
||||
💡 基本 Material You 设计, 类[Surfboard](https://github.com/getsurfboard/surfboard)用户界面
|
||||
|
||||
☁️ 支持通过WebDAV同步数据
|
||||
|
||||
✨ 支持一键导入订阅, 深色模式
|
||||
|
||||
## Contact
|
||||
|
||||
Submodule core/Clash.Meta updated: 66e6d5f5f8...2cf9c4b120
@@ -160,9 +160,8 @@ class ApplicationState extends State<Application> {
|
||||
AppLocalizations.delegate.supportedLocales,
|
||||
themeMode: state.themeMode,
|
||||
theme: ThemeData(
|
||||
useMaterial3: true,
|
||||
fontFamily: '',
|
||||
pageTransitionsTheme: _pageTransitionsTheme,
|
||||
useMaterial3: true,
|
||||
colorScheme: _getAppColorScheme(
|
||||
brightness: Brightness.light,
|
||||
systemColorSchemes: systemColorSchemes,
|
||||
@@ -171,7 +170,6 @@ class ApplicationState extends State<Application> {
|
||||
),
|
||||
darkTheme: ThemeData(
|
||||
useMaterial3: true,
|
||||
fontFamily: '',
|
||||
pageTransitionsTheme: _pageTransitionsTheme,
|
||||
colorScheme: _getAppColorScheme(
|
||||
brightness: Brightness.dark,
|
||||
|
||||
@@ -35,8 +35,4 @@ extension DateTimeExtension on DateTime {
|
||||
}
|
||||
return appLocalizations.just;
|
||||
}
|
||||
|
||||
String get show {
|
||||
return toIso8601String().substring(0, 10);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -23,7 +23,6 @@ class Measure {
|
||||
double? _bodyMediumHeight;
|
||||
double? _bodySmallHeight;
|
||||
double? _labelSmallHeight;
|
||||
double? _labelMediumHeight;
|
||||
double? _titleLargeHeight;
|
||||
double? _titleMediumHeight;
|
||||
|
||||
@@ -57,16 +56,6 @@ class Measure {
|
||||
return _labelSmallHeight!;
|
||||
}
|
||||
|
||||
double get labelMediumHeight {
|
||||
_labelMediumHeight ??= computeTextSize(
|
||||
Text(
|
||||
"",
|
||||
style: context.textTheme.labelMedium,
|
||||
),
|
||||
).height;
|
||||
return _labelMediumHeight!;
|
||||
}
|
||||
|
||||
double get titleLargeHeight {
|
||||
_titleLargeHeight ??= computeTextSize(
|
||||
Text(
|
||||
|
||||
@@ -14,6 +14,9 @@ class Request {
|
||||
Request() {
|
||||
_dio = Dio(
|
||||
BaseOptions(
|
||||
connectTimeout: httpTimeoutDuration,
|
||||
sendTimeout: httpTimeoutDuration,
|
||||
receiveTimeout: httpTimeoutDuration,
|
||||
headers: {"User-Agent": coreName},
|
||||
),
|
||||
);
|
||||
@@ -34,7 +37,7 @@ class Request {
|
||||
_dio.httpClientAdapter = IOHttpClientAdapter(
|
||||
createHttpClient: () {
|
||||
final client = HttpClient();
|
||||
if (!_isStart) return client;
|
||||
if(!_isStart) return client;
|
||||
client.findProxy = (url) {
|
||||
return "PROXY localhost:$_port;DIRECT";
|
||||
};
|
||||
@@ -53,7 +56,7 @@ class Request {
|
||||
),
|
||||
)
|
||||
.timeout(
|
||||
httpTimeoutDuration * 2,
|
||||
httpTimeoutDuration,
|
||||
);
|
||||
return response;
|
||||
}
|
||||
@@ -83,14 +86,12 @@ class Request {
|
||||
"https://ipinfo.io/json/": IpInfo.fromIpInfoIoJson,
|
||||
};
|
||||
|
||||
Future<IpInfo?> checkIp(CancelToken? cancelToken) async {
|
||||
Future<IpInfo?> checkIp() async {
|
||||
for (final source in _ipInfoSources.entries) {
|
||||
try {
|
||||
final response = await _dio
|
||||
.get<Map<String, dynamic>>(source.key, cancelToken: cancelToken)
|
||||
.timeout(
|
||||
httpTimeoutDuration,
|
||||
);
|
||||
final response = await _dio.get<Map<String, dynamic>>(
|
||||
source.key,
|
||||
);
|
||||
if (response.statusCode == 200 && response.data != null) {
|
||||
return source.value(response.data!);
|
||||
}
|
||||
@@ -102,4 +103,4 @@ class Request {
|
||||
}
|
||||
}
|
||||
|
||||
final request = Request();
|
||||
final request = Request();
|
||||
@@ -6,11 +6,6 @@ extension TextStyleExtension on TextStyle {
|
||||
return copyWith(color: color?.toLight());
|
||||
}
|
||||
|
||||
toLighter() {
|
||||
return copyWith(color: color?.toLighter());
|
||||
}
|
||||
|
||||
|
||||
toSoftBold() {
|
||||
return copyWith(fontWeight: FontWeight.w500);
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:fl_clash/enum/enum.dart';
|
||||
import 'package:fl_clash/state.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
@@ -97,7 +96,7 @@ class AppController {
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> updateProfile(String id) async {
|
||||
updateProfile(String id) async {
|
||||
final profile = config.getCurrentProfileForId(id);
|
||||
if (profile != null) {
|
||||
final tempProfile = profile.copyWith();
|
||||
@@ -136,25 +135,16 @@ class AppController {
|
||||
|
||||
autoUpdateProfiles() async {
|
||||
for (final profile in config.profiles) {
|
||||
if (!profile.autoUpdate) continue;
|
||||
if (!profile.autoUpdate) return;
|
||||
final isNotNeedUpdate = profile.lastUpdateDate
|
||||
?.add(
|
||||
profile.autoUpdateDuration,
|
||||
)
|
||||
.isBeforeNow;
|
||||
if (isNotNeedUpdate == false || profile.type == ProfileType.file) {
|
||||
continue;
|
||||
}
|
||||
await updateProfile(profile.id);
|
||||
}
|
||||
}
|
||||
|
||||
updateProfiles() async {
|
||||
for (final profile in config.profiles) {
|
||||
if (profile.type == ProfileType.file) {
|
||||
continue;
|
||||
}
|
||||
await updateProfile(profile.id);
|
||||
if (isNotNeedUpdate == false ||
|
||||
profile.url == null ||
|
||||
profile.url!.isEmpty) continue;
|
||||
await profile.update();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,4 +61,4 @@ enum MessageType { log, tun, delay, process, now }
|
||||
enum RecoveryOption {
|
||||
all,
|
||||
onlyProfiles,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:country_flags/country_flags.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:fl_clash/common/common.dart';
|
||||
import 'package:fl_clash/models/models.dart';
|
||||
import 'package:fl_clash/state.dart';
|
||||
@@ -17,28 +16,20 @@ class NetworkDetection extends StatefulWidget {
|
||||
class _NetworkDetectionState extends State<NetworkDetection> {
|
||||
final ipInfoNotifier = ValueNotifier<IpInfo?>(null);
|
||||
final timeoutNotifier = ValueNotifier<bool>(false);
|
||||
bool? _preIsStart;
|
||||
CancelToken? cancelToken;
|
||||
|
||||
_checkIp(
|
||||
bool isInit,
|
||||
bool isStart,
|
||||
) async {
|
||||
if (!isInit) return;
|
||||
if (_preIsStart == false && _preIsStart == isStart) return;
|
||||
if (cancelToken != null) {
|
||||
cancelToken!.cancel();
|
||||
cancelToken = null;
|
||||
}
|
||||
ipInfoNotifier.value = null;
|
||||
final ipInfo = await request.checkIp(cancelToken);
|
||||
final ipInfo = await request.checkIp();
|
||||
if (ipInfo == null) {
|
||||
timeoutNotifier.value = true;
|
||||
return;
|
||||
} else {
|
||||
timeoutNotifier.value = false;
|
||||
}
|
||||
ipInfoNotifier.value = ipInfo;
|
||||
ipInfoNotifier.value = await request.checkIp();
|
||||
}
|
||||
|
||||
_checkIpContainer(Widget child) {
|
||||
@@ -51,7 +42,9 @@ class _NetworkDetectionState extends State<NetworkDetection> {
|
||||
);
|
||||
},
|
||||
builder: (_, state, __) {
|
||||
_checkIp(state.isInit, state.isStart);
|
||||
_checkIp(
|
||||
state.isInit,
|
||||
);
|
||||
return child;
|
||||
},
|
||||
child: child,
|
||||
@@ -89,30 +82,15 @@ class _NetworkDetectionState extends State<NetworkDetection> {
|
||||
width: 24,
|
||||
height: 24,
|
||||
)
|
||||
: ValueListenableBuilder(
|
||||
valueListenable: timeoutNotifier,
|
||||
builder: (_, timeout, __) {
|
||||
if (timeout) {
|
||||
return Text(
|
||||
appLocalizations.checkError,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.titleMedium,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
);
|
||||
}
|
||||
return TooltipText(
|
||||
text: Text(
|
||||
appLocalizations.checking,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.titleMedium,
|
||||
),
|
||||
);
|
||||
},
|
||||
: TooltipText(
|
||||
text: Text(
|
||||
appLocalizations.checking,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
style: Theme.of(context)
|
||||
.textTheme
|
||||
.titleMedium,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -148,21 +126,17 @@ class _NetworkDetectionState extends State<NetworkDetection> {
|
||||
: ValueListenableBuilder(
|
||||
valueListenable: timeoutNotifier,
|
||||
builder: (_, timeout, __) {
|
||||
if (timeout) {
|
||||
if(timeout){
|
||||
return Text(
|
||||
appLocalizations.ipCheckTimeout,
|
||||
style: context.textTheme.titleLarge
|
||||
appLocalizations.ipCheckError,
|
||||
style: context.textTheme.bodyMedium
|
||||
?.toSoftBold(),
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
);
|
||||
}
|
||||
return Container(
|
||||
padding: const EdgeInsets.all(2),
|
||||
child: const AspectRatio(
|
||||
aspectRatio: 1,
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
return const SizedBox(
|
||||
child: CircularProgressIndicator(),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
@@ -56,9 +56,6 @@ class _LogsFragmentState extends State<LogsFragment> {
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.search),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 8,
|
||||
)
|
||||
];
|
||||
});
|
||||
@@ -142,9 +139,6 @@ class LogsSearchDelegate extends SearchDelegate {
|
||||
},
|
||||
icon: const Icon(Icons.clear),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 8,
|
||||
)
|
||||
];
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:fl_clash/common/common.dart';
|
||||
import 'package:fl_clash/enum/enum.dart';
|
||||
import 'package:fl_clash/models/models.dart';
|
||||
import 'package:fl_clash/state.dart';
|
||||
import 'package:fl_clash/widgets/widgets.dart';
|
||||
@@ -83,7 +82,7 @@ class _EditProfileState extends State<EditProfile> {
|
||||
},
|
||||
),
|
||||
),
|
||||
if (widget.profile.type == ProfileType.url)...[
|
||||
if (widget.profile.url != null && widget.profile.url!.isNotEmpty == true)...[
|
||||
ListItem(
|
||||
title: TextFormField(
|
||||
controller: urlController,
|
||||
|
||||
@@ -17,9 +17,24 @@ enum ProfileActions {
|
||||
delete,
|
||||
}
|
||||
|
||||
class ProfilesFragment extends StatelessWidget {
|
||||
class ProfilesFragment extends StatefulWidget {
|
||||
const ProfilesFragment({super.key});
|
||||
|
||||
@override
|
||||
State<ProfilesFragment> createState() => _ProfilesFragmentState();
|
||||
}
|
||||
|
||||
class _ProfilesFragmentState extends State<ProfilesFragment> {
|
||||
_handleDeleteProfile(String id) async {
|
||||
globalState.appController.deleteProfile(id);
|
||||
}
|
||||
|
||||
_handleUpdateProfile(String id) async {
|
||||
context.findAncestorStateOfType<CommonScaffoldState>()?.loadingRun(
|
||||
() => globalState.appController.updateProfile(id),
|
||||
);
|
||||
}
|
||||
|
||||
_handleShowAddExtendPage() {
|
||||
showExtendPage(
|
||||
globalState.navigatorKey.currentState!.context,
|
||||
@@ -30,6 +45,76 @@ class ProfilesFragment extends StatelessWidget {
|
||||
);
|
||||
}
|
||||
|
||||
_handleShowEditExtendPage(Profile profile) {
|
||||
showExtendPage(
|
||||
context,
|
||||
body: EditProfile(
|
||||
profile: profile.copyWith(),
|
||||
context: context,
|
||||
),
|
||||
title: "${appLocalizations.edit}${appLocalizations.profile}",
|
||||
);
|
||||
}
|
||||
|
||||
_buildGrid({
|
||||
required ProfilesSelectorState state,
|
||||
int crossAxisCount = 1,
|
||||
}) {
|
||||
return SingleChildScrollView(
|
||||
padding: crossAxisCount > 1
|
||||
? const EdgeInsets.symmetric(horizontal: 16)
|
||||
: EdgeInsets.zero,
|
||||
child: Grid.baseGap(
|
||||
crossAxisCount: crossAxisCount,
|
||||
children: [
|
||||
for (final profile in state.profiles)
|
||||
GridItem(
|
||||
child: ProfileItem(
|
||||
profile: profile,
|
||||
commonPopupMenu: CommonPopupMenu<ProfileActions>(
|
||||
items: [
|
||||
CommonPopupMenuItem(
|
||||
action: ProfileActions.edit,
|
||||
label: appLocalizations.edit,
|
||||
iconData: Icons.edit,
|
||||
),
|
||||
if (profile.url != null)
|
||||
CommonPopupMenuItem(
|
||||
action: ProfileActions.update,
|
||||
label: appLocalizations.update,
|
||||
iconData: Icons.sync,
|
||||
),
|
||||
CommonPopupMenuItem(
|
||||
action: ProfileActions.delete,
|
||||
label: appLocalizations.delete,
|
||||
iconData: Icons.delete,
|
||||
),
|
||||
],
|
||||
onSelected: (ProfileActions? action) async {
|
||||
switch (action) {
|
||||
case ProfileActions.edit:
|
||||
_handleShowEditExtendPage(profile);
|
||||
break;
|
||||
case ProfileActions.delete:
|
||||
_handleDeleteProfile(profile.id);
|
||||
break;
|
||||
case ProfileActions.update:
|
||||
_handleUpdateProfile(profile.id);
|
||||
break;
|
||||
case null:
|
||||
break;
|
||||
}
|
||||
},
|
||||
),
|
||||
groupValue: state.currentProfileId,
|
||||
onChanged: globalState.appController.changeProfile,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_getColumns(ViewMode viewMode) {
|
||||
switch (viewMode) {
|
||||
case ViewMode.mobile:
|
||||
@@ -41,47 +126,17 @@ class ProfilesFragment extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
_initScaffoldState(BuildContext context) {
|
||||
WidgetsBinding.instance.addPostFrameCallback(
|
||||
(_) {
|
||||
final commonScaffoldState =
|
||||
context.findAncestorStateOfType<CommonScaffoldState>();
|
||||
commonScaffoldState?.actions = [
|
||||
IconButton(
|
||||
onPressed: () {
|
||||
commonScaffoldState.loadingRun<void>(
|
||||
() async {
|
||||
await globalState.appController.updateProfiles();
|
||||
},
|
||||
);
|
||||
},
|
||||
icon: const Icon(Icons.download),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 8,
|
||||
)
|
||||
];
|
||||
commonScaffoldState?.floatingActionButton = FloatingActionButton(
|
||||
heroTag: null,
|
||||
onPressed: _handleShowAddExtendPage,
|
||||
child: const Icon(
|
||||
Icons.add,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Selector<AppState, bool>(
|
||||
selector: (_, appState) => appState.currentLabel == 'profiles',
|
||||
builder: (_, isCurrent, child) {
|
||||
if (isCurrent) {
|
||||
_initScaffoldState(context);
|
||||
}
|
||||
return child!;
|
||||
},
|
||||
return FloatLayout(
|
||||
floatingWidget: Container(
|
||||
margin: const EdgeInsets.all(kFloatingActionButtonMargin),
|
||||
child: FloatingActionButton(
|
||||
heroTag: null,
|
||||
onPressed: _handleShowAddExtendPage,
|
||||
child: const Icon(Icons.add),
|
||||
),
|
||||
),
|
||||
child: Selector2<AppState, Config, ProfilesSelectorState>(
|
||||
selector: (_, appState, config) => ProfilesSelectorState(
|
||||
profiles: config.profiles,
|
||||
@@ -94,32 +149,11 @@ class ProfilesFragment extends StatelessWidget {
|
||||
label: appLocalizations.nullProfileDesc,
|
||||
);
|
||||
}
|
||||
final columns = _getColumns(state.viewMode);
|
||||
final isMobile = state.viewMode == ViewMode.mobile;
|
||||
return Align(
|
||||
alignment: Alignment.topCenter,
|
||||
child: SingleChildScrollView(
|
||||
padding: !isMobile
|
||||
? const EdgeInsets.symmetric(
|
||||
horizontal: 16,
|
||||
vertical: 16,
|
||||
)
|
||||
: EdgeInsets.zero,
|
||||
child: Grid(
|
||||
mainAxisSpacing: isMobile ? 8 : 16,
|
||||
crossAxisSpacing: 16,
|
||||
crossAxisCount: columns,
|
||||
children: [
|
||||
for (final profile in state.profiles)
|
||||
GridItem(
|
||||
child: ProfileItem(
|
||||
profile: profile,
|
||||
groupValue: state.currentProfileId,
|
||||
onChanged: globalState.appController.changeProfile,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
child: _buildGrid(
|
||||
state: state,
|
||||
crossAxisCount: _getColumns(state.viewMode),
|
||||
),
|
||||
);
|
||||
},
|
||||
@@ -128,188 +162,92 @@ class ProfilesFragment extends StatelessWidget {
|
||||
}
|
||||
}
|
||||
|
||||
class ProfileItem extends StatefulWidget {
|
||||
class ProfileItem extends StatelessWidget {
|
||||
final Profile profile;
|
||||
final String? groupValue;
|
||||
final CommonPopupMenu commonPopupMenu;
|
||||
final void Function(String? value) onChanged;
|
||||
|
||||
const ProfileItem({
|
||||
super.key,
|
||||
required this.profile,
|
||||
required this.commonPopupMenu,
|
||||
required this.groupValue,
|
||||
required this.onChanged,
|
||||
});
|
||||
|
||||
@override
|
||||
State<ProfileItem> createState() => _ProfileItemState();
|
||||
}
|
||||
|
||||
class _ProfileItemState extends State<ProfileItem> {
|
||||
final isUpdating = ValueNotifier<bool>(false);
|
||||
|
||||
_handleDeleteProfile(String id) async {
|
||||
globalState.appController.deleteProfile(id);
|
||||
}
|
||||
|
||||
_handleUpdateProfile(String id) async {
|
||||
isUpdating.value = true;
|
||||
await globalState.safeRun<void>(() async {
|
||||
await globalState.appController.updateProfile(id);
|
||||
});
|
||||
isUpdating.value = false;
|
||||
}
|
||||
|
||||
_handleShowEditExtendPage(
|
||||
Profile profile,
|
||||
) {
|
||||
showExtendPage(
|
||||
context,
|
||||
body: EditProfile(
|
||||
profile: profile.copyWith(),
|
||||
context: context,
|
||||
Widget build(BuildContext context) {
|
||||
String useShow;
|
||||
String totalShow;
|
||||
double progress;
|
||||
final userInfo = profile.userInfo;
|
||||
if (userInfo == null) {
|
||||
useShow = "Infinite";
|
||||
totalShow = "Infinite";
|
||||
progress = 1;
|
||||
} else {
|
||||
final use = userInfo.upload + userInfo.download;
|
||||
final total = userInfo.total;
|
||||
useShow = TrafficValue(value: use).show;
|
||||
totalShow = TrafficValue(value: total).show;
|
||||
progress = total == 0 ? 0.0 : use / total;
|
||||
}
|
||||
return ListItem.radio(
|
||||
horizontalTitleGap: 16,
|
||||
delegate: RadioDelegate<String?>(
|
||||
value: profile.id,
|
||||
groupValue: groupValue,
|
||||
onChanged: onChanged,
|
||||
),
|
||||
title: "${appLocalizations.edit}${appLocalizations.profile}",
|
||||
);
|
||||
}
|
||||
|
||||
_buildTitle(Profile profile) {
|
||||
final textTheme = context.textTheme;
|
||||
final userInfo = profile.userInfo ?? UserInfo();
|
||||
final use = userInfo.upload + userInfo.download;
|
||||
final total = userInfo.total;
|
||||
final useShow = TrafficValue(value: use).show;
|
||||
final totalShow = TrafficValue(value: total).show;
|
||||
final progress = total == 0 ? 0.0 : use / total;
|
||||
final expireShow = userInfo.expire == 0
|
||||
? "长期有效"
|
||||
: DateTime.fromMillisecondsSinceEpoch(userInfo.expire * 1000).show;
|
||||
return Container(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: Column(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
trailing: commonPopupMenu,
|
||||
title: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Text(
|
||||
profile.label ?? profile.id,
|
||||
style: textTheme.titleMedium,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
Text(
|
||||
profile.lastUpdateDate?.lastUpdateTimeDesc ?? '',
|
||||
style: textTheme.labelMedium?.toLight(),
|
||||
),
|
||||
],
|
||||
Flexible(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: [
|
||||
Flexible(
|
||||
child: Text(
|
||||
profile.label ?? profile.id,
|
||||
style: Theme.of(context).textTheme.titleMedium,
|
||||
maxLines: 1,
|
||||
overflow: TextOverflow.ellipsis,
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Text(
|
||||
profile.lastUpdateDate?.lastUpdateTimeDesc ?? '',
|
||||
style: Theme.of(context).textTheme.labelMedium?.toLight(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Container(
|
||||
margin: const EdgeInsets.symmetric(
|
||||
vertical: 8,
|
||||
),
|
||||
child: LinearProgressIndicator(
|
||||
minHeight: 6,
|
||||
value: progress,
|
||||
),
|
||||
Flexible(
|
||||
child: Container(
|
||||
margin: const EdgeInsets.symmetric(
|
||||
vertical: 8,
|
||||
),
|
||||
Text(
|
||||
"$useShow / $totalShow",
|
||||
style: textTheme.labelMedium?.toLight(),
|
||||
child: LinearProgressIndicator(
|
||||
minHeight: 6,
|
||||
value: progress,
|
||||
),
|
||||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
Row(
|
||||
children: [
|
||||
Text(
|
||||
"到期时间:",
|
||||
style: textTheme.labelMedium?.toLighter(),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 4,
|
||||
),
|
||||
Text(
|
||||
expireShow,
|
||||
style: textTheme.labelMedium?.toLighter(),
|
||||
),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
Flexible(
|
||||
child: Text(
|
||||
"$useShow / $totalShow",
|
||||
style: Theme.of(context).textTheme.labelMedium?.toLight(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final profile = widget.profile;
|
||||
final groupValue = widget.groupValue;
|
||||
final onChanged = widget.onChanged;
|
||||
return Selector<AppState, ViewMode>(
|
||||
selector: (_, appState) => appState.viewMode,
|
||||
builder: (_, viewMode, child) {
|
||||
if (viewMode == ViewMode.mobile) {
|
||||
return child!;
|
||||
}
|
||||
return CommonCard(
|
||||
child: child!,
|
||||
);
|
||||
},
|
||||
child: ListItem.radio(
|
||||
key: Key(profile.id),
|
||||
horizontalTitleGap: 16,
|
||||
delegate: RadioDelegate<String?>(
|
||||
value: profile.id,
|
||||
groupValue: groupValue,
|
||||
onChanged: onChanged,
|
||||
),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
trailing: CommonPopupMenu<ProfileActions>(
|
||||
items: [
|
||||
CommonPopupMenuItem(
|
||||
action: ProfileActions.edit,
|
||||
label: appLocalizations.edit,
|
||||
iconData: Icons.edit,
|
||||
),
|
||||
if (profile.type == ProfileType.url)
|
||||
CommonPopupMenuItem(
|
||||
action: ProfileActions.update,
|
||||
label: appLocalizations.update,
|
||||
iconData: Icons.sync,
|
||||
),
|
||||
CommonPopupMenuItem(
|
||||
action: ProfileActions.delete,
|
||||
label: appLocalizations.delete,
|
||||
iconData: Icons.delete,
|
||||
),
|
||||
],
|
||||
onSelected: (ProfileActions? action) async {
|
||||
switch (action) {
|
||||
case ProfileActions.edit:
|
||||
_handleShowEditExtendPage(profile);
|
||||
break;
|
||||
case ProfileActions.delete:
|
||||
_handleDeleteProfile(profile.id);
|
||||
break;
|
||||
case ProfileActions.update:
|
||||
_handleUpdateProfile(profile.id);
|
||||
break;
|
||||
case null:
|
||||
break;
|
||||
}
|
||||
},
|
||||
),
|
||||
title: _buildTitle(profile),
|
||||
tileTitleAlignment: ListTileTitleAlignment.titleHeight,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,9 +51,6 @@ class _ProxiesFragmentState extends State<ProxiesFragment>
|
||||
selectedValue: proxiesSortType,
|
||||
);
|
||||
},
|
||||
),
|
||||
const SizedBox(
|
||||
width: 8,
|
||||
)
|
||||
];
|
||||
});
|
||||
@@ -434,7 +431,7 @@ class _DelayTestButtonContainerState extends State<DelayTestButtonContainer>
|
||||
_controller = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(
|
||||
milliseconds: 600,
|
||||
milliseconds: 1200,
|
||||
),
|
||||
);
|
||||
_scale = Tween<double>(
|
||||
@@ -446,6 +443,7 @@ class _DelayTestButtonContainerState extends State<DelayTestButtonContainer>
|
||||
curve: const Interval(
|
||||
0,
|
||||
1,
|
||||
curve: Curves.elasticInOut,
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
@@ -159,6 +159,5 @@
|
||||
"externalResources": "External resources",
|
||||
"checking": "Checking...",
|
||||
"country": "Country",
|
||||
"checkError": "Check error",
|
||||
"ipCheckTimeout": "Ip check timeout"
|
||||
"ipCheckError": "Ip check timeout"
|
||||
}
|
||||
@@ -159,6 +159,5 @@
|
||||
"externalResources": "外部资源",
|
||||
"checking": "检测中...",
|
||||
"country": "区域",
|
||||
"checkError": "检测失败",
|
||||
"ipCheckTimeout": "Ip检测超时"
|
||||
"ipCheckError": "Ip检测超时"
|
||||
}
|
||||
@@ -76,7 +76,6 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
MessageLookupByLibrary.simpleMessage("Cancel filter system app"),
|
||||
"cancelSelectAll":
|
||||
MessageLookupByLibrary.simpleMessage("Cancel select all"),
|
||||
"checkError": MessageLookupByLibrary.simpleMessage("Check error"),
|
||||
"checkUpdate":
|
||||
MessageLookupByLibrary.simpleMessage("Check for updates"),
|
||||
"checkUpdateError": MessageLookupByLibrary.simpleMessage(
|
||||
@@ -125,7 +124,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"hours": MessageLookupByLibrary.simpleMessage("Hours"),
|
||||
"importFromURL":
|
||||
MessageLookupByLibrary.simpleMessage("Import from URL"),
|
||||
"ipCheckTimeout":
|
||||
"ipCheckError":
|
||||
MessageLookupByLibrary.simpleMessage("Ip check timeout"),
|
||||
"just": MessageLookupByLibrary.simpleMessage("Just"),
|
||||
"language": MessageLookupByLibrary.simpleMessage("Language"),
|
||||
|
||||
@@ -63,7 +63,6 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"cancelFilterSystemApp":
|
||||
MessageLookupByLibrary.simpleMessage("取消过滤系统应用"),
|
||||
"cancelSelectAll": MessageLookupByLibrary.simpleMessage("取消全选"),
|
||||
"checkError": MessageLookupByLibrary.simpleMessage("检测失败"),
|
||||
"checkUpdate": MessageLookupByLibrary.simpleMessage("检查更新"),
|
||||
"checkUpdateError": MessageLookupByLibrary.simpleMessage("当前应用已经是最新版了"),
|
||||
"checking": MessageLookupByLibrary.simpleMessage("检测中..."),
|
||||
@@ -102,7 +101,7 @@ class MessageLookup extends MessageLookupByLibrary {
|
||||
"goDownload": MessageLookupByLibrary.simpleMessage("前往下载"),
|
||||
"hours": MessageLookupByLibrary.simpleMessage("小时"),
|
||||
"importFromURL": MessageLookupByLibrary.simpleMessage("从URL导入"),
|
||||
"ipCheckTimeout": MessageLookupByLibrary.simpleMessage("Ip检测超时"),
|
||||
"ipCheckError": MessageLookupByLibrary.simpleMessage("Ip检测超时"),
|
||||
"just": MessageLookupByLibrary.simpleMessage("刚刚"),
|
||||
"language": MessageLookupByLibrary.simpleMessage("语言"),
|
||||
"light": MessageLookupByLibrary.simpleMessage("浅色"),
|
||||
|
||||
@@ -1650,21 +1650,11 @@ class AppLocalizations {
|
||||
);
|
||||
}
|
||||
|
||||
/// `Check error`
|
||||
String get checkError {
|
||||
return Intl.message(
|
||||
'Check error',
|
||||
name: 'checkError',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
}
|
||||
|
||||
/// `Ip check timeout`
|
||||
String get ipCheckTimeout {
|
||||
String get ipCheckError {
|
||||
return Intl.message(
|
||||
'Ip check timeout',
|
||||
name: 'ipCheckTimeout',
|
||||
name: 'ipCheckError',
|
||||
desc: '',
|
||||
args: [],
|
||||
);
|
||||
|
||||
@@ -16,17 +16,16 @@ class UserInfo {
|
||||
int upload;
|
||||
int download;
|
||||
int total;
|
||||
int expire;
|
||||
int? expire;
|
||||
|
||||
UserInfo({
|
||||
int? upload,
|
||||
int? download,
|
||||
int? total,
|
||||
int? expire,
|
||||
this.expire,
|
||||
}) : upload = upload ?? 0,
|
||||
download = download ?? 0,
|
||||
total = total ?? 0,
|
||||
expire = expire ?? 0;
|
||||
total = total ?? 0;
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$UserInfoToJson(this);
|
||||
@@ -38,10 +37,10 @@ class UserInfo {
|
||||
|
||||
factory UserInfo.formHString(String? info) {
|
||||
if (info == null) return UserInfo();
|
||||
final list = info.split(";");
|
||||
var list = info.split(";");
|
||||
Map<String, int?> map = {};
|
||||
for (final i in list) {
|
||||
final keyValue = i.trim().split("=");
|
||||
for (var i in list) {
|
||||
var keyValue = i.trim().split("=");
|
||||
map[keyValue[0]] = int.tryParse(keyValue[1]);
|
||||
}
|
||||
return UserInfo(
|
||||
@@ -84,8 +83,7 @@ class Profile {
|
||||
autoUpdateDuration = autoUpdateDuration ?? defaultUpdateDuration,
|
||||
selectedMap = selectedMap ?? {};
|
||||
|
||||
ProfileType get type =>
|
||||
url == null || url?.isEmpty == true ? ProfileType.file : ProfileType.url;
|
||||
ProfileType get type => url == null ? ProfileType.file : ProfileType.url;
|
||||
|
||||
Future<void> checkAndUpdate() async {
|
||||
final isExists = await check();
|
||||
|
||||
@@ -71,7 +71,6 @@ class ListItem<T> extends StatelessWidget {
|
||||
final Widget title;
|
||||
final Widget? subtitle;
|
||||
final EdgeInsets padding;
|
||||
final ListTileTitleAlignment tileTitleAlignment;
|
||||
final bool? prue;
|
||||
final Widget? trailing;
|
||||
final Delegate delegate;
|
||||
@@ -88,7 +87,6 @@ class ListItem<T> extends StatelessWidget {
|
||||
this.horizontalTitleGap,
|
||||
this.prue,
|
||||
this.onTab,
|
||||
this.tileTitleAlignment = ListTileTitleAlignment.center,
|
||||
}) : delegate = const Delegate();
|
||||
|
||||
const ListItem.open({
|
||||
@@ -101,7 +99,6 @@ class ListItem<T> extends StatelessWidget {
|
||||
required OpenDelegate this.delegate,
|
||||
this.horizontalTitleGap,
|
||||
this.prue,
|
||||
this.tileTitleAlignment = ListTileTitleAlignment.center,
|
||||
}) : onTab = null;
|
||||
|
||||
const ListItem.next({
|
||||
@@ -114,7 +111,6 @@ class ListItem<T> extends StatelessWidget {
|
||||
required NextDelegate this.delegate,
|
||||
this.horizontalTitleGap,
|
||||
this.prue,
|
||||
this.tileTitleAlignment = ListTileTitleAlignment.center,
|
||||
}) : onTab = null;
|
||||
|
||||
const ListItem.checkbox({
|
||||
@@ -126,7 +122,6 @@ class ListItem<T> extends StatelessWidget {
|
||||
required CheckboxDelegate this.delegate,
|
||||
this.horizontalTitleGap,
|
||||
this.prue,
|
||||
this.tileTitleAlignment = ListTileTitleAlignment.center,
|
||||
}) : trailing = null,
|
||||
onTab = null;
|
||||
|
||||
@@ -139,7 +134,6 @@ class ListItem<T> extends StatelessWidget {
|
||||
required SwitchDelegate this.delegate,
|
||||
this.horizontalTitleGap,
|
||||
this.prue,
|
||||
this.tileTitleAlignment = ListTileTitleAlignment.center,
|
||||
}) : trailing = null,
|
||||
onTab = null;
|
||||
|
||||
@@ -152,7 +146,6 @@ class ListItem<T> extends StatelessWidget {
|
||||
required RadioDelegate<T> this.delegate,
|
||||
this.horizontalTitleGap = 8,
|
||||
this.prue,
|
||||
this.tileTitleAlignment = ListTileTitleAlignment.center,
|
||||
}) : leading = null,
|
||||
onTab = null;
|
||||
|
||||
@@ -200,7 +193,6 @@ class ListItem<T> extends StatelessWidget {
|
||||
horizontalTitleGap: horizontalTitleGap,
|
||||
title: title,
|
||||
subtitle: subtitle,
|
||||
titleAlignment: tileTitleAlignment,
|
||||
onTap: onTab,
|
||||
trailing: trailing ?? this.trailing,
|
||||
contentPadding: padding,
|
||||
|
||||
@@ -49,7 +49,6 @@ class CommonScaffold extends StatefulWidget {
|
||||
|
||||
class CommonScaffoldState extends State<CommonScaffold> {
|
||||
final ValueNotifier<List<Widget>> _actions = ValueNotifier([]);
|
||||
final ValueNotifier<Widget?> _floatingActionButton = ValueNotifier(null);
|
||||
|
||||
final ValueNotifier<bool> _loading = ValueNotifier(false);
|
||||
|
||||
@@ -59,16 +58,11 @@ class CommonScaffoldState extends State<CommonScaffold> {
|
||||
}
|
||||
}
|
||||
|
||||
set floatingActionButton(Widget? actions) {
|
||||
if (_floatingActionButton.value != actions) {
|
||||
_floatingActionButton.value = actions;
|
||||
}
|
||||
}
|
||||
|
||||
Future<T?> loadingRun<T>(
|
||||
Future<T> Function() futureFunction, {
|
||||
String? title,
|
||||
}) async {
|
||||
if (_loading.value == true) return null;
|
||||
_loading.value = true;
|
||||
try {
|
||||
final res = await futureFunction();
|
||||
@@ -91,7 +85,6 @@ class CommonScaffoldState extends State<CommonScaffold> {
|
||||
super.didUpdateWidget(oldWidget);
|
||||
if (oldWidget.title != widget.title) {
|
||||
_actions.value = [];
|
||||
_floatingActionButton.value = null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,13 +109,6 @@ class CommonScaffoldState extends State<CommonScaffold> {
|
||||
Widget build(BuildContext context) {
|
||||
return _platformContainer(
|
||||
child: Scaffold(
|
||||
floatingActionButton: ValueListenableBuilder(
|
||||
valueListenable: _floatingActionButton,
|
||||
builder: (_, floatingActionButton, __) {
|
||||
return floatingActionButton ?? Container();
|
||||
},
|
||||
),
|
||||
floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling,
|
||||
appBar: PreferredSize(
|
||||
preferredSize: const Size.fromHeight(kToolbarHeight),
|
||||
child: Stack(
|
||||
|
||||
116
pubspec.lock
116
pubspec.lock
@@ -37,10 +37,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: archive
|
||||
sha256: cb6a278ef2dbb298455e1a713bda08524a175630ec643a242c399c932a0a1f7d
|
||||
sha256: ecf4273855368121b1caed0d10d4513c7241dfc813f7d3c8933b36622ae9b265
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.6.1"
|
||||
version: "3.5.1"
|
||||
args:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
@@ -85,10 +85,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: build_daemon
|
||||
sha256: "79b2aef6ac2ed00046867ed354c88778c9c0f029df8a20fe10b5436826721ef9"
|
||||
sha256: "0343061a33da9c5810b2d6cee51945127d8f4c060b7fbdd9d54917f0a3feaaa1"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.0.2"
|
||||
version: "4.0.1"
|
||||
build_resolvers:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -101,18 +101,18 @@ packages:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: build_runner
|
||||
sha256: "644dc98a0f179b872f612d3eb627924b578897c629788e858157fa5e704ca0c7"
|
||||
sha256: "3ac61a79bfb6f6cc11f693591063a7f19a7af628dc52f141743edac5c16e8c22"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.4.11"
|
||||
version: "2.4.9"
|
||||
build_runner_core:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: build_runner_core
|
||||
sha256: e3c79f69a64bdfcd8a776a3c28db4eb6e3fb5356d013ae5eb2e52007706d5dbe
|
||||
sha256: "4ae8ffe5ac758da294ecf1802f2aff01558d8b1b00616aa7538ea9a8a5d50799"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "7.3.1"
|
||||
version: "7.3.0"
|
||||
built_collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -343,10 +343,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_plugin_android_lifecycle
|
||||
sha256: c6b0b4c05c458e1c01ad9bcc14041dd7b1f6783d487be4386f793f47a8a4d03e
|
||||
sha256: "592dc01a18961a51c24ae5d963b724b2b7fa4a95c100fe8eb6ca8a5a4732cadf"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.20"
|
||||
version: "2.0.18"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
@@ -361,10 +361,10 @@ packages:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
name: freezed
|
||||
sha256: a434911f643466d78462625df76fd9eb13e57348ff43fe1f77bbe909522c67a1
|
||||
sha256: "91bce569d4805ea5bad6619a3e8690df8ad062a235165af4c0c5d928dda15eaf"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.5.2"
|
||||
version: "2.5.1"
|
||||
freezed_annotation:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -433,10 +433,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: image
|
||||
sha256: "2237616a36c0d69aef7549ab439b833fb7f9fb9fc861af2cc9ac3eedddd69ca8"
|
||||
sha256: "4c68bfd5ae83e700b5204c1e74451e7bf3cf750e6843c6e158289cf56bda018e"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "4.2.0"
|
||||
version: "4.1.7"
|
||||
image_picker:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -449,26 +449,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image_picker_android
|
||||
sha256: "4161e1f843d8480d2e9025ee22411778c3c9eb7e40076dcf2da23d8242b7b51c"
|
||||
sha256: "79455f6cff4cbef583b2b524bbf0d4ec424e5959f4d464e36ef5323715b98370"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.8.12+3"
|
||||
version: "0.8.12"
|
||||
image_picker_for_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image_picker_for_web
|
||||
sha256: "5d6eb13048cd47b60dbf1a5495424dea226c5faf3950e20bf8120a58efb5b5f3"
|
||||
sha256: "6a1704fdd75022272e7e7a897a9068e9c2ff3cd6a66820bf3ded810633eac954"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.0.4"
|
||||
version: "3.0.3"
|
||||
image_picker_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: image_picker_ios
|
||||
sha256: "6703696ad49f5c3c8356d576d7ace84d1faf459afb07accbb0fae780753ff447"
|
||||
sha256: cb0db0ec0d3e2cd49674f2e6053be25ccdb959832607c1cbd215dd6cf10fb0dd
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.8.12"
|
||||
version: "0.8.11"
|
||||
image_picker_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -705,18 +705,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_android
|
||||
sha256: "9c96da072b421e98183f9ea7464898428e764bc0ce5567f27ec8693442e72514"
|
||||
sha256: "51f0d2c554cfbc9d6a312ab35152fc77e2f0b758ce9f1a444a3a1e5b8f3c6b7f"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.2.5"
|
||||
version: "2.2.3"
|
||||
path_provider_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: path_provider_foundation
|
||||
sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16
|
||||
sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
version: "2.3.2"
|
||||
path_provider_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -808,10 +808,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: pubspec_parse
|
||||
sha256: c799b721d79eb6ee6fa56f00c04b472dcd44a30d258fac2174a6ec57302678f8
|
||||
sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.3.0"
|
||||
version: "1.2.3"
|
||||
quiver:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -840,18 +840,18 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_android
|
||||
sha256: "93d0ec9dd902d85f326068e6a899487d1f65ffcd5798721a95330b26c8131577"
|
||||
sha256: "8568a389334b6e83415b6aae55378e158fbc2314e074983362d20c562780fb06"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.2.3"
|
||||
version: "2.2.1"
|
||||
shared_preferences_foundation:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shared_preferences_foundation
|
||||
sha256: "0a8a893bf4fd1152f93fec03a415d11c27c74454d96e2318a7ac38dd18683ab7"
|
||||
sha256: "7708d83064f38060c7b39db12aefe449cb8cdc031d6062280087bc4cdb988f5c"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.4.0"
|
||||
version: "2.3.5"
|
||||
shared_preferences_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -896,10 +896,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: shelf_web_socket
|
||||
sha256: "073c147238594ecd0d193f3456a5fe91c4b0abbcc68bf5cd95b36c4e194ac611"
|
||||
sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "1.0.4"
|
||||
shortid:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -997,10 +997,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: tray_manager
|
||||
sha256: c9a63fd88bd3546287a7eb8ccc978d707eef82c775397af17dda3a4f4c039e64
|
||||
sha256: e0ac9a88b2700f366b8629b97e8663b6ef450a2f169560a685dc167bfe9c9c29
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.2.3"
|
||||
version: "0.2.2"
|
||||
typed_data:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1013,26 +1013,26 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: url_launcher
|
||||
sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3"
|
||||
sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "6.3.0"
|
||||
version: "6.2.6"
|
||||
url_launcher_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
sha256: ceb2625f0c24ade6ef6778d1de0b2e44f2db71fded235eb52295247feba8c5cf
|
||||
sha256: d4ed0711849dd8e33eb2dd69c25db0d0d3fdc37e0a62e629fe32f57a22db2745
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "6.3.3"
|
||||
version: "6.3.0"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_ios
|
||||
sha256: "7068716403343f6ba4969b4173cbf3b84fc768042124bc2c011e5d782b24fe89"
|
||||
sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "6.3.0"
|
||||
version: "6.2.5"
|
||||
url_launcher_linux:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1045,10 +1045,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_macos
|
||||
sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de"
|
||||
sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.2.0"
|
||||
version: "3.1.0"
|
||||
url_launcher_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1061,10 +1061,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_web
|
||||
sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a"
|
||||
sha256: "3692a459204a33e04bc94f5fb91158faf4f2c8903281ddd82915adecdb1a901d"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "2.3.1"
|
||||
version: "2.3.0"
|
||||
url_launcher_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -1105,22 +1105,14 @@ packages:
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.5.1"
|
||||
web_socket:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket
|
||||
sha256: "24301d8c293ce6fe327ffe6f59d8fd8834735f0ec36e4fd383ec7ff8a64aa078"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.1.5"
|
||||
web_socket_channel:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: web_socket_channel
|
||||
sha256: a2d56211ee4d35d9b344d9d4ce60f362e4f5d1aafb988302906bd732bc731276
|
||||
sha256: "58c6666b342a38816b2e7e50ed0f1e261959630becd4c879c4f26bfa14aa5a42"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "2.4.5"
|
||||
webdav_client:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -1133,26 +1125,26 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: win32
|
||||
sha256: a79dbe579cb51ecd6d30b17e0cae4e0ea15e2c0e66f69ad4198f22a6789e94f4
|
||||
sha256: "0eaf06e3446824099858367950a813472af675116bf63f008a4c2a75ae13e9cb"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "5.5.1"
|
||||
version: "5.5.0"
|
||||
win32_registry:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: win32_registry
|
||||
sha256: "10589e0d7f4e053f2c61023a31c9ce01146656a70b7b7f0828c0b46d7da2a9bb"
|
||||
sha256: "41fd8a189940d8696b1b810efb9abcf60827b6cbfab90b0c43e8439e3a39d85a"
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "1.1.3"
|
||||
version: "1.1.2"
|
||||
window_manager:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: window_manager
|
||||
sha256: "8699323b30da4cdbe2aa2e7c9de567a6abd8a97d9a5c850a3c86dcd0b34bbfbf"
|
||||
sha256: b3c895bdf936c77b83c5254bec2e6b3f066710c1f89c38b20b8acc382b525494
|
||||
url: "https://pub.flutter-io.cn"
|
||||
source: hosted
|
||||
version: "0.3.9"
|
||||
version: "0.3.8"
|
||||
windows_single_instance:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
@@ -1202,5 +1194,5 @@ packages:
|
||||
source: hosted
|
||||
version: "0.2.3"
|
||||
sdks:
|
||||
dart: ">=3.4.0 <4.0.0"
|
||||
flutter: ">=3.22.0"
|
||||
dart: ">=3.3.0 <4.0.0"
|
||||
flutter: ">=3.19.0"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
name: fl_clash
|
||||
description: A multi-platform proxy client based on ClashMeta, simple and easy to use, open-source and ad-free.
|
||||
publish_to: 'none'
|
||||
version: 0.8.16
|
||||
version: 0.8.15
|
||||
environment:
|
||||
sdk: '>=3.1.0 <4.0.0'
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
// ignore_for_file: avoid_print
|
||||
|
||||
void main() async {
|
||||
String input = """
|
||||
您
|
||||
|
||||
Reference in New Issue
Block a user