Skip to content

Solving Dart Warnings #57

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

Merged
merged 27 commits into from
Jul 28, 2025
Merged

Solving Dart Warnings #57

merged 27 commits into from
Jul 28, 2025

Conversation

gabrielbmoro
Copy link
Collaborator

@gabrielbmoro gabrielbmoro commented Jul 27, 2025

  • Update some Flutter dependencies;
  • Convert flutter gradle files to be gradle .kts;
  • Try to use Dart analyze with Megalinter but it looks like it is only supported by dart, we do not have flutter linter support. I will check how we can add it in their repository. For now, I created a specific linter job for flutter.

Tests

  • Run the flutter app sample on Android and iOS

Screenshots

image

Check list

  • The tests were executed and passed successfully.
  • Code changes follow the project style guidelines.
  • Tests have been added if applicable.
  • Did you subscribe to the channel?😛

- Replaced Groovy Gradle files with Kotlin DSL (.kts) equivalents.
- Updated Gradle wrapper to version 8.12.
- Updated Android Gradle Plugin and Kotlin versions.
- Modified `AndroidManifest.xml` files:
    - Removed `package` attribute from root manifest.
    - Added `taskAffinity=""` to `MainActivity`.
    - Added `<queries>` for `ACTION_PROCESS_TEXT`.
- Updated `.gitignore` to include `.cxx/`.
- Increased Gradle JVM arguments in `gradle.properties`.
- Updated various dependency versions in `pubspec.lock`.
- Added empty test files for iOS and macOS.
Copy link
Contributor

github-actions bot commented Jul 27, 2025

@gabrielbmoro gabrielbmoro changed the title Update Android Gradle configuration and dependencies Solving Dart Warnings Jul 27, 2025
- Enable stricter type checks (`strict-casts`, `strict-raw-types`) in `analysis_options.yaml`.
- Exclude `build/**` directory from linting.
- Point MegaLinter to the correct Dart analyzer configuration file.
- Removed commented-out informational section in `analysis_options.yaml`.
This commit introduces a new `analysis_options.yaml` file for Flutter projects. This file defines a set of linter rules to enforce coding standards and best practices.

The specific rules added are based on the recommended set from `package:flutter_lints`, aiming to improve code quality, readability, and maintainability.

The Mega-Linter configuration has also been updated to remove the explicit reference to a Dart analyzer config file, as the standard `analysis_options.yaml` will now be used by default.
Replaced double quotes with single quotes for string literals across the codebase for consistency. This change primarily affects property lookups in `fromJson` methods and static key definitions in builder classes.
The Dartanalyzer will now run `flutter pub get` in the `flutter/craftd_widget` and `flutter/sample` directories before analysis. This ensures that dependencies are fetched, which is necessary for the analyzer to function correctly.
This commit updates the MegaLinter configuration by:

- Removing pre-commands for Dart analyzer, as they are no longer needed.
- Ensuring JavaScript Standard errors are disabled.
@gabrielbmoro gabrielbmoro marked this pull request as ready for review July 28, 2025 02:17
@gabrielbmoro gabrielbmoro merged commit be49d3f into main Jul 28, 2025
4 checks passed
@rviannaoliveira rviannaoliveira deleted the feature/dart-warnings branch July 29, 2025 00:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants