Skip to content

Commit f56f04a

Browse files
authored
chore(deps): bump to Flutter 3.32.0 (#161)
* chore(deps): bump to Flutter 3.32.0 * style: trailing commas are back in style ig * fix: bump analyzer_plugin * ci: bump timeout
1 parent 26e2cfe commit f56f04a

28 files changed

Lines changed: 409 additions & 295 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,9 @@ permissions:
2424
jobs:
2525
setup:
2626
name: Setup
27-
needs: []
2827
timeout-minutes: 5
2928
runs-on: ubuntu-latest
3029

31-
strategy:
32-
fail-fast: false
33-
3430
steps:
3531
- name: 📚 Git checkout
3632
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -81,7 +77,7 @@ jobs:
8177
build:
8278
name: Build
8379
needs: ["setup"]
84-
timeout-minutes: ${{ (matrix.target == 'web') && 5 || 10 }}
80+
timeout-minutes: ${{ (matrix.target == 'web') && 5 || 20 }}
8581
runs-on: ${{ matrix.os }}
8682

8783
strategy:
@@ -224,6 +220,9 @@ jobs:
224220
timeout-minutes: 7
225221
runs-on: ubuntu-latest
226222

223+
permissions:
224+
id-token: write
225+
227226
steps:
228227
- name: 📚 Git checkout
229228
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -268,9 +267,9 @@ jobs:
268267
continue-on-error: true
269268
- name: 📊 Upload code coverage
270269
if: ${{ !cancelled() }}
271-
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
270+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
272271
with:
273-
token: ${{ secrets.CODECOV_TOKEN }}
272+
use_oidc: true
274273
files: packages/app/coverage/lcov.info
275274
fail_ci_if_error: true
276275
verbose: true
@@ -299,6 +298,8 @@ jobs:
299298
cache: true
300299
- name: 🌐 Disable analytics
301300
run: flutter --disable-analytics
301+
- name: 📦 Install dependencies
302+
run: dart pub get --enforce-lockfile
302303
- name: ✨ Verify formatting
303304
run: dart format . --output=none --set-exit-if-changed
304305

@@ -344,7 +345,6 @@ jobs:
344345
345346
spell-check:
346347
name: Check Spelling
347-
needs: []
348348
runs-on: ubuntu-latest
349349

350350
steps:
@@ -370,7 +370,6 @@ jobs:
370370

371371
link-check:
372372
name: Check Links
373-
needs: []
374373
timeout-minutes: 2
375374
runs-on: ubuntu-latest
376375

@@ -384,7 +383,6 @@ jobs:
384383

385384
markdownlint:
386385
name: Lint Markdown
387-
needs: []
388386
timeout-minutes: 4
389387
runs-on: ubuntu-latest
390388

@@ -405,3 +403,26 @@ jobs:
405403
# Surprisingly, the default is to only lint the project root.
406404
globs: |
407405
**/*.md
406+
407+
zizmor:
408+
name: Run zizmor
409+
timeout-minutes: 1
410+
runs-on: ubuntu-latest
411+
412+
permissions:
413+
contents: read
414+
security-events: write
415+
actions: read
416+
417+
steps:
418+
- name: 📚 Git Checkout
419+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
420+
with:
421+
submodules: recursive
422+
clean: true
423+
persist-credentials: false
424+
set-safe-directory: true
425+
- name: 🌈 Run zizmor
426+
uses: zizmorcore/zizmor-action@2520132f44b3ed84916048d32e5c7153fc739fe7 # v0.0.3
427+
env:
428+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

packages/_analysis_options/lib/analysis_options.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ linter:
5353
prefer_mixin: true
5454
unnecessary_null_aware_operator_on_extension_on_nullable: true
5555
unreachable_from_main: true
56+
require_trailing_commas: true
5657

5758
# Rules with false-positives, not in VGA
5859
discarded_futures: true
@@ -65,13 +66,16 @@ linter:
6566
specify_nonobvious_property_types: true
6667

6768
# New/updated rules, not yet in VGA
68-
use_truncating_division: true
6969
avoid_futureor_void: true
70-
unnecessary_underscores: true
71-
strict_top_level_inference: true
70+
use_null_aware_elements: true
71+
unnecessary_ignore: true
72+
use_truncating_division: true
7273

7374
# Newly (or soon-to-be) deprecated rules, still in VGA
7475
unnecessary_await_in_return: false
75-
require_trailing_commas: false
76+
7677
# Additional information about this file can be found at
7778
# https://dart.dev/guides/language/analysis-options
79+
80+
formatter:
81+
trailing_commas: preserve

packages/_analysis_options/pubspec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ issue_tracker: https://github.com/PHS-TSA/nexus/issues
77
repository: https://github.com/PHS-TSA/nexus.git
88

99
environment:
10-
sdk: ^3.7.0
10+
sdk: ^3.8.0
1111
resolution: workspace
1212

1313
dependencies:
14-
very_good_analysis: ^7.0.0
14+
very_good_analysis: ^8.0.0-rc.1

packages/app/lib/src/app/app.dart

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ class App extends ConsumerStatefulWidget with Bootstrap {
1818
/// {@macro harvest_hub.app}
1919
///
2020
/// Construct a new [App] widget.
21-
const App({super.key});
21+
const App({
22+
super.key,
23+
});
2224

2325
@override
2426
ConsumerState<App> createState() => _AppState();
@@ -80,7 +82,9 @@ class _AppState extends ConsumerState<App> with RestorationMixin {
8082

8183
/// Eagerly initializes providers.
8284
class _EagerInitialization extends ConsumerWidget {
83-
const _EagerInitialization({required this.child});
85+
const _EagerInitialization({
86+
required this.child,
87+
});
8488

8589
final Widget child;
8690

packages/app/lib/src/app/bootstrap.dart

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@ typedef GetSharedPreferences =
3131
});
3232

3333
/// The environment needed to bootstrap the app.
34-
typedef BootstrapEnv =
35-
({RunApp runApp, GetSharedPreferences getSharedPreferences});
34+
typedef BootstrapEnv = ({
35+
RunApp runApp,
36+
GetSharedPreferences getSharedPreferences,
37+
});
3638

3739
/// Turn any widget into a flow-blown app.
3840
mixin Bootstrap implements Widget {

packages/app/lib/src/app/create_post.dart

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ class CreatePost extends HookConsumerWidget {
2929
/// {@macro harvest_hub.app.create_post}
3030
///
3131
/// Construct a new [CreatePost] widget.
32-
const CreatePost({super.key});
32+
const CreatePost({
33+
super.key,
34+
});
3335

3436
@override
3537
Widget build(BuildContext context, WidgetRef ref) {
@@ -99,10 +101,12 @@ class CreatePost extends HookConsumerWidget {
99101
),
100102
),
101103
insetPadding: EdgeInsets.symmetric(
102-
horizontal:
103-
context.sizeClass == MaterialWindowSizeClass.compact ? 0.0 : 64.0,
104-
vertical:
105-
context.sizeClass == MaterialWindowSizeClass.compact ? 0.0 : 48.0,
104+
horizontal: context.sizeClass == MaterialWindowSizeClass.compact
105+
? 0.0
106+
: 64.0,
107+
vertical: context.sizeClass == MaterialWindowSizeClass.compact
108+
? 0.0
109+
: 48.0,
106110
),
107111
child: Padding(
108112
padding: EdgeInsets.all(
@@ -216,7 +220,10 @@ class CreatePost extends HookConsumerWidget {
216220
///
217221
/// Notably, it also allows the user to remove images from the list.
218222
class _UploadedImagesView extends HookConsumerWidget {
219-
const _UploadedImagesView({super.key});
223+
const _UploadedImagesView({
224+
super.key,
225+
});
226+
220227
@override
221228
Widget build(BuildContext context, WidgetRef ref) {
222229
final uploadedImages = ref.watch(uploadedImagesServiceProvider);

packages/app/lib/src/app/wrapper.dart

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,10 @@ class Wrapper extends StatelessWidget {
1515
/// {@macro harvest_hub.app.wrapper}
1616
///
1717
/// Construct a new [Wrapper] widget.
18-
const Wrapper({required this.child, super.key});
18+
const Wrapper({
19+
required this.child,
20+
super.key,
21+
});
1922

2023
/// The child widget to display.
2124
final Widget child;
@@ -80,11 +83,10 @@ class _DesktopWrapper extends StatelessWidget {
8083
],
8184
), // TODO(MattsAttack): Implement rail here, similar to Google article.
8285
floatingActionButton: FloatingActionButton(
83-
onPressed:
84-
() async => showDialog<void>(
85-
context: context,
86-
builder: (context) => const CreatePost(),
87-
),
86+
onPressed: () async => showDialog<void>(
87+
context: context,
88+
builder: (context) => const CreatePost(),
89+
),
8890
child: const Icon(Icons.create),
8991
), // TODO(MattsAttack): Change to form on top of feed for desktop.
9092
);
@@ -112,11 +114,10 @@ class _MobileWrapper extends StatelessWidget {
112114
Widget build(BuildContext context) {
113115
return Scaffold(
114116
floatingActionButton: FloatingActionButton(
115-
onPressed:
116-
() async => showDialog<void>(
117-
context: context,
118-
builder: (context) => const CreatePost(),
119-
),
117+
onPressed: () async => showDialog<void>(
118+
context: context,
119+
builder: (context) => const CreatePost(),
120+
),
120121
child: const Icon(Icons.create),
121122
),
122123
body: child,

packages/app/lib/src/app/wrapper_page.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@ class WrapperPage extends ConsumerWidget {
1616
/// {@macro harvest_hub.app.wrapper_page}
1717
///
1818
/// Construct a new [WrapperPage] widget.
19-
const WrapperPage({super.key});
19+
const WrapperPage({
20+
super.key,
21+
});
2022

2123
@override
2224
Widget build(BuildContext context, WidgetRef ref) {

packages/app/lib/src/features/auth/presentation/auth/log_in_page.dart

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ class LogInPage extends HookConsumerWidget {
2222
/// {@macro harvest_hub.features.auth.presentation.auth.login_page}
2323
///
2424
/// Construct a new [LogInPage] widget.
25-
const LogInPage({super.key, AuthCallback? onResult}) : _onResult = onResult;
25+
const LogInPage({
26+
super.key,
27+
AuthCallback? onResult,
28+
}) : _onResult = onResult;
2629

2730
final AuthCallback? _onResult;
2831

@@ -39,10 +42,13 @@ class LogInPage extends HookConsumerWidget {
3942
}
4043

4144
class _DesktopLogInPage extends HookConsumerWidget {
42-
const _DesktopLogInPage({super.key, AuthCallback? onResult})
43-
: _onResult = onResult;
45+
const _DesktopLogInPage({
46+
super.key,
47+
AuthCallback? onResult,
48+
}) : _onResult = onResult;
4449

4550
final AuthCallback? _onResult;
51+
4652
@override
4753
Widget build(BuildContext context, WidgetRef ref) {
4854
final formKey = useGlobalKey<FormState>();
@@ -178,10 +184,13 @@ class _DesktopLogInPage extends HookConsumerWidget {
178184
}
179185

180186
class _MobileLogInPage extends HookConsumerWidget {
181-
const _MobileLogInPage({super.key, AuthCallback? onResult})
182-
: _onResult = onResult;
187+
const _MobileLogInPage({
188+
super.key,
189+
AuthCallback? onResult,
190+
}) : _onResult = onResult;
183191

184192
final AuthCallback? _onResult;
193+
185194
@override
186195
Widget build(BuildContext context, WidgetRef ref) {
187196
final formKey = useGlobalKey<FormState>();
@@ -250,10 +259,9 @@ class _MobileLogInPage extends HookConsumerWidget {
250259
'Welcome to Harvest Hub!',
251260
style: TextStyle(
252261
fontSize: 24,
253-
color:
254-
Theme.of(
255-
context,
256-
).colorScheme.onPrimaryContainer,
262+
color: Theme.of(
263+
context,
264+
).colorScheme.onPrimaryContainer,
257265
),
258266
textAlign: TextAlign.center,
259267
),

packages/app/lib/src/features/auth/presentation/auth/sign_up_page.dart

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@ class SignUpPage extends HookConsumerWidget {
2424
/// {@macro harvest_hub.features.auth.presentation.auth.sign_up_page}
2525
///
2626
/// Construct a new [SignUpPage] widget.
27-
const SignUpPage({super.key, AuthCallback? onResult}) : _onResult = onResult;
27+
const SignUpPage({
28+
super.key,
29+
AuthCallback? onResult,
30+
}) : _onResult = onResult;
2831

2932
final AuthCallback? _onResult;
3033

@@ -41,10 +44,13 @@ class SignUpPage extends HookConsumerWidget {
4144
}
4245

4346
class _DesktopSignUpPage extends HookConsumerWidget {
44-
const _DesktopSignUpPage({super.key, AuthCallback? onResult})
45-
: _onResult = onResult;
47+
const _DesktopSignUpPage({
48+
super.key,
49+
AuthCallback? onResult,
50+
}) : _onResult = onResult;
4651

4752
final AuthCallback? _onResult;
53+
4854
@override
4955
Widget build(BuildContext context, WidgetRef ref) {
5056
final formKey = useGlobalKey<FormState>();
@@ -190,10 +196,13 @@ class _DesktopSignUpPage extends HookConsumerWidget {
190196
}
191197

192198
class _MobileSignUpPage extends HookConsumerWidget {
193-
const _MobileSignUpPage({super.key, AuthCallback? onResult})
194-
: _onResult = onResult;
199+
const _MobileSignUpPage({
200+
super.key,
201+
AuthCallback? onResult,
202+
}) : _onResult = onResult;
195203

196204
final AuthCallback? _onResult;
205+
197206
@override
198207
Widget build(BuildContext context, WidgetRef ref) {
199208
final formKey = useGlobalKey<FormState>();
@@ -262,10 +271,9 @@ class _MobileSignUpPage extends HookConsumerWidget {
262271
'Welcome to Harvest Hub!',
263272
style: TextStyle(
264273
fontSize: 24,
265-
color:
266-
Theme.of(
267-
context,
268-
).colorScheme.onPrimaryContainer,
274+
color: Theme.of(
275+
context,
276+
).colorScheme.onPrimaryContainer,
269277
),
270278
textAlign: TextAlign.center,
271279
),

0 commit comments

Comments
 (0)