Skip to content
This repository was archived by the owner on Sep 18, 2025. It is now read-only.

Commit b0dbf48

Browse files
committed
update workflow
1 parent 5dadbf5 commit b0dbf48

File tree

15 files changed

+109
-123
lines changed

15 files changed

+109
-123
lines changed

.github/workflows/analyze.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,16 @@ jobs:
2222
GOOGLE_SERVICE_INFO_PLIST_BASE64: ${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }}
2323
FIREBASE_JSON_BASE64: ${{ secrets.FIREBASE_JSON_BASE64 }}
2424
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
25+
CONFIG_BASE64: ${{ secrets.CONFIG_BASE64 }}
26+
API_KEYS_BASE64: ${{ secrets.API_KEYS_BASE64 }}
2527
run: |
2628
cd khelo
2729
echo $FIREBASE_OPTIONS_BASE64 | base64 --decode > lib/firebase_options.dart
2830
echo $GOOGLE_SERVICE_INFO_PLIST_BASE64 | base64 --decode > ios/Runner/GoogleService-Info.plist
2931
echo $FIREBASE_JSON_BASE64 | base64 --decode > firebase.json
3032
echo $GOOGLE_SERVICES_JSON_BASE64 | base64 --decode > android/app/google-services.json
33+
echo $CONFIG_BASE64 | base64 --decode > ios/Config.xcconfig
34+
echo $API_KEYS_BASE64 | base64 --decode > ../data/lib/utils/api_keys.dart
3135
3236
- name: Install dependencies
3337
run: |

.github/workflows/android_build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ jobs:
3737
env:
3838
FIREBASE_OPTIONS_BASE64: ${{ secrets.FIREBASE_OPTIONS_BASE64 }}
3939
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
40-
40+
CONFIG_BASE64: ${{ secrets.CONFIG_BASE64 }}
41+
API_KEYS_BASE64: ${{ secrets.API_KEYS_BASE64 }}
4142
run: |
4243
cd khelo
4344
echo $FIREBASE_OPTIONS_BASE64 | base64 -di > lib/firebase_options.dart
4445
echo $GOOGLE_SERVICES_JSON_BASE64 | base64 -di > android/app/google-services.json
46+
echo $CONFIG_BASE64 | base64 --decode > ios/Config.xcconfig
47+
echo $API_KEYS_BASE64 | base64 --decode > ../data/lib/utils/api_keys.dart
4548
4649
- name: Install Dependencies
4750
run: |

.github/workflows/android_deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,14 @@ jobs:
3737
env:
3838
FIREBASE_OPTIONS_BASE64: ${{ secrets.FIREBASE_OPTIONS_BASE64 }}
3939
GOOGLE_SERVICES_JSON_BASE64: ${{ secrets.GOOGLE_SERVICES_JSON_BASE64 }}
40-
40+
CONFIG_BASE64: ${{ secrets.CONFIG_BASE64 }}
41+
API_KEYS_BASE64: ${{ secrets.API_KEYS_BASE64 }}
4142
run: |
4243
cd khelo
4344
echo $FIREBASE_OPTIONS_BASE64 | base64 -di > lib/firebase_options.dart
4445
echo $GOOGLE_SERVICES_JSON_BASE64 | base64 -di > android/app/google-services.json
46+
echo $CONFIG_BASE64 | base64 --decode > ios/Config.xcconfig
47+
echo $API_KEYS_BASE64 | base64 --decode > ../data/lib/utils/api_keys.dart
4548
4649
- name: Install Dependencies
4750
run: |

.github/workflows/function_deploy.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,12 @@ jobs:
4242
env:
4343
GOOGLE_APPLICATION_CREDENTIALS: ${{ secrets.GOOGLE_APPLICATION_CREDENTIALS }}
4444
FIREBASE_JSON_BASE64: ${{ secrets.FIREBASE_JSON_BASE64 }}
45+
ENVIRONMENT_VARIABLE_BASE64: ${{ secrets.ENVIRONMENT_VARIABLE_BASE64 }}
4546
run: |
4647
cd khelo
4748
echo $GOOGLE_APPLICATION_CREDENTIALS | base64 --decode > google-application-credentials.json
4849
echo $FIREBASE_JSON_BASE64 | base64 --decode > firebase.json
50+
echo $ENVIRONMENT_VARIABLE_BASE64 | base64 --decode > functions/.env
4951
5052
- name: Deploy Firebase functions
5153
run: |

.github/workflows/ios_deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,15 @@ jobs:
3939
FIREBASE_OPTIONS_BASE64: ${{ secrets.FIREBASE_OPTIONS_BASE64 }}
4040
GOOGLE_SERVICE_INFO_PLIST_BASE64: ${{ secrets.GOOGLE_SERVICE_INFO_PLIST_BASE64 }}
4141
FIREBASE_JSON_BASE64: ${{ secrets.FIREBASE_JSON_BASE64 }}
42+
CONFIG_BASE64: ${{ secrets.CONFIG_BASE64 }}
43+
API_KEYS_BASE64: ${{ secrets.API_KEYS_BASE64 }}
4244
run: |
4345
cd khelo
4446
echo $FIREBASE_OPTIONS_BASE64 | base64 --decode > lib/firebase_options.dart
4547
echo $GOOGLE_SERVICE_INFO_PLIST_BASE64 | base64 --decode > ios/Runner/GoogleService-Info.plist
4648
echo $FIREBASE_JSON_BASE64 | base64 --decode > firebase.json
47-
49+
echo $CONFIG_BASE64 | base64 --decode > ios/Config.xcconfig
50+
echo $API_KEYS_BASE64 | base64 --decode > ../data/lib/utils/api_keys.dart
4851
- name: Install Dependencies
4952
run: |
5053
cd data && flutter clean && flutter pub get

data/lib/service/auth/auth_service.dart

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,6 @@ class AuthService {
145145
return false;
146146
}
147147

148-
Future<void> unlinkGoogle() async {
149-
try {
150-
final User? user = _auth.currentUser;
151-
if (user != null) {
152-
await user.unlink('google.com');
153-
}
154-
} catch (error) {
155-
debugPrint(error.toString());
156-
}
157-
}
158-
159148
Future<void> verifyOTP(
160149
String countryCode,
161150
String phoneNumber,

khelo/ios/Podfile.lock

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,8 +1159,6 @@ PODS:
11591159
- BoringSSL-GRPC/Implementation (0.0.36):
11601160
- BoringSSL-GRPC/Interface (= 0.0.36)
11611161
- BoringSSL-GRPC/Interface (0.0.36)
1162-
- camera_avfoundation (0.0.1):
1163-
- Flutter
11641162
- cloud_firestore (5.5.1):
11651163
- Firebase/Firestore (= 11.4.0)
11661164
- firebase_core
@@ -1489,7 +1487,6 @@ PODS:
14891487

14901488
DEPENDENCIES:
14911489
- audio_session (from `.symlinks/plugins/audio_session/ios`)
1492-
- camera_avfoundation (from `.symlinks/plugins/camera_avfoundation/ios`)
14931490
- cloud_firestore (from `.symlinks/plugins/cloud_firestore/ios`)
14941491
- cloud_functions (from `.symlinks/plugins/cloud_functions/ios`)
14951492
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
@@ -1559,8 +1556,6 @@ SPEC REPOS:
15591556
EXTERNAL SOURCES:
15601557
audio_session:
15611558
:path: ".symlinks/plugins/audio_session/ios"
1562-
camera_avfoundation:
1563-
:path: ".symlinks/plugins/camera_avfoundation/ios"
15641559
cloud_firestore:
15651560
:path: ".symlinks/plugins/cloud_firestore/ios"
15661561
cloud_functions:
@@ -1615,7 +1610,6 @@ SPEC CHECKSUMS:
16151610
AppAuth: d4f13a8fe0baf391b2108511793e4b479691fb73
16161611
audio_session: 088d2483ebd1dc43f51d253d4a1c517d9a2e7207
16171612
BoringSSL-GRPC: ca6a8e5d04812fce8ffd6437810c2d46f925eaeb
1618-
camera_avfoundation: dd002b0330f4981e1bbcb46ae9b62829237459a4
16191613
cloud_firestore: 3fafe78d755b01fe1fd267a87bb52e80b7dacacc
16201614
cloud_functions: ddb115d2d97e0f545fed35a14fb69771a744f1e1
16211615
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d

khelo/lib/domain/extensions/enum_extensions.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,4 +382,4 @@ extension MediumOptionString on MediumOption {
382382
return context.l10n.add_stream_info_your_yt_channel_text;
383383
}
384384
}
385-
}
385+
}

khelo/lib/ui/app_route.dart

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -245,13 +245,15 @@ class AppRoute {
245245
builder: (context) =>
246246
LeaderboardScreen(selectedField: selectedField));
247247

248-
static AppRoute addStreamInfo({required String matchId}) => AppRoute(
249-
pathAddStreamInfo,
250-
builder: (context) => AddStreamInfoScreen(matchId: matchId));
251-
252-
static AppRoute streamCameraView({required LiveStreamModel stream}) => AppRoute(
253-
pathStreamCamera,
254-
builder: (context) => StreamCameraScreen(stream: stream,));
248+
static AppRoute addStreamInfo({required String matchId}) =>
249+
AppRoute(pathAddStreamInfo,
250+
builder: (context) => AddStreamInfoScreen(matchId: matchId));
251+
252+
static AppRoute streamCameraView({required LiveStreamModel stream}) =>
253+
AppRoute(pathStreamCamera,
254+
builder: (context) => StreamCameraScreen(
255+
stream: stream,
256+
));
255257

256258
static AppRoute searchTeam({
257259
List<String>? excludedIds,

khelo/lib/ui/flow/matches/live_streaming/add_stream_info_screen.dart

Lines changed: 27 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import 'package:flutter/services.dart';
55
import 'package:flutter_riverpod/flutter_riverpod.dart';
66
import 'package:flutter_svg/flutter_svg.dart';
77
import 'package:go_router/go_router.dart';
8+
import 'package:khelo/components/action_bottom_sheet.dart';
89
import 'package:khelo/components/app_page.dart';
910
import 'package:khelo/domain/extensions/context_extensions.dart';
1011
import 'package:khelo/domain/extensions/enum_extensions.dart';
@@ -68,28 +69,28 @@ class _AddStreamInfoScreenState extends ConsumerState<AddStreamInfoScreen> {
6869
}
6970

7071
return ListView(
72+
padding: context.mediaQueryPadding + EdgeInsets.symmetric(horizontal: 16),
7173
children: [
7274
if (state.stream == null) ...[
7375
_mediumOptionView(context),
7476
] else ...[
7577
Container(
76-
padding: EdgeInsets.all(16),
77-
margin: const EdgeInsets.all(16),
78+
padding: EdgeInsets.symmetric(horizontal: 16, vertical: 24),
7879
decoration: BoxDecoration(
7980
borderRadius: BorderRadius.circular(30),
8081
border: Border.all(color: context.colorScheme.outline),
8182
),
8283
child: Column(
8384
spacing: 16,
8485
children: [
85-
Text(
86-
context.l10n.add_stream_info_all_set_title,
87-
style: AppTextStyle.header4
88-
.copyWith(color: context.colorScheme.textPrimary),
89-
),
86+
Text(context.l10n.add_stream_info_all_set_title,
87+
textAlign: TextAlign.center,
88+
style: AppTextStyle.header4
89+
.copyWith(color: context.colorScheme.textPrimary)),
9090
Text(context.l10n.add_stream_info_all_set_description,
91+
textAlign: TextAlign.center,
9192
style: AppTextStyle.subtitle2
92-
.copyWith(color: context.colorScheme.textPrimary)),
93+
.copyWith(color: context.colorScheme.textSecondary)),
9394
PrimaryButton(
9495
context.l10n.add_stream_info_go_live_title,
9596
expanded: false,
@@ -107,7 +108,7 @@ class _AddStreamInfoScreenState extends ConsumerState<AddStreamInfoScreen> {
107108

108109
Widget _mediumOptionView(BuildContext context) {
109110
return Padding(
110-
padding: context.mediaQueryPadding + const EdgeInsets.all(16),
111+
padding: const EdgeInsets.symmetric(vertical: 16),
111112
child: Container(
112113
padding: const EdgeInsets.all(16),
113114
decoration: BoxDecoration(
@@ -116,11 +117,9 @@ class _AddStreamInfoScreenState extends ConsumerState<AddStreamInfoScreen> {
116117
child: Column(
117118
spacing: 16,
118119
children: [
119-
// TODO: remove unlink button
120-
ElevatedButton(
121-
onPressed: () => notifier.unlink(), child: Text("Unlink")),
122120
Text(
123121
context.l10n.add_stream_info_go_live_with_text,
122+
textAlign: TextAlign.center,
124123
style: AppTextStyle.header4
125124
.copyWith(color: context.colorScheme.textPrimary),
126125
),
@@ -145,21 +144,23 @@ class _AddStreamInfoScreenState extends ConsumerState<AddStreamInfoScreen> {
145144
children: [
146145
SvgPicture.asset(
147146
Assets.images.icYoutube,
147+
height: 22,
148148
colorFilter:
149149
ColorFilter.mode(context.colorScheme.alert, BlendMode.srcIn),
150-
height: 20,
151150
),
152151
SizedBox(width: 16),
153152
Expanded(
154153
child: Column(
155154
crossAxisAlignment: CrossAxisAlignment.start,
156155
children: [
157156
Text(option.getString(context),
157+
textAlign: TextAlign.center,
158158
style: AppTextStyle.subtitle2
159159
.copyWith(color: context.colorScheme.textPrimary)),
160160
if (option.isLoginRequired)
161161
Text(
162162
context.l10n.add_stream_info_login_required_text,
163+
textAlign: TextAlign.center,
163164
style: AppTextStyle.caption
164165
.copyWith(color: context.colorScheme.textSecondary),
165166
)
@@ -181,10 +182,7 @@ class _AddStreamInfoScreenState extends ConsumerState<AddStreamInfoScreen> {
181182
});
182183
}
183184

184-
void _observeYTChannels(
185-
BuildContext context,
186-
WidgetRef ref,
187-
) {
185+
void _observeYTChannels(BuildContext context, WidgetRef ref) {
188186
ref.listen(addStreamInfoStateProvider.select((value) => value.ytChannels),
189187
(previous, next) {
190188
if (next.isNotEmpty) {
@@ -193,15 +191,22 @@ class _AddStreamInfoScreenState extends ConsumerState<AddStreamInfoScreen> {
193191
});
194192
}
195193

196-
void _observeShowSelectResolutionSheet(
197-
BuildContext context,
198-
WidgetRef ref,
199-
) {
194+
void _observeShowSelectResolutionSheet(BuildContext context, WidgetRef ref) {
200195
ref.listen(
201196
addStreamInfoStateProvider.select(
202197
(value) => value.showSelectResolutionSheet), (previous, next) {
203198
if (next) {
204-
chooseYTResolutionSheet(context);
199+
showActionBottomSheet(
200+
context: context,
201+
items: YouTubeResolution.values
202+
.map((e) => BottomSheetAction(
203+
title: e.stringResolution,
204+
onTap: () {
205+
context.pop();
206+
notifier.onResolutionSelect(e);
207+
},
208+
))
209+
.toList());
205210
}
206211
});
207212
}
@@ -244,49 +249,6 @@ class _AddStreamInfoScreenState extends ConsumerState<AddStreamInfoScreen> {
244249
);
245250
}
246251

247-
void chooseYTResolutionSheet(BuildContext context) {
248-
HapticFeedback.mediumImpact();
249-
showModalBottomSheet(
250-
context: context,
251-
showDragHandle: false,
252-
enableDrag: false,
253-
isScrollControlled: true,
254-
useRootNavigator: true,
255-
backgroundColor: context.colorScheme.surface,
256-
builder: (context) {
257-
return SizedBox(
258-
height: context.mediaQuerySize.height * 0.8,
259-
child: Column(
260-
crossAxisAlignment: CrossAxisAlignment.start,
261-
children: [
262-
Padding(
263-
padding:
264-
const EdgeInsets.symmetric(horizontal: 16.0, vertical: 16),
265-
child: Text(
266-
context.l10n.add_stream_info_choose_resolution,
267-
style: AppTextStyle.header4
268-
.copyWith(color: context.colorScheme.textPrimary),
269-
),
270-
),
271-
Expanded(
272-
child: ListView.separated(
273-
itemBuilder: (context, index) => OnTapScale(
274-
onTap: () {
275-
context.pop();
276-
notifier.onResolutionSelect(
277-
YouTubeResolution.values[index]);
278-
},
279-
child: Text(YouTubeResolution.values[index].name)),
280-
separatorBuilder: (context, index) =>
281-
Divider(color: context.colorScheme.outline),
282-
itemCount: YouTubeResolution.values.length)),
283-
],
284-
),
285-
);
286-
},
287-
);
288-
}
289-
290252
Widget ytChannelCell(BuildContext context, {required YTChannel channel}) {
291253
return OnTapScale(
292254
onTap: () => notifier.onChannelSelect(channel.id),

0 commit comments

Comments
 (0)