Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add replication and cleanup capabilities #13

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions lib/src/ansi_parser.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';

class AnsiParser {
static const TEXT = 0, BRACKET = 1, CODE = 2;
Expand Down Expand Up @@ -116,11 +118,15 @@ class AnsiParser {

TextSpan createSpan(String text) {
return TextSpan(
text: text,
style: TextStyle(
color: foreground,
backgroundColor: background,
),
);
text: text,
style: TextStyle(
color: foreground,
backgroundColor: background,
),
recognizer: LongPressGestureRecognizer()
..onLongPress = () {
Clipboard.setData(ClipboardData(text: text));
// Toast.toast("Copy to paste board");
});
}
}
10 changes: 10 additions & 0 deletions lib/src/log_console.dart
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,16 @@ class _LogConsoleState extends State<LogConsole> {
),
),
Spacer(),
IconButton(
icon: Icon(Icons.cancel),
onPressed: () {
setState(() {
//Clear historical data in order to find the target data
_outputEventBuffer.clear();
_filteredBuffer.clear();
});
},
),
IconButton(
icon: Icon(Icons.add),
onPressed: () {
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ dependencies:
flutter:
sdk: flutter

logger: ">=0.7.0"
logger: ^0.7.0
sensors: ^0.4.0+1