wip: info page and GET app login / settings

This commit is contained in:
2022-11-18 15:56:37 -05:00
parent 4a698e61d2
commit 67efdc0289
24 changed files with 1461 additions and 355 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:furman_now/src/services/buildings/buildings_service.dart';
import 'package:furman_now/src/services/events/event.dart';
import 'package:furman_now/src/services/events/events_service.dart';
import 'package:furman_now/src/services/restaurants/restaurant_service.dart';
@@ -6,6 +7,7 @@ import 'package:furman_now/src/services/restaurants/restaurant_service.dart';
class AppState extends ChangeNotifier {
late Future<List<Event>> events;
late Future<List<Restaurant>> restaurants;
late Future<List<Building>> buildings;
AppState() {
refresh();
@@ -14,20 +16,22 @@ class AppState extends ChangeNotifier {
void refresh() {
events = EventsService.fetchEvents();
restaurants = RestaurantService.fetchRestaurants();
buildings = BuildingsService.fetchBuildings();
notifyListeners();
}
@override
int get hashCode =>
events.hashCode ^
restaurants.hashCode;
events.hashCode ^
restaurants.hashCode ^
buildings.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is AppState &&
runtimeType == other.runtimeType &&
events == other.events &&
restaurants == other.restaurants;
identical(this, other) ||
other is AppState &&
runtimeType == other.runtimeType &&
events == other.events &&
restaurants == other.restaurants &&
buildings == other.buildings;
}