wip: info page and GET app login / settings
This commit is contained in:
@@ -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;
|
||||
}
|
Reference in New Issue
Block a user