feat: add home and profile screens

This commit is contained in:
soragui
2026-01-19 14:56:39 +08:00
parent 0ade16350a
commit 12ff1d61c2
4 changed files with 116 additions and 13 deletions

View File

@@ -1,18 +1,11 @@
import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
class AuthState extends ChangeNotifier {
User? _user;
User? get user => _user;
bool _isLoggedIn = false;
bool get isLoggedIn => _isLoggedIn;
final FirebaseAuth _auth = FirebaseAuth.instance;
AuthState() {
_auth.authStateChanges().listen((user) {
_user = user;
notifyListeners();
});
void toggleLogin() {
_isLoggedIn = !_isLoggedIn;
notifyListeners();
}
bool get isLoggedIn => _user != null;
}