diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml index 4daae7e8..3c3599c8 100644 --- a/.github/workflows/analyze.yml +++ b/.github/workflows/analyze.yml @@ -22,12 +22,16 @@ jobs: GOOGLE_SERVICE_INFO_PLIST_BASE64: ${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }} FIREBASE_JSON_BASE64: ${{ secrets.FIREBASE_JSON_BASE64 }} GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }} + CONFIG_BASE64: ${{ secrets.CONFIG_BASE64 }} + API_KEYS_BASE64: ${{ secrets.API_KEYS_BASE64 }} run: | cd khelo echo $FIREBASE_OPTIONS_BASE64 | base64 --decode > lib/firebase_options.dart echo $GOOGLE_SERVICE_INFO_PLIST_BASE64 | base64 --decode > ios/Runner/GoogleService-Info.plist echo $FIREBASE_JSON_BASE64 | base64 --decode > firebase.json echo $GOOGLE_SERVICES_JSON_BASE64 | base64 --decode > android/app/google-services.json + echo $CONFIG_BASE64 | base64 --decode > ios/Config.xcconfig + echo $API_KEYS_BASE64 | base64 --decode > ../data/lib/utils/api_keys.dart - name: Install dependencies run: | diff --git a/.github/workflows/android_build.yml b/.github/workflows/android_build.yml index 562c83a6..bc7e09a3 100644 --- a/.github/workflows/android_build.yml +++ b/.github/workflows/android_build.yml @@ -37,11 +37,14 @@ jobs: env: FIREBASE_OPTIONS_BASE64: ${{ secrets.FIREBASE_OPTIONS_BASE64 }} GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }} - + CONFIG_BASE64: ${{ secrets.CONFIG_BASE64 }} + API_KEYS_BASE64: ${{ secrets.API_KEYS_BASE64 }} run: | cd khelo echo $FIREBASE_OPTIONS_BASE64 | base64 -di > lib/firebase_options.dart echo $GOOGLE_SERVICES_JSON_BASE64 | base64 -di > android/app/google-services.json + echo $CONFIG_BASE64 | base64 --decode > ios/Config.xcconfig + echo $API_KEYS_BASE64 | base64 --decode > ../data/lib/utils/api_keys.dart - name: Install Dependencies run: | diff --git a/.github/workflows/android_deploy.yml b/.github/workflows/android_deploy.yml index 15a28174..55275305 100644 --- a/.github/workflows/android_deploy.yml +++ b/.github/workflows/android_deploy.yml @@ -37,11 +37,14 @@ jobs: env: FIREBASE_OPTIONS_BASE64: ${{ secrets.FIREBASE_OPTIONS_BASE64 }} GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }} - + CONFIG_BASE64: ${{ secrets.CONFIG_BASE64 }} + API_KEYS_BASE64: ${{ secrets.API_KEYS_BASE64 }} run: | cd khelo echo $FIREBASE_OPTIONS_BASE64 | base64 -di > lib/firebase_options.dart echo $GOOGLE_SERVICES_JSON_BASE64 | base64 -di > android/app/google-services.json + echo $CONFIG_BASE64 | base64 --decode > ios/Config.xcconfig + echo $API_KEYS_BASE64 | base64 --decode > ../data/lib/utils/api_keys.dart - name: Install Dependencies run: | diff --git a/.github/workflows/function_deploy.yml b/.github/workflows/function_deploy.yml index f1a354e1..c2738764 100644 --- a/.github/workflows/function_deploy.yml +++ b/.github/workflows/function_deploy.yml @@ -42,10 +42,12 @@ jobs: env: GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }} FIREBASE_JSON_BASE64: ${{ secrets.FIREBASE_JSON_BASE64 }} + ENVIRONMENT_VARIABLE_BASE64: ${{ secrets.ENVIRONMENT_VARIABLE_BASE64 }} run: | cd khelo echo $GOOGLE_APPLICATION_CREDENTIALS | base64 --decode > google-application-credentials.json echo $FIREBASE_JSON_BASE64 | base64 --decode > firebase.json + echo $ENVIRONMENT_VARIABLE_BASE64 | base64 --decode > functions/.env - name: Deploy Firebase functions run: | diff --git a/.github/workflows/ios_deploy.yml b/.github/workflows/ios_deploy.yml index 61bf8293..9c08f832 100644 --- a/.github/workflows/ios_deploy.yml +++ b/.github/workflows/ios_deploy.yml @@ -39,12 +39,15 @@ jobs: FIREBASE_OPTIONS_BASE64: ${{ secrets.FIREBASE_OPTIONS_BASE64 }} GOOGLE_SERVICE_INFO_PLIST_BASE64: ${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }} FIREBASE_JSON_BASE64: ${{ secrets.FIREBASE_JSON_BASE64 }} + CONFIG_BASE64: ${{ secrets.CONFIG_BASE64 }} + API_KEYS_BASE64: ${{ secrets.API_KEYS_BASE64 }} run: | cd khelo echo $FIREBASE_OPTIONS_BASE64 | base64 --decode > lib/firebase_options.dart echo $GOOGLE_SERVICE_INFO_PLIST_BASE64 | base64 --decode > ios/Runner/GoogleService-Info.plist echo $FIREBASE_JSON_BASE64 | base64 --decode > firebase.json - + echo $CONFIG_BASE64 | base64 --decode > ios/Config.xcconfig + echo $API_KEYS_BASE64 | base64 --decode > ../data/lib/utils/api_keys.dart - name: Install Dependencies run: | cd data && flutter clean && flutter pub get diff --git a/data/lib/service/auth/auth_service.dart b/data/lib/service/auth/auth_service.dart index b992340b..6fe9979d 100644 --- a/data/lib/service/auth/auth_service.dart +++ b/data/lib/service/auth/auth_service.dart @@ -145,17 +145,6 @@ class AuthService { return false; } - Future unlinkGoogle() async { - try { - final User? user = _auth.currentUser; - if (user != null) { - await user.unlink('google.com'); - } - } catch (error) { - debugPrint(error.toString()); - } - } - Future verifyOTP( String countryCode, String phoneNumber, diff --git a/khelo/ios/Podfile.lock b/khelo/ios/Podfile.lock index 91fa67f2..f8e8742c 100644 --- a/khelo/ios/Podfile.lock +++ b/khelo/ios/Podfile.lock @@ -1159,8 +1159,6 @@ PODS: - BoringSSL-GRPC/Implementation (0.0.36): - BoringSSL-GRPC/Interface (= 0.0.36) - BoringSSL-GRPC/Interface (0.0.36) - - camera_avfoundation (0.0.1): - - Flutter - cloud_firestore (5.5.1): - Firebase/Firestore (= 11.4.0) - firebase_core @@ -1489,7 +1487,6 @@ PODS: DEPENDENCIES: - audio_session (from `.symlinks/plugins/audio_session/ios`) - - camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`) - cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`) - cloud_functions (from `.symlinks/plugins/cloud_functions/ios`) - device_info_plus (from `.symlinks/plugins/device_info_plus/ios`) @@ -1559,8 +1556,6 @@ SPEC REPOS: EXTERNAL SOURCES: audio_session: :path: ".symlinks/plugins/audio_session/ios" - camera_avfoundation: - :path: ".symlinks/plugins/camera_avfoundation/ios" cloud_firestore: :path: ".symlinks/plugins/cloud_firestore/ios" cloud_functions: @@ -1615,7 +1610,6 @@ SPEC CHECKSUMS: AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73 audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207 BoringSSL-GRPC: ca6a8e5d04812fce8ffd6437810c2d46f925eaeb - camera_avfoundation: dd002b0330f4981e1bbcb46ae9b62829237459a4 cloud_firestore: 3fafe78d755b01fe1fd267a87bb52e80b7dacacc cloud_functions: ddb115d2d97e0f545fed35a14fb69771a744f1e1 device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d diff --git a/khelo/lib/domain/extensions/enum_extensions.dart b/khelo/lib/domain/extensions/enum_extensions.dart index 5431e147..3b53af53 100644 --- a/khelo/lib/domain/extensions/enum_extensions.dart +++ b/khelo/lib/domain/extensions/enum_extensions.dart @@ -382,4 +382,4 @@ extension MediumOptionString on MediumOption { return context.l10n.add_stream_info_your_yt_channel_text; } } -} \ No newline at end of file +} diff --git a/khelo/lib/ui/app_route.dart b/khelo/lib/ui/app_route.dart index 1c97e7e9..6d12f8c3 100644 --- a/khelo/lib/ui/app_route.dart +++ b/khelo/lib/ui/app_route.dart @@ -245,13 +245,15 @@ class AppRoute { builder: (context) => LeaderboardScreen(selectedField: selectedField)); - static AppRoute addStreamInfo({required String matchId}) => AppRoute( - pathAddStreamInfo, - builder: (context) => AddStreamInfoScreen(matchId: matchId)); - - static AppRoute streamCameraView({required LiveStreamModel stream}) => AppRoute( - pathStreamCamera, - builder: (context) => StreamCameraScreen(stream: stream,)); + static AppRoute addStreamInfo({required String matchId}) => + AppRoute(pathAddStreamInfo, + builder: (context) => AddStreamInfoScreen(matchId: matchId)); + + static AppRoute streamCameraView({required LiveStreamModel stream}) => + AppRoute(pathStreamCamera, + builder: (context) => StreamCameraScreen( + stream: stream, + )); static AppRoute searchTeam({ List? excludedIds, diff --git a/khelo/lib/ui/flow/matches/live_streaming/add_stream_info_screen.dart b/khelo/lib/ui/flow/matches/live_streaming/add_stream_info_screen.dart index 907c2f8f..f3d32184 100644 --- a/khelo/lib/ui/flow/matches/live_streaming/add_stream_info_screen.dart +++ b/khelo/lib/ui/flow/matches/live_streaming/add_stream_info_screen.dart @@ -5,6 +5,7 @@ import 'package:flutter/services.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:flutter_svg/flutter_svg.dart'; import 'package:go_router/go_router.dart'; +import 'package:khelo/components/action_bottom_sheet.dart'; import 'package:khelo/components/app_page.dart'; import 'package:khelo/domain/extensions/context_extensions.dart'; import 'package:khelo/domain/extensions/enum_extensions.dart'; @@ -68,13 +69,13 @@ class _AddStreamInfoScreenState extends ConsumerState { } return ListView( + padding: context.mediaQueryPadding + EdgeInsets.symmetric(horizontal: 16), children: [ if (state.stream == null) ...[ _mediumOptionView(context), ] else ...[ Container( - padding: EdgeInsets.all(16), - margin: const EdgeInsets.all(16), + padding: EdgeInsets.symmetric(horizontal: 16, vertical: 24), decoration: BoxDecoration( borderRadius: BorderRadius.circular(30), border: Border.all(color: context.colorScheme.outline), @@ -82,14 +83,14 @@ class _AddStreamInfoScreenState extends ConsumerState { child: Column( spacing: 16, children: [ - Text( - context.l10n.add_stream_info_all_set_title, - style: AppTextStyle.header4 - .copyWith(color: context.colorScheme.textPrimary), - ), + Text(context.l10n.add_stream_info_all_set_title, + textAlign: TextAlign.center, + style: AppTextStyle.header4 + .copyWith(color: context.colorScheme.textPrimary)), Text(context.l10n.add_stream_info_all_set_description, + textAlign: TextAlign.center, style: AppTextStyle.subtitle2 - .copyWith(color: context.colorScheme.textPrimary)), + .copyWith(color: context.colorScheme.textSecondary)), PrimaryButton( context.l10n.add_stream_info_go_live_title, expanded: false, @@ -107,7 +108,7 @@ class _AddStreamInfoScreenState extends ConsumerState { Widget _mediumOptionView(BuildContext context) { return Padding( - padding: context.mediaQueryPadding + const EdgeInsets.all(16), + padding: const EdgeInsets.symmetric(vertical: 16), child: Container( padding: const EdgeInsets.all(16), decoration: BoxDecoration( @@ -116,11 +117,9 @@ class _AddStreamInfoScreenState extends ConsumerState { child: Column( spacing: 16, children: [ - // TODO: remove unlink button - ElevatedButton( - onPressed: () => notifier.unlink(), child: Text("Unlink")), Text( context.l10n.add_stream_info_go_live_with_text, + textAlign: TextAlign.center, style: AppTextStyle.header4 .copyWith(color: context.colorScheme.textPrimary), ), @@ -145,9 +144,9 @@ class _AddStreamInfoScreenState extends ConsumerState { children: [ SvgPicture.asset( Assets.images.icYoutube, + height: 22, colorFilter: ColorFilter.mode(context.colorScheme.alert, BlendMode.srcIn), - height: 20, ), SizedBox(width: 16), Expanded( @@ -155,11 +154,13 @@ class _AddStreamInfoScreenState extends ConsumerState { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text(option.getString(context), + textAlign: TextAlign.center, style: AppTextStyle.subtitle2 .copyWith(color: context.colorScheme.textPrimary)), if (option.isLoginRequired) Text( context.l10n.add_stream_info_login_required_text, + textAlign: TextAlign.center, style: AppTextStyle.caption .copyWith(color: context.colorScheme.textSecondary), ) @@ -181,10 +182,7 @@ class _AddStreamInfoScreenState extends ConsumerState { }); } - void _observeYTChannels( - BuildContext context, - WidgetRef ref, - ) { + void _observeYTChannels(BuildContext context, WidgetRef ref) { ref.listen(addStreamInfoStateProvider.select((value) => value.ytChannels), (previous, next) { if (next.isNotEmpty) { @@ -193,15 +191,22 @@ class _AddStreamInfoScreenState extends ConsumerState { }); } - void _observeShowSelectResolutionSheet( - BuildContext context, - WidgetRef ref, - ) { + void _observeShowSelectResolutionSheet(BuildContext context, WidgetRef ref) { ref.listen( addStreamInfoStateProvider.select( (value) => value.showSelectResolutionSheet), (previous, next) { if (next) { - chooseYTResolutionSheet(context); + showActionBottomSheet( + context: context, + items: YouTubeResolution.values + .map((e) => BottomSheetAction( + title: e.stringResolution, + onTap: () { + context.pop(); + notifier.onResolutionSelect(e); + }, + )) + .toList()); } }); } @@ -244,49 +249,6 @@ class _AddStreamInfoScreenState extends ConsumerState { ); } - void chooseYTResolutionSheet(BuildContext context) { - HapticFeedback.mediumImpact(); - showModalBottomSheet( - context: context, - showDragHandle: false, - enableDrag: false, - isScrollControlled: true, - useRootNavigator: true, - backgroundColor: context.colorScheme.surface, - builder: (context) { - return SizedBox( - height: context.mediaQuerySize.height * 0.8, - child: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 16.0, vertical: 16), - child: Text( - context.l10n.add_stream_info_choose_resolution, - style: AppTextStyle.header4 - .copyWith(color: context.colorScheme.textPrimary), - ), - ), - Expanded( - child: ListView.separated( - itemBuilder: (context, index) => OnTapScale( - onTap: () { - context.pop(); - notifier.onResolutionSelect( - YouTubeResolution.values[index]); - }, - child: Text(YouTubeResolution.values[index].name)), - separatorBuilder: (context, index) => - Divider(color: context.colorScheme.outline), - itemCount: YouTubeResolution.values.length)), - ], - ), - ); - }, - ); - } - Widget ytChannelCell(BuildContext context, {required YTChannel channel}) { return OnTapScale( onTap: () => notifier.onChannelSelect(channel.id), diff --git a/khelo/lib/ui/flow/matches/live_streaming/add_stream_info_view_model.dart b/khelo/lib/ui/flow/matches/live_streaming/add_stream_info_view_model.dart index 7a977ff3..a759b839 100644 --- a/khelo/lib/ui/flow/matches/live_streaming/add_stream_info_view_model.dart +++ b/khelo/lib/ui/flow/matches/live_streaming/add_stream_info_view_model.dart @@ -56,7 +56,8 @@ class AddStreamInfoViewNotifier extends StateNotifier { } Future onOptionSelected(MediumOption option) async { - state = state.copyWith(mediumOption: option, showSelectResolutionSheet: false); + state = + state.copyWith(mediumOption: option, showSelectResolutionSheet: false); switch (option) { case MediumOption.kheloYTChannel: showResolutionSheet(); @@ -69,7 +70,8 @@ class AddStreamInfoViewNotifier extends StateNotifier { Future fetchYTChannels() async { try { - state = state.copyWith(loading: true, actionError: null, showSelectResolutionSheet: false); + state = state.copyWith( + loading: true, actionError: null, showSelectResolutionSheet: false); await signInWithGoogleIfNeeded(); @@ -94,7 +96,8 @@ class AddStreamInfoViewNotifier extends StateNotifier { } void onChannelSelect(String channelId) { - state = state.copyWith(channelId: channelId, showSelectResolutionSheet: false); + state = + state.copyWith(channelId: channelId, showSelectResolutionSheet: false); showResolutionSheet(); } @@ -148,10 +151,6 @@ class AddStreamInfoViewNotifier extends StateNotifier { "AddStreamInfoViewNotifier: error while creating yt stream -> $e"); } } - - void unlink() { - _authService.unlinkGoogle(); - } } @freezed diff --git a/khelo/lib/ui/flow/matches/live_streaming/stream_camera/stream_camera_screen.dart b/khelo/lib/ui/flow/matches/live_streaming/stream_camera/stream_camera_screen.dart index 97a94b0d..781538ab 100644 --- a/khelo/lib/ui/flow/matches/live_streaming/stream_camera/stream_camera_screen.dart +++ b/khelo/lib/ui/flow/matches/live_streaming/stream_camera/stream_camera_screen.dart @@ -62,11 +62,7 @@ class _StreamCameraScreenState extends ConsumerState { ); } - return Text( - "Something is not well", - style: AppTextStyle.subtitle1 - .copyWith(color: context.colorScheme.textPrimary), - ); + return const SizedBox(); } Widget _recordingModeButton(StreamCameraViewState state) { @@ -149,7 +145,7 @@ class _StreamCameraScreenState extends ConsumerState { final showEnabled = disabledAction != null && isEnable; return OnTapScale( onTap: onTap, - enabled: true, // TODO: if state.loading is not true + enabled: true, child: Material( type: MaterialType.transparency, child: Chip( diff --git a/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_screen.dart b/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_screen.dart index 4520566e..38c22af6 100644 --- a/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_screen.dart +++ b/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_screen.dart @@ -53,17 +53,13 @@ class _MatchDetailTabScreenState extends ConsumerState { return AppPage( title: _getScreenTitle(context, state), actions: [ - // TODO: Handle visibility of button to live streamer only - actionButton( - context, - icon: Icon(Icons.live_tv_outlined), - onPressed: () { - // TODO: Start live streaming Config Flow - AppRoute.addStreamInfo(matchId: widget.matchId).push(context); - // show configuration flow if not done already - // show resume live streaming panel or something to resume streaming or start streaming - }, - ) + if (state.match?.live_streamer_id == state.currentUserId) + actionButton( + context, + icon: Icon(Icons.live_tv_outlined), + onPressed: () => + AppRoute.addStreamInfo(matchId: widget.matchId).push(context), + ) ], body: Builder( builder: (context) { diff --git a/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_view_model.dart b/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_view_model.dart index 2cb4f2d7..ac8e0052 100644 --- a/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_view_model.dart +++ b/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_view_model.dart @@ -10,6 +10,7 @@ import 'package:data/errors/app_error.dart'; import 'package:data/service/ball_score/ball_score_service.dart'; import 'package:data/service/innings/inning_service.dart'; import 'package:data/service/match/match_service.dart'; +import 'package:data/storage/app_preferences.dart'; import 'package:data/utils/combine_latest.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; @@ -26,13 +27,17 @@ import 'package:khelo/ui/flow/matches/match_detail/components/match_detail_squad part 'match_detail_tab_view_model.freezed.dart'; final matchDetailTabStateProvider = StateNotifierProvider.autoDispose< - MatchDetailTabViewNotifier, MatchDetailTabState>( - (ref) => MatchDetailTabViewNotifier( + MatchDetailTabViewNotifier, MatchDetailTabState>((ref) { + final notifier = MatchDetailTabViewNotifier( ref.read(matchServiceProvider), ref.read(inningServiceProvider), ref.read(ballScoreServiceProvider), - ), -); + ); + ref.listen(currentUserPod, (previous, next) { + notifier._setUserId(next?.id); + }); + return notifier; +}); class MatchDetailTabViewNotifier extends StateNotifier { final MatchService _matchService; @@ -41,6 +46,7 @@ class MatchDetailTabViewNotifier extends StateNotifier { late String _matchId; StreamSubscription? _matchStreamSubscription; StreamSubscription? _ballScoreStreamSubscription; + int _ballsLoaded = 0; MatchDetailTabViewNotifier( this._matchService, @@ -48,7 +54,11 @@ class MatchDetailTabViewNotifier extends StateNotifier { this._ballScoreService, ) : super(const MatchDetailTabState()); - int _ballsLoaded = 0; + void _setUserId(String? userId) { + if (userId != null) { + state = state.copyWith(currentUserId: userId); + } + } void setData(String matchId) { _matchId = matchId; @@ -400,6 +410,7 @@ class MatchDetailTabViewNotifier extends StateNotifier { class MatchDetailTabState with _$MatchDetailTabState { const factory MatchDetailTabState({ Object? error, + String? currentUserId, MatchModel? match, @Default([]) List allInnings, String? highlightTeamId, diff --git a/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_view_model.freezed.dart b/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_view_model.freezed.dart index 32608086..2389dd61 100644 --- a/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_view_model.freezed.dart +++ b/khelo/lib/ui/flow/matches/match_detail/match_detail_tab_view_model.freezed.dart @@ -17,6 +17,7 @@ final _privateConstructorUsedError = UnsupportedError( /// @nodoc mixin _$MatchDetailTabState { Object? get error => throw _privateConstructorUsedError; + String? get currentUserId => throw _privateConstructorUsedError; MatchModel? get match => throw _privateConstructorUsedError; List get allInnings => throw _privateConstructorUsedError; String? get highlightTeamId => throw _privateConstructorUsedError; @@ -48,6 +49,7 @@ abstract class $MatchDetailTabStateCopyWith<$Res> { @useResult $Res call( {Object? error, + String? currentUserId, MatchModel? match, List allInnings, String? highlightTeamId, @@ -80,6 +82,7 @@ class _$MatchDetailTabStateCopyWithImpl<$Res, $Val extends MatchDetailTabState> @override $Res call({ Object? error = freezed, + Object? currentUserId = freezed, Object? match = freezed, Object? allInnings = null, Object? highlightTeamId = freezed, @@ -95,6 +98,10 @@ class _$MatchDetailTabStateCopyWithImpl<$Res, $Val extends MatchDetailTabState> }) { return _then(_value.copyWith( error: freezed == error ? _value.error : error, + currentUserId: freezed == currentUserId + ? _value.currentUserId + : currentUserId // ignore: cast_nullable_to_non_nullable + as String?, match: freezed == match ? _value.match : match // ignore: cast_nullable_to_non_nullable @@ -172,6 +179,7 @@ abstract class _$$MatchDetailTabStateImplCopyWith<$Res> @useResult $Res call( {Object? error, + String? currentUserId, MatchModel? match, List allInnings, String? highlightTeamId, @@ -203,6 +211,7 @@ class __$$MatchDetailTabStateImplCopyWithImpl<$Res> @override $Res call({ Object? error = freezed, + Object? currentUserId = freezed, Object? match = freezed, Object? allInnings = null, Object? highlightTeamId = freezed, @@ -218,6 +227,10 @@ class __$$MatchDetailTabStateImplCopyWithImpl<$Res> }) { return _then(_$MatchDetailTabStateImpl( error: freezed == error ? _value.error : error, + currentUserId: freezed == currentUserId + ? _value.currentUserId + : currentUserId // ignore: cast_nullable_to_non_nullable + as String?, match: freezed == match ? _value.match : match // ignore: cast_nullable_to_non_nullable @@ -276,6 +289,7 @@ class __$$MatchDetailTabStateImplCopyWithImpl<$Res> class _$MatchDetailTabStateImpl implements _MatchDetailTabState { const _$MatchDetailTabStateImpl( {this.error, + this.currentUserId, this.match, final List allInnings = const [], this.highlightTeamId, @@ -296,6 +310,8 @@ class _$MatchDetailTabStateImpl implements _MatchDetailTabState { @override final Object? error; @override + final String? currentUserId; + @override final MatchModel? match; final List _allInnings; @override @@ -356,7 +372,7 @@ class _$MatchDetailTabStateImpl implements _MatchDetailTabState { @override String toString() { - return 'MatchDetailTabState(error: $error, match: $match, allInnings: $allInnings, highlightTeamId: $highlightTeamId, showTeamSelectionSheet: $showTeamSelectionSheet, showHighlightOptionSelectionSheet: $showHighlightOptionSelectionSheet, selectedTab: $selectedTab, overList: $overList, filteredHighlight: $filteredHighlight, expandedInningsScorecard: $expandedInningsScorecard, loading: $loading, loadingBallScoreMore: $loadingBallScoreMore, highlightFilterOption: $highlightFilterOption)'; + return 'MatchDetailTabState(error: $error, currentUserId: $currentUserId, match: $match, allInnings: $allInnings, highlightTeamId: $highlightTeamId, showTeamSelectionSheet: $showTeamSelectionSheet, showHighlightOptionSelectionSheet: $showHighlightOptionSelectionSheet, selectedTab: $selectedTab, overList: $overList, filteredHighlight: $filteredHighlight, expandedInningsScorecard: $expandedInningsScorecard, loading: $loading, loadingBallScoreMore: $loadingBallScoreMore, highlightFilterOption: $highlightFilterOption)'; } @override @@ -365,6 +381,8 @@ class _$MatchDetailTabStateImpl implements _MatchDetailTabState { (other.runtimeType == runtimeType && other is _$MatchDetailTabStateImpl && const DeepCollectionEquality().equals(other.error, error) && + (identical(other.currentUserId, currentUserId) || + other.currentUserId == currentUserId) && (identical(other.match, match) || other.match == match) && const DeepCollectionEquality() .equals(other._allInnings, _allInnings) && @@ -394,6 +412,7 @@ class _$MatchDetailTabStateImpl implements _MatchDetailTabState { int get hashCode => Object.hash( runtimeType, const DeepCollectionEquality().hash(error), + currentUserId, match, const DeepCollectionEquality().hash(_allInnings), highlightTeamId, @@ -420,6 +439,7 @@ class _$MatchDetailTabStateImpl implements _MatchDetailTabState { abstract class _MatchDetailTabState implements MatchDetailTabState { const factory _MatchDetailTabState( {final Object? error, + final String? currentUserId, final MatchModel? match, final List allInnings, final String? highlightTeamId, @@ -437,6 +457,8 @@ abstract class _MatchDetailTabState implements MatchDetailTabState { @override Object? get error; @override + String? get currentUserId; + @override MatchModel? get match; @override List get allInnings;