This reverts commit cb378edc9e.
This commit is contained in:
@@ -47,7 +47,7 @@ class AutocompleteBasicExample extends StatelessWidget {
|
||||
});
|
||||
},
|
||||
onSelected: (String selection) {
|
||||
debugPrint('You just selected $selection');
|
||||
print('You just selected $selection');
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ class AutocompleteBasicUserExample extends StatelessWidget {
|
||||
});
|
||||
},
|
||||
onSelected: (User selection) {
|
||||
debugPrint('You just selected ${_displayStringForOption(selection)}');
|
||||
print('You just selected ${_displayStringForOption(selection)}');
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
child: InkWell(
|
||||
splashColor: Colors.blue.withAlpha(30),
|
||||
onTap: () {
|
||||
debugPrint('Card tapped.');
|
||||
print('Card tapped.');
|
||||
},
|
||||
child: const SizedBox(
|
||||
width: 300,
|
||||
|
||||
@@ -59,7 +59,7 @@ class LinkedLabelCheckbox extends StatelessWidget {
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
debugPrint('Label has been tapped.');
|
||||
print('Label has been tapped.');
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
@@ -45,7 +45,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
),
|
||||
floatingActionButton: FloatingActionButton(
|
||||
onPressed: () {
|
||||
debugPrint('FAB pressed.');
|
||||
print('FAB pressed.');
|
||||
},
|
||||
tooltip: 'Increment',
|
||||
child: const Icon(Icons.add),
|
||||
|
||||
@@ -34,7 +34,7 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return OutlinedButton(
|
||||
onPressed: () {
|
||||
debugPrint('Received click');
|
||||
print('Received click');
|
||||
},
|
||||
child: const Text('Click Me'),
|
||||
);
|
||||
|
||||
@@ -64,7 +64,7 @@ class LinkedLabelRadio extends StatelessWidget {
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
debugPrint('Label has been tapped.');
|
||||
print('Label has been tapped.');
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
@@ -59,7 +59,7 @@ class LinkedLabelSwitch extends StatelessWidget {
|
||||
),
|
||||
recognizer: TapGestureRecognizer()
|
||||
..onTap = () {
|
||||
debugPrint('Label has been tapped.');
|
||||
print('Label has been tapped.');
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
@@ -54,7 +54,7 @@ class _MyStatefulWidgetState extends State<MyStatefulWidget> {
|
||||
constraints: BoxConstraints.tight(const Size(200, 50)),
|
||||
child: TextFormField(
|
||||
onSaved: (String? value) {
|
||||
debugPrint('Value for field $index saved as "$value"');
|
||||
print('Value for field $index saved as "$value"');
|
||||
},
|
||||
),
|
||||
),
|
||||
|
||||
@@ -92,13 +92,13 @@ class MyAction extends Action<MyIntent> {
|
||||
@override
|
||||
void addActionListener(ActionListenerCallback listener) {
|
||||
super.addActionListener(listener);
|
||||
debugPrint('Action Listener was added');
|
||||
print('Action Listener was added');
|
||||
}
|
||||
|
||||
@override
|
||||
void removeActionListener(ActionListenerCallback listener) {
|
||||
super.removeActionListener(listener);
|
||||
debugPrint('Action Listener was removed');
|
||||
print('Action Listener was removed');
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -34,7 +34,7 @@ class Model {
|
||||
|
||||
int save() {
|
||||
if (isDirty.value) {
|
||||
debugPrint('Saved Data: ${data.value}');
|
||||
print('Saved Data: ${data.value}');
|
||||
isDirty.value = false;
|
||||
}
|
||||
return data.value;
|
||||
|
||||
@@ -57,21 +57,21 @@ class _ColorfulButtonState extends State<ColorfulButton> {
|
||||
|
||||
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;
|
||||
});
|
||||
|
||||
@@ -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;
|
||||
});
|
||||
|
||||
@@ -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(
|
||||
|
||||
@@ -68,7 +68,7 @@ class _OrderedButtonState<T> extends State<OrderedButton<T>> {
|
||||
|
||||
void _handleOnPressed() {
|
||||
focusNode.requestFocus();
|
||||
debugPrint('Button ${widget.name} pressed.');
|
||||
print('Button ${widget.name} pressed.');
|
||||
debugDumpFocusTree();
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ class DemoButton extends StatelessWidget {
|
||||
final double order;
|
||||
|
||||
void _handleOnPressed() {
|
||||
debugPrint('Button $name pressed.');
|
||||
print('Button $name pressed.');
|
||||
debugDumpFocusTree();
|
||||
}
|
||||
|
||||
|
||||
@@ -122,10 +122,10 @@ class _IVBuilderExampleState extends State<_IVBuilderExample> {
|
||||
cellWidth: _cellWidth,
|
||||
builder: (BuildContext context, int row, int column) {
|
||||
if (!_isCellVisible(row, column, viewport)) {
|
||||
debugPrint('removing cell ($row, $column)');
|
||||
print('removing cell ($row, $column)');
|
||||
return Container(height: _cellHeight);
|
||||
}
|
||||
debugPrint('building cell ($row, $column)');
|
||||
print('building cell ($row, $column)');
|
||||
return Container(
|
||||
height: _cellHeight,
|
||||
color: row % 2 + column % 2 == 1
|
||||
|
||||
@@ -45,9 +45,9 @@ class MyStatelessWidget extends StatelessWidget {
|
||||
body: NotificationListener<ScrollNotification>(
|
||||
onNotification: (ScrollNotification scrollNotification) {
|
||||
if (scrollNotification is ScrollStartNotification) {
|
||||
debugPrint('Scrolling has started');
|
||||
print('Scrolling has started');
|
||||
} else if (scrollNotification is ScrollEndNotification) {
|
||||
debugPrint('Scrolling has ended');
|
||||
print('Scrolling has ended');
|
||||
}
|
||||
// Return true to cancel the notification bubbling.
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user