Skip to content

Commit cfe8ace

Browse files
authored
chore: flutter v3.22 (#1290)
* chore: replace intl usage with jiffy * chore: remove intl package * chore: replace deprecated properties * chore: upgrade CI/CD actions to flutter 3.22 * chore: update ios files
1 parent 90af899 commit cfe8ace

12 files changed

+40
-42
lines changed

.github/workflows/flutter-ci.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,13 @@ jobs:
7171
disable-animations: false
7272
script: echo "Generated AVD snapshot for caching."
7373

74-
- name: Setup Flutter 3.19.x
74+
- name: Setup Flutter 3.22.x
7575
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2
7676
with:
77-
flutter-version: "3.19.x"
77+
flutter-version: "3.22.x"
7878
channel: "stable"
7979
cache: true
80-
cache-key: flutter-3.19.x
80+
cache-key: flutter-3.22.x
8181
cache-path: ${{ runner.tool_cache }}/flutter
8282

8383
- name: Create .env file

.github/workflows/flutter-deploy.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,13 @@ jobs:
6666
disable-animations: false
6767
script: echo "Generated AVD snapshot for caching."
6868

69-
- name: Setup Flutter 3.19.x
69+
- name: Setup Flutter 3.22.x
7070
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2
7171
with:
72-
flutter-version: "3.19.x"
72+
flutter-version: "3.22.x"
7373
channel: "stable"
7474
cache: true
75-
cache-key: flutter-3.19.x
75+
cache-key: flutter-3.22.x
7676
cache-path: ${{ runner.tool_cache }}/flutter
7777

7878
- name: Create .env file

.github/workflows/mobile-curriculum-e2e.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,13 @@ jobs:
4343
node-version: ${{ matrix.node-version }}
4444
cache: pnpm
4545

46-
- name: Setup Flutter 3.19.x
46+
- name: Setup Flutter 3.22.x
4747
uses: subosito/flutter-action@44ac965b96f18d999802d4b807e3256d5a3f9fa1 # v2
4848
with:
49-
flutter-version: "3.19.x"
49+
flutter-version: "3.22.x"
5050
channel: "stable"
5151
cache: true
52-
cache-key: flutter-3.19.x
52+
cache-key: flutter-3.22.x
5353
cache-path: ${{ runner.tool_cache }}/flutter
5454

5555
- name: Set freeCodeCamp Environment Variables

codemagic.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ workflows:
1515
cancel_previous_builds: true
1616

1717
environment:
18-
flutter: 3.19.6
18+
flutter: 3.22.2
1919
xcode: latest
2020
cocoapods: default
2121
groups:
@@ -87,7 +87,7 @@ workflows:
8787
cancel_previous_builds: true
8888

8989
environment:
90-
flutter: 3.19.6
90+
flutter: 3.22.2
9191
xcode: latest
9292
cocoapods: default
9393
ios_signing:

mobile-app/ios/Podfile.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,7 @@ SPEC CHECKSUMS:
335335
GoogleAppMeasurement: f3abf08495ef2cba7829f15318c373b8d9226491
336336
GoogleDataTransport: 6c09b596d841063d76d4288cc2d2f42cc36e1e2a
337337
GoogleUtilities: d053d902a8edaa9904e1bd00c37535385b8ed152
338-
integration_test: 13825b8a9334a850581300559b8839134b124670
338+
integration_test: ce0a3ffa1de96d1a89ca0ac26fca7ea18a749ef4
339339
just_audio: baa7252489dbcf47a4c7cc9ca663e9661c99aafa
340340
JWTDecode: 2eed97c2fa46ccaf3049a787004eedf0be474a87
341341
nanopb: 438bc412db1928dac798aa6fd75726007be04262

mobile-app/lib/ui/theme/fcc_theme.dart

+4-4
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ class FccTheme {
2323
),
2424
textButtonTheme: TextButtonThemeData(
2525
style: ButtonStyle(
26-
backgroundColor: MaterialStateProperty.resolveWith(
26+
backgroundColor: WidgetStateProperty.resolveWith(
2727
(states) => const Color.fromRGBO(0x3b, 0x3b, 0x4f, 1)),
2828
foregroundColor:
29-
MaterialStateProperty.resolveWith((states) => Colors.white),
30-
overlayColor: MaterialStateProperty.resolveWith(
29+
WidgetStateProperty.resolveWith((states) => Colors.white),
30+
overlayColor: WidgetStateProperty.resolveWith(
3131
(states) => const Color(0x4DFFFFFF),
3232
),
3333
),
@@ -36,7 +36,7 @@ class FccTheme {
3636
colorScheme: const ColorScheme.dark(
3737
primary: Colors.white,
3838
secondary: Color.fromRGBO(0xa9, 0xaa, 0xb2, 1),
39-
background: Color(0xFF0a0a23),
39+
surface: Color(0xFF0a0a23),
4040
error: Colors.red,
4141
),
4242
primaryColorDark: const Color(0xFF0a0a23),

mobile-app/lib/ui/views/code_radio/code_radio_view.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class CodeRadioView extends StatelessWidget {
137137
}
138138
return ElevatedButton.icon(
139139
style: ButtonStyle(
140-
backgroundColor: MaterialStateProperty.all<Color>(
140+
backgroundColor: WidgetStateProperty.all<Color>(
141141
const Color.fromRGBO(0x2A, 0x2A, 0x40, 1)),
142142
),
143143
onPressed: () {
@@ -153,7 +153,7 @@ class CodeRadioView extends StatelessWidget {
153153
}
154154
return ElevatedButton.icon(
155155
style: ButtonStyle(
156-
backgroundColor: MaterialStateProperty.all<Color>(
156+
backgroundColor: WidgetStateProperty.all<Color>(
157157
const Color.fromRGBO(0x2A, 0x2A, 0x40, 1)),
158158
),
159159
onPressed: () {

mobile-app/lib/ui/views/login/native_login_view.dart

+1-1
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ class NativeLoginView extends StatelessWidget {
191191
margin: const EdgeInsets.all(16),
192192
child: ElevatedButton(
193193
style: buttonStyle.copyWith(
194-
padding: const MaterialStatePropertyAll(
194+
padding: const WidgetStatePropertyAll(
195195
EdgeInsets.symmetric(vertical: 8),
196196
),
197197
),

mobile-app/lib/ui/views/profile/profile_view.dart

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import 'package:freecodecamp/models/main/user_model.dart';
66
import 'package:freecodecamp/service/authentication/authentication_service.dart';
77
import 'package:freecodecamp/ui/views/profile/profile_viewmodel.dart';
88
import 'package:freecodecamp/ui/widgets/drawer_widget/drawer_widget_view.dart';
9-
import 'package:intl/intl.dart';
109
import 'package:jiffy/jiffy.dart';
1110
import 'package:stacked/stacked.dart';
1211
import 'package:url_launcher/url_launcher.dart';
@@ -266,7 +265,7 @@ class ProfileView extends StatelessWidget {
266265
leading: const Icon(Icons.calendar_month),
267266
title: Text(
268267
context.t.profile_join_date(
269-
DateFormat.yMMMM().format(user.joinDate),
268+
Jiffy.parseFromDateTime(user.joinDate).yMMMM,
270269
),
271270
),
272271
)
@@ -301,7 +300,7 @@ class ProfileView extends StatelessWidget {
301300
content: Text(
302301
context.t.profile_points_on_date(
303302
(user.heatMapCal[value] ?? 0),
304-
DateFormat.yMMMd().format(value),
303+
Jiffy.parseFromDateTime(value).yMMMd,
305304
),
306305
),
307306
),

mobile-app/lib/ui/widgets/podcast_widgets/podcast_tilte_widget.dart

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import 'package:freecodecamp/service/podcast/download_service.dart';
1414
import 'package:freecodecamp/service/podcast/podcasts_service.dart';
1515
import 'package:freecodecamp/ui/views/podcast/episode/episode_view.dart';
1616
import 'package:html/parser.dart';
17-
import 'package:intl/intl.dart';
17+
import 'package:jiffy/jiffy.dart';
1818
import 'package:path_provider/path_provider.dart';
1919
import 'package:shared_preferences/shared_preferences.dart';
2020

@@ -347,7 +347,7 @@ class PodcastTileState extends State<PodcastTile> {
347347
);
348348
})
349349
: Text(
350-
DateFormat.yMMMd().format(widget.episode.publicationDate!) +
350+
Jiffy.parseFromDateTime(widget.episode.publicationDate!).yMMMd +
351351
(widget.episode.duration != null &&
352352
widget.episode.duration != Duration.zero
353353
? (' • ${_parseDuration(

mobile-app/pubspec.lock

+17-17
Original file line numberDiff line numberDiff line change
@@ -845,13 +845,13 @@ packages:
845845
source: sdk
846846
version: "0.0.0"
847847
intl:
848-
dependency: "direct main"
848+
dependency: transitive
849849
description:
850850
name: intl
851-
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
851+
sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf
852852
url: "https://pub.dev"
853853
source: hosted
854-
version: "0.18.1"
854+
version: "0.19.0"
855855
io:
856856
dependency: transitive
857857
description:
@@ -864,10 +864,10 @@ packages:
864864
dependency: "direct main"
865865
description:
866866
name: jiffy
867-
sha256: cc1d4b75016a9156c29b5d61f0c9176c3e0fb0580cc5a0e0422b5d2cab3fbfff
867+
sha256: "3497caaa36d36a29033e66803c9739ce6bccbc7e241ca46070f76ee9e6f6eb0c"
868868
url: "https://pub.dev"
869869
source: hosted
870-
version: "6.2.1"
870+
version: "6.3.1"
871871
js:
872872
dependency: transitive
873873
description:
@@ -912,26 +912,26 @@ packages:
912912
dependency: transitive
913913
description:
914914
name: leak_tracker
915-
sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa"
915+
sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
916916
url: "https://pub.dev"
917917
source: hosted
918-
version: "10.0.0"
918+
version: "10.0.4"
919919
leak_tracker_flutter_testing:
920920
dependency: transitive
921921
description:
922922
name: leak_tracker_flutter_testing
923-
sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0
923+
sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
924924
url: "https://pub.dev"
925925
source: hosted
926-
version: "2.0.1"
926+
version: "3.0.3"
927927
leak_tracker_testing:
928928
dependency: transitive
929929
description:
930930
name: leak_tracker_testing
931-
sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47
931+
sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
932932
url: "https://pub.dev"
933933
source: hosted
934-
version: "2.0.1"
934+
version: "3.0.1"
935935
lints:
936936
dependency: transitive
937937
description:
@@ -984,10 +984,10 @@ packages:
984984
dependency: transitive
985985
description:
986986
name: meta
987-
sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04
987+
sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
988988
url: "https://pub.dev"
989989
source: hosted
990-
version: "1.11.0"
990+
version: "1.12.0"
991991
mime:
992992
dependency: transitive
993993
description:
@@ -1509,10 +1509,10 @@ packages:
15091509
dependency: transitive
15101510
description:
15111511
name: test_api
1512-
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
1512+
sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
15131513
url: "https://pub.dev"
15141514
source: hosted
1515-
version: "0.6.1"
1515+
version: "0.7.0"
15161516
timezone:
15171517
dependency: transitive
15181518
description:
@@ -1653,10 +1653,10 @@ packages:
16531653
dependency: transitive
16541654
description:
16551655
name: vm_service
1656-
sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957
1656+
sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
16571657
url: "https://pub.dev"
16581658
source: hosted
1659-
version: "13.0.0"
1659+
version: "14.2.1"
16601660
watcher:
16611661
dependency: transitive
16621662
description:

mobile-app/pubspec.yaml

-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ dependencies:
3434
flutter_secure_storage: ^9.0.0
3535
html: ^0.15.4
3636
infinite_scroll_pagination: ^4.0.0
37-
intl: ^0.18.1 # TODO: replace with jiffy
3837
jiffy: ^6.2.1 # TODO: upgrade after migrating to FLutter 3.19
3938
just_audio: ^0.9.37
4039
path: ^1.8.3 # TODO: upgrade after migrating to FLutter 3.19

0 commit comments

Comments
 (0)