initial commit to gitea
This commit is contained in:
@@ -2,28 +2,25 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/rendering.dart';
|
||||
import 'package:flutter_wisetronic/widgets/desktop/desktop_appbar_menu.dart';
|
||||
import '../../widgets/general/breadcrumbs.dart';
|
||||
|
||||
import '../../constants.dart';
|
||||
import '../../dialog/logout_dialog.dart';
|
||||
import '../../events/eventbus.dart';
|
||||
import '../../events/events.dart';
|
||||
import '../../generated/l10n.dart';
|
||||
import '../../models/user.dart';
|
||||
import '../../routes.dart';
|
||||
import '../../store/store.dart';
|
||||
import '../../utils/utils.dart';
|
||||
import '../../widgets/general/navigationbar_logo.dart';
|
||||
import '../../widgets/general/text_link.dart';
|
||||
import '../../widgets/desktop/desktop_appbar_menu.dart';
|
||||
import '../../widgets/general/breadcrumbs.dart';
|
||||
import '../../widgets/general/navigationbar.dart';
|
||||
|
||||
class DesktopNavigationBar extends StatefulWidget {
|
||||
final bool hasBack;
|
||||
final List<BreadCrumb> breadCrumbs;
|
||||
final Widget shoppingCart;
|
||||
final OnBackPress onBackPress;
|
||||
|
||||
const DesktopNavigationBar({Key key, this.hasBack, this.breadCrumbs,
|
||||
this.shoppingCart}) : super(key: key);
|
||||
this.shoppingCart, this.onBackPress}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
@@ -37,132 +34,6 @@ class DesktopNavigationBarState extends State<DesktopNavigationBar> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
// String currentRoute = ModalRoute.of(context).settings.name;
|
||||
// Stack stack = 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,
|
||||
// '/my-support/${Constants.BUSINESS_ID}',
|
||||
// color: Colors.white,
|
||||
// selected: currentRoute == '/my-support/${Constants.BUSINESS_ID}',
|
||||
// ),
|
||||
// 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/${Constants.BUSINESS_ID}',
|
||||
// color: Colors.white,
|
||||
// selected: currentRoute == '/blog/${Constants.BUSINESS_ID}',
|
||||
// ),
|
||||
// SizedBox(width: 15.0,),
|
||||
// _user != null ?
|
||||
// (currentRoute == '/me') ?
|
||||
// MouseRegion(
|
||||
// cursor: SystemMouseCursors.click,
|
||||
// child: GestureDetector(
|
||||
// child: Row(
|
||||
// mainAxisAlignment: MainAxisAlignment.start,
|
||||
// crossAxisAlignment: CrossAxisAlignment.start,
|
||||
// children: [
|
||||
// Container(
|
||||
// padding: EdgeInsets.only(right: 4.0),
|
||||
// child: Text(
|
||||
// S.of(context).logout,
|
||||
// style: TextStyle(
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Icon(
|
||||
// Icons.logout,
|
||||
// color: Colors.white,
|
||||
// size: 16.0,
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// onTap: () {
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// builder: (BuildContext context) {
|
||||
// return logoutDialog(context);
|
||||
// }
|
||||
// );
|
||||
// },
|
||||
// ),
|
||||
// ) : IconButton(
|
||||
// icon: Icon(
|
||||
// Icons.account_circle,
|
||||
// color: Colors.white,
|
||||
// ),
|
||||
// onPressed: () {
|
||||
// Routes.router.navigateTo(context, '/me');
|
||||
// },
|
||||
// ) :
|
||||
// TextLink(
|
||||
// S.of(context).login,
|
||||
// '/login',
|
||||
// color: Colors.white,
|
||||
// selected: currentRoute == '/login',
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// );
|
||||
Widget sc = SizedBox.shrink();
|
||||
if (widget.shoppingCart != null) {
|
||||
sc = widget.shoppingCart;
|
||||
@@ -171,8 +42,8 @@ class DesktopNavigationBarState extends State<DesktopNavigationBar> {
|
||||
if (widget.breadCrumbs != null && widget.breadCrumbs.length > 0) {
|
||||
breadCrumbBar = Container(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: 38.0,
|
||||
color: Color(0xFF4FB0C6),
|
||||
height: Constants.BREADCRUMB_HEIGHT,
|
||||
padding: EdgeInsets.only(top: 6.0),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -180,6 +51,7 @@ class DesktopNavigationBarState extends State<DesktopNavigationBar> {
|
||||
Expanded(
|
||||
child: BreadCrumbs(
|
||||
widget.hasBack ?? false,
|
||||
onBackPress: widget.onBackPress,
|
||||
breadCrumbs: widget.breadCrumbs,
|
||||
),
|
||||
),
|
||||
@@ -189,14 +61,18 @@ class DesktopNavigationBarState extends State<DesktopNavigationBar> {
|
||||
),
|
||||
],
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.black12,
|
||||
border: Border(
|
||||
bottom: BorderSide(
|
||||
width: 1.0,
|
||||
color: Colors.black26,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
// stack.children.add(
|
||||
// Positioned(
|
||||
// top: 90.0,
|
||||
// child: breadCrumbBar,
|
||||
// ),
|
||||
// );
|
||||
|
||||
return Column(
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
Reference in New Issue
Block a user