DealORound / Deal-O-Round

Flutter port of the Deal-O-Round board card game
MIT License
2 stars 0 forks source link

Use Get DI service to separate Preferences and sound effect, sound track logic #4

Closed MrCsabaToth closed 4 years ago

MrCsabaToth commented 4 years ago

https://medium.com/flutter-community/flutter-fast-dependency-injection-5748d956bb5c Get looks like a nice DI concept plus it provides some short hand commands like media width. Right now the Preferences handling is not centralized enough. Maybe the Rules can be a service as well.

MrCsabaToth commented 4 years ago

Get is now introduced with https://github.com/CsabaConsulting/Deal-O-Round/commit/8a2ebc6369e41d62596978288eacdf9b63f1525d but currently I'm only using shorthands for navigation, media queries and snackbars. We'll have DI later when the game logic is refactored more.

MrCsabaToth commented 4 years ago

Now Get is used for the sound effects and background music sound tracks as well. The game logic could be refactored, although that may not even need Get, just logic transfer from the GamePage into the logic/Board.