Adding Bottom Navigation bar

This commit is contained in:
2021-03-18 00:44:33 +02:00
parent caa7f5e2f9
commit 6bf2b46059
19 changed files with 454 additions and 63 deletions
+34
View File
@@ -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(),
),
);
}
}
);
}
}