Make header links work properly
This commit is contained in:
parent
373004f52a
commit
306defc6df
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue