Skip to content

Commit f0fac67

Browse files
committed
update plugin version
1 parent 349724f commit f0fac67

File tree

22 files changed

+206
-208
lines changed

22 files changed

+206
-208
lines changed

lib/app_stater/impl/start_repository.dart

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
import 'dart:convert';
42
import 'dart:io';
53

@@ -11,7 +9,6 @@ import 'package:shared_preferences/shared_preferences.dart';
119
import 'package:storage/storage.dart';
1210
import 'package:path/path.dart' as path;
1311

14-
1512
class AppStartRepositoryImpl implements AppStartRepository<AppConfigState> {
1613
const AppStartRepositoryImpl();
1714

@@ -22,8 +19,12 @@ class AppStartRepositoryImpl implements AppStartRepository<AppConfigState> {
2219
await SpStorage.instance.initSp();
2320
await initDb();
2421
AppConfigPo po = await SpStorage.instance.appConfig.read();
25-
ConnectivityResult netConnect = await (Connectivity().checkConnectivity());
26-
return AppConfigState.fromPo(po).copyWith(netConnect: netConnect);
22+
List<ConnectivityResult> netConnect = await (Connectivity().checkConnectivity());
23+
AppConfigState state = AppConfigState.fromPo(po);
24+
if (netConnect.isNotEmpty) {
25+
state = state.copyWith(netConnect: netConnect.first);
26+
}
27+
return state;
2728
}
2829

2930
@override
@@ -33,8 +34,7 @@ class AppStartRepositoryImpl implements AppStartRepository<AppConfigState> {
3334
return;
3435
}
3536

36-
37-
Future<void> initDb() async{
37+
Future<void> initDb() async {
3838
DbOpenHelper.setupDatabase();
3939
//数据库不存在,执行拷贝
4040
String databasesPath = await DbOpenHelper.getDbDirPath();
@@ -60,8 +60,7 @@ class AppStartRepositoryImpl implements AppStartRepository<AppConfigState> {
6060
await dir.create(recursive: true);
6161
}
6262
ByteData data = await rootBundle.load("assets/flutter.db");
63-
List<int> bytes =
64-
data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes);
63+
List<int> bytes = data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes);
6564
await File(dbPath).writeAsBytes(bytes, flush: true);
6665

6766
print("=====flutter.db==== assets ======拷贝完成====");

macos/Flutter/GeneratedPluginRegistrant.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import url_launcher_macos
1616
import window_manager
1717

1818
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
19-
ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin"))
20-
FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin"))
19+
ConnectivityPlusPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlusPlugin"))
20+
FPPPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FPPPackageInfoPlusPlugin"))
2121
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
2222
ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin"))
2323
SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin"))

packages/app/lib/app_config/bloc/bloc.dart

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,34 +7,34 @@ import 'package:flutter_bloc/flutter_bloc.dart';
77
import 'package:l10n/l10n.dart';
88
import 'package:storage/storage.dart';
99

10-
1110
/// create by 张风捷特烈 on 2020-03-22
1211
/// contact me by email [email protected]
1312
/// 说明: 全局信息的bloc
1413
1514
class AppConfigBloc extends Cubit<AppConfigState> {
16-
1715
final Connectivity _connectivity = Connectivity();
1816

19-
late StreamSubscription<ConnectivityResult> _subscription;
17+
late StreamSubscription<List<ConnectivityResult>> _subscription;
2018

21-
AppConfigBloc() : super(const AppConfigState()){
19+
AppConfigBloc() : super(const AppConfigState()) {
2220
_subscription = _connectivity.onConnectivityChanged.listen(_onNetConnectChange);
2321
}
2422

25-
void _onNetConnectChange(ConnectivityResult event) {
26-
emit(state.copyWith(netConnect: event,));
23+
void _onNetConnectChange(List<ConnectivityResult> event) {
24+
if (event.isNotEmpty) {
25+
emit(state.copyWith(
26+
netConnect: event.first,
27+
));
28+
}
2729
}
2830

29-
3031
@override
31-
Future<void> close() async{
32+
Future<void> close() async {
3233
_subscription.cancel();
3334
super.close();
3435
}
3536

36-
37-
void init(AppConfigState state){
37+
void init(AppConfigState state) {
3838
emit(state);
3939
}
4040

@@ -89,13 +89,13 @@ class AppConfigBloc extends Cubit<AppConfigState> {
8989
emit(newState);
9090
}
9191

92-
void changeThemeMode(ThemeMode style) async{
92+
void changeThemeMode(ThemeMode style) async {
9393
AppConfigState newState = state.copyWith(themeMode: style);
9494
cao.write(newState.toAppConfigPo());
9595
emit(newState);
9696
}
9797

98-
void switchShowTool(bool show) async{
98+
void switchShowTool(bool show) async {
9999
AppConfigState newState = state.copyWith(showOverlayTool: show);
100100
cao.write(newState.toAppConfigPo());
101101
emit(newState);

packages/app/pubspec.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ environment:
1010
dependencies:
1111
flutter:
1212
sdk: flutter
13-
flutter_bloc: ^8.1.3 # 状态管理
13+
flutter_bloc: ^8.1.6 # 状态管理
1414
equatable: ^2.0.5 # 相等辅助
1515
shared_preferences: ^2.2.2 # xml 固化
16-
connectivity_plus: ^5.0.2
17-
window_manager: ^0.3.7 #桌面尺寸
16+
connectivity_plus: ^6.0.3
17+
window_manager: ^0.3.9 #桌面尺寸
1818
storage:
1919
path: ../storage
2020
widget_module:

packages/app_update/pubspec.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ environment:
1010
dependencies:
1111
flutter:
1212
sdk: flutter
13-
flutter_bloc: ^8.1.3 # 状态管理
13+
flutter_bloc: ^8.1.6 # 状态管理
1414
equatable: ^2.0.5 # 相等辅助
15-
shared_preferences: ^2.2.1 # xml 固化
15+
shared_preferences: ^2.2.3 # xml 固化
1616
r_upgrade: ^0.4.2 # 应用升级
17-
url_launcher: ^6.1.14 # url
18-
package_info_plus: ^4.0.2
17+
url_launcher: ^6.3.0 # url
18+
package_info_plus: ^8.0.0
1919
utils:
2020
path: ../utils
2121
app:

packages/artifact/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ environment:
1010
dependencies:
1111
flutter:
1212
sdk: flutter
13-
flutter_bloc: ^8.1.3 # 状态管理
13+
flutter_bloc: ^8.1.6 # 状态管理
1414
dio: ^5.3.2 # 网络请求
1515
webview_flutter: ^4.2.4
1616
url_launcher: ^6.1.14 # url

packages/authentication/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ environment:
1010
dependencies:
1111
flutter:
1212
sdk: flutter
13-
flutter_bloc: ^8.1.3 # 状态管理
13+
flutter_bloc: ^8.1.6 # 状态管理
1414
equatable: ^2.0.5 # 相等辅助
1515
shared_preferences: ^2.2.1 # xml 固化
16-
go_router: ^13.2.2
16+
go_router: ^14.2.0
1717
utils:
1818
path: ../utils
1919
app_update:

packages/components/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dependencies:
1111
flutter:
1212
sdk: flutter
1313
flutter_spinkit: ^5.2.0 # loading
14-
flutter_markdown: ^0.6.4 # markdown
14+
flutter_markdown: ^0.7.2+1 # markdown
1515
toly_ui:
1616
path: ../toly_ui
1717
app:

packages/draw_system/pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
components:
2020
path: ../components
2121
dash_painter: ^1.0.2
22-
flutter_bloc: ^8.1.3 # 状态管理
22+
flutter_bloc: ^8.1.6 # 状态管理
2323
url_launcher: ^6.1.14 # url
2424
image: ^4.0.17
2525
dev_dependencies:

packages/l10n/l10n_copy.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# 复制文件夹
4+
cp -r .dart_tool/flutter_gen/gen_l10n lib
5+
6+
# 检查拷贝是否成功
7+
if [ $? -eq 0 ]; then
8+
echo "文件夹拷贝成功"
9+
else
10+
echo "文件夹拷贝失败"
11+
fi

0 commit comments

Comments
 (0)