fix
This commit is contained in:
@ -1,4 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:momo/material/gallery.dart';
|
||||
|
||||
class HomePage extends StatefulWidget {
|
||||
const HomePage({Key? key}) : super(key: key);
|
||||
@ -14,16 +16,21 @@ class _HomePageState extends State<HomePage> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
backgroundColor: Colors.pinkAccent,
|
||||
title: const Text("APP"),
|
||||
title: const Text(
|
||||
"App Header",
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
elevation: 10,
|
||||
),
|
||||
body: Row(
|
||||
children: [
|
||||
MediaQuery.of(context).size.width > 640
|
||||
? NavigationRail(
|
||||
elevation: 10,
|
||||
backgroundColor: const Color(0xffebf6f5),
|
||||
leading: MediaQuery.of(context).size.width >= 1008
|
||||
? const Text(
|
||||
"Header",
|
||||
"Side Header",
|
||||
style: TextStyle(
|
||||
fontWeight: FontWeight.bold, fontSize: 36),
|
||||
)
|
||||
@ -43,11 +50,13 @@ class _HomePageState extends State<HomePage> {
|
||||
selectedIndex: selectedIndex)
|
||||
: const SizedBox(
|
||||
width: 0,
|
||||
)
|
||||
),
|
||||
Expanded(child: pageList[selectedIndex])
|
||||
],
|
||||
),
|
||||
bottomNavigationBar: MediaQuery.of(context).size.width <= 640
|
||||
? BottomNavigationBar(
|
||||
elevation: 10,
|
||||
currentIndex: selectedIndex,
|
||||
onTap: (idx) {
|
||||
setState(() {
|
||||
@ -63,3 +72,10 @@ class _HomePageState extends State<HomePage> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
List<Widget> pageList = [
|
||||
Gallery(),
|
||||
Scaffold(
|
||||
body: Placeholder(),
|
||||
)
|
||||
];
|
||||
|
Reference in New Issue
Block a user