flutter/examples/fn/widgets/buttonbase.dart
Rafael Weinstein 202f99d71d Initial commit of Effen reactive framework experiment for Sky
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
2015-03-02 20:55:02 -08:00

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;
});
}
}