opt: 代码优化

This commit is contained in:
orz12
2024-01-15 00:59:19 +08:00
parent 0cc25203b1
commit 6654094480
5 changed files with 6 additions and 6 deletions

View File

@ -34,7 +34,7 @@ class ContentContainer extends StatelessWidget {
child: contentWidget!, child: contentWidget!,
) )
else else
Spacer(), const Spacer(),
if (bottomWidget != null) bottomWidget!, if (bottomWidget != null) bottomWidget!,
], ],
), ),

View File

@ -15,7 +15,7 @@ class HtmlHttp {
Match match = regex.firstMatch(response.data)!; Match match = regex.firstMatch(response.data)!;
String matchedString = match.group(0)!; String matchedString = match.group(0)!;
response = await Request().get( response = await Request().get(
'https:$matchedString' + '/', 'https:$matchedString/',
extra: {'ua': 'pc'}, extra: {'ua': 'pc'},
); );
} }

View File

@ -6,7 +6,7 @@ import 'package:cookie_jar/cookie_jar.dart';
import 'package:dio/dio.dart'; import 'package:dio/dio.dart';
import 'package:dio/io.dart'; import 'package:dio/io.dart';
import 'package:dio_cookie_manager/dio_cookie_manager.dart'; import 'package:dio_cookie_manager/dio_cookie_manager.dart';
import 'package:dio_http2_adapter/dio_http2_adapter.dart'; // import 'package:dio_http2_adapter/dio_http2_adapter.dart';
import 'package:hive/hive.dart'; import 'package:hive/hive.dart';
import '../utils/storage.dart'; import '../utils/storage.dart';
import '../utils/utils.dart'; import '../utils/utils.dart';

View File

@ -210,11 +210,11 @@ class _WhisperPageState extends State<WhisperPage> {
); );
} else { } else {
// 请求错误 // 请求错误
return SizedBox(); return const SizedBox();
} }
} else { } else {
// 骨架屏 // 骨架屏
return SizedBox(); return const SizedBox();
} }
}, },
) )

View File

@ -80,7 +80,7 @@ class WbiSign {
String getMixinKey(String orig) { String getMixinKey(String orig) {
String temp = ''; String temp = '';
for (int i = 0; i < mixinKeyEncTab.length; i++) { for (int i = 0; i < mixinKeyEncTab.length; i++) {
temp += orig.split('')[mixinKeyEncTab[i] as int]; temp += orig.split('')[mixinKeyEncTab[i]];
} }
return temp.substring(0, 32); return temp.substring(0, 32);
} }