backup.
This commit is contained in:
57
lib/pages/download.dart
Normal file
57
lib/pages/download.dart
Normal file
@@ -0,0 +1,57 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_wisetronic/widgets/general/download_apps.dart';
|
||||
import '../events/eventbus.dart';
|
||||
import '../events/events.dart';
|
||||
import '../generated/l10n.dart';
|
||||
import '../utils/double_back_to_close_app.dart';
|
||||
import '../widgets/general/bottom_nav.dart';
|
||||
import '../widgets/mobile/mobile_navigation_drawer.dart';
|
||||
import '../widgets/general/navigationbar.dart';
|
||||
import 'package:responsive_builder/responsive_builder.dart';
|
||||
|
||||
class Download extends StatefulWidget {
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
return DownloadState();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class DownloadState extends State<Download> {
|
||||
final _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
|
||||
return ResponsiveBuilder(
|
||||
builder: (context, sizingInformation) =>
|
||||
Scaffold(
|
||||
key: _scaffoldKey,
|
||||
appBar: NavigationBar(title: S.of(context).download,),
|
||||
drawer: sizingInformation.deviceScreenType == DeviceScreenType.mobile ? MobileNavigationDrawer() : null,
|
||||
body: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
DownloadApps(),
|
||||
],
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: BottomNav(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
eventBus.on<OpenDrawer>().listen((event) {
|
||||
if (mounted) {
|
||||
_scaffoldKey.currentState.openDrawer();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
@@ -19,10 +19,11 @@ import '../widgets/mobile/mobile_navigation_drawer.dart';
|
||||
import 'package:responsive_builder/responsive_builder.dart';
|
||||
|
||||
class Home extends StatefulWidget {
|
||||
final Locale locale;
|
||||
Locale locale;
|
||||
final String title;
|
||||
|
||||
Home(this.locale, {Key key, this.title}) : super(key: key);
|
||||
Home(Locale locale, {Key key, this.title}) :
|
||||
locale = locale ?? store.state.locale;
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
|
||||
Reference in New Issue
Block a user