Initial commit: monorepo Match Live TV.
Rails API, app Flutter, infrastruttura Docker/MediaMTX, sito marketing e documentazione di deploy. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
12
mobile/lib/providers/match_rules_provider.dart
Normal file
12
mobile/lib/providers/match_rules_provider.dart
Normal file
@@ -0,0 +1,12 @@
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
|
||||
import '../shared/scoring/match_scoring_rules.dart';
|
||||
import 'session_provider.dart';
|
||||
|
||||
final matchScoringRulesProvider = Provider<MatchScoringRules>((ref) {
|
||||
final match = ref.watch(sessionProvider).match;
|
||||
if (match == null) {
|
||||
return const MatchScoringRules(setsToWin: 3);
|
||||
}
|
||||
return MatchScoringRules.fromMatch(match);
|
||||
});
|
||||
Reference in New Issue
Block a user