Billing upgrade/downgrade, inviti in app e diretta YouTube da mobile.
Upgrade Stripe con addebito immediato; downgrade programmato a fine periodo. UX billing più sobria con box info; icone piani. API inviti e OAuth YouTube per staff trasmissione; deep link join; scelta partita programmata o nuova. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
28
mobile/lib/shared/models/invite_preview.dart
Normal file
28
mobile/lib/shared/models/invite_preview.dart
Normal file
@@ -0,0 +1,28 @@
|
||||
class InvitePreview {
|
||||
const InvitePreview({
|
||||
required this.valid,
|
||||
required this.email,
|
||||
required this.teamName,
|
||||
this.clubName,
|
||||
this.teamId,
|
||||
this.error,
|
||||
});
|
||||
|
||||
final bool valid;
|
||||
final String email;
|
||||
final String teamName;
|
||||
final String? clubName;
|
||||
final String? teamId;
|
||||
final String? error;
|
||||
|
||||
factory InvitePreview.fromJson(Map<String, dynamic> json) {
|
||||
return InvitePreview(
|
||||
valid: json['valid'] as bool? ?? false,
|
||||
email: json['email'] as String? ?? '',
|
||||
teamName: json['team_name'] as String? ?? '',
|
||||
clubName: json['club_name'] as String?,
|
||||
teamId: json['team_id'] as String?,
|
||||
error: json['error'] as String?,
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -29,6 +29,7 @@ class Team {
|
||||
this.staffRole,
|
||||
this.canStream = true,
|
||||
this.youtubeMode,
|
||||
this.canConnectYoutube = false,
|
||||
});
|
||||
|
||||
final String id;
|
||||
@@ -60,6 +61,7 @@ class Team {
|
||||
final bool phoneDownloadEnabled;
|
||||
final bool youtubeEnabled;
|
||||
final String? youtubeMode;
|
||||
final bool canConnectYoutube;
|
||||
|
||||
bool get canUseYoutube => youtubeEnabled && (premiumFull || youtubeMode == 'matchlivetv_light');
|
||||
|
||||
@@ -105,6 +107,7 @@ class Team {
|
||||
phoneDownloadEnabled: json['phone_download_enabled'] as bool? ?? false,
|
||||
youtubeEnabled: json['youtube_enabled'] as bool? ?? false,
|
||||
youtubeMode: json['youtube_mode'] as String?,
|
||||
canConnectYoutube: json['can_connect_youtube'] as bool? ?? false,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user