primaryPlayerProvider top-level property
Implementation
final primaryPlayerProvider = StateNotifierProvider<PlayerStateNotifier, PlayerState?>((ref) {
final playerNotifier = ref.watch(
pluginStateProvider.select((value) => value.players[value.primaryPlayerId]),
);
if (playerNotifier == null) return PlayerStateNotifier(keepAlive: false);
return playerNotifier;
});