made changes to feed page

This commit is contained in:
SomnusVeritas
2023-10-20 21:26:41 +02:00
parent 7cc2850ab3
commit be468d9b32
2 changed files with 46 additions and 9 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:maggs_victory_voyage/pages/feed_page.dart';
import 'package:maggs_victory_voyage/services/db_helper.dart';
import 'package:provider/provider.dart';
@@ -15,6 +16,11 @@ class SplashPage extends StatefulWidget {
class _SplashPageState extends State<SplashPage> {
late final Future<bool> loginFuture;
int currentPageIndex = 0;
final List<Widget> tabs = [
const FeedPage(),
const FeedPage(),
const FeedPage(),
];
@override
void initState() {
@@ -47,15 +53,16 @@ class _SplashPageState extends State<SplashPage> {
Provider.of<Feed>(context, listen: false).feed;
return Scaffold(
body: const Column(
children: [
Text('Logged in!'),
TextButton(
onPressed: DbHelper.logout,
child: Text('Log out'),
),
],
),
body: tabs.elementAt(currentPageIndex),
// const Column(
// children: [
// Text('Logged in!'),
// TextButton(
// onPressed: DbHelper.logout,
// child: Text('Log out'),
// ),
// ],
// ),
bottomNavigationBar: BottomNavigationBar(
items: const <BottomNavigationBarItem>[
BottomNavigationBarItem(