Skip to content

Commit 37df31e

Browse files
add script
1 parent 37134ec commit 37df31e

File tree

9 files changed

+182
-90
lines changed

9 files changed

+182
-90
lines changed

.github/workflows/script.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: handle some stuff
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * *' # Runs daily at 08:00 UTC
6+
7+
jobs:
8+
script:
9+
name: Run Script
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Configure Git
19+
run: |
20+
git config user.name "${{ secrets.GIT_USER_NAME }}"
21+
git config user.email "${{ secrets.GIT_USER_EMAIL }}"
22+
23+
- name: Run Script Action
24+
uses: AhmedAbdoElhawary/private-algo-action@main
25+
with:
26+
source-branch: feature/sorting
27+
target-branch: develop

ios/Flutter/Debug.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "Generated.xcconfig"

ios/Flutter/Release.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "Generated.xcconfig"

ios/Podfile

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Uncomment this line to define a global platform for your project
2+
# platform :ios, '12.0'
3+
4+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6+
7+
project 'Runner', {
8+
'Debug' => :debug,
9+
'Profile' => :release,
10+
'Release' => :release,
11+
}
12+
13+
def flutter_root
14+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
15+
unless File.exist?(generated_xcode_build_settings_path)
16+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
17+
end
18+
19+
File.foreach(generated_xcode_build_settings_path) do |line|
20+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
21+
return matches[1].strip if matches
22+
end
23+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
24+
end
25+
26+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
27+
28+
flutter_ios_podfile_setup
29+
30+
target 'Runner' do
31+
use_frameworks!
32+
33+
flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
34+
target 'RunnerTests' do
35+
inherit! :search_paths
36+
end
37+
end
38+
39+
post_install do |installer|
40+
installer.pods_project.targets.each do |target|
41+
flutter_additional_ios_build_settings(target)
42+
end
43+
end

lib/config/themes/app_theme.dart

Lines changed: 28 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -17,27 +17,25 @@ class AppTheme {
1717
focusColor: ColorManager.black,
1818
disabledColor: ColorManager.blackOp50,
1919
switchTheme: const SwitchThemeData(),
20-
dialogBackgroundColor: ColorManager.whiteD1,
2120
hoverColor: ColorManager.blackOp50,
22-
indicatorColor: ColorManager.blackOp40,
2321
highlightColor: ColorManager.whiteD3,
2422
bottomSheetTheme: const BottomSheetThemeData(
2523
backgroundColor: ColorManager.white,
2624
surfaceTintColor: ColorManager.white,
2725
shadowColor: ColorManager.white,
2826
),
29-
dialogTheme: const DialogTheme(surfaceTintColor: ColorManager.whiteD5),
27+
dialogTheme: const DialogThemeData(surfaceTintColor: ColorManager.whiteD5),
3028
dividerColor: ColorManager.blackOp10,
3129
scaffoldBackgroundColor: ColorManager.white,
3230
iconTheme: const IconThemeData(color: ColorManager.black),
3331
outlinedButtonTheme: _outlinedButtonTheme(),
3432
elevatedButtonTheme: _elevatedButtonThemeData(),
3533
textButtonTheme: const TextButtonThemeData(
3634
style: ButtonStyle(
37-
overlayColor: WidgetStatePropertyAll(
38-
ColorManager.whiteD3,
39-
),
40-
)),
35+
overlayColor: WidgetStatePropertyAll(
36+
ColorManager.whiteD3,
37+
),
38+
)),
4139
chipTheme: const ChipThemeData(backgroundColor: ColorManager.blackOp10),
4240
canvasColor: ColorManager.transparent,
4341
splashColor: ColorManager.white,
@@ -56,20 +54,16 @@ class AppTheme {
5654
// circle avatar color
5755
primaryContainer: ColorManager.whiteD4,
5856
surface: ColorManager.whiteD3,
59-
)
60-
.copyWith(surface: ColorManager.whiteD5)
61-
.copyWith(error: ColorManager.black),
57+
).copyWith(surface: ColorManager.whiteD5).copyWith(error: ColorManager.black),
6258
);
6359
}
6460

6561
static ElevatedButtonThemeData _elevatedButtonThemeData() {
6662
return ElevatedButtonThemeData(
6763
style: ButtonStyle(
6864
fixedSize: WidgetStateProperty.all<Size>(Size(double.maxFinite, 45.r)),
69-
backgroundColor: WidgetStateProperty.resolveWith<Color?>(
70-
(_) => ColorManager.whiteD2),
71-
overlayColor: WidgetStateProperty.resolveWith<Color?>(
72-
(_) => ColorManager.whiteOp20),
65+
backgroundColor: WidgetStateProperty.resolveWith<Color?>((_) => ColorManager.whiteD2),
66+
overlayColor: WidgetStateProperty.resolveWith<Color?>((_) => ColorManager.whiteOp20),
7367
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
7468
const RoundedRectangleBorder(borderRadius: BorderRadius.zero),
7569
),
@@ -81,15 +75,14 @@ class AppTheme {
8175
return OutlinedButtonThemeData(
8276
style: OutlinedButton.styleFrom(
8377
fixedSize: Size(double.maxFinite, 45.r),
84-
shape:
85-
RoundedRectangleBorder(borderRadius: BorderRadius.circular(50.r)),
78+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(50.r)),
8679
side: BorderSide(width: 1.r, color: ColorManager.whiteD5),
8780
),
8881
);
8982
}
9083

91-
static TabBarTheme _tabBarTheme() {
92-
return TabBarTheme(
84+
static TabBarThemeData _tabBarTheme() {
85+
return TabBarThemeData(
9386
indicatorSize: TabBarIndicatorSize.label,
9487
labelPadding: EdgeInsets.zero,
9588
indicator: BoxDecoration(
@@ -105,20 +98,16 @@ class AppTheme {
10598
static TextTheme _textTheme() {
10699
return TextTheme(
107100
bodyLarge: _getStyle(const GetRegularStyle(color: ColorManager.greyD4)),
108-
bodyMedium: _getStyle(
109-
const GetRegularStyle(color: ColorManager.greyD5, fontSize: 12)),
101+
bodyMedium: _getStyle(const GetRegularStyle(color: ColorManager.greyD5, fontSize: 12)),
110102
bodySmall: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
111103
titleSmall: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
112104
labelSmall: _getStyle(const GetMediumStyle(color: ColorManager.greyD2)),
113105
displaySmall: _getStyle(const GetMediumStyle(color: ColorManager.greyD2)),
114106
displayLarge: _getStyle(const GetMediumStyle(color: ColorManager.grey)),
115107
displayMedium: _getStyle(const GetMediumStyle(color: ColorManager.grey)),
116-
headlineLarge:
117-
_getStyle(const GetRegularStyle(color: ColorManager.whiteD3)),
118-
headlineMedium:
119-
_getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
120-
headlineSmall:
121-
_getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
108+
headlineLarge: _getStyle(const GetRegularStyle(color: ColorManager.whiteD3)),
109+
headlineMedium: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
110+
headlineSmall: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
122111
labelLarge: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
123112
labelMedium: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
124113
titleLarge: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
@@ -139,8 +128,7 @@ class AppTheme {
139128
shadowColor: ColorManager.blackOp20,
140129
scrolledUnderElevation: 1.5.r,
141130
iconTheme: const IconThemeData(color: ColorManager.black),
142-
titleTextStyle: const GetRegularStyle(
143-
fontSize: 16, color: ColorManager.black),
131+
titleTextStyle: const GetRegularStyle(fontSize: 16, color: ColorManager.black),
144132
);
145133
}
146134

@@ -155,16 +143,14 @@ class AppTheme {
155143
shadowColor: ColorManager.whiteOp10,
156144
focusColor: ColorManager.white,
157145
disabledColor: ColorManager.whiteOp50,
158-
dialogBackgroundColor: ColorManager.blackL1,
159146
hoverColor: ColorManager.whiteOp50,
160-
indicatorColor: ColorManager.whiteOp40,
161147
highlightColor: ColorManager.blackL3Blue,
162148
bottomSheetTheme: const BottomSheetThemeData(
163149
backgroundColor: ColorManager.blackL5,
164150
surfaceTintColor: ColorManager.blackL5,
165151
shadowColor: ColorManager.blackL5,
166152
),
167-
dialogTheme: const DialogTheme(surfaceTintColor: ColorManager.blackL5),
153+
dialogTheme: const DialogThemeData(surfaceTintColor: ColorManager.blackL5),
168154
dividerColor: ColorManager.whiteOp10,
169155
scaffoldBackgroundColor: ColorManager.blackBlue,
170156
iconTheme: const IconThemeData(color: ColorManager.white),
@@ -191,20 +177,16 @@ class AppTheme {
191177
colorScheme: const ColorScheme.highContrastDark(
192178
primaryContainer: ColorManager.blackL4,
193179
surface: ColorManager.blackL6,
194-
)
195-
.copyWith(surface: ColorManager.blackL6)
196-
.copyWith(error: ColorManager.white),
180+
).copyWith(surface: ColorManager.blackL6).copyWith(error: ColorManager.white),
197181
);
198182
}
199183

200184
static ElevatedButtonThemeData _elevatedButtonDarkThemeData() {
201185
return ElevatedButtonThemeData(
202186
style: ButtonStyle(
203187
fixedSize: WidgetStateProperty.all<Size>(Size(double.maxFinite, 45.r)),
204-
backgroundColor: WidgetStateProperty.resolveWith<Color?>(
205-
(_) => ColorManager.blackL2),
206-
overlayColor: WidgetStateProperty.resolveWith<Color?>(
207-
(_) => ColorManager.blackOp20),
188+
backgroundColor: WidgetStateProperty.resolveWith<Color?>((_) => ColorManager.blackL2),
189+
overlayColor: WidgetStateProperty.resolveWith<Color?>((_) => ColorManager.blackOp20),
208190
shape: WidgetStateProperty.all<RoundedRectangleBorder>(
209191
const RoundedRectangleBorder(borderRadius: BorderRadius.zero),
210192
),
@@ -216,15 +198,14 @@ class AppTheme {
216198
return OutlinedButtonThemeData(
217199
style: OutlinedButton.styleFrom(
218200
fixedSize: Size(double.maxFinite, 45.r),
219-
shape:
220-
RoundedRectangleBorder(borderRadius: BorderRadius.circular(50.r)),
201+
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(50.r)),
221202
side: BorderSide(width: 1.r, color: ColorManager.whiteD5),
222203
),
223204
);
224205
}
225206

226-
static TabBarTheme _tabBarDarkTheme() {
227-
return TabBarTheme(
207+
static TabBarThemeData _tabBarDarkTheme() {
208+
return TabBarThemeData(
228209
indicatorSize: TabBarIndicatorSize.label,
229210
labelPadding: EdgeInsets.zero,
230211
indicator: BoxDecoration(
@@ -240,20 +221,16 @@ class AppTheme {
240221
static TextTheme _textDarkTheme() {
241222
return TextTheme(
242223
bodyLarge: _getStyle(const GetRegularStyle(color: ColorManager.greyD1)),
243-
bodyMedium: _getStyle(
244-
const GetRegularStyle(color: ColorManager.grey, fontSize: 12)),
224+
bodyMedium: _getStyle(const GetRegularStyle(color: ColorManager.grey, fontSize: 12)),
245225
bodySmall: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
246226
titleSmall: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
247227
labelSmall: _getStyle(const GetMediumStyle(color: ColorManager.greyD2)),
248228
displaySmall: _getStyle(const GetMediumStyle(color: ColorManager.greyD2)),
249229
displayLarge: _getStyle(const GetMediumStyle(color: ColorManager.grey)),
250230
displayMedium: _getStyle(const GetMediumStyle(color: ColorManager.grey)),
251-
headlineLarge:
252-
_getStyle(const GetRegularStyle(color: ColorManager.blackL3Blue)),
253-
headlineMedium:
254-
_getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
255-
headlineSmall:
256-
_getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
231+
headlineLarge: _getStyle(const GetRegularStyle(color: ColorManager.blackL3Blue)),
232+
headlineMedium: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
233+
headlineSmall: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
257234
labelLarge: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
258235
labelMedium: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
259236
titleLarge: _getStyle(const GetRegularStyle(color: ColorManager.greyD2)),
@@ -270,8 +247,7 @@ class AppTheme {
270247
shadowColor: ColorManager.greyD8,
271248
scrolledUnderElevation: 1.5.r,
272249
iconTheme: const IconThemeData(color: ColorManager.white),
273-
titleTextStyle: const GetRegularStyle(
274-
fontSize:16, color: ColorManager.white),
250+
titleTextStyle: const GetRegularStyle(fontSize: 16, color: ColorManager.white),
275251
);
276252
}
277253
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
12
#include "ephemeral/Flutter-Generated.xcconfig"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1+
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
12
#include "ephemeral/Flutter-Generated.xcconfig"

macos/Podfile

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
platform :osx, '10.14'
2+
3+
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
4+
ENV['COCOAPODS_DISABLE_STATS'] = 'true'
5+
6+
project 'Runner', {
7+
'Debug' => :debug,
8+
'Profile' => :release,
9+
'Release' => :release,
10+
}
11+
12+
def flutter_root
13+
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
14+
unless File.exist?(generated_xcode_build_settings_path)
15+
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
16+
end
17+
18+
File.foreach(generated_xcode_build_settings_path) do |line|
19+
matches = line.match(/FLUTTER_ROOT\=(.*)/)
20+
return matches[1].strip if matches
21+
end
22+
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
23+
end
24+
25+
require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
26+
27+
flutter_macos_podfile_setup
28+
29+
target 'Runner' do
30+
use_frameworks!
31+
32+
flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
33+
target 'RunnerTests' do
34+
inherit! :search_paths
35+
end
36+
end
37+
38+
post_install do |installer|
39+
installer.pods_project.targets.each do |target|
40+
flutter_additional_macos_build_settings(target)
41+
end
42+
end

0 commit comments

Comments
 (0)