Skip to content

Commit

Permalink
修复logcat中文乱码
Browse files Browse the repository at this point in the history
  • Loading branch information
EaniaHuui committed Jun 14, 2022
1 parent 057c455 commit c39209e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/page/android_log/android_log_view_model.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'dart:convert';
import 'dart:io';

import 'package:android_tool/page/common/app.dart';
Expand All @@ -7,7 +8,6 @@ import 'package:android_tool/widget/pop_up_menu_button.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_list_view/flutter_list_view.dart';
import 'package:process_run/shell.dart';
import 'package:shared_preferences/shared_preferences.dart';

class AndroidLogViewModel extends BaseViewModel with PackageHelpMixin {
Expand Down Expand Up @@ -119,8 +119,7 @@ class AndroidLogViewModel extends BaseViewModel with PackageHelpMixin {
}
execAdb(list, onProcess: (process) {
_process = process;
var outLine = process.outLines;
outLine.listen((line) {
process.stdout.transform(const Utf8Decoder()).listen((line) {
if (filterContent.isNotEmpty
? line.toLowerCase().contains(filterContent.toLowerCase())
: true) {
Expand Down

0 comments on commit c39209e

Please sign in to comment.