提交 ec1b92d8 authored 作者: yueweilu's avatar yueweilu

1、删除无用代码

2、注释不必要log
上级 685056fd
......@@ -49,7 +49,7 @@ class ReadController extends FullLifeCycleController with GetSingleTickerProvide
bool get show => _show;
// 录音
final FlutterSoundRecorder _mRecorder = FlutterSoundRecorder();
final FlutterSoundRecorder _mRecorder = FlutterSoundRecorder(logLevel:Level.error);
// 录音开始
bool startRecording = false;
// 是否存在离线文件
......
......@@ -23,6 +23,7 @@ import 'package:get/get.dart';
import 'package:go_router/go_router.dart';
import 'package:intl/intl.dart';
import 'package:just_audio/just_audio.dart' as just_audio;
import 'package:logger/logger.dart';
import 'package:path_provider/path_provider.dart';
import 'dart:async';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
......
......@@ -262,19 +262,6 @@ class _ReadPageState extends State<ReadPage> {
},
),
// AnimatedPositioned(
// duration: readController.controller.duration!,
// curve: Curves.easeInOut,
// top: readController.show ? 0 : -100, // 负值隐藏,0 显示
// left: 0,
// right: 0,
// height: 100,
// child: Container(
// color: Colors.limeAccent,
// alignment: Alignment.center,
// child: Text('top View'),
// ),
// ),
Positioned(
left: 0,
right: 0,
......@@ -282,19 +269,6 @@ class _ReadPageState extends State<ReadPage> {
bottom: 69,
child: _showContent(readController,readController.toolModel)
),
// AnimatedPositioned(
// duration: readController.controller.duration!,
// curve: Curves.easeInOut,
// bottom: readController.show ? 0 : -49 - MediaQuery.of(context).viewInsets.bottom, // 负值隐藏,0 显示
// left: 0,
// right: 0,
// height: 49,
// child: Container(
// color: Colors.limeAccent,
// alignment: Alignment.center,
// child: _createToolBar(readController)
// ),
// ),
/// 底部工具栏布局
Visibility(
visible: readController.show,
......@@ -400,14 +374,12 @@ class _ReadPageState extends State<ReadPage> {
// 点 搜索全部 列表 某一项 事件
onTapSearchItem: (SearchAllModel sModel){
controller.chooseTool(model);
// TODO:重新加载阅读界面 参数:chapter_id text
Console.log('-----------目录点击搜索条目---------------------');
// 加载阅读界面 参数:chapter_id text
controller.sModel = sModel;
controller.selectChapter(ChapterModel(id: sModel.chapterId,name: sModel.chapterName));
controller.webViewController.reload();
},
onTapChapter: (ChapterModel chapterModel){
Console.log('-----------选择的章节-------------${chapterModel.name}--------');
// 配置选择的章节
controller.selectChapter(chapterModel);
// 取消选中 tool
......@@ -426,8 +398,7 @@ class _ReadPageState extends State<ReadPage> {
// 点 搜索全部 列表 某一项 事件
onTapSearchItem: (SearchAllModel sModel){
controller.chooseTool(model);
// TODO:重新加载阅读界面 参数:chapter_id text
Console.log('-----------笔记点击搜索条目---------------------');
// 重新加载阅读界面 参数:chapter_id text
controller.sModel = sModel;
controller.selectChapter(ChapterModel(id: sModel.chapterId,name: sModel.chapterName));
controller.webViewController.reload();
......@@ -446,8 +417,7 @@ class _ReadPageState extends State<ReadPage> {
onTapSearchItem: (SearchAllModel sModel){
controller.chooseTool(model);
controller.sModel = sModel;
// TODO:重新加载阅读界面 参数:chapter_id text
Console.log('-----------讨论点击搜索条目---------------------');
// 重新加载阅读界面 参数:chapter_id text
controller.selectChapter(ChapterModel(id: sModel.chapterId,name: sModel.chapterName));
controller.webViewController.reload();
},
......@@ -459,7 +429,6 @@ class _ReadPageState extends State<ReadPage> {
}
/// 目录、评论、笔记 背景
Widget _showContent(ReadController controller,ToolModel model) {
Console.log('++++++++++++++++++++++++${model.tag}');
if (controller.show){
if(model.selected){
return GestureDetector(
......
......@@ -345,7 +345,7 @@ class _CacheInterceptor extends Interceptor {
// 在发起请求之前,检查缓存是否存在有效数据
String cacheKey = '${options.uri.toString()}?${options.data}';
final cachedFile = await DefaultCacheManager().getFileFromCache(cacheKey);
Console.log('获取数据----------cacheKey-----------------------$cacheKey');
// Console.log('获取数据----------cacheKey-----------------------$cacheKey');
if (cachedFile != null && cachedFile.validTill.isAfter(DateTime.now())) {
// 如果缓存有效,直接返回缓存数据
final cachedData = await cachedFile.file.readAsBytes();
......@@ -374,7 +374,7 @@ class _CacheInterceptor extends Interceptor {
final requestBody = response.requestOptions.data.toString();
// 将 GET 请求的参数和请求体参数拼接成缓存的键
final cacheKey = requestBody.isEmpty ? url : '$url?$requestBody';
Console.log('----------cacheKey-----------------------$cacheKey');
// Console.log('----------cacheKey-----------------------$cacheKey');
// 将响应数据转换为字符串,并将其编码为字节列表
List<int> bytes = utf8.encode(jsonEncode(response.data));
Uint8List uint8List = Uint8List.fromList(bytes);
......
......@@ -53,10 +53,8 @@ class SqlManager {
static Future<Database?> getCurrentDatabase() async {
if (_database == null) {
Console.log('Sql-------------getCurrentDatabase---------------_database == null----');
await init();
}
Console.log('Sql-------------getCurrentDatabase---------------$_database');
return _database;
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论