feat(ui_kit): update example with full studio button theme

This commit is contained in:
2023-02-15 22:36:26 +01:00
parent a595183107
commit dd198b0e51
8 changed files with 317 additions and 45 deletions
@@ -23,6 +23,14 @@ import 'package:wyatt_ui_kit_example/theme/constants.dart';
class SymbolButtons extends StatelessWidget {
const SymbolButtons({super.key});
Icon _icon(BuildContext context) => Icon(
Icons.android,
size: 25,
color: (Theme.of(context).colorScheme.brightness == Brightness.light)
? Constants.dark
: Constants.white,
);
@override
Widget build(BuildContext context) => Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -34,75 +42,47 @@ class SymbolButtons extends StatelessWidget {
const Gap(20),
SymbolButton(
label: const TextWrapper('Text'),
icon: const Icon(
Icons.android,
size: 25,
color: Constants.white,
),
icon: _icon(context),
),
const Gap(20),
SymbolButton(
label: const TextWrapper('Enabled'),
icon: const Icon(
Icons.android,
size: 25,
color: Constants.white,
),
icon: _icon(context),
)
..bloc.enable()
..bloc.freeze(),
const Gap(20),
SymbolButton(
label: const TextWrapper('Disabled'),
icon: const Icon(
Icons.android,
size: 25,
color: Constants.white,
),
icon: _icon(context),
)
..bloc.disable()
..bloc.freeze(),
const Gap(20),
SymbolButton(
label: const TextWrapper('Hovered'),
icon: const Icon(
Icons.android,
size: 25,
color: Constants.white,
),
icon: _icon(context),
)
..bloc.onMouseEnter()
..bloc.freeze(),
const Gap(20),
SymbolButton(
label: const TextWrapper('Focused'),
icon: const Icon(
Icons.android,
size: 25,
color: Constants.white,
),
icon: _icon(context),
)
..bloc.onFocus()
..bloc.freeze(),
const Gap(20),
SymbolButton(
label: const TextWrapper('Tapped'),
icon: const Icon(
Icons.android,
size: 25,
color: Constants.white,
),
icon: _icon(context),
)
..bloc.onClickDown()
..bloc.freeze(),
const Gap(20),
SymbolButton(
label: const TextWrapper('Selected'),
icon: const Icon(
Icons.android,
size: 25,
color: Constants.white,
),
icon: _icon(context),
)
..bloc.select()
..bloc.freeze(),
@@ -113,11 +93,7 @@ class SymbolButtons extends StatelessWidget {
),
child: SymbolButton(
label: const TextWrapper('Trigger zone'),
icon: const Icon(
Icons.android,
size: 25,
color: Constants.white,
),
icon: _icon(context),
),
),
const Gap(20),