summaryrefslogtreecommitdiff
path: root/lib/widgets/debug/colors.dart
diff options
context:
space:
mode:
authormirror <mirror@localhost>2026-11-22 08:41:00 +0900
committermirror <mirror@localhost>2026-11-22 08:41:00 +0900
commit449d8b74bd6d9dae98a07254cdfad677b920e7b0 (patch)
treec131c3528c4d517f56e19b854a7453fedb097d40 /lib/widgets/debug/colors.dart
downloadaves-src-master.tar.gz
aves-src-master.zip
snapshot of aves v1.13.12 (secrets removed: android/app/google-services.json)HEADv1.13.12master
Diffstat (limited to 'lib/widgets/debug/colors.dart')
-rw-r--r--lib/widgets/debug/colors.dart99
1 files changed, 99 insertions, 0 deletions
diff --git a/lib/widgets/debug/colors.dart b/lib/widgets/debug/colors.dart
new file mode 100644
index 0000000..52bebdc
--- /dev/null
+++ b/lib/widgets/debug/colors.dart
@@ -0,0 +1,99 @@
+import 'package:aves/widgets/common/identity/aves_expansion_tile.dart';
+import 'package:flex_color_picker/flex_color_picker.dart';
+import 'package:flutter/material.dart';
+
+class DebugColorSection extends StatefulWidget {
+ const DebugColorSection({super.key});
+
+ @override
+ State<DebugColorSection> createState() => _DebugColorSectionState();
+}
+
+class _DebugColorSectionState extends State<DebugColorSection> with AutomaticKeepAliveClientMixin {
+ @override
+ Widget build(BuildContext context) {
+ super.build(context);
+
+ final scheme = Theme.of(context).colorScheme;
+ final List<(String, Color)> colors = [
+ ('primary', scheme.primary),
+ ('onPrimary', scheme.onPrimary),
+ ('primaryContainer', scheme.primaryContainer),
+ ('onPrimaryContainer', scheme.onPrimaryContainer),
+ ('primaryFixed', scheme.primaryFixed),
+ ('primaryFixedDim', scheme.primaryFixedDim),
+ ('onPrimaryFixed', scheme.onPrimaryFixed),
+ ('onPrimaryFixedVariant', scheme.onPrimaryFixedVariant),
+ ('secondary', scheme.secondary),
+ ('onSecondary', scheme.onSecondary),
+ ('secondaryContainer', scheme.secondaryContainer),
+ ('onSecondaryContainer', scheme.onSecondaryContainer),
+ ('secondaryFixed', scheme.secondaryFixed),
+ ('secondaryFixedDim', scheme.secondaryFixedDim),
+ ('onSecondaryFixed', scheme.onSecondaryFixed),
+ ('onSecondaryFixedVariant', scheme.onSecondaryFixedVariant),
+ ('tertiary', scheme.tertiary),
+ ('onTertiary', scheme.onTertiary),
+ ('tertiaryContainer', scheme.tertiaryContainer),
+ ('onTertiaryContainer', scheme.onTertiaryContainer),
+ ('tertiaryFixed', scheme.tertiaryFixed),
+ ('tertiaryFixedDim', scheme.tertiaryFixedDim),
+ ('onTertiaryFixed', scheme.onTertiaryFixed),
+ ('onTertiaryFixedVariant', scheme.onTertiaryFixedVariant),
+ ('error', scheme.error),
+ ('onError', scheme.onError),
+ ('errorContainer', scheme.errorContainer),
+ ('onErrorContainer', scheme.onErrorContainer),
+ ('surface', scheme.surface),
+ ('onSurface', scheme.onSurface),
+ ('surfaceDim', scheme.surfaceDim),
+ ('surfaceBright', scheme.surfaceBright),
+ ('surfaceContainerLowest', scheme.surfaceContainerLowest),
+ ('surfaceContainerLow', scheme.surfaceContainerLow),
+ ('surfaceContainer', scheme.surfaceContainer),
+ ('surfaceContainerHigh', scheme.surfaceContainerHigh),
+ ('surfaceContainerHighest', scheme.surfaceContainerHighest),
+ ('onSurfaceVariant', scheme.onSurfaceVariant),
+ ('outline', scheme.outline),
+ ('outlineVariant', scheme.outlineVariant),
+ ('shadow', scheme.shadow),
+ ('scrim', scheme.scrim),
+ ('inverseSurface', scheme.inverseSurface),
+ ('onInverseSurface', scheme.onInverseSurface),
+ ('inversePrimary', scheme.inversePrimary),
+ ('surfaceTint', scheme.surfaceTint),
+ ];
+ return AvesExpansionTile(
+ title: 'Colors',
+ children: [
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 8),
+ child: Column(
+ children: colors.map((kv) {
+ final (text, color) = kv;
+ return Row(
+ children: [
+ Text(text),
+ const Spacer(),
+ Text(
+ color.hex,
+ style: const TextStyle(fontFamily: 'monospace'),
+ ),
+ const SizedBox(width: 4),
+ Container(
+ width: 20,
+ height: 20,
+ color: color,
+ ),
+ ],
+ );
+ }).toList(),
+ ),
+ ),
+ ],
+ );
+ }
+
+ @override
+ bool get wantKeepAlive => true;
+}