Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update dependencies and add dart_code_linter #212

Merged
merged 7 commits into from
Jun 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.13.9"
"flutter": "3.22.1"
}
18 changes: 7 additions & 11 deletions analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ linter:
- avoid_relative_lib_imports
- avoid_renaming_method_parameters
- avoid_return_types_on_setters
- avoid_returning_null
- avoid_returning_null_for_future
Comment on lines -17 to -18
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we want this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE: This rule is removed in Dart 3.3.0; it is no longer functional.

Both rules say this in the docs
https://dart.dev/tools/linter-rules/avoid_returning_null

- avoid_returning_null_for_void
- avoid_returning_this
- avoid_shadowing_type_parameters
Expand Down Expand Up @@ -85,7 +83,7 @@ linter:
- use_key_in_widget_constructors
- valid_regexps

dart_code_metrics:
dart_code_linter:
anti-patterns:
- long-method
- long-parameter-list
Expand All @@ -112,18 +110,16 @@ dart_code_metrics:
allowed-duplicated-chains: 3
- prefer-trailing-comma



# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
analyzer:
exclude:
- '**/*.freezed.dart'
- '**/*.g.dart'
- '**/*.gen.dart'
- '**/*.gr.dart'
- 'bricks'
- 'lib/generated_plugin_registrant.dart'
- "**/*.freezed.dart"
- "**/*.g.dart"
- "**/*.gen.dart"
- "**/*.gr.dart"
- "bricks"
- "lib/generated_plugin_registrant.dart"
errors:
invalid_annotation_target: ignore
unused_element: ignore # https://github.com/dart-lang/sdk/issues/49025
4 changes: 2 additions & 2 deletions catalog/gallery/lib/catalog/catalog_scaffold_screen.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:auto_route/auto_route.dart';
import 'package:catalog/catalog.dart';
import 'package:catalog/extensions/color_extensions.dart';
import 'package:flutter/material.dart';
import 'package:catalog/catalog.dart';

class CatalogScaffold extends StatelessWidget {
final Widget child;
Expand All @@ -24,7 +24,7 @@ class CatalogScaffold extends StatelessWidget {
Icons.chevron_left,
color: context.theme.colorScheme.primary.getShade(100),
),
onPressed: () => context.router.pop(),
onPressed: () => context.router.maybePop(),
)
: null,
title: Text(title),
Expand Down
92 changes: 58 additions & 34 deletions catalog/gallery/pubspec.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 15 additions & 15 deletions catalog/gallery/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
name: gallery
description: A new Flutter project.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev
publish_to: "none" # Remove this line if you wish to publish to pub.dev
version: 1.0.0+1

environment:
sdk: '>=3.0.0 <4.0.0'
flutter: 3.13.9
sdk: ">=3.0.0 <4.0.0"
flutter: 3.22.1

# Dependencies specify other packages that your package needs in order to work.
# To automatically upgrade your package dependencies to the latest versions
Expand All @@ -19,16 +19,16 @@ dependencies:
catalog:
path: ../

auto_route: 7.8.3
flutter_screenutil: 5.9.0
auto_route: 8.1.3
flutter_screenutil: 5.9.3
flutter_native_splash: 2.3.2
material_color_generator: 1.1.0
google_fonts: 5.1.0
google_fonts: 6.2.1

dev_dependencies:
flutter_test:
sdk: flutter
auto_route_generator: 7.3.1
auto_route_generator: 8.0.0
flutter_lints: 3.0.1
flutter_gen_runner: 5.3.1
flutter_flavorizr: 2.2.1
Expand All @@ -42,19 +42,19 @@ flutter:
flutter_launcher_icons:
android: true
ios: true
image_path: 'icons/ic_launcher.png'
image_path_ios: 'icons/ic_launcher_ios.png' # Transparency not supported on IOS
adaptive_icon_foreground: 'icons/ic_launcher_foreground.png'
adaptive_icon_background: '#ee1a64'
image_path: "icons/ic_launcher.png"
image_path_ios: "icons/ic_launcher_ios.png" # Transparency not supported on IOS
adaptive_icon_foreground: "icons/ic_launcher_foreground.png"
adaptive_icon_background: "#ee1a64"
remove_alpha_ios: true
web:
generate: false
windows:
generate: false

flutter_native_splash:
color: '#ffffff'
image: 'icons/splash_logo.png'
color: "#ffffff"
image: "icons/splash_logo.png"
android_12:
image: 'icons/splash_logo_android_12.png'
branding: 'icons/splash_branding.png'
image: "icons/splash_logo_android_12.png"
branding: "icons/splash_branding.png"
Loading
Loading