mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00

This is just a proof of concept. If we like this direction, it will move out of the examples directory (likely re-written) and be committed in smaller pieces with unit tests and formal reviews. TBR=abarth BUG= Review URL: https://codereview.chromium.org/971183002
25 lines
404 B
Dart
25 lines
404 B
Dart
part of widgets;
|
|
|
|
abstract class ButtonBase extends Component {
|
|
|
|
bool _highlight = false;
|
|
|
|
ButtonBase({ Object key }) : super(key: key);
|
|
|
|
void _handlePointerDown(_) {
|
|
setState(() {
|
|
_highlight = true;
|
|
});
|
|
}
|
|
void _handlePointerUp(_) {
|
|
setState(() {
|
|
_highlight = false;
|
|
});
|
|
}
|
|
void _handlePointerCancel(_) {
|
|
setState(() {
|
|
_highlight = false;
|
|
});
|
|
}
|
|
}
|