Implements focus handling and hover for Material buttons. (#31438)

This implements focus and hover handling for Material buttons. It inserts Focus widgets into the tree in order to allow buttons to be focusable via keyboard traversal (a.k.a. TAB traversal), and Listener widgets into the InkWell to allow the detection of hover states for widgets.

Addresses #11344, #1608, and #13264.
This commit is contained in:
Greg Spencer
2019-05-14 20:48:29 -07:00
committed by GitHub
parent ed90d05596
commit bb3c660522
34 changed files with 1696 additions and 356 deletions

View File

@@ -60,6 +60,7 @@ class _CategoryItem extends StatelessWidget {
return RepaintBoundary(
child: RawMaterialButton(
padding: EdgeInsets.zero,
hoverColor: theme.primaryColor.withOpacity(0.05),
splashColor: theme.primaryColor.withOpacity(0.12),
highlightColor: Colors.transparent,
onPressed: onTap,