feat(ui_kit): update example with full studio button theme
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ class FileSelectionButtons extends StatelessWidget {
|
||||
|
||||
Widget _leading() => const DecoratedBox(
|
||||
decoration: BoxDecoration(
|
||||
color: Constants.grey3,
|
||||
color: Constants.grey2,
|
||||
borderRadius: BorderRadius.all(
|
||||
Radius.circular(5),
|
||||
),
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user