backup. before shop update
This commit is contained in:
@@ -1,21 +1,31 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/widgets/desktop/desktop_navigationbar.dart';
|
||||
import 'package:flutter_wisetronic/widgets/mobile/mobile_navigationbar.dart';
|
||||
import 'package:responsive_builder/responsive_builder.dart';
|
||||
|
||||
import '../../widgets/desktop/desktop_navigationbar.dart';
|
||||
import '../../widgets/mobile/mobile_navigationbar.dart';
|
||||
import 'breadcrumbs.dart';
|
||||
|
||||
class NavigationBar extends StatefulWidget implements PreferredSizeWidget {
|
||||
final Key key;
|
||||
final PreferredSizeWidget bottom;
|
||||
final String title;
|
||||
final bool back;
|
||||
final bool toHome;
|
||||
final bool showMe;
|
||||
final List<BreadCrumb> breadCrumbs;
|
||||
final double breadCrumbHeight;
|
||||
final Widget shoppingCart;
|
||||
|
||||
NavigationBar({Key key, PreferredSizeWidget bottom, String title, bool back})
|
||||
NavigationBar({Key key, PreferredSizeWidget bottom, String title,
|
||||
bool back, bool toHome, bool showMe, this.breadCrumbs,
|
||||
this.breadCrumbHeight, this.shoppingCart})
|
||||
: key = key,
|
||||
preferredSize = Size.fromHeight(kToolbarHeight + (bottom?.preferredSize?.height ?? 0.0)),
|
||||
bottom = bottom,
|
||||
preferredSize = breadCrumbHeight != null ? Size.fromHeight(kToolbarHeight + breadCrumbHeight) :
|
||||
Size.fromHeight(kToolbarHeight),
|
||||
title = title ?? '',
|
||||
back = back ?? false;
|
||||
back = back ?? false,
|
||||
toHome = toHome ?? false,
|
||||
showMe = showMe ?? true;
|
||||
|
||||
@override
|
||||
final Size preferredSize;
|
||||
@@ -32,10 +42,17 @@ class NavigationBarState extends State<NavigationBar> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ScreenTypeLayout(
|
||||
mobile: MobileNavigationBar(title: widget.title, back: widget.back,),
|
||||
tablet: DesktopNavigationBar(),
|
||||
desktop: DesktopNavigationBar(),
|
||||
mobile: MobileNavigationBar(title: widget.title, back: widget.back,
|
||||
toHome: widget.toHome, showMe: widget.showMe,),
|
||||
tablet: DesktopNavigationBar(hasBack: widget.back,
|
||||
breadCrumbs: widget.breadCrumbs, shoppingCart: widget.shoppingCart,),
|
||||
desktop: DesktopNavigationBar(hasBack: widget.back,
|
||||
breadCrumbs: widget.breadCrumbs, shoppingCart: widget.shoppingCart,),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user