backup. before shop update
This commit is contained in:
66
lib/pages/tutorials.dart
Normal file
66
lib/pages/tutorials.dart
Normal file
@@ -0,0 +1,66 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:responsive_builder/responsive_builder.dart';
|
||||
|
||||
import '../constants.dart';
|
||||
import '../events/eventbus.dart';
|
||||
import '../events/events.dart';
|
||||
import '../generated/l10n.dart';
|
||||
import '../widgets/desktop/desktop_tutorials.dart';
|
||||
import '../widgets/general/bottom_nav.dart';
|
||||
import '../widgets/general/breadcrumbs.dart';
|
||||
import '../widgets/general/navigationbar.dart';
|
||||
import '../widgets/mobile/MobileBottomNav.dart';
|
||||
import '../widgets/mobile/mobile_navigation_drawer.dart';
|
||||
import '../widgets/mobile/mobile_tutorials.dart';
|
||||
|
||||
class Tutorials extends StatefulWidget {
|
||||
const Tutorials({Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return TutorialsState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class TutorialsState extends State<Tutorials> {
|
||||
final _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return ResponsiveBuilder(
|
||||
builder: (context, sizingInformation) =>
|
||||
Scaffold(
|
||||
key: _scaffoldKey,
|
||||
appBar: NavigationBar(
|
||||
title: S.of(context).tutorials,
|
||||
back: true,
|
||||
breadCrumbs: [BreadCrumb(S.of(context).tutorials, null)],
|
||||
breadCrumbHeight: sizingInformation.deviceScreenType == DeviceScreenType.mobile ? null : Constants.BREADCRUMB_HEIGHT,
|
||||
),
|
||||
drawer: null,
|
||||
body: ScreenTypeLayout(
|
||||
mobile: MobileTutorials(),
|
||||
tablet: DesktopTutorials(),
|
||||
desktop: DesktopTutorials(),
|
||||
),
|
||||
bottomNavigationBar: ScreenTypeLayout(
|
||||
mobile: MobileBottomNav(currentIndex: 0,),
|
||||
tablet: BottomNav(),
|
||||
desktop: BottomNav(),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
eventBus.on<OpenDrawer>().listen((event) {
|
||||
if (mounted) {
|
||||
_scaffoldKey.currentState.openDrawer();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user