|
1 | 1 | import 'package:flutter/material.dart';
|
2 | 2 |
|
3 |
| -import 'package:fluffychat/config/app_config.dart'; |
| 3 | +import 'package:flutter_gen/gen_l10n/l10n.dart'; |
| 4 | +import 'package:material_symbols_icons/symbols.dart'; |
| 5 | + |
4 | 6 | import 'package:fluffychat/pangea/analytics_details_popup/morph_analytics_view.dart';
|
5 | 7 | import 'package:fluffychat/pangea/analytics_details_popup/morph_details_view.dart';
|
6 | 8 | import 'package:fluffychat/pangea/analytics_details_popup/vocab_analytics_view.dart';
|
7 | 9 | import 'package:fluffychat/pangea/analytics_details_popup/vocab_details_view.dart';
|
8 |
| -import 'package:fluffychat/pangea/analytics_misc/analytics_constants.dart'; |
9 | 10 | import 'package:fluffychat/pangea/analytics_misc/construct_identifier.dart';
|
10 | 11 | import 'package:fluffychat/pangea/analytics_misc/construct_type_enum.dart';
|
11 | 12 | import 'package:fluffychat/pangea/analytics_summary/progress_indicators_enum.dart';
|
@@ -63,38 +64,40 @@ class AnalyticsPopupWrapperState extends State<AnalyticsPopupWrapper> {
|
63 | 64 | : () => setConstructZoom(null),
|
64 | 65 | ),
|
65 | 66 | actions: [
|
66 |
| - Padding( |
67 |
| - padding: const EdgeInsets.all(8.0), |
68 |
| - child: SizedBox( |
69 |
| - height: 30.0, |
70 |
| - width: 30.0, |
71 |
| - child: InkWell( |
72 |
| - child: Image.network( |
73 |
| - '${AppConfig.assetsBaseURL}/${AnalyticsConstants.vocabIconFileName}', |
74 |
| - ), |
75 |
| - onTap: () => setState(() { |
76 |
| - localView = ConstructTypeEnum.vocab; |
77 |
| - localConstructZoom = null; |
78 |
| - }), |
| 67 | + TextButton.icon( |
| 68 | + style: TextButton.styleFrom( |
| 69 | + shape: RoundedRectangleBorder( |
| 70 | + borderRadius: BorderRadius.circular(10.0), |
79 | 71 | ),
|
| 72 | + backgroundColor: localView == ConstructTypeEnum.vocab |
| 73 | + ? Theme.of(context).colorScheme.primary.withAlpha(50) |
| 74 | + : Theme.of(context).colorScheme.surface, |
80 | 75 | ),
|
| 76 | + label: Text(L10n.of(context).vocab), |
| 77 | + icon: const Icon(Symbols.dictionary), |
| 78 | + onPressed: () => setState(() { |
| 79 | + localView = ConstructTypeEnum.vocab; |
| 80 | + localConstructZoom = null; |
| 81 | + }), |
81 | 82 | ),
|
82 |
| - Padding( |
83 |
| - padding: const EdgeInsets.all(8.0), |
84 |
| - child: SizedBox( |
85 |
| - height: 30.0, |
86 |
| - width: 30.0, |
87 |
| - child: InkWell( |
88 |
| - child: Image.network( |
89 |
| - '${AppConfig.assetsBaseURL}/${AnalyticsConstants.morphIconFileName}', |
90 |
| - ), |
91 |
| - onTap: () => setState(() { |
92 |
| - localView = ConstructTypeEnum.morph; |
93 |
| - localConstructZoom = null; |
94 |
| - }), |
| 83 | + const SizedBox(width: 4.0), |
| 84 | + TextButton.icon( |
| 85 | + style: TextButton.styleFrom( |
| 86 | + shape: RoundedRectangleBorder( |
| 87 | + borderRadius: BorderRadius.circular(10.0), |
95 | 88 | ),
|
| 89 | + backgroundColor: localView == ConstructTypeEnum.morph |
| 90 | + ? Theme.of(context).colorScheme.primary.withAlpha(50) |
| 91 | + : Theme.of(context).colorScheme.surface, |
96 | 92 | ),
|
| 93 | + label: Text(L10n.of(context).grammar), |
| 94 | + icon: const Icon(Symbols.toys_and_games), |
| 95 | + onPressed: () => setState(() { |
| 96 | + localView = ConstructTypeEnum.morph; |
| 97 | + localConstructZoom = null; |
| 98 | + }), |
97 | 99 | ),
|
| 100 | + const SizedBox(width: 4.0), |
98 | 101 | ],
|
99 | 102 | ),
|
100 | 103 | body: localView == ConstructTypeEnum.morph
|
|
0 commit comments