@@ -49,6 +49,27 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
4949 super .dispose ();
5050 }
5151
52+ String _getDecoratorDescription (
53+ BuildContext context,
54+ FeedDecoratorType type,
55+ ) {
56+ final l10n = AppLocalizationsX (context).l10n;
57+ switch (type) {
58+ case FeedDecoratorType .linkAccount:
59+ return l10n.feedDecoratorLinkAccountDescription;
60+ case FeedDecoratorType .upgrade:
61+ return l10n.feedDecoratorUpgradeDescription;
62+ case FeedDecoratorType .rateApp:
63+ return l10n.feedDecoratorRateAppDescription;
64+ case FeedDecoratorType .enableNotifications:
65+ return l10n.feedDecoratorEnableNotificationsDescription;
66+ case FeedDecoratorType .suggestedTopics:
67+ return l10n.feedDecoratorSuggestedTopicsDescription;
68+ case FeedDecoratorType .suggestedSources:
69+ return l10n.feedDecoratorSuggestedSourcesDescription;
70+ }
71+ }
72+
5273 @override
5374 Widget build (BuildContext context) {
5475 final l10n = AppLocalizationsX (context).l10n;
@@ -62,14 +83,28 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
6283 builder: (context, expandedIndex, child) {
6384 const tileIndex = 0 ;
6485 return ExpansionTile (
86+ leading: Icon (
87+ Icons .paid_outlined,
88+ color: Theme .of (context).colorScheme.onSurface.withOpacity (
89+ 0.7 ,
90+ ),
91+ ),
6592 key: ValueKey ('advertisementsTile_$expandedIndex ' ),
6693 title: Text (l10n.advertisementsTab),
67- onExpansionChanged: (isExpanded) {
94+ subtitle: Text (
95+ l10n.advertisementsDescription,
96+ style: Theme .of (context).textTheme.bodySmall? .copyWith (
97+ color: Theme .of (
98+ context,
99+ ).colorScheme.onSurface.withOpacity (0.7 ),
100+ ),
101+ ),
102+ onExpansionChanged: (bool isExpanded) {
68103 _expandedTileIndex.value = isExpanded ? tileIndex : null ;
69104 },
70105 initiallyExpanded: expandedIndex == tileIndex,
71106 childrenPadding: const EdgeInsetsDirectional .only (
72- start: AppSpacing .lg ,
107+ start: AppSpacing .xxl ,
73108 top: AppSpacing .md,
74109 bottom: AppSpacing .md,
75110 ),
@@ -106,14 +141,28 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
106141 builder: (context, expandedIndex, child) {
107142 const tileIndex = 1 ;
108143 return ExpansionTile (
144+ leading: Icon (
145+ Icons .notifications_active_outlined,
146+ color: Theme .of (context).colorScheme.onSurface.withOpacity (
147+ 0.7 ,
148+ ),
149+ ),
109150 key: ValueKey ('pushNotificationsTile_$expandedIndex ' ),
110151 title: Text (l10n.notificationsTab),
111- onExpansionChanged: (isExpanded) {
152+ subtitle: Text (
153+ l10n.notificationsDescription,
154+ style: Theme .of (context).textTheme.bodySmall? .copyWith (
155+ color: Theme .of (
156+ context,
157+ ).colorScheme.onSurface.withOpacity (0.7 ),
158+ ),
159+ ),
160+ onExpansionChanged: (bool isExpanded) {
112161 _expandedTileIndex.value = isExpanded ? tileIndex : null ;
113162 },
114163 initiallyExpanded: expandedIndex == tileIndex,
115164 childrenPadding: const EdgeInsetsDirectional .only (
116- start: AppSpacing .lg ,
165+ start: AppSpacing .xxl ,
117166 top: AppSpacing .md,
118167 bottom: AppSpacing .md,
119168 ),
@@ -135,37 +184,50 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
135184 builder: (context, expandedIndex, child) {
136185 const tileIndex = 2 ;
137186 return ExpansionTile (
187+ leading: Icon (
188+ Icons .dynamic_feed_outlined,
189+ color: Theme .of (context).colorScheme.onSurface.withOpacity (
190+ 0.7 ,
191+ ),
192+ ),
138193 key: ValueKey ('feedTile_$expandedIndex ' ),
139194 title: Text (l10n.feedTab),
140- onExpansionChanged: (isExpanded) {
195+ subtitle: Text (
196+ l10n.feedDescription,
197+ style: Theme .of (context).textTheme.bodySmall? .copyWith (
198+ color: Theme .of (
199+ context,
200+ ).colorScheme.onSurface.withOpacity (0.7 ),
201+ ),
202+ ),
203+ onExpansionChanged: (bool isExpanded) {
141204 _expandedTileIndex.value = isExpanded ? tileIndex : null ;
142205 },
143206 initiallyExpanded: expandedIndex == tileIndex,
144207 childrenPadding: const EdgeInsetsDirectional .only (
145- start: AppSpacing .lg ,
208+ start: AppSpacing .xxl ,
146209 top: AppSpacing .md,
147210 bottom: AppSpacing .md,
148211 ),
149212 expandedCrossAxisAlignment: CrossAxisAlignment .start,
150213 children: [
151214 ExpansionTile (
152215 title: Text (l10n.feedItemClickBehaviorTitle),
216+ subtitle: Text (
217+ l10n.feedItemClickBehaviorDescription,
218+ style: Theme .of (context).textTheme.bodySmall? .copyWith (
219+ color: Theme .of (
220+ context,
221+ ).colorScheme.onSurface.withOpacity (0.7 ),
222+ ),
223+ ),
153224 childrenPadding: const EdgeInsetsDirectional .only (
154225 start: AppSpacing .lg,
155226 top: AppSpacing .md,
156227 bottom: AppSpacing .md,
157228 ),
158229 expandedCrossAxisAlignment: CrossAxisAlignment .start,
159230 children: [
160- Text (
161- l10n.feedItemClickBehaviorDescription,
162- style: Theme .of (context).textTheme.bodySmall? .copyWith (
163- color: Theme .of (
164- context,
165- ).colorScheme.onSurface.withOpacity (0.7 ),
166- ),
167- ),
168- const SizedBox (height: AppSpacing .lg),
169231 Align (
170232 alignment: AlignmentDirectional .centerStart,
171233 child: SegmentedButton <FeedItemClickBehavior >(
@@ -203,27 +265,35 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
203265 const SizedBox (height: AppSpacing .lg),
204266 ExpansionTile (
205267 title: Text (l10n.feedDecoratorsTitle),
268+ subtitle: Text (
269+ l10n.feedDecoratorsDescription,
270+ style: Theme .of (context).textTheme.bodySmall? .copyWith (
271+ color: Theme .of (
272+ context,
273+ ).colorScheme.onSurface.withOpacity (0.7 ),
274+ ),
275+ ),
206276 childrenPadding: const EdgeInsetsDirectional .only (
207277 start: AppSpacing .lg,
208278 top: AppSpacing .md,
209279 bottom: AppSpacing .md,
210280 ),
211281 expandedCrossAxisAlignment: CrossAxisAlignment .start,
212282 children: [
213- Text (
214- l10n.feedDecoratorsDescription,
215- style: Theme .of (context).textTheme.bodySmall? .copyWith (
216- color: Theme .of (
217- context,
218- ).colorScheme.onSurface.withOpacity (0.7 ),
219- ),
220- ),
221- const SizedBox (height: AppSpacing .lg),
222283 for (final decoratorType in FeedDecoratorType .values)
223284 Padding (
224285 padding: const EdgeInsets .only (bottom: AppSpacing .md),
225286 child: ExpansionTile (
226287 title: Text (decoratorType.l10n (context)),
288+ subtitle: Text (
289+ _getDecoratorDescription (context, decoratorType),
290+ style: Theme .of (context).textTheme.bodySmall
291+ ? .copyWith (
292+ color: Theme .of (
293+ context,
294+ ).colorScheme.onSurface.withOpacity (0.7 ),
295+ ),
296+ ),
227297 childrenPadding: const EdgeInsetsDirectional .only (
228298 start: AppSpacing .xl,
229299 top: AppSpacing .md,
@@ -253,6 +323,12 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
253323 builder: (context, expandedIndex, child) {
254324 const tileIndex = 3 ;
255325 return ExpansionTile (
326+ leading: Icon (
327+ Icons .groups_outlined,
328+ color: Theme .of (context).colorScheme.onSurface.withOpacity (
329+ 0.7 ,
330+ ),
331+ ),
256332 key: ValueKey ('communityTile_$expandedIndex ' ),
257333 title: Text (l10n.communityAndEngagementTitle),
258334 subtitle: Text (
@@ -263,12 +339,12 @@ class _FeaturesConfigurationTabState extends State<FeaturesConfigurationTab> {
263339 ).colorScheme.onSurface.withOpacity (0.7 ),
264340 ),
265341 ),
266- onExpansionChanged: (isExpanded) {
342+ onExpansionChanged: (bool isExpanded) {
267343 _expandedTileIndex.value = isExpanded ? tileIndex : null ;
268344 },
269345 initiallyExpanded: expandedIndex == tileIndex,
270346 childrenPadding: const EdgeInsetsDirectional .only (
271- start: AppSpacing .lg ,
347+ start: AppSpacing .xxl ,
272348 top: AppSpacing .md,
273349 bottom: AppSpacing .md,
274350 ),
0 commit comments