Update Events authored by Nicholas Sarian's avatar Nicholas Sarian
......@@ -23,4 +23,20 @@ class SendCreatePlayerEvent extends CreatePlayerEvent {
'password: $password, crew: $crew, major: $major, section: $section)';
}
}
```
\ No newline at end of file
```
Note: not all events need instance variables, as you can see in the `SendGetQuestEditingInformationEvent` in the [quest event](https://gitlab.engr.ship.edu/merlin/freshmanrpgsuite/-/blob/main/game_manager/lib/pages/quest/bloc/quest_event.dart) page. Whether you need instance variables or not depends on if the backend needs those variables. If the backend does not need any variables, the vent does not need to have any instance variables. Events are used to trigger the bloc to retrieve information. If an event has no instance variables, that means the backend does not require any instance variables to get the requested information.
It's worth noting that not all events require instance variables, as demonstrated by the `SendGetQuestEditingInformationEvent` in the [quest event](https://gitlab.engr.ship.edu/merlin/freshmanrpgsuite/-/blob/main/game_manager/lib/pages/quest/bloc/quest_event.dart) page.
```dart
class SendGetQuestEditingInformationEvent extends QuestEvent {
SendGetQuestEditingInformationEvent()
: super();
@override
String toString() {
return 'GetQuestEditingInformationEvent()';
}
}
```
The `SendGetQuestEditingInformationEvent` event, as shown in the code snippet above, is used to retrieve all the information on all the quests during the initial load of the quest page.
Whether an event requires instance variables or not depends on if the backend needs additional data or context to retrieve the requested data
\ No newline at end of file