57 lines
1.5 KiB
Dart
57 lines
1.5 KiB
Dart
|
|
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();
|
|
}
|
|
});
|
|
|
|
}
|
|
} |