Fix navigation gradient (#2657)

* Fix navigation gradient

tuxsudo committed Nov 18, 2025 at 12:42 UTC d51be0577bb0034af52b78e05c568281b24417cb
2 files changed +43 -44
lib/src/screens/dashboard/dashboard_page.dart
+43 -18
@@ -34,6 +34,7 @@ import 'package:shared_preferences/shared_preferences.dart';
34 import 'package:smooth_page_indicator/smooth_page_indicator.dart';
35 import 'package:cake_wallet/main.dart';
36 import 'package:cake_wallet/src/screens/release_notes/release_notes_screen.dart';
37 +import 'package:cake_wallet/themes/core/theme_extension.dart';
38
39 class DashboardPage extends StatefulWidget {
40 DashboardPage({
@@ -232,27 +233,51 @@ class _DashboardPageView extends BasePage {
233 );
234 },
235 ),
235 - Positioned(
236 - child: Container(
237 - alignment: Alignment.bottomCenter,
238 - margin: EdgeInsets.only(bottom: 110),
239 - child: Semantics(
240 - container: true,
241 - label: 'Page indicator',
242 - hint: 'Swipe left or right to change page, or double tap buttons below to navigate directly.',
243 - child: ExcludeSemantics(
244 - excluding: false,
245 - child: PageIndicator(
246 - controller: controller,
247 - dashboardViewModel: dashboardViewModel,
236 + Stack(
237 + alignment: Alignment.bottomCenter,
238 + children: <Widget>[
239 + IgnorePointer(
240 + child: Container(
241 + alignment: Alignment.bottomCenter,
242 + height: 220,
243 + decoration: BoxDecoration(
244 + gradient: LinearGradient(
245 + begin: Alignment.topCenter,
246 + end: Alignment.bottomCenter,
247 + colors: <Color>[
248 + context.customColors.backgroundGradientColor.withAlpha(5),
249 + context.customColors.backgroundGradientColor.withAlpha(50),
250 + context.customColors.backgroundGradientColor.withAlpha(125),
251 + context.customColors.backgroundGradientColor.withAlpha(150),
252 + context.customColors.backgroundGradientColor.withAlpha(200),
253 + context.customColors.backgroundGradientColor,
254 + context.customColors.backgroundGradientColor,
255 + ],
256 + ),
257 + ),
258 ),
259 ),
250 - ),
251 - ),
260 + Container(
261 + margin: EdgeInsets.only(bottom: 110),
262 + child: Semantics(
263 + container: true,
264 + label: 'Page indicator',
265 + hint:
266 + 'Swipe left or right to change page, or double tap buttons below to navigate directly.',
267 + child: ExcludeSemantics(
268 + excluding: false,
269 + child: PageIndicator(
270 + controller: controller,
271 + dashboardViewModel: dashboardViewModel,
272 + ),
273 + ),
274 + ),
275 + ),
276 + NavigationDock(
277 + dashboardViewModel: dashboardViewModel,
278 + )
279 + ],
280 ),
253 - NavigationDock(
254 - dashboardViewModel: dashboardViewModel,
255 - )
281 ],
282 ),
283 ),
lib/src/screens/dashboard/pages/navigation_dock.dart
-26
@@ -21,23 +21,9 @@ class NavigationDock extends StatelessWidget {
21 return Container(
22 height: 84,
23 alignment: Alignment.bottomCenter,
24 - decoration: dashboardViewModel.settingsStore.backgroundImage.isEmpty
25 - ? BoxDecoration(
26 - gradient: LinearGradient(
27 - begin: Alignment.topCenter,
28 - end: Alignment.bottomCenter,
29 - colors: _getColors(context),
30 - ),
31 - )
32 - : null,
24 child: Container(
25 decoration: BoxDecoration(
26 borderRadius: BorderRadius.circular(50),
36 - gradient: LinearGradient(
37 - begin: Alignment.topCenter,
38 - end: Alignment.bottomCenter,
39 - colors: _getColors(context),
40 - ),
27 ),
28 margin: const EdgeInsets.only(left: 8, right: 8, bottom: 16),
29 child: ClipRRect(
@@ -105,16 +91,4 @@ class NavigationDock extends StatelessWidget {
91 ),
92 );
93 }
108 -
109 - List<Color> _getColors(BuildContext context) {
110 - return <Color>[
111 - context.customColors.backgroundGradientColor.withAlpha(5),
112 - context.customColors.backgroundGradientColor.withAlpha(50),
113 - context.customColors.backgroundGradientColor.withAlpha(125),
114 - context.customColors.backgroundGradientColor.withAlpha(150),
115 - context.customColors.backgroundGradientColor.withAlpha(200),
116 - context.customColors.backgroundGradientColor,
117 - context.customColors.backgroundGradientColor,
118 - ];
119 - }
94 }