diff --git a/lib/src/widgets/header.dart b/lib/src/widgets/header.dart index 93229df..7a65ab5 100644 --- a/lib/src/widgets/header.dart +++ b/lib/src/widgets/header.dart @@ -1,3 +1,4 @@ +import 'package:auto_route/auto_route.dart'; import 'package:flutter/material.dart'; import 'package:furman_now/src/utils/theme.dart'; @@ -28,13 +29,16 @@ class HeaderWidget extends StatelessWidget { )), ), if (link != null) - Text( - link!.text, - style: furmanTextStyle(const TextStyle( - color: Color(0xff755898), - fontSize: 12, - fontWeight: FontWeight.bold, - )), + GestureDetector( + onTap: () => context.router.navigate(link!.href), + child: Text( + link!.text, + style: furmanTextStyle(const TextStyle( + color: Color(0xff755898), + fontSize: 12, + fontWeight: FontWeight.bold, + )), + ), ), ], ), @@ -45,7 +49,7 @@ class HeaderWidget extends StatelessWidget { @immutable class HeaderLink { final String text; - final String href; + final PageRouteInfo href; const HeaderLink({ required this.text,