Revert "Enable avoid_print lint. (#91332)" (#91438)

This reverts commit cb378edc9e.
This commit is contained in:
Mouad Debbar
2021-10-07 16:16:17 -04:00
committed by GitHub
parent d68f95676c
commit c2ea78d231
85 changed files with 246 additions and 359 deletions

View File

@@ -38,21 +38,21 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
KeyEventResult _handleKeyPress(FocusNode node, RawKeyEvent event) {
if (event is RawKeyDownEvent) {
debugPrint('Focus node ${node.debugLabel} got key event: ${event.logicalKey}');
print('Focus node ${node.debugLabel} got key event: ${event.logicalKey}');
if (event.logicalKey == LogicalKeyboardKey.keyR) {
debugPrint('Changing color to red.');
print('Changing color to red.');
setState(() {
_color = Colors.red;
});
return KeyEventResult.handled;
} else if (event.logicalKey == LogicalKeyboardKey.keyG) {
debugPrint('Changing color to green.');
print('Changing color to green.');
setState(() {
_color = Colors.green;
});
return KeyEventResult.handled;
} else if (event.logicalKey == LogicalKeyboardKey.keyB) {
debugPrint('Changing color to blue.');
print('Changing color to blue.');
setState(() {
_color = Colors.blue;
});

View File

@@ -115,7 +115,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
// This button would be not visible, but still focusable from
// the foreground pane without the FocusScope.
ElevatedButton(
onPressed: () => debugPrint('You pressed the other button!'),
onPressed: () => print('You pressed the other button!'),
child: const Text('ANOTHER BUTTON TO FOCUS'),
),
DefaultTextStyle(