final
This commit is contained in:
@@ -34,7 +34,7 @@ import '../widgets/mobile/mobile_navigation_drawer.dart';
|
||||
class Home extends StatefulWidget {
|
||||
final String title;
|
||||
|
||||
Home({Key key, this.title = ''}) : super(key: key);
|
||||
Home({Key? key, this.title = ''}) : super(key: key);
|
||||
|
||||
@override
|
||||
State<StatefulWidget> createState() {
|
||||
@@ -46,11 +46,11 @@ class Home extends StatefulWidget {
|
||||
class HomeState extends State<Home> {
|
||||
final _scaffoldKey = GlobalKey<ScaffoldState>();
|
||||
List<Gallery> galleries = [];
|
||||
String content1Message;
|
||||
Map<String, dynamic> content2;
|
||||
String? content1Message;
|
||||
Map<String, dynamic>? content2;
|
||||
|
||||
StreamSubscription _sub;
|
||||
Uri _latestUri;
|
||||
StreamSubscription? _sub;
|
||||
Uri? _latestUri;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
@@ -74,8 +74,8 @@ class HomeState extends State<Home> {
|
||||
appBar: MiniNavigationBar(),
|
||||
drawer: sizingInformation.deviceScreenType == DeviceScreenType.mobile ? MobileNavigationDrawer() : null,
|
||||
body: DoubleBackToCloseAppWrapper(
|
||||
child: ScreenTypeLayout(
|
||||
mobile: SingleChildScrollView(
|
||||
child: ScreenTypeLayout.builder(
|
||||
mobile: (context) => SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@@ -86,7 +86,7 @@ class HomeState extends State<Home> {
|
||||
],
|
||||
),
|
||||
),
|
||||
tablet: SingleChildScrollView(
|
||||
tablet: (context) => SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
@@ -98,8 +98,8 @@ class HomeState extends State<Home> {
|
||||
],
|
||||
),
|
||||
),
|
||||
desktop: Scrollbar(
|
||||
isAlwaysShown: true,
|
||||
desktop: (context) => Scrollbar(
|
||||
thumbVisibility: true,
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
@@ -115,10 +115,10 @@ class HomeState extends State<Home> {
|
||||
),
|
||||
),
|
||||
),
|
||||
bottomNavigationBar: ScreenTypeLayout(
|
||||
mobile: MobileBottomNav(currentIndex: 0,),
|
||||
tablet: BottomNav(),
|
||||
desktop: BottomNav(),
|
||||
bottomNavigationBar: ScreenTypeLayout.builder(
|
||||
mobile: (context) => MobileBottomNav(currentIndex: 0,),
|
||||
tablet: (context) => BottomNav(),
|
||||
desktop: (context) => BottomNav(),
|
||||
),
|
||||
),
|
||||
);
|
||||
@@ -136,7 +136,7 @@ class HomeState extends State<Home> {
|
||||
_loadData();
|
||||
eventBus.on<OpenDrawer>().listen((event) {
|
||||
if (mounted) {
|
||||
_scaffoldKey.currentState.openDrawer();
|
||||
_scaffoldKey.currentState?.openDrawer();
|
||||
}
|
||||
});
|
||||
WidgetsBinding.instance.addPostFrameCallback((timeStamp) {
|
||||
@@ -163,7 +163,9 @@ class HomeState extends State<Home> {
|
||||
if (!mounted) return;
|
||||
_latestUri = Uri.base;
|
||||
print('uri base $_latestUri');
|
||||
eventBus.fire(OnGotDeepLinkUri(_latestUri));
|
||||
if (_latestUri != null) {
|
||||
eventBus.fire(OnGotDeepLinkUri(_latestUri!));
|
||||
}
|
||||
} else {
|
||||
// _sub = getUriLinksStream().listen((Uri uri) {
|
||||
// print('_sub should get uri $uri');
|
||||
|
||||
Reference in New Issue
Block a user