mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
25 lines
412 B
Dart
25 lines
412 B
Dart
part of widgets;
|
|
|
|
abstract class ButtonBase extends MaterialComponent {
|
|
|
|
bool _highlight = false;
|
|
|
|
ButtonBase({ Object key }) : super(key: key);
|
|
|
|
void _handlePointerDown(_) {
|
|
setState(() {
|
|
_highlight = true;
|
|
});
|
|
}
|
|
void _handlePointerUp(_) {
|
|
setState(() {
|
|
_highlight = false;
|
|
});
|
|
}
|
|
void _handlePointerCancel(_) {
|
|
setState(() {
|
|
_highlight = false;
|
|
});
|
|
}
|
|
}
|