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:flutter/material.dart';
|
||||||
import 'package:furman_now/src/utils/theme.dart';
|
import 'package:furman_now/src/utils/theme.dart';
|
||||||
|
|
||||||
|
@ -28,7 +29,9 @@ class HeaderWidget extends StatelessWidget {
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
if (link != null)
|
if (link != null)
|
||||||
Text(
|
GestureDetector(
|
||||||
|
onTap: () => context.router.navigate(link!.href),
|
||||||
|
child: Text(
|
||||||
link!.text,
|
link!.text,
|
||||||
style: furmanTextStyle(const TextStyle(
|
style: furmanTextStyle(const TextStyle(
|
||||||
color: Color(0xff755898),
|
color: Color(0xff755898),
|
||||||
|
@ -36,6 +39,7 @@ class HeaderWidget extends StatelessWidget {
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -45,7 +49,7 @@ class HeaderWidget extends StatelessWidget {
|
||||||
@immutable
|
@immutable
|
||||||
class HeaderLink {
|
class HeaderLink {
|
||||||
final String text;
|
final String text;
|
||||||
final String href;
|
final PageRouteInfo href;
|
||||||
|
|
||||||
const HeaderLink({
|
const HeaderLink({
|
||||||
required this.text,
|
required this.text,
|
||||||
|
|
Loading…
Reference in New Issue