import 'package:flutter/material.dart'; import 'package:flutter_wisetronic/generated/l10n.dart'; import 'package:flutter_wisetronic/widgets/general/navigationbar_logo.dart'; import 'package:flutter_wisetronic/widgets/general/text_link.dart'; class DesktopNavigationBar extends StatefulWidget { const DesktopNavigationBar({Key key}) : super(key: key); @override State createState() { return DesktopNavigationBarState(); } } class DesktopNavigationBarState extends State { @override Widget build(BuildContext context) { String currentRoute = ModalRoute.of(context).settings.name; return Stack( children: [ Container( color: Colors.blue, height: 80.0, ), Container( height: 80.0, padding: EdgeInsets.only(left: 10.0, right: 10.0, top: 5.0, bottom: 5.0), child: Row( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [ NavigationBarLogo(), Expanded( child: Container( alignment: Alignment.centerRight, padding: EdgeInsets.only(left: 8.0, right: 16.0), child: SingleChildScrollView( scrollDirection: Axis.horizontal, child: Row( mainAxisSize: MainAxisSize.min, children: [ SizedBox(width: 20.0,), TextLink( S.of(context).home, '/', color: Colors.white, selected: currentRoute == '/', clearStack: true, ), SizedBox(width: 15.0,), TextLink( S.of(context).download, '/download', color: Colors.white, selected: currentRoute == '/download', ), SizedBox(width: 15.0,), TextLink( S.of(context).tutorials, '/tutorials', color: Colors.white, selected: currentRoute == '/tutorials', ), SizedBox(width: 15.0,), TextLink( S.of(context).support, '/support', color: Colors.white, selected: currentRoute == '/support', ), SizedBox(width: 15.0,), TextLink( S.of(context).shop, '/shop', color: Colors.white, selected: currentRoute == '/shop', ), SizedBox(width: 15.0,), TextLink( S.of(context).blog, '/blog', color: Colors.white, selected: currentRoute == '/blog', ), SizedBox(width: 15.0,), TextLink( S.of(context).login, '/login', color: Colors.white, selected: currentRoute == '/login', ), ], ), ), ), ), ], ), ), ], ); } }