1
0
mirror of https://github.com/flutter/samples.git synced 2026-07-18 06:52:06 +00:00

Fixup varfont_shader_puzzle, attempt #2 (#1563)

This commit is contained in:
Brett Morgan
2023-01-13 14:47:23 +10:00
committed by GitHub
parent 02a8b9cfbb
commit 2c7ffd4617
15 changed files with 84 additions and 75 deletions

View File

@@ -30,18 +30,15 @@ class TextStyles {
class ButtonStyles {
static ButtonStyle style() {
return ButtonStyle(
fixedSize:
MaterialStateProperty.resolveWith<Size>((Set<MaterialState> states) {
fixedSize: MaterialStateProperty.resolveWith<Size>((states) {
return const Size(100, 36);
}),
shape: MaterialStateProperty.resolveWith<OutlinedBorder>(
(Set<MaterialState> states) {
shape: MaterialStateProperty.resolveWith<OutlinedBorder>((states) {
return const RoundedRectangleBorder(
borderRadius: BorderRadius.all(Radius.circular(18)));
}),
overlayColor: null,
backgroundColor: MaterialStateProperty.resolveWith<Color?>(
(Set<MaterialState> states) {
backgroundColor: MaterialStateProperty.resolveWith<Color?>((states) {
if (states.contains(MaterialState.hovered)) {
return Colors.black; // Hovered bg (for desktop with mouse)
}