Skip to content

Deps upgrade + fix compile time errors #26

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

M-Ahal
Copy link

@M-Ahal M-Ahal commented May 9, 2025

No description provided.

@tenhobi tenhobi requested review from Copilot and petrnymsa May 9, 2025 12:16
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR upgrades various dependency versions and fixes compile-time errors by refactoring mapping functions and introducing safe conversion handling. Key changes include:

  • Upgraded dependency versions in both pubspec.yaml files.
  • Added a new enum (CodeFileGeneratedType) to classify generated code types.
  • Updated AutoMappr mapping functions to include an optional onMappingError parameter and a new _safeConvert helper.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pubspec.yaml Upgraded dependency versions to address compile-time and compatibility issues.
lib/model/code_file_generated_type.dart Introduced a new enum for generated code types.
example/pubspec.yaml Updated dependency and SDK versions for example usage.
example/lib/user_mappr.auto_mappr.dart Refactored conversion methods to incorporate safe error handling.
example/lib/models/freezed_union.freezed.dart Updated generated code formatting and refactored copyWith and equality logic.

@@ -0,0 +1,4 @@
enum CodeFileGeneratedType {
import,
Copy link
Preview

Copilot AI May 9, 2025

Choose a reason for hiding this comment

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

The enum value 'import' is a reserved keyword in Dart and may cause compile-time errors. Consider renaming it to a non-reserved identifier such as 'importFile'.

Suggested change
import,
importFile,

Copilot uses AI. Check for mistakes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant