Bottom Navigation Destination
This commit is contained in:
@@ -0,0 +1,8 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class HomeView extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
}
|
||||||
+17
-6
@@ -1,7 +1,12 @@
|
|||||||
import 'package:firebase_auth/firebase_auth.dart';
|
import 'package:firebase_auth/firebase_auth.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/widgets.dart';
|
import 'package:flutter/widgets.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/home.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/news.dart';
|
||||||
import 'package:le_kiosque_by_gcs/ui/profile.dart';
|
import 'package:le_kiosque_by_gcs/ui/profile.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/search.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/setting.dart';
|
||||||
|
import 'package:le_kiosque_by_gcs/ui/subscription.dart';
|
||||||
|
|
||||||
class MainView extends StatefulWidget {
|
class MainView extends StatefulWidget {
|
||||||
@override
|
@override
|
||||||
@@ -12,9 +17,9 @@ class _MainViewState extends State<MainView> {
|
|||||||
int _selectedIndex = 0;
|
int _selectedIndex = 0;
|
||||||
|
|
||||||
List<Widget> _widgetOptions = [
|
List<Widget> _widgetOptions = [
|
||||||
Text('Index 0: Home'),
|
HomeView(),
|
||||||
Text('Index 1: Business'),
|
NewsView(),
|
||||||
Text('Index 2: School'),
|
SubscriptionView(),
|
||||||
ProfileView()
|
ProfileView()
|
||||||
];
|
];
|
||||||
|
|
||||||
@@ -26,10 +31,18 @@ class _MainViewState extends State<MainView> {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_showSettingView(BuildContext context) {
|
||||||
|
Navigator.of(context).push(
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => SettingView(),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
void _showSearchView(BuildContext context) {
|
void _showSearchView(BuildContext context) {
|
||||||
Navigator.of(context).push(
|
Navigator.of(context).push(
|
||||||
MaterialPageRoute(
|
MaterialPageRoute(
|
||||||
builder: (context) => Scaffold(),
|
builder: (context) => SearchView(),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -125,6 +138,4 @@ class _MainViewState extends State<MainView> {
|
|||||||
],
|
],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
_showSettingView(BuildContext context) {}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class NewsView extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class SearchView extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class SettingView extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
class SubscriptionView extends StatelessWidget {
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container();
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user