GameManager class

A class to manage the games

Constructors

GameManager({Map<String, Game> games = const {}, String username = "Player", String? databaseRefInp, Widget? homeScreen, Widget? joinRoomScreen, Widget? roomNotFoundWidget, Widget lobbyScreenGenerator(BuildContext, Room) = generateDefaultLobbyScreen})

Properties

databaseRefStr ↔ String
getter/setter pair
games → Map<String, Game>
no setter
hashCode → int
The hash code for this object.
no setterinherited
homeScreen ↔ Widget?
getter/setter pair
joinRoomScreen ↔ Widget?
getter/setter pair
lobbyScreenGenerator ↔ Widget Function(BuildContext, Room)
getter/setter pair
roomNotFoundWidget ↔ Widget
getter/setter pair
roomRef → DatabaseReference?
no setter
routes → dynamic
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
username ↔ String
getter/setter pair

Methods

addGame(String name, Game gameManagerGetter) → String
createRoom(String gameName) → Future<Room>
Function to create a room
generateRandomRoomId() → String
getGame(String name) → Game
Function to get a game prefab
getRoom(String id) → Room
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited