Adding Bottom Navigation bar
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import 'package:firebase_auth/firebase_auth.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:le_kiosque_by_gcs/services/auth/auth.dart';
|
||||
import 'package:le_kiosque_by_gcs/ui/auth.dart';
|
||||
import 'package:le_kiosque_by_gcs/ui/main.dart';
|
||||
|
||||
class LandingPageView extends StatelessWidget {
|
||||
final Auth auth;
|
||||
|
||||
const LandingPageView({Key key, this.auth}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return StreamBuilder<User>(
|
||||
stream: auth.authStateChanges(),
|
||||
builder: (context, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.active) {
|
||||
if (snapshot.data == null) {
|
||||
return AuthView(auth: auth);
|
||||
} else {
|
||||
return MainView();
|
||||
}
|
||||
}
|
||||
else {
|
||||
return Scaffold(
|
||||
body: Center(
|
||||
child: CircularProgressIndicator(),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user