From 4e9a5a25e68a22721ff9d2a2a0f9bfbcc8151cba Mon Sep 17 00:00:00 2001 From: Gordon Martin Date: Thu, 4 Jul 2024 23:02:02 +0100 Subject: [PATCH] custom lint --- .../model/game/chat_presets_controller.dart | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/lib/src/model/game/chat_presets_controller.dart b/lib/src/model/game/chat_presets_controller.dart index 509f9241ac..373cbcb531 100644 --- a/lib/src/model/game/chat_presets_controller.dart +++ b/lib/src/model/game/chat_presets_controller.dart @@ -10,9 +10,9 @@ part 'chat_presets_controller.g.dart'; @riverpod class ChatPresetsController extends _$ChatPresetsController { - late GameFullId gameId; + late GameFullId _gameId; - static const Map> presetMessages = { + static const Map> _presetMessages = { PresetMessageGroup.start: [ (label: 'HI', value: 'Hello'), (label: 'GL', value: 'Good luck'), @@ -30,12 +30,11 @@ class ChatPresetsController extends _$ChatPresetsController { @override Future build(GameFullId id) async { - gameId = id; + _gameId = id; - final gameCtrlProvider = gameControllerProvider(gameId); - final gameState = ref.read(gameCtrlProvider).value; + final gameState = ref.read(gameControllerProvider(_gameId)).value; - ref.listen(gameCtrlProvider, _handleGameStateChange); + ref.listen(gameControllerProvider(_gameId), _handleGameStateChange); if (gameState != null) { final presetMessageGroup = PresetMessageGroup.fromGame(gameState.game); @@ -43,8 +42,8 @@ class ChatPresetsController extends _$ChatPresetsController { const List alreadySaid = []; final initialState = ChatPresetsState( - presets: presetMessages, - gameId: gameId, + presets: _presetMessages, + gameId: _gameId, alreadySaid: alreadySaid, currentPresetMessageGroup: presetMessageGroup, ); @@ -52,8 +51,8 @@ class ChatPresetsController extends _$ChatPresetsController { return initialState; } else { return ChatPresetsState( - presets: presetMessages, - gameId: gameId, + presets: _presetMessages, + gameId: _gameId, alreadySaid: [], currentPresetMessageGroup: null, );