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

File tree

12 files changed

+40
-42
lines changed

12 files changed

+40
-42
lines changed

.github/workflows/flutter-ci.yml

Lines changed: 3 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 3 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 4 additions & 4 deletions
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

Lines changed: 2 additions & 2 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 2 additions & 3 deletions
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

Lines changed: 2 additions & 2 deletions
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(

0 commit comments

Comments
 (0)