├── .idea
├── .name
├── .gitignore
├── codeStyles
│ └── codeStyleConfig.xml
├── runConfigurations
│ ├── Run_on_build_runner.xml
│ ├── Run_on_flutter_gen_command.xml
│ ├── build_runner_build_example.xml
│ └── build_runner_build_example_resources.xml
└── modules.xml
├── .node-version
├── .pubignore
├── packages
├── command
│ ├── LICENSE
│ ├── README.md
│ ├── .gitignore
│ ├── CHANGELOG.md
│ ├── dart_test.yaml
│ ├── analysis_options.yaml
│ ├── test
│ │ └── deprecated_configs.yaml
│ ├── example
│ │ └── lib
│ │ │ └── gen
│ │ │ └── fonts.gen.dart
│ ├── pubspec.yaml
│ ├── flutter_gen.iml
│ └── bin
│ │ └── flutter_gen_command.dart
├── core
│ ├── LICENSE
│ ├── README.md
│ ├── CHANGELOG.md
│ ├── dart_test.yaml
│ ├── test_resources
│ │ ├── pubspec_empty.yaml
│ │ ├── assets
│ │ │ ├── images
│ │ │ │ ├── chip2.jpg
│ │ │ │ ├── profile.jpg
│ │ │ │ ├── profile.png
│ │ │ │ ├── icons
│ │ │ │ │ ├── invalid.svg
│ │ │ │ │ └── fuchsia.svg
│ │ │ │ ├── chip1.jpg
│ │ │ │ ├── logo.png
│ │ │ │ ├── 2.0x
│ │ │ │ │ ├── chip1.jpg
│ │ │ │ │ ├── chip2.jpg
│ │ │ │ │ ├── logo.png
│ │ │ │ │ └── profile.jpg
│ │ │ │ ├── 3.0x
│ │ │ │ │ ├── chip1.jpg
│ │ │ │ │ ├── chip2.jpg
│ │ │ │ │ ├── logo.png
│ │ │ │ │ └── profile.jpg
│ │ │ │ ├── chip3
│ │ │ │ │ └── chip3.jpg
│ │ │ │ ├── chip4
│ │ │ │ │ └── chip4.jpg
│ │ │ │ └── animated
│ │ │ │ │ └── emoji_hugging_face.webp
│ │ │ ├── unknown
│ │ │ │ ├── dummy.DS_Store
│ │ │ │ └── unknown_mime_type.bk
│ │ │ ├── json
│ │ │ │ ├── list.json
│ │ │ │ └── map.json
│ │ │ ├── flare
│ │ │ │ └── Penguin.flr
│ │ │ ├── lottie
│ │ │ │ ├── cat_cat.tgs
│ │ │ │ ├── XuiIZ9X1Rf.lottie
│ │ │ │ ├── missing_layers.json
│ │ │ │ └── spinning_carrousel.zip
│ │ │ ├── movie
│ │ │ │ └── the_earth.mp4
│ │ │ ├── rive
│ │ │ │ └── vehicles.riv
│ │ │ ├── fonts
│ │ │ │ ├── Raleway-Italic.ttf
│ │ │ │ ├── Raleway-Regular.ttf
│ │ │ │ ├── RobotoMono-Bold.ttf
│ │ │ │ └── RobotoMono-Regular.ttf
│ │ │ ├── deferred_component
│ │ │ │ └── images
│ │ │ │ │ ├── chip1.jpg
│ │ │ │ │ └── component_logo.png
│ │ │ └── color
│ │ │ │ ├── colors2.xml
│ │ │ │ └── colors.xml
│ │ ├── CHANGELOG.md
│ │ ├── pubspec_deprecated_line_length.yaml
│ │ ├── pictures
│ │ │ └── chip5.jpg
│ │ ├── build_empty.yaml
│ │ ├── pubspec_colors_no_inputs.yaml
│ │ ├── pubspec_fonts_no_family.yaml
│ │ ├── pubspec_colors_no_inputs_list.yaml
│ │ ├── pubspec_only_flutter_gen_value.yaml
│ │ ├── pubspec_unknown_mime_type.yaml
│ │ ├── build_assets.yaml
│ │ ├── pubspec_assets_no_list.yaml
│ │ ├── pubspec_assets_rive_integrations.yaml
│ │ ├── deprecated_configs.yaml
│ │ ├── pubspec_assets_change_class_name.yaml
│ │ ├── pubspec_colors_change_class_name.yaml
│ │ ├── pubspec_ignore_files.yaml
│ │ ├── build_runner_assets.yaml
│ │ ├── pubspec_colors.yaml
│ │ ├── pubspec_only_flutter_value.yaml
│ │ ├── pubspec_assets_lottie_integrations.yaml
│ │ ├── pubspec_assets_package_parameter_disable_null_safety.yaml
│ │ ├── pubspec_assets_svg_integrations.yaml
│ │ ├── pubspec_generation_disabled.yaml
│ │ ├── pubspec_assets_directory_path.yaml
│ │ ├── pubspec_assets_package_parameter.yaml
│ │ ├── pubspec_fonts_change_class_name.yaml
│ │ ├── pubspec_wrong_output_path.yaml
│ │ ├── pubspec_fonts_package_parameter.yaml
│ │ ├── pubspec_no_settings.yaml
│ │ ├── pubspec_wrong_line_length.yaml
│ │ ├── pubspec_change_output_path.yaml
│ │ ├── pubspec_assets_directory_path_with_package_parameter.yaml
│ │ ├── pubspec_assets_no_integrations.yaml
│ │ ├── pubspec_assets_no_image_integration.yaml
│ │ ├── actual_data
│ │ │ ├── fonts_change_output_path.gen.dart
│ │ │ ├── fonts_only_flutter_value.gen.dart
│ │ │ ├── fonts_wrong_output_path.gen.dart
│ │ │ ├── fonts_fonts_change_class_name.gen.dart
│ │ │ ├── assets_ignore_files.gen.dart
│ │ │ ├── fonts_fonts_package_parameter.gen.dart
│ │ │ ├── fonts_fonts.gen.dart
│ │ │ ├── fonts_normal.gen.dart
│ │ │ ├── assets_unknown_mime_type.gen.dart
│ │ │ ├── assets_assets_rive_integrations.gen.dart
│ │ │ ├── colors_change_output_path.gen.dart
│ │ │ ├── colors_wrong_output_path.gen.dart
│ │ │ ├── colors_only_flutter_gen_value.gen.dart
│ │ │ └── colors_colors_change_class_name.gen.dart
│ │ ├── pubspec_assets_camel_case.yaml
│ │ ├── pubspec_assets_snake_case.yaml
│ │ ├── pubspec_assets_exclude_files.yaml
│ │ ├── pubspec_assets_flavored.yaml
│ │ ├── pubspec_assets.yaml
│ │ ├── pubspec_fonts.yaml
│ │ ├── pubspec_assets_flavored_duplicate_entry.yaml
│ │ ├── pubspec_assets_parse_metadata.yaml
│ │ ├── pubspec_assets_deferred_components.yaml
│ │ └── pubspec_normal.yaml
│ ├── lib
│ │ ├── utils
│ │ │ ├── file.dart
│ │ │ ├── log.dart
│ │ │ ├── error.dart
│ │ │ ├── cast.dart
│ │ │ ├── formatter.dart
│ │ │ ├── map.dart
│ │ │ └── string.dart
│ │ ├── version.gen.dart
│ │ ├── settings
│ │ │ ├── color_path.dart
│ │ │ ├── import.dart
│ │ │ ├── flavored_asset.dart
│ │ │ └── config_default.dart
│ │ └── generators
│ │ │ ├── generator_helper.dart
│ │ │ ├── integrations
│ │ │ ├── rive_integration.dart
│ │ │ └── integration.dart
│ │ │ └── fonts_generator.dart
│ ├── analysis_options.yaml
│ ├── build.yaml
│ ├── example
│ │ └── lib
│ │ │ └── gen
│ │ │ └── fonts.gen.dart
│ ├── flutter_gen_core.iml
│ ├── pubspec.yaml
│ ├── test
│ │ ├── fonts_gen_test.dart
│ │ └── colors_gen_test.dart
│ └── scripts
│ │ └── generate_facts.dart
└── runner
│ ├── LICENSE
│ ├── README.md
│ ├── CHANGELOG.md
│ ├── analysis_options.yaml
│ ├── build.yaml
│ ├── example
│ └── lib
│ │ └── gen
│ │ └── fonts.gen.dart
│ ├── pubspec.yaml
│ └── flutter_gen_runner.iml
├── .tool-versions
├── examples
├── example
│ ├── assets
│ │ ├── images
│ │ │ ├── chip2.jpg
│ │ │ ├── profile.jpg
│ │ │ ├── profile.png
│ │ │ ├── chip1.jpg
│ │ │ ├── logo.png
│ │ │ ├── 2.0x
│ │ │ │ ├── chip1.jpg
│ │ │ │ ├── chip2.jpg
│ │ │ │ ├── logo.png
│ │ │ │ └── profile.jpg
│ │ │ ├── 3.0x
│ │ │ │ ├── chip1.jpg
│ │ │ │ ├── chip2.jpg
│ │ │ │ ├── logo.png
│ │ │ │ └── profile.jpg
│ │ │ ├── chip3
│ │ │ │ └── chip3.jpg
│ │ │ ├── chip4
│ │ │ │ └── chip4.jpg
│ │ │ └── icons
│ │ │ │ └── fuchsia.svg
│ │ ├── mix
│ │ │ ├── dummy.DS_Store
│ │ │ ├── unknown_mime_type.bk
│ │ │ └── aaa.jpg
│ │ ├── unknown
│ │ │ ├── dummy.DS_Store
│ │ │ ├── README.md
│ │ │ ├── CHANGELOG.md
│ │ │ └── unknown_mime_type.bk
│ │ ├── json
│ │ │ ├── list.json
│ │ │ └── map.json
│ │ ├── lottie
│ │ │ ├── cat.tgs
│ │ │ ├── wrong
│ │ │ │ └── dummy.zip
│ │ │ ├── XuiIZ9X1Rf.lottie
│ │ │ └── spinning_carrousel.zip
│ │ ├── flare
│ │ │ └── Penguin.flr
│ │ ├── rive
│ │ │ └── vehicles.riv
│ │ ├── movie
│ │ │ └── the_earth.mp4
│ │ ├── fonts
│ │ │ ├── Raleway-Italic.ttf
│ │ │ ├── Raleway-Regular.ttf
│ │ │ ├── RobotoMono-Bold.ttf
│ │ │ └── RobotoMono-Regular.ttf
│ │ └── color
│ │ │ ├── colors2.xml
│ │ │ └── colors.xml
│ ├── .gitignore
│ ├── analysis_options.yaml
│ ├── ios
│ │ ├── Runner
│ │ │ ├── Runner-Bridging-Header.h
│ │ │ ├── Assets.xcassets
│ │ │ │ ├── LaunchImage.imageset
│ │ │ │ │ ├── LaunchImage.png
│ │ │ │ │ ├── LaunchImage@2x.png
│ │ │ │ │ ├── LaunchImage@3x.png
│ │ │ │ │ ├── README.md
│ │ │ │ │ └── Contents.json
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ ├── Icon-App-20x20@1x.png
│ │ │ │ │ ├── Icon-App-20x20@2x.png
│ │ │ │ │ ├── Icon-App-20x20@3x.png
│ │ │ │ │ ├── Icon-App-29x29@1x.png
│ │ │ │ │ ├── Icon-App-29x29@2x.png
│ │ │ │ │ ├── Icon-App-29x29@3x.png
│ │ │ │ │ ├── Icon-App-40x40@1x.png
│ │ │ │ │ ├── Icon-App-40x40@2x.png
│ │ │ │ │ ├── Icon-App-40x40@3x.png
│ │ │ │ │ ├── Icon-App-60x60@2x.png
│ │ │ │ │ ├── Icon-App-60x60@3x.png
│ │ │ │ │ ├── Icon-App-76x76@1x.png
│ │ │ │ │ ├── Icon-App-76x76@2x.png
│ │ │ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ │ │ └── Contents.json
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Base.lproj
│ │ │ │ ├── Main.storyboard
│ │ │ │ └── LaunchScreen.storyboard
│ │ │ └── Info.plist
│ │ ├── Flutter
│ │ │ ├── Debug.xcconfig
│ │ │ ├── Release.xcconfig
│ │ │ └── AppFrameworkInfo.plist
│ │ ├── Runner.xcodeproj
│ │ │ └── project.xcworkspace
│ │ │ │ ├── contents.xcworkspacedata
│ │ │ │ └── xcshareddata
│ │ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── Runner.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ ├── WorkspaceSettings.xcsettings
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── firebase_app_id_file.json
│ │ ├── .gitignore
│ │ └── Podfile
│ ├── web
│ │ ├── favicon.png
│ │ ├── icons
│ │ │ ├── Icon-192.png
│ │ │ ├── Icon-512.png
│ │ │ ├── Icon-maskable-192.png
│ │ │ └── Icon-maskable-512.png
│ │ ├── manifest.json
│ │ └── index.html
│ ├── pictures
│ │ └── chip5.jpg
│ ├── assets-extern
│ │ └── logo.png
│ ├── macos
│ │ ├── Runner
│ │ │ ├── Configs
│ │ │ │ ├── Debug.xcconfig
│ │ │ │ ├── Release.xcconfig
│ │ │ │ ├── Warnings.xcconfig
│ │ │ │ └── AppInfo.xcconfig
│ │ │ ├── Assets.xcassets
│ │ │ │ └── AppIcon.appiconset
│ │ │ │ │ ├── app_icon_16.png
│ │ │ │ │ ├── app_icon_32.png
│ │ │ │ │ ├── app_icon_64.png
│ │ │ │ │ ├── app_icon_1024.png
│ │ │ │ │ ├── app_icon_128.png
│ │ │ │ │ ├── app_icon_256.png
│ │ │ │ │ ├── app_icon_512.png
│ │ │ │ │ └── Contents.json
│ │ │ ├── AppDelegate.swift
│ │ │ ├── Release.entitlements
│ │ │ ├── DebugProfile.entitlements
│ │ │ ├── MainFlutterWindow.swift
│ │ │ └── Info.plist
│ │ ├── Flutter
│ │ │ ├── Flutter-Debug.xcconfig
│ │ │ ├── Flutter-Release.xcconfig
│ │ │ └── GeneratedPluginRegistrant.swift
│ │ ├── Runner.xcworkspace
│ │ │ ├── contents.xcworkspacedata
│ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── Runner.xcodeproj
│ │ │ └── project.xcworkspace
│ │ │ │ └── xcshareddata
│ │ │ │ └── IDEWorkspaceChecks.plist
│ │ ├── .gitignore
│ │ └── Podfile
│ ├── android
│ │ ├── gradle.properties
│ │ ├── app
│ │ │ ├── src
│ │ │ │ ├── main
│ │ │ │ │ ├── res
│ │ │ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ │ │ └── ic_launcher.png
│ │ │ │ │ │ ├── drawable
│ │ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ │ ├── drawable-v21
│ │ │ │ │ │ │ └── launch_background.xml
│ │ │ │ │ │ ├── values
│ │ │ │ │ │ │ └── styles.xml
│ │ │ │ │ │ └── values-night
│ │ │ │ │ │ │ └── styles.xml
│ │ │ │ │ ├── kotlin
│ │ │ │ │ │ └── com
│ │ │ │ │ │ │ └── example
│ │ │ │ │ │ │ └── example
│ │ │ │ │ │ │ └── MainActivity.kt
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ ├── debug
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ │ └── profile
│ │ │ │ │ └── AndroidManifest.xml
│ │ │ ├── google-services.json
│ │ │ └── build.gradle
│ │ ├── gradle
│ │ │ └── wrapper
│ │ │ │ └── gradle-wrapper.properties
│ │ ├── settings.gradle
│ │ └── build.gradle
│ ├── README.md
│ ├── .idea
│ │ ├── runConfigurations
│ │ │ └── main_dart.xml
│ │ ├── modules.xml
│ │ ├── libraries
│ │ │ ├── KotlinJavaRuntime.xml
│ │ │ └── Dart_SDK.xml
│ │ └── workspace.xml
│ ├── .metadata
│ ├── lib
│ │ └── gen
│ │ │ └── fonts.gen.dart
│ ├── example.iml
│ ├── test
│ │ └── svg_integrations_test.dart
│ └── pubspec.yaml
└── example_resources
│ ├── assets
│ ├── unknown
│ │ └── unknown_mime_type.bk
│ ├── images
│ │ ├── cat.tgs
│ │ ├── skills.riv
│ │ ├── favorite.flr
│ │ ├── flutter3.jpg
│ │ └── dart.svg
│ └── color
│ │ └── colors.xml
│ ├── README.md
│ ├── lib
│ └── gen
│ │ └── colors.gen.dart
│ ├── pubspec.yaml
│ └── example_resources.iml
├── .github
├── CODEOWNERS
├── FUNDING.yml
├── workflows
│ ├── publish.yml
│ ├── renovate.yml
│ └── build.yml
├── PULL_REQUEST_TEMPLATE.md
└── ISSUE_TEMPLATE
│ ├── feature_request.yml
│ └── bug_report.yml
├── art
└── logo.png
├── .husky
└── pre-commit
├── .gitattributes
├── pubspec.yaml
├── prettier.config.js
├── .prettierignore
├── scripts
└── coverage.sh
├── codecov.yml
├── renovate.json
├── package.json
├── fluttergen.iml
├── .vscode
└── launch.json
├── LICENSE
├── analysis_options.yaml
├── CONTRIBUTING.md
└── .gitignore
/.idea/.name:
--------------------------------------------------------------------------------
1 | FlutterGen
--------------------------------------------------------------------------------
/.node-version:
--------------------------------------------------------------------------------
1 | 22.21.1
2 |
--------------------------------------------------------------------------------
/.pubignore:
--------------------------------------------------------------------------------
1 | test_resources/
2 |
--------------------------------------------------------------------------------
/packages/command/LICENSE:
--------------------------------------------------------------------------------
1 | ../../LICENSE
--------------------------------------------------------------------------------
/packages/core/LICENSE:
--------------------------------------------------------------------------------
1 | ../../LICENSE
--------------------------------------------------------------------------------
/packages/core/README.md:
--------------------------------------------------------------------------------
1 | ../../README.md
--------------------------------------------------------------------------------
/packages/runner/LICENSE:
--------------------------------------------------------------------------------
1 | ../../LICENSE
--------------------------------------------------------------------------------
/.tool-versions:
--------------------------------------------------------------------------------
1 | flutter 3.35.2-stable
2 |
--------------------------------------------------------------------------------
/examples/example/assets/images/chip2.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/example/assets/images/profile.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/example/assets/images/profile.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/example/assets/mix/dummy.DS_Store:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/command/README.md:
--------------------------------------------------------------------------------
1 | ../../README.md
--------------------------------------------------------------------------------
/packages/runner/README.md:
--------------------------------------------------------------------------------
1 | ../../README.md
--------------------------------------------------------------------------------
/examples/example/.gitignore:
--------------------------------------------------------------------------------
1 | **/build/
2 |
3 |
--------------------------------------------------------------------------------
/examples/example/assets/unknown/dummy.DS_Store:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/command/.gitignore:
--------------------------------------------------------------------------------
1 | test/lib/gen/
2 |
--------------------------------------------------------------------------------
/packages/command/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ../../CHANGELOG.md
--------------------------------------------------------------------------------
/packages/core/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ../../CHANGELOG.md
--------------------------------------------------------------------------------
/packages/core/dart_test.yaml:
--------------------------------------------------------------------------------
1 | concurrency: 1
2 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_empty.yaml:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/runner/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | ../../CHANGELOG.md
--------------------------------------------------------------------------------
/.github/CODEOWNERS:
--------------------------------------------------------------------------------
1 | * @wasabeef @AlexV525 @lcdsmao
2 |
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: [wasabeef, AlexV525]
2 |
--------------------------------------------------------------------------------
/packages/command/dart_test.yaml:
--------------------------------------------------------------------------------
1 | concurrency: 1
2 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/chip2.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/profile.jpg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/profile.png:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/unknown/dummy.DS_Store:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/examples/example/assets/unknown/README.md:
--------------------------------------------------------------------------------
1 | This is the README.md
2 |
--------------------------------------------------------------------------------
/examples/example/assets/unknown/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | This is the CHANGELOG.md
2 |
--------------------------------------------------------------------------------
/packages/core/test_resources/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | This is the CHANGELOG.md
2 |
--------------------------------------------------------------------------------
/art/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/art/logo.png
--------------------------------------------------------------------------------
/examples/example/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: ../../analysis_options.yaml
2 |
--------------------------------------------------------------------------------
/examples/example/assets/json/list.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "ABC42"
4 | }
5 | ]
6 |
--------------------------------------------------------------------------------
/examples/example/assets/mix/unknown_mime_type.bk:
--------------------------------------------------------------------------------
1 | This file is UNKNOWN MIME TYPE FILE.
2 |
--------------------------------------------------------------------------------
/examples/example/assets/unknown/unknown_mime_type.bk:
--------------------------------------------------------------------------------
1 | This file is UNKNOWN MIME TYPE FILE.
2 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
2 |
--------------------------------------------------------------------------------
/examples/example_resources/assets/unknown/unknown_mime_type.bk:
--------------------------------------------------------------------------------
1 | This file is UNKNOWN MIME TYPE FILE.
2 |
--------------------------------------------------------------------------------
/packages/core/lib/utils/file.dart:
--------------------------------------------------------------------------------
1 | typedef FileWriter = void Function(String contents, String path);
2 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/icons/invalid.svg:
--------------------------------------------------------------------------------
1 | is not a valid SVG file
2 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/json/list.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "id": "ABC42"
4 | }
5 | ]
6 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/unknown/unknown_mime_type.bk:
--------------------------------------------------------------------------------
1 | This file is UNKNOWN MIME TYPE FILE.
2 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_deprecated_line_length.yaml:
--------------------------------------------------------------------------------
1 | flutter_gen:
2 | line_length: 120
3 |
--------------------------------------------------------------------------------
/.husky/pre-commit:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env sh
2 | . "$(dirname "$0")/_/husky.sh"
3 |
4 | pnpm lint-staged --allow-empty
5 |
--------------------------------------------------------------------------------
/examples/example/assets/json/map.json:
--------------------------------------------------------------------------------
1 | {
2 | "fruit": "Apple",
3 | "size": "Large",
4 | "color": "Red"
5 | }
6 |
--------------------------------------------------------------------------------
/packages/core/lib/utils/log.dart:
--------------------------------------------------------------------------------
1 | import 'package:logging/logging.dart';
2 |
3 | final log = Logger('FlutterGen');
4 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | examples/**/lib/gen/* linguist-generated=false
2 | test_resources/actual_data/* linguist-generated=false
3 |
--------------------------------------------------------------------------------
/examples/example/web/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/web/favicon.png
--------------------------------------------------------------------------------
/examples/example/assets/mix/aaa.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/mix/aaa.jpg
--------------------------------------------------------------------------------
/examples/example/pictures/chip5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/pictures/chip5.jpg
--------------------------------------------------------------------------------
/packages/core/lib/version.gen.dart:
--------------------------------------------------------------------------------
1 | /// DO NOT MODIFY BY HAND, Generated by version_gen
2 | String packageVersion = '5.12.0';
3 |
--------------------------------------------------------------------------------
/packages/core/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: ../../analysis_options.yaml
2 |
3 | analyzer:
4 | exclude:
5 | - 'example/**'
6 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/json/map.json:
--------------------------------------------------------------------------------
1 | {
2 | "fruit": "Apple",
3 | "size": "Large",
4 | "color": "Red"
5 | }
6 |
--------------------------------------------------------------------------------
/examples/example/assets-extern/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets-extern/logo.png
--------------------------------------------------------------------------------
/examples/example/assets/images/chip1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/chip1.jpg
--------------------------------------------------------------------------------
/examples/example/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/logo.png
--------------------------------------------------------------------------------
/examples/example/assets/lottie/cat.tgs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/lottie/cat.tgs
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Configs/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Debug.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/examples/example/web/icons/Icon-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/web/icons/Icon-192.png
--------------------------------------------------------------------------------
/examples/example/web/icons/Icon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/web/icons/Icon-512.png
--------------------------------------------------------------------------------
/packages/command/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: ../../analysis_options.yaml
2 |
3 | analyzer:
4 | exclude:
5 | - 'example/**'
6 |
--------------------------------------------------------------------------------
/packages/runner/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: ../../analysis_options.yaml
2 |
3 | analyzer:
4 | exclude:
5 | - 'example/**'
6 |
--------------------------------------------------------------------------------
/examples/example/assets/flare/Penguin.flr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/flare/Penguin.flr
--------------------------------------------------------------------------------
/examples/example/assets/rive/vehicles.riv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/rive/vehicles.riv
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Configs/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "../../Flutter/Flutter-Release.xcconfig"
2 | #include "Warnings.xcconfig"
3 |
--------------------------------------------------------------------------------
/examples/example/assets/images/2.0x/chip1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/2.0x/chip1.jpg
--------------------------------------------------------------------------------
/examples/example/assets/images/2.0x/chip2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/2.0x/chip2.jpg
--------------------------------------------------------------------------------
/examples/example/assets/images/2.0x/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/2.0x/logo.png
--------------------------------------------------------------------------------
/examples/example/assets/images/3.0x/chip1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/3.0x/chip1.jpg
--------------------------------------------------------------------------------
/examples/example/assets/images/3.0x/chip2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/3.0x/chip2.jpg
--------------------------------------------------------------------------------
/examples/example/assets/images/3.0x/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/3.0x/logo.png
--------------------------------------------------------------------------------
/examples/example/assets/movie/the_earth.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/movie/the_earth.mp4
--------------------------------------------------------------------------------
/examples/example/assets/images/2.0x/profile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/2.0x/profile.jpg
--------------------------------------------------------------------------------
/examples/example/assets/images/3.0x/profile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/3.0x/profile.jpg
--------------------------------------------------------------------------------
/examples/example/assets/images/chip3/chip3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/chip3/chip3.jpg
--------------------------------------------------------------------------------
/examples/example/assets/images/chip4/chip4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/images/chip4/chip4.jpg
--------------------------------------------------------------------------------
/examples/example/assets/lottie/wrong/dummy.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/lottie/wrong/dummy.zip
--------------------------------------------------------------------------------
/packages/core/test_resources/pictures/chip5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/pictures/chip5.jpg
--------------------------------------------------------------------------------
/examples/example/assets/fonts/Raleway-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/fonts/Raleway-Italic.ttf
--------------------------------------------------------------------------------
/examples/example/assets/fonts/Raleway-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/fonts/Raleway-Regular.ttf
--------------------------------------------------------------------------------
/examples/example/assets/fonts/RobotoMono-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/fonts/RobotoMono-Bold.ttf
--------------------------------------------------------------------------------
/examples/example/assets/lottie/XuiIZ9X1Rf.lottie:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/lottie/XuiIZ9X1Rf.lottie
--------------------------------------------------------------------------------
/examples/example/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/examples/example/web/icons/Icon-maskable-192.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/web/icons/Icon-maskable-192.png
--------------------------------------------------------------------------------
/examples/example/web/icons/Icon-maskable-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/web/icons/Icon-maskable-512.png
--------------------------------------------------------------------------------
/examples/example_resources/assets/images/cat.tgs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example_resources/assets/images/cat.tgs
--------------------------------------------------------------------------------
/examples/example/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=false
5 |
--------------------------------------------------------------------------------
/examples/example/assets/fonts/RobotoMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/fonts/RobotoMono-Regular.ttf
--------------------------------------------------------------------------------
/examples/example/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/examples/example_resources/assets/images/skills.riv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example_resources/assets/images/skills.riv
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/chip1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/chip1.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/logo.png
--------------------------------------------------------------------------------
/packages/core/test_resources/build_empty.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | targets:
4 | $default:
5 | builders:
6 | flutter_gen_runner:
7 | options:
8 |
--------------------------------------------------------------------------------
/examples/example/assets/lottie/spinning_carrousel.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/assets/lottie/spinning_carrousel.zip
--------------------------------------------------------------------------------
/examples/example_resources/assets/images/favorite.flr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example_resources/assets/images/favorite.flr
--------------------------------------------------------------------------------
/examples/example_resources/assets/images/flutter3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example_resources/assets/images/flutter3.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/flare/Penguin.flr:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/flare/Penguin.flr
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/lottie/cat_cat.tgs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/lottie/cat_cat.tgs
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/movie/the_earth.mp4:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/movie/the_earth.mp4
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/rive/vehicles.riv:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/rive/vehicles.riv
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_colors_no_inputs.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | colors:
7 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/2.0x/chip1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/2.0x/chip1.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/2.0x/chip2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/2.0x/chip2.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/2.0x/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/2.0x/logo.png
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/3.0x/chip1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/3.0x/chip1.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/3.0x/chip2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/3.0x/chip2.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/3.0x/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/3.0x/logo.png
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/fonts/Raleway-Italic.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/fonts/Raleway-Italic.ttf
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/2.0x/profile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/2.0x/profile.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/3.0x/profile.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/3.0x/profile.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/chip3/chip3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/chip3/chip3.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/chip4/chip4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/chip4/chip4.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/lottie/XuiIZ9X1Rf.lottie:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/lottie/XuiIZ9X1Rf.lottie
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/fonts/Raleway-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/fonts/Raleway-Regular.ttf
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/fonts/RobotoMono-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/fonts/RobotoMono-Bold.ttf
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/lottie/missing_layers.json:
--------------------------------------------------------------------------------
1 | {
2 | "v": "5.6.7",
3 | "w": "w",
4 | "h": "h",
5 | "ip": "ip",
6 | "op": "op",
7 | "fr": "fr"
8 | }
9 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_fonts_no_family.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | flutter:
7 | fonts:
8 |
--------------------------------------------------------------------------------
/examples/example/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | A sample project using FlutterGen.
4 |
5 | ## Getting Started
6 |
7 | ```
8 | cd ../flutter_gen
9 | melos bootstrap
10 | ```
11 |
--------------------------------------------------------------------------------
/examples/example/macos/Flutter/Flutter-Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/fonts/RobotoMono-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/fonts/RobotoMono-Regular.ttf
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/lottie/spinning_carrousel.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/lottie/spinning_carrousel.zip
--------------------------------------------------------------------------------
/examples/example/macos/Flutter/Flutter-Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "ephemeral/Flutter-Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_colors_no_inputs_list.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | colors:
7 | inputs:
8 |
--------------------------------------------------------------------------------
/.idea/.gitignore:
--------------------------------------------------------------------------------
1 | !/codeStyles/
2 | !/.name
3 | !/modules.xml
4 | !/runConfigurations/
5 |
6 | /dictionaries/
7 | /libraries/
8 | /runConfigurations/melos_*
9 | /shelf/
10 | /*.xml
11 |
--------------------------------------------------------------------------------
/examples/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/example_resources/README.md:
--------------------------------------------------------------------------------
1 | # example
2 |
3 | A sample project using FlutterGen.
4 |
5 | ## Getting Started
6 |
7 | ```
8 | cd ../flutter_gen
9 | melos bootstrap
10 | ```
11 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_only_flutter_gen_value.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 |
3 | flutter_gen:
4 | output: lib/gen/
5 |
6 | colors:
7 | inputs:
8 | - assets/color/colors.xml
9 |
--------------------------------------------------------------------------------
/.idea/codeStyles/codeStyleConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/examples/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/examples/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/deferred_component/images/chip1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/deferred_component/images/chip1.jpg
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/images/animated/emoji_hugging_face.webp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/images/animated/emoji_hugging_face.webp
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_unknown_mime_type.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | flutter:
7 | assets:
8 | - assets/unknown/
9 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_gen_repository
2 |
3 | environment:
4 | sdk: ^3.4.0
5 |
6 | dev_dependencies:
7 | lints: any # Ignoring the version to allow editing across SDK versions.
8 | melos: ^6.0.0
9 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/deferred_component/images/component_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/packages/core/test_resources/assets/deferred_component/images/component_logo.png
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png
--------------------------------------------------------------------------------
/examples/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.example
2 |
3 | import io.flutter.embedding.android.FlutterActivity
4 |
5 | class MainActivity: FlutterActivity() {
6 | }
7 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/packages/command/test/deprecated_configs.yaml:
--------------------------------------------------------------------------------
1 | flutter:
2 | assets:
3 | - assets/
4 |
5 | flutter_gen:
6 | assets:
7 | enabled: true
8 | style: snake-case
9 | package_parameter_enabled: true
10 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/FlutterGen/flutter_gen/HEAD/examples/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/packages/core/test_resources/build_assets.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | targets:
4 | $default:
5 | builders:
6 | flutter_gen:
7 | options:
8 | output: lib/build_gen/
9 | line_length: 80
10 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_no_list.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | integrations:
7 | flutter_svg: true
8 |
9 | flutter:
10 | assets:
11 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_rive_integrations.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/
5 |
6 | integrations:
7 | rive: true
8 |
9 | flutter:
10 | assets:
11 | - assets/rive/vehicles.riv
12 |
--------------------------------------------------------------------------------
/packages/core/test_resources/deprecated_configs.yaml:
--------------------------------------------------------------------------------
1 | name: deprecated_configs
2 |
3 | flutter:
4 | assets:
5 | - assets/
6 |
7 | flutter_gen:
8 | assets:
9 | enabled: true
10 | style: snake-case
11 | package_parameter_enabled: true
12 |
--------------------------------------------------------------------------------
/packages/core/lib/utils/error.dart:
--------------------------------------------------------------------------------
1 | class InvalidSettingsException implements Exception {
2 | const InvalidSettingsException(this.message);
3 |
4 | final String message;
5 |
6 | @override
7 | String toString() => 'InvalidSettingsException: $message';
8 | }
9 |
--------------------------------------------------------------------------------
/prettier.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | singleQuote: true,
3 | useTabs: false,
4 | tabWidth: 2,
5 | semi: true,
6 | bracketSpacing: true,
7 | trailingComma: 'all',
8 | arrowParens: 'always',
9 | plugins: ['prettier-plugin-packagejson'],
10 | };
11 |
--------------------------------------------------------------------------------
/examples/example/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | distributionBase=GRADLE_USER_HOME
2 | distributionPath=wrapper/dists
3 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_change_class_name.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | assets:
7 | outputs:
8 | class_name: MyAssets
9 |
10 | flutter:
11 | assets:
12 | - assets/images
13 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_colors_change_class_name.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | colors:
7 | outputs:
8 | class_name: MyColorName
9 | inputs:
10 | - assets/color/colors.xml
11 |
--------------------------------------------------------------------------------
/examples/example/macos/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | @NSApplicationMain
5 | class AppDelegate: FlutterAppDelegate {
6 | override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
7 | return true
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/examples/example_resources/assets/color/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #000000
5 | #EEEEEE
6 | #979797
7 |
8 |
--------------------------------------------------------------------------------
/examples/example/assets/color/colors2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #4D000000
4 | #66000000
5 | #80000000
6 | #99000000
7 |
8 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_ignore_files.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | flutter:
7 | assets:
8 | - assets/unknown/.DS_Store
9 | - assets/unknown/dummy.DS_Store
10 | - assets/unknown/unknown_mime_type.bk.swp
11 |
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Release.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/color/colors2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #4D000000
4 | #66000000
5 | #80000000
6 | #99000000
7 |
8 |
--------------------------------------------------------------------------------
/.prettierignore:
--------------------------------------------------------------------------------
1 | .dart_tool/
2 | build/
3 | packages/**/android/
4 | packages/**/ios/
5 | packages/**/linux/
6 | packages/**/macos/
7 | packages/**/web/
8 | packages/**/windows/
9 | examples/**/android/
10 | examples/**/ios/
11 | examples/**/linux/
12 | examples/**/macos/
13 | examples/**/web/
14 | examples/**/windows/
15 |
--------------------------------------------------------------------------------
/packages/core/lib/utils/cast.dart:
--------------------------------------------------------------------------------
1 | /// Returns the value if it is the same type as [T], otherwise `null`.
2 | ///
3 | /// [T] must be non-nullable since the return type is nullable.
4 | T? safeCast(Object? value) {
5 | return switch (value) {
6 | final T v => v,
7 | _ => null,
8 | };
9 | }
10 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/example/macos/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/packages/core/test_resources/build_runner_assets.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | targets:
4 | $default:
5 | builders:
6 | flutter_gen_runner:
7 | options:
8 | output: lib/build_gen/
9 | line_length: 120
10 | assets:
11 | outputs:
12 | class_name: BuildAssets
13 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/example/ios/firebase_app_id_file.json:
--------------------------------------------------------------------------------
1 | {
2 | "file_generated_by": "FlutterFire CLI",
3 | "purpose": "FirebaseAppID & ProjectID for this Firebase app in this directory",
4 | "GOOGLE_APP_ID": "1:223276840801:ios:b5be85aa3c64059db77720",
5 | "FIREBASE_PROJECT_ID": "flutter-gen-5b267",
6 | "GCM_SENDER_ID": "223276840801"
7 | }
8 |
--------------------------------------------------------------------------------
/examples/example/.idea/runConfigurations/main_dart.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/examples/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_colors.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | environment:
4 | sdk: ^3.6.0
5 |
6 | flutter_gen:
7 | output: lib/gen/ # Optional (default: lib/gen/)
8 |
9 | colors:
10 | inputs:
11 | - assets/color/colors.xml
12 | - assets/color/colors2.xml
13 | - assets/color/colors2.xml # duplicated
14 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreviewsEnabled
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/example/macos/Flutter/GeneratedPluginRegistrant.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Generated file. Do not edit.
3 | //
4 |
5 | import FlutterMacOS
6 | import Foundation
7 |
8 | import rive_common
9 |
10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
11 | RivePlugin.register(with: registry.registrar(forPlugin: "RivePlugin"))
12 | }
13 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/examples/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_only_flutter_value.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 |
3 | flutter:
4 | uses-material-design: true
5 | assets:
6 | - assets/images/
7 | fonts:
8 | - family: Raleway
9 | fonts:
10 | - asset: assets/fonts/Raleway-Regular.ttf
11 | - asset: assets/fonts/Raleway-Italic.ttf
12 | style: italic
13 |
--------------------------------------------------------------------------------
/examples/example/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: bbfbf1770cca2da7c82e887e4e4af910034800b6
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_lottie_integrations.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/
5 |
6 | integrations:
7 | lottie: true
8 |
9 | flutter:
10 | assets:
11 | - assets/lottie/hamburger_arrow.json
12 | - assets/lottie/spinning_carrousel.zip
13 | - assets/lottie/XuiIZ9X1Rf.lottie
14 | - assets/lottie/cat_cat.tgs
15 |
--------------------------------------------------------------------------------
/packages/runner/build.yaml:
--------------------------------------------------------------------------------
1 | targets:
2 | $default:
3 | builders:
4 | flutter_gen_runner:
5 | enabled: true
6 |
7 | builders:
8 | flutter_gen_runner:
9 | import: 'package:flutter_gen_runner/flutter_gen_runner.dart'
10 | builder_factories: ['build']
11 | build_extensions: { '$package$': ['.gen.dart'] }
12 | auto_apply: dependents
13 | build_to: source
14 |
--------------------------------------------------------------------------------
/examples/example/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/example/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_package_parameter_disable_null_safety.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | integrations:
5 | flutter_svg: true
6 | assets:
7 | outputs:
8 | package_parameter_enabled: true
9 |
10 | flutter:
11 | assets:
12 | - assets/images/chip3/chip3.jpg
13 | - assets/images/icons/dart@test.svg
14 | - assets/images/icons/fuchsia.svg
15 |
--------------------------------------------------------------------------------
/scripts/coverage.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | set -e
4 | set -o pipefail
5 |
6 | # Validate the configurations.
7 | curl --data-binary @codecov.yml https://codecov.io/validate
8 |
9 | DIR="${1}"
10 | cd "${DIR}" || exit
11 |
12 | dart pub global activate coverage
13 | dart run coverage:test_with_coverage --port=9292
14 | format_coverage --lcov --in=coverage --out=coverage.lcov --report-on=lib
15 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_svg_integrations.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/
5 |
6 | integrations:
7 | flutter_svg: true
8 |
9 | flutter:
10 | assets:
11 | - assets/images/icons/dart@test.svg
12 | - assets/images/icons/fuchsia.svg
13 | - path: assets/images/icons/kmm.svg
14 | transformers:
15 | - package: vector_graphics_compiler
16 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_generation_disabled.yaml:
--------------------------------------------------------------------------------
1 | flutter_gen:
2 | assets:
3 | enabled: false
4 | fonts:
5 | enabled: false
6 | colors:
7 | enabled: false
8 | inputs:
9 | - assets/color/colors.xml
10 |
11 | flutter:
12 | assets:
13 | - assets/images
14 | fonts:
15 | - family: Raleway
16 | fonts:
17 | - asset: assets/fonts/Raleway-Regular.ttf
18 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
6 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_directory_path.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | integrations:
5 | flutter_svg: true
6 | assets:
7 | outputs:
8 | directory_path_enabled: true
9 |
10 | flutter:
11 | assets:
12 | - assets/images/chip3/chip3.jpg
13 | - assets/images/icons/dart@test.svg
14 | - assets/images/icons/fuchsia.svg
15 | - assets/unknown/unknown_mime_type.bk
16 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_package_parameter.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | integrations:
5 | flutter_svg: true
6 | assets:
7 | outputs:
8 | package_parameter_enabled: true
9 |
10 | flutter:
11 | assets:
12 | - assets/images/chip3/chip3.jpg
13 | - assets/images/icons/dart@test.svg
14 | - assets/images/icons/fuchsia.svg
15 | - assets/unknown/unknown_mime_type.bk
16 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_fonts_change_class_name.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | fonts:
7 | outputs:
8 | class_name: MyFontFamily
9 |
10 | flutter:
11 | fonts:
12 | - family: Raleway
13 | fonts:
14 | - asset: assets/fonts/Raleway-Regular.ttf
15 | - asset: assets/fonts/Raleway-Italic.ttf
16 | style: italic
17 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_wrong_output_path.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 |
3 | flutter_gen:
4 | output:
5 |
6 | colors:
7 | inputs:
8 | - assets/color/colors.xml
9 |
10 | flutter:
11 | assets:
12 | - assets/images/
13 | fonts:
14 | - family: Raleway
15 | fonts:
16 | - asset: assets/fonts/Raleway-Regular.ttf
17 | - asset: assets/fonts/Raleway-Italic.ttf
18 | style: italic
19 |
--------------------------------------------------------------------------------
/examples/example/assets/color/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #000000
5 | #EEEEEE
6 | #979797
7 | #CF2A2A
8 | #DF9527
9 |
10 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_fonts_package_parameter.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | fonts:
7 | outputs:
8 | package_parameter_enabled: true
9 |
10 | flutter:
11 | fonts:
12 | - family: Raleway
13 | fonts:
14 | - asset: assets/fonts/Raleway-Regular.ttf
15 | - asset: assets/fonts/Raleway-Italic.ttf
16 | style: italic
17 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_no_settings.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 | description: A sample project using FlutterGen.
3 |
4 | publish_to: 'none'
5 |
6 | version: 1.0.0+1
7 |
8 | environment:
9 | sdk: '>=2.9.0 <3.0.0'
10 | flutter: '>=1.20.0'
11 |
12 | dependencies:
13 | flutter:
14 | sdk: flutter
15 |
16 | dev_dependencies:
17 | flutter_test:
18 | sdk: flutter
19 | build_runner:
20 | flutter_gen:
21 | path: ../
22 |
--------------------------------------------------------------------------------
/examples/example/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/examples/example/macos/Runner/DebugProfile.entitlements:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | com.apple.security.app-sandbox
6 |
7 | com.apple.security.cs.allow-jit
8 |
9 | com.apple.security.network.server
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/core/test_resources/assets/color/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #000000
5 | #EEEEEE
6 | #979797
7 | #CF2A2A
8 | #DF9527
9 |
10 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_wrong_line_length.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 |
3 | flutter_gen:
4 | output: lib/gen/
5 | line_length: aaaa
6 |
7 | colors:
8 | inputs:
9 | - assets/color/colors.xml
10 |
11 | flutter:
12 | assets:
13 | - assets/images/
14 | fonts:
15 | - family: Raleway
16 | fonts:
17 | - asset: assets/fonts/Raleway-Regular.ttf
18 | - asset: assets/fonts/Raleway-Italic.ttf
19 | style: italic
20 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_change_output_path.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/aaa/bbb/ccc # Optional (default: lib/gen/)
5 |
6 | colors:
7 | inputs:
8 | - assets/color/colors.xml
9 |
10 | flutter:
11 | assets:
12 | - assets/images/
13 | fonts:
14 | - family: Raleway
15 | fonts:
16 | - asset: assets/fonts/Raleway-Regular.ttf
17 | - asset: assets/fonts/Raleway-Italic.ttf
18 | style: italic
19 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_directory_path_with_package_parameter.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | integrations:
5 | flutter_svg: true
6 | assets:
7 | outputs:
8 | directory_path_enabled: true
9 | package_parameter_enabled: true
10 |
11 | flutter:
12 | assets:
13 | - assets/images/chip3/chip3.jpg
14 | - assets/images/icons/dart@test.svg
15 | - assets/images/icons/fuchsia.svg
16 | - assets/unknown/unknown_mime_type.bk
17 |
--------------------------------------------------------------------------------
/packages/core/build.yaml:
--------------------------------------------------------------------------------
1 | targets:
2 | $default:
3 | builders:
4 | json_serializable:
5 | options:
6 | any_map: true
7 | checked: true
8 | create_factory: true
9 | create_to_json: false
10 | disallow_unrecognized_keys: true
11 | explicit_to_json: false
12 | field_rename: none
13 | generic_argument_factories: false
14 | ignore_unannotated: false
15 | include_if_null: true
16 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/examples/example/macos/Runner/MainFlutterWindow.swift:
--------------------------------------------------------------------------------
1 | import Cocoa
2 | import FlutterMacOS
3 |
4 | class MainFlutterWindow: NSWindow {
5 | override func awakeFromNib() {
6 | let flutterViewController = FlutterViewController.init()
7 | let windowFrame = self.frame
8 | self.contentViewController = flutterViewController
9 | self.setFrame(windowFrame, display: true)
10 |
11 | RegisterGeneratedPlugins(registry: flutterViewController)
12 |
13 | super.awakeFromNib()
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/Run_on_build_runner.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/packages/core/lib/settings/color_path.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io';
2 |
3 | import 'package:mime/mime.dart' show lookupMimeType;
4 |
5 | /// https://github.com/dart-lang/mime/blob/master/lib/src/default_extension_map.dart
6 | class ColorPath {
7 | const ColorPath(this.path);
8 |
9 | final String path;
10 |
11 | File get file => File(path);
12 |
13 | String? get mime => lookupMimeType(path);
14 |
15 | /// https://api.flutter.dev/flutter/widgets/Image-class.html
16 | bool get isXml => mime == 'application/xml';
17 | }
18 |
--------------------------------------------------------------------------------
/examples/example/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
4 | def properties = new Properties()
5 |
6 | assert localPropertiesFile.exists()
7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
8 |
9 | def flutterSdkPath = properties.getProperty("flutter.sdk")
10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
12 |
--------------------------------------------------------------------------------
/examples/example/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_no_integrations.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | flutter:
7 | assets:
8 | - assets/images
9 | - assets/images/chip3/chip3.jpg
10 | - assets/images/chip3/chip3.jpg # duplicated
11 | - assets/images/chip4/
12 | - assets/images/icons/fuchsia.svg
13 | - assets/images/icons/kmm.svg
14 | - assets/images/icons/paint.svg
15 | - assets/images/icons/dart@test.svg
16 | - assets/json/
17 | - pictures/chip5.jpg
18 |
--------------------------------------------------------------------------------
/examples/example/android/app/src/main/res/drawable-v21/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/Run_on_flutter_gen_command.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/build_runner_build_example.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/examples/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/packages/core/lib/settings/import.dart:
--------------------------------------------------------------------------------
1 | import 'package:meta/meta.dart';
2 |
3 | @immutable
4 | class Import {
5 | const Import(this.import, {this.alias});
6 |
7 | final String import;
8 | final String? alias;
9 |
10 | @override
11 | bool operator ==(Object other) {
12 | if (identical(this, other)) {
13 | return true;
14 | }
15 | return other is Import &&
16 | identical(other.import, import) &&
17 | identical(other.alias, alias);
18 | }
19 |
20 | @override
21 | int get hashCode => import.hashCode ^ alias.hashCode;
22 | }
23 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | codecov:
2 | notify:
3 | wait_for_ci: true
4 | require_ci_to_pass: yes
5 |
6 | coverage:
7 | status:
8 | project:
9 | default:
10 | # basic
11 | target: 0%
12 | threshold: 0%
13 | base: auto
14 | # advanced
15 | branches: null
16 | if_no_uploads: error
17 | if_not_found: success
18 | if_ci_failed: error
19 | only_pulls: false
20 | flags: null
21 | paths: null
22 |
23 | ignore:
24 | - 'examples/**/*'
25 | - '**/*.g.dart'
26 | - '**/*.gen.dart'
27 |
--------------------------------------------------------------------------------
/.idea/runConfigurations/build_runner_build_example_resources.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_no_image_integration.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | integrations:
7 | image: false
8 |
9 | flutter:
10 | assets:
11 | - assets/images
12 | - assets/images/chip3/chip3.jpg
13 | - assets/images/chip3/chip3.jpg # duplicated
14 | - assets/images/chip4/
15 | - assets/images/icons/fuchsia.svg
16 | - assets/images/icons/kmm.svg
17 | - assets/images/icons/paint.svg
18 | - assets/images/icons/dart@test.svg
19 | - assets/json/
20 | - pictures/chip5.jpg
21 |
--------------------------------------------------------------------------------
/packages/core/test_resources/actual_data/fonts_change_output_path.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 | /// GENERATED CODE - DO NOT MODIFY BY HAND
3 | /// *****************************************************
4 | /// FlutterGen
5 | /// *****************************************************
6 |
7 | // coverage:ignore-file
8 | // ignore_for_file: type=lint
9 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
10 |
11 | class FontFamily {
12 | FontFamily._();
13 |
14 | /// Font family: Raleway
15 | static const String raleway = 'Raleway';
16 | }
17 |
--------------------------------------------------------------------------------
/packages/core/test_resources/actual_data/fonts_only_flutter_value.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 | /// GENERATED CODE - DO NOT MODIFY BY HAND
3 | /// *****************************************************
4 | /// FlutterGen
5 | /// *****************************************************
6 |
7 | // coverage:ignore-file
8 | // ignore_for_file: type=lint
9 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
10 |
11 | class FontFamily {
12 | FontFamily._();
13 |
14 | /// Font family: Raleway
15 | static const String raleway = 'Raleway';
16 | }
17 |
--------------------------------------------------------------------------------
/packages/core/test_resources/actual_data/fonts_wrong_output_path.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 | /// GENERATED CODE - DO NOT MODIFY BY HAND
3 | /// *****************************************************
4 | /// FlutterGen
5 | /// *****************************************************
6 |
7 | // coverage:ignore-file
8 | // ignore_for_file: type=lint
9 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
10 |
11 | class FontFamily {
12 | FontFamily._();
13 |
14 | /// Font family: Raleway
15 | static const String raleway = 'Raleway';
16 | }
17 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_camel_case.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | assets:
7 | outputs:
8 | style: camel-case
9 |
10 | flutter:
11 | assets:
12 | - assets/images
13 | - assets/images/chip3/chip3.jpg
14 | - assets/images/chip3/chip3.jpg # duplicated
15 | - assets/images/chip4/
16 | - assets/images/icons/fuchsia.svg
17 | - assets/images/icons/kmm.svg
18 | - assets/images/icons/paint.svg
19 | - assets/images/icons/dart@test.svg
20 | - assets/json/
21 | - pictures/chip5.jpg
22 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_snake_case.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | assets:
7 | outputs:
8 | style: snake-case
9 |
10 | flutter:
11 | assets:
12 | - assets/images
13 | - assets/images/chip3/chip3.jpg
14 | - assets/images/chip3/chip3.jpg # duplicated
15 | - assets/images/chip4/
16 | - assets/images/icons/fuchsia.svg
17 | - assets/images/icons/kmm.svg
18 | - assets/images/icons/paint.svg
19 | - assets/images/icons/dart@test.svg
20 | - assets/json/
21 | - pictures/chip5.jpg
22 |
--------------------------------------------------------------------------------
/packages/core/test_resources/actual_data/fonts_fonts_change_class_name.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 | /// GENERATED CODE - DO NOT MODIFY BY HAND
3 | /// *****************************************************
4 | /// FlutterGen
5 | /// *****************************************************
6 |
7 | // coverage:ignore-file
8 | // ignore_for_file: type=lint
9 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
10 |
11 | class MyFontFamily {
12 | MyFontFamily._();
13 |
14 | /// Font family: Raleway
15 | static const String raleway = 'Raleway';
16 | }
17 |
--------------------------------------------------------------------------------
/renovate.json:
--------------------------------------------------------------------------------
1 | {
2 | "extends": [
3 | "config:recommended",
4 | "group:monorepos",
5 | ":semanticCommits",
6 | ":semanticCommitTypeAll(upgrade)",
7 | ":semanticCommitScopeDisabled"
8 | ],
9 | "timezone": "Asia/Tokyo",
10 | "schedule": ["* * * * 3"],
11 | "branchConcurrentLimit": 5,
12 | "branchPrefix": "upgrade-renovate-",
13 | "dependencyDashboard": false,
14 | "ignorePaths": [".github/", "examples/**"],
15 | "major": {
16 | "minimumReleaseAge": "30 days"
17 | },
18 | "minor": {
19 | "minimumReleaseAge": "14 days"
20 | },
21 | "patch": {
22 | "enabled": false
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/packages/core/example/lib/gen/fonts.gen.dart:
--------------------------------------------------------------------------------
1 | /// GENERATED CODE - DO NOT MODIFY BY HAND
2 | /// *****************************************************
3 | /// FlutterGen
4 | /// *****************************************************
5 |
6 | // coverage:ignore-file
7 | // ignore_for_file: type=lint
8 | // ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
9 |
10 | class MyFontFamily {
11 | MyFontFamily._();
12 |
13 | /// Font family: Raleway
14 | static const String raleway = 'Raleway';
15 |
16 | /// Font family: RobotoMono
17 | static const String robotoMono = 'RobotoMono';
18 | }
19 |
--------------------------------------------------------------------------------
/packages/runner/example/lib/gen/fonts.gen.dart:
--------------------------------------------------------------------------------
1 | /// GENERATED CODE - DO NOT MODIFY BY HAND
2 | /// *****************************************************
3 | /// FlutterGen
4 | /// *****************************************************
5 |
6 | // coverage:ignore-file
7 | // ignore_for_file: type=lint
8 | // ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
9 |
10 | class MyFontFamily {
11 | MyFontFamily._();
12 |
13 | /// Font family: Raleway
14 | static const String raleway = 'Raleway';
15 |
16 | /// Font family: RobotoMono
17 | static const String robotoMono = 'RobotoMono';
18 | }
19 |
--------------------------------------------------------------------------------
/.github/workflows/publish.yml:
--------------------------------------------------------------------------------
1 | name: Publish to pub.dev
2 |
3 | on:
4 | push:
5 | tags:
6 | - 'v[0-9]+.[0-9]+.[0-9]+'
7 | workflow_dispatch:
8 |
9 | jobs:
10 | publish:
11 | permissions:
12 | id-token: write
13 | runs-on: ubuntu-latest
14 | steps:
15 | - uses: actions/checkout@v4
16 | - uses: dart-lang/setup-dart@v1
17 | - uses: flutter-actions/setup-flutter@v4.0
18 | - name: Install dependencies
19 | run: dart pub get
20 | - name: Prepare Melos workspace
21 | uses: bluefireteam/melos-action@v3
22 | - name: Publish
23 | run: melos run publish:force --no-select
24 |
--------------------------------------------------------------------------------
/packages/command/example/lib/gen/fonts.gen.dart:
--------------------------------------------------------------------------------
1 | /// GENERATED CODE - DO NOT MODIFY BY HAND
2 | /// *****************************************************
3 | /// FlutterGen
4 | /// *****************************************************
5 |
6 | // coverage:ignore-file
7 | // ignore_for_file: type=lint
8 | // ignore_for_file: directives_ordering,unnecessary_import,implicit_dynamic_list_literal,deprecated_member_use
9 |
10 | class MyFontFamily {
11 | MyFontFamily._();
12 |
13 | /// Font family: Raleway
14 | static const String raleway = 'Raleway';
15 |
16 | /// Font family: RobotoMono
17 | static const String robotoMono = 'RobotoMono';
18 | }
19 |
--------------------------------------------------------------------------------
/examples/example/lib/gen/fonts.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 | /// GENERATED CODE - DO NOT MODIFY BY HAND
3 | /// *****************************************************
4 | /// FlutterGen
5 | /// *****************************************************
6 |
7 | // coverage:ignore-file
8 | // ignore_for_file: type=lint
9 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
10 |
11 | class MyFontFamily {
12 | MyFontFamily._();
13 |
14 | /// Font family: Raleway
15 | static const String raleway = 'Raleway';
16 |
17 | /// Font family: RobotoMono
18 | static const String robotoMono = 'RobotoMono';
19 | }
20 |
--------------------------------------------------------------------------------
/packages/core/test_resources/actual_data/assets_ignore_files.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 |
3 | /// GENERATED CODE - DO NOT MODIFY BY HAND
4 | /// *****************************************************
5 | /// FlutterGen
6 | /// *****************************************************
7 |
8 | // coverage:ignore-file
9 | // ignore_for_file: type=lint
10 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
11 |
12 | class $AssetsUnknownGen {
13 | const $AssetsUnknownGen();
14 | }
15 |
16 | class Assets {
17 | const Assets._();
18 |
19 | static const $AssetsUnknownGen unknown = $AssetsUnknownGen();
20 | }
21 |
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Configs/Warnings.xcconfig:
--------------------------------------------------------------------------------
1 | WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings
2 | GCC_WARN_UNDECLARED_SELECTOR = YES
3 | CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES
4 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE
5 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES
6 | CLANG_WARN_PRAGMA_PACK = YES
7 | CLANG_WARN_STRICT_PROTOTYPES = YES
8 | CLANG_WARN_COMMA = YES
9 | GCC_WARN_STRICT_SELECTOR_MATCH = YES
10 | CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES
11 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES
12 | GCC_WARN_SHADOW = YES
13 | CLANG_WARN_UNREACHABLE_CODE = YES
14 |
--------------------------------------------------------------------------------
/packages/core/test_resources/actual_data/fonts_fonts_package_parameter.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 | /// GENERATED CODE - DO NOT MODIFY BY HAND
3 | /// *****************************************************
4 | /// FlutterGen
5 | /// *****************************************************
6 |
7 | // coverage:ignore-file
8 | // ignore_for_file: type=lint
9 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
10 |
11 | class FontFamily {
12 | FontFamily._();
13 |
14 | static const String package = 'test';
15 |
16 | /// Font family: Raleway
17 | static const String raleway = 'packages/$package/Raleway';
18 | }
19 |
--------------------------------------------------------------------------------
/packages/core/test_resources/actual_data/fonts_fonts.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 | /// GENERATED CODE - DO NOT MODIFY BY HAND
3 | /// *****************************************************
4 | /// FlutterGen
5 | /// *****************************************************
6 |
7 | // coverage:ignore-file
8 | // ignore_for_file: type=lint
9 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
10 |
11 | class FontFamily {
12 | FontFamily._();
13 |
14 | /// Font family: Raleway
15 | static const String raleway = 'Raleway';
16 |
17 | /// Font family: RobotoMono
18 | static const String robotoMono = 'RobotoMono';
19 | }
20 |
--------------------------------------------------------------------------------
/packages/core/test_resources/actual_data/fonts_normal.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 | /// GENERATED CODE - DO NOT MODIFY BY HAND
3 | /// *****************************************************
4 | /// FlutterGen
5 | /// *****************************************************
6 |
7 | // coverage:ignore-file
8 | // ignore_for_file: type=lint
9 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
10 |
11 | class FontFamily {
12 | FontFamily._();
13 |
14 | /// Font family: Raleway
15 | static const String raleway = 'Raleway';
16 |
17 | /// Font family: RobotoMono
18 | static const String robotoMono = 'RobotoMono';
19 | }
20 |
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Configs/AppInfo.xcconfig:
--------------------------------------------------------------------------------
1 | // Application-level settings for the Runner target.
2 | //
3 | // This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the
4 | // future. If not, the values below would default to using the project name when this becomes a
5 | // 'flutter create' template.
6 |
7 | // The application's name. By default this is also the title of the Flutter window.
8 | PRODUCT_NAME = example
9 |
10 | // The application's bundle identifier
11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example
12 |
13 | // The copyright displayed in application information
14 | PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved.
15 |
--------------------------------------------------------------------------------
/examples/example/.idea/libraries/KotlinJavaRuntime.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_exclude_files.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/
5 |
6 | integrations:
7 | flutter_svg: true
8 |
9 | assets:
10 | exclude:
11 | - assets/images/chip3/*.jpg
12 | - assets/images/*.png
13 | - assets/**/icons/*
14 |
15 | flutter:
16 | uses-material-design: true
17 | assets:
18 | - assets/images/
19 | - assets/images/chip3/chip3.jpg
20 | - assets/images/chip3/chip3.jpg # duplicated
21 | - assets/images/chip4/
22 | - assets/images/icons/fuchsia.svg
23 | - assets/images/icons/kmm.svg
24 | - assets/images/icons/paint.svg
25 | - assets/images/icons/dart@test.svg
26 | - assets/json/
27 | - pictures/chip5.jpg
28 |
--------------------------------------------------------------------------------
/examples/example/ios/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/examples/example/macos/.gitignore:
--------------------------------------------------------------------------------
1 | **/dgph
2 | *.mode1v3
3 | *.mode2v3
4 | *.moved-aside
5 | *.pbxuser
6 | *.perspectivev3
7 | **/*sync/
8 | .sconsign.dblite
9 | .tags*
10 | **/.vagrant/
11 | **/DerivedData/
12 | Icon?
13 | **/Pods/
14 | **/.symlinks/
15 | profile
16 | xcuserdata
17 | **/.generated/
18 | Flutter/App.framework
19 | Flutter/Flutter.framework
20 | Flutter/Flutter.podspec
21 | Flutter/Generated.xcconfig
22 | Flutter/ephemeral/
23 | Flutter/app.flx
24 | Flutter/app.zip
25 | Flutter/flutter_assets/
26 | Flutter/flutter_export_environment.sh
27 | ServiceDefinitions.json
28 | Runner/GeneratedPluginRegistrant.*
29 |
30 | # Exceptions to above rules.
31 | !default.mode1v3
32 | !default.mode2v3
33 | !default.pbxuser
34 | !default.perspectivev3
35 |
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "flutter_gen",
3 | "private": true,
4 | "author": "wasabeef",
5 | "scripts": {
6 | "format": "prettier --config prettier.config.js --write '**/*.+(md|yml|yaml|json)'",
7 | "prepare": "husky install"
8 | },
9 | "lint-staged": {
10 | "**/*.+(md|yml|yaml|json)": [
11 | "pnpm run format"
12 | ],
13 | "!(packages/core/test_resources/actual_data/**/*)*.dart": [
14 | "melos format",
15 | "dart run packages/core/scripts/generate_facts.dart"
16 | ]
17 | },
18 | "devDependencies": {
19 | "husky": "8.0.3",
20 | "lint-staged": "^16.0.0",
21 | "prettier": "^3.0.3",
22 | "prettier-plugin-packagejson": "^2.4.5"
23 | },
24 | "packageManager": "pnpm@10.22.0"
25 | }
26 |
--------------------------------------------------------------------------------
/fluttergen.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_flavored.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | integrations:
7 | flutter_svg: true
8 |
9 | flutter:
10 | assets:
11 | - assets/images
12 | - assets/images/chip3/chip3.jpg
13 | - assets/images/chip3/chip3.jpg # duplicated
14 | - assets/images/icons/fuchsia.svg
15 | - assets/images/icons/kmm.svg
16 | - assets/images/icons/paint.svg
17 | - assets/images/icons/dart@test.svg
18 | - assets/json/
19 | - pictures/chip5.jpg
20 | - assets/flare/
21 | - assets/movie/
22 | - assets/unknown/unknown_mime_type.bk
23 | - CHANGELOG.md
24 | - path: assets/images/chip4/
25 | flavors:
26 | - test
27 |
--------------------------------------------------------------------------------
/packages/core/lib/settings/flavored_asset.dart:
--------------------------------------------------------------------------------
1 | class FlavoredAsset {
2 | const FlavoredAsset({
3 | required this.path,
4 | this.flavors = const {},
5 | this.transformers = const {},
6 | });
7 |
8 | final String path;
9 | final Set flavors;
10 | final Set transformers;
11 |
12 | FlavoredAsset copyWith({
13 | String? path,
14 | Set? flavors,
15 | Set? transformers,
16 | }) {
17 | return FlavoredAsset(
18 | path: path ?? this.path,
19 | flavors: flavors ?? this.flavors,
20 | transformers: transformers ?? this.transformers,
21 | );
22 | }
23 |
24 | @override
25 | String toString() =>
26 | 'FlavoredAsset(path: $path, flavors: $flavors, transformers: $transformers)';
27 | }
28 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | environment:
4 | sdk: ^3.4.0
5 |
6 | flutter_gen:
7 | output: lib/gen/ # Optional (default: lib/gen/)
8 | line_length: 80 # Optional
9 |
10 | integrations:
11 | flutter_svg: true
12 |
13 | flutter:
14 | assets:
15 | - assets/images
16 | - assets/images/chip3/chip3.jpg
17 | - assets/images/chip3/chip3.jpg # duplicated
18 | - assets/images/chip4/
19 | - assets/images/icons/fuchsia.svg
20 | - assets/images/icons/kmm.svg
21 | - assets/images/icons/paint.svg
22 | - assets/images/icons/dart@test.svg
23 | - assets/json/
24 | - pictures/chip5.jpg
25 | - assets/flare/
26 | - assets/movie/
27 | - assets/unknown/unknown_mime_type.bk
28 | - CHANGELOG.md
29 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_fonts.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | environment:
4 | sdk: ^3.6.0
5 |
6 | flutter_gen:
7 | output: lib/gen/ # Optional (default: lib/gen/)
8 |
9 | flutter:
10 | fonts:
11 | - family: Raleway
12 | fonts:
13 | - asset: assets/fonts/Raleway-Regular.ttf
14 | - asset: assets/fonts/Raleway-Italic.ttf
15 | style: italic
16 | - family: RobotoMono
17 | fonts:
18 | - asset: assets/fonts/RobotoMono-Regular.ttf
19 | - asset: assets/fonts/RobotoMono-Bold.ttf
20 | weight: 700
21 |
22 | # duplicated
23 | - family: RobotoMono
24 | fonts:
25 | - asset: assets/fonts/RobotoMono-Regular.ttf
26 | - asset: assets/fonts/RobotoMono-Bold.ttf
27 | weight: 700
28 |
--------------------------------------------------------------------------------
/.github/workflows/renovate.yml:
--------------------------------------------------------------------------------
1 | name: Validate Renovate Config
2 |
3 | on:
4 | push:
5 | paths:
6 | - 'renovate.json'
7 | pull_request:
8 | paths:
9 | - 'renovate.json'
10 | workflow_dispatch:
11 |
12 | jobs:
13 | validate:
14 | runs-on: ubuntu-latest
15 | steps:
16 | - name: Checkout repository
17 | uses: actions/checkout@v4
18 |
19 | - name: Read .node-version
20 | id: node_version
21 | run: echo "version=$(cat .node-version)" >> $GITHUB_ENV
22 |
23 | - name: Setup Node.js
24 | uses: actions/setup-node@v4
25 | with:
26 | node-version: '${{ env.version }}'
27 |
28 | - name: Validate Renovate Config
29 | run: npx --yes --package renovate -- renovate-config-validator
30 |
--------------------------------------------------------------------------------
/packages/runner/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_gen_runner
2 | description: The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
3 | version: 5.12.0
4 | homepage: https://github.com/FlutterGen/flutter_gen
5 | repository: https://github.com/FlutterGen/flutter_gen/tree/main/packages/runner
6 | documentation: https://github.com/FlutterGen/flutter_gen
7 | issue_tracker: https://github.com/FlutterGen/flutter_gen/issues
8 |
9 | environment:
10 | sdk: ^3.4.0
11 |
12 | dependencies:
13 | flutter_gen_core: 5.12.0
14 | build: '>=2.0.0 <5.0.0'
15 | collection: ^1.17.0
16 | crypto: ^3.0.0
17 | glob: ^2.0.0
18 | path: ^1.8.0
19 | yaml: ^3.0.0
20 |
21 | dev_dependencies:
22 | lints: any # Ignoring the version to allow editing across SDK versions.
23 |
--------------------------------------------------------------------------------
/packages/command/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_gen
2 | description: The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
3 | version: 5.12.0
4 | homepage: https://github.com/FlutterGen/flutter_gen
5 | repository: https://github.com/FlutterGen/flutter_gen/tree/main/packages/command
6 | documentation: https://github.com/FlutterGen/flutter_gen
7 | issue_tracker: https://github.com/FlutterGen/flutter_gen/issues
8 |
9 | environment:
10 | sdk: ^3.4.0
11 |
12 | executables:
13 | fluttergen: flutter_gen_command
14 |
15 | dependencies:
16 | flutter_gen_core: 5.12.0
17 |
18 | args: ^2.0.0
19 | logging: ^1.3.0
20 |
21 | dev_dependencies:
22 | lints: any # Ignoring the version to allow editing across SDK versions.
23 | test: ^1.16.0
24 | test_process: ^2.0.0
25 |
--------------------------------------------------------------------------------
/packages/core/flutter_gen_core.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/packages/runner/flutter_gen_runner.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_flavored_duplicate_entry.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 |
6 | integrations:
7 | flutter_svg: true
8 |
9 | flutter:
10 | assets:
11 | - assets/images
12 | - assets/images/chip3/chip3.jpg
13 | - assets/images/chip3/chip3.jpg # duplicated
14 | - assets/images/icons/fuchsia.svg
15 | - assets/images/icons/kmm.svg
16 | - assets/images/icons/paint.svg
17 | - assets/images/icons/dart@test.svg
18 | - assets/json/
19 | - pictures/chip5.jpg
20 | - assets/flare/
21 | - assets/movie/
22 | - assets/unknown/unknown_mime_type.bk
23 | - CHANGELOG.md
24 | - path: assets/images/chip4/
25 | flavors:
26 | - test
27 | - path: assets/images/chip4/
28 | flavors:
29 | - another_test
30 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.2.0",
3 | "configurations": [
4 | {
5 | "name": "Run example on main.dart",
6 | "program": "${workspaceFolder}/examples/example/lib/main.dart",
7 | "request": "launch",
8 | "type": "dart",
9 | "flutterMode": "debug",
10 | "cwd": "examples/example/"
11 | },
12 | {
13 | "name": "Run on build_runner",
14 | "program": "${workspaceFolder}/examples/example/.dart_tool/build/entrypoint/build.dart",
15 | "request": "launch",
16 | "type": "dart",
17 | "args": ["build"],
18 | "cwd": "examples/example/"
19 | },
20 | {
21 | "name": "Run on flutter_gen_command",
22 | "program": "${workspaceFolder}/packages/command/bin/flutter_gen_command.dart",
23 | "request": "launch",
24 | "type": "dart",
25 | "cwd": "examples/example/"
26 | }
27 | ]
28 | }
29 |
--------------------------------------------------------------------------------
/packages/core/test_resources/actual_data/assets_unknown_mime_type.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 |
3 | /// GENERATED CODE - DO NOT MODIFY BY HAND
4 | /// *****************************************************
5 | /// FlutterGen
6 | /// *****************************************************
7 |
8 | // coverage:ignore-file
9 | // ignore_for_file: type=lint
10 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
11 |
12 | class $AssetsUnknownGen {
13 | const $AssetsUnknownGen();
14 |
15 | /// File path: assets/unknown/unknown_mime_type.bk
16 | String get unknownMimeType => 'assets/unknown/unknown_mime_type.bk';
17 |
18 | /// List of all assets
19 | List get values => [unknownMimeType];
20 | }
21 |
22 | class Assets {
23 | const Assets._();
24 |
25 | static const $AssetsUnknownGen unknown = $AssetsUnknownGen();
26 | }
27 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_parse_metadata.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 | parse_metadata: true # Optional (default: false)
6 |
7 | images:
8 | parse_animation: true # Optional (default: false)
9 |
10 | integrations:
11 | flutter_svg: true
12 |
13 | flutter:
14 | assets:
15 | - assets/images
16 | - assets/images/chip3/chip3.jpg
17 | - assets/images/chip3/chip3.jpg # duplicated
18 | - assets/images/chip4/
19 | - assets/images/icons/fuchsia.svg
20 | - assets/images/icons/kmm.svg
21 | - assets/images/icons/paint.svg
22 | - assets/images/icons/dart@test.svg
23 | - assets/images/icons/invalid.svg
24 | - assets/json/
25 | - pictures/chip5.jpg
26 | - assets/flare/
27 | - assets/movie/
28 | - assets/unknown/unknown_mime_type.bk
29 | - assets/images/animated
30 |
--------------------------------------------------------------------------------
/examples/example_resources/lib/gen/colors.gen.dart:
--------------------------------------------------------------------------------
1 | // dart format width=80
2 | /// GENERATED CODE - DO NOT MODIFY BY HAND
3 | /// *****************************************************
4 | /// FlutterGen
5 | /// *****************************************************
6 |
7 | // coverage:ignore-file
8 | // ignore_for_file: type=lint
9 | // ignore_for_file: deprecated_member_use,directives_ordering,implicit_dynamic_list_literal,unnecessary_import
10 |
11 | import 'package:flutter/painting.dart';
12 | import 'package:flutter/material.dart';
13 |
14 | class ColorName {
15 | ColorName._();
16 |
17 | /// Color: #000000
18 | static const Color black = Color(0xFF000000);
19 |
20 | /// Color: #979797
21 | static const Color gray410 = Color(0xFF979797);
22 |
23 | /// Color: #EEEEEE
24 | static const Color gray70 = Color(0xFFEEEEEE);
25 |
26 | /// Color: #FFFFFF
27 | static const Color white = Color(0xFFFFFFFF);
28 | }
29 |
--------------------------------------------------------------------------------
/examples/example/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 12.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/examples/example_resources/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: example_resources
2 | description: A sample project using FlutterGen.
3 | publish_to: 'none'
4 |
5 | environment:
6 | sdk: ^3.4.0
7 |
8 | dependencies:
9 | flutter:
10 | sdk: flutter
11 |
12 | flutter_svg: ^2.0.0
13 | lottie: ^3.0.0
14 | rive: ^0.13.20
15 |
16 | dev_dependencies:
17 | flutter_gen_runner:
18 | path: ../../packages/runner
19 |
20 | build_runner: ^2.0.0
21 | lints: any
22 |
23 | flutter_gen:
24 | output: lib/gen/
25 |
26 | integrations:
27 | flutter_svg: true
28 | rive: true
29 | lottie: true
30 |
31 | assets:
32 | enabled: true
33 | outputs:
34 | package_parameter_enabled: true
35 | class_name: ResAssets
36 |
37 | fonts:
38 | enabled: true
39 |
40 | colors:
41 | enabled: true
42 | inputs:
43 | - assets/color/colors.xml
44 |
45 | flutter:
46 | assets:
47 | - assets/images/
48 | - assets/unknown/unknown_mime_type.bk
49 |
--------------------------------------------------------------------------------
/examples/example/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.8.10'
3 | repositories {
4 | google()
5 | mavenCentral()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:7.2.2'
10 | // START: FlutterFire Configuration
11 | classpath 'com.google.gms:google-services:4.3.15'
12 | classpath 'com.google.firebase:perf-plugin:1.4.2'
13 | // END: FlutterFire Configuration
14 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
15 | }
16 | }
17 |
18 | allprojects {
19 | repositories {
20 | google()
21 | mavenCentral()
22 | }
23 | }
24 |
25 | rootProject.buildDir = '../build'
26 | subprojects {
27 | project.buildDir = "${rootProject.buildDir}/${project.name}"
28 | }
29 | subprojects {
30 | project.evaluationDependsOn(':app')
31 | }
32 |
33 | tasks.register("clean", Delete) {
34 | delete rootProject.buildDir
35 | }
36 |
--------------------------------------------------------------------------------
/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/packages/command/flutter_gen.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/examples/example/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/examples/example/web/manifest.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "flutter_gen",
3 | "short_name": "flutter_gen",
4 | "start_url": ".",
5 | "display": "standalone",
6 | "background_color": "#0175C2",
7 | "theme_color": "#0175C2",
8 | "description": "A new Flutter project.",
9 | "orientation": "portrait-primary",
10 | "prefer_related_applications": false,
11 | "icons": [
12 | {
13 | "src": "icons/Icon-192.png",
14 | "sizes": "192x192",
15 | "type": "image/png"
16 | },
17 | {
18 | "src": "icons/Icon-512.png",
19 | "sizes": "512x512",
20 | "type": "image/png"
21 | },
22 | {
23 | "src": "icons/Icon-maskable-192.png",
24 | "sizes": "192x192",
25 | "type": "image/png",
26 | "purpose": "maskable"
27 | },
28 | {
29 | "src": "icons/Icon-maskable-512.png",
30 | "sizes": "512x512",
31 | "type": "image/png",
32 | "purpose": "maskable"
33 | }
34 | ]
35 | }
36 |
--------------------------------------------------------------------------------
/examples/example/android/app/src/main/res/values-night/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
15 |
18 |
19 |
--------------------------------------------------------------------------------
/examples/example/.idea/libraries/Dart_SDK.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2020-2022 FlutterGen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/packages/core/lib/utils/formatter.dart:
--------------------------------------------------------------------------------
1 | import 'dart:io' as io show Platform;
2 |
3 | import 'package:dart_style/dart_style.dart' show DartFormatter;
4 | import 'package:pub_semver/pub_semver.dart' show VersionConstraint;
5 |
6 | import '../settings/config.dart' show Config;
7 |
8 | /// The formatter will only use the tall-style if the SDK constraint is ^3.7.
9 | DartFormatter buildDartFormatterFromConfig(Config config) {
10 | VersionConstraint? sdkConstraint = config.sdkConstraint;
11 | if (sdkConstraint == null) {
12 | final version = io.Platform.version.split(' ').first;
13 | sdkConstraint = VersionConstraint.parse('^$version');
14 | }
15 | final useShort = sdkConstraint.allowsAny(VersionConstraint.parse('<3.7.0'));
16 |
17 | final pageWidth =
18 | config.pubspec.flutterGen.lineLength ?? config.formatterPageWidth;
19 |
20 | return DartFormatter(
21 | languageVersion: useShort
22 | ? DartFormatter.latestShortStyleLanguageVersion
23 | : DartFormatter.latestLanguageVersion,
24 | pageWidth: pageWidth,
25 | // trailingCommas: config.formatterTrailingCommas,
26 | lineEnding: '\n',
27 | );
28 | }
29 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | ## What does this change?
2 |
3 | Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
4 |
5 | Fixes # 🎯
6 |
7 | ## Type of change
8 |
9 | Please delete options that are not relevant.
10 |
11 | - [ ] Bug fix (non-breaking change which fixes an issue)
12 | - [ ] New feature (non-breaking change which adds functionality)
13 | - [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
14 | - [ ] This change requires a documentation update
15 |
16 | ## Checklist:
17 |
18 | Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
19 |
20 | - [ ] Make sure to open a GitHub issue as a bug/feature request before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
21 | - [ ] Ensure the tests (`melos run test`)
22 | - [ ] Ensure the analyzer and formatter pass (`melos run format` to automatically apply formatting)
23 | - [ ] Appropriate docs were updated (if necessary)
24 |
--------------------------------------------------------------------------------
/examples/example/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "223276840801",
4 | "project_id": "flutter-gen-5b267",
5 | "storage_bucket": "flutter-gen-5b267.appspot.com"
6 | },
7 | "client": [
8 | {
9 | "client_info": {
10 | "mobilesdk_app_id": "1:223276840801:android:8c43b96e396a1781b77720",
11 | "android_client_info": {
12 | "package_name": "com.example.example"
13 | }
14 | },
15 | "oauth_client": [
16 | {
17 | "client_id": "223276840801-vd883eedtkum45svga4m9dqpppacohpi.apps.googleusercontent.com",
18 | "client_type": 3
19 | }
20 | ],
21 | "api_key": [
22 | {
23 | "current_key": "AIzaSyBqCLgp5h6_dHlMJzKSsCfnSFawfFjCK1c"
24 | }
25 | ],
26 | "services": {
27 | "appinvite_service": {
28 | "other_platform_oauth_client": [
29 | {
30 | "client_id": "223276840801-vd883eedtkum45svga4m9dqpppacohpi.apps.googleusercontent.com",
31 | "client_type": 3
32 | }
33 | ]
34 | }
35 | }
36 | }
37 | ],
38 | "configuration_version": "1"
39 | }
40 |
--------------------------------------------------------------------------------
/packages/core/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: flutter_gen_core
2 | description: The Flutter code generator for your assets, fonts, colors, … — Get rid of all String-based APIs.
3 | version: 5.12.0
4 | homepage: https://github.com/FlutterGen/flutter_gen
5 | repository: https://github.com/FlutterGen/flutter_gen/tree/main/packages/core
6 | documentation: https://github.com/FlutterGen/flutter_gen
7 | issue_tracker: https://github.com/FlutterGen/flutter_gen/issues
8 |
9 | environment:
10 | sdk: ^3.4.0
11 |
12 | version_gen:
13 | path: lib/
14 |
15 | dependencies:
16 | meta: ^1.7.0
17 | path: ^1.8.0
18 | yaml: ^3.0.0
19 | mime: '>=1.0.0 <3.0.0'
20 | xml: ^6.0.0
21 | dartx: ^1.0.0
22 | color: ^3.0.0
23 | collection: ^1.15.0
24 | json_annotation: ^4.4.0
25 | glob: ^2.0.0
26 | logging: ^1.3.0
27 |
28 | dart_style: ^3.0.0
29 | archive: '>=3.4.0 <5.0.0'
30 | args: ^2.0.0
31 | pub_semver: ^2.0.0
32 | vector_graphics_compiler: ^1.1.9
33 | image_size_getter: ^2.4.0
34 | image: ^4.5.4
35 |
36 | dev_dependencies:
37 | lints: any # Ignoring the version to allow editing across SDK versions.
38 | test: ^1.16.0
39 | build_runner: ^2.0.0
40 | json_serializable: ^6.0.0
41 | version_gen: ^1.0.1
42 |
--------------------------------------------------------------------------------
/examples/example/macos/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | $(PRODUCT_BUNDLE_IDENTIFIER)
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | $(PRODUCT_NAME)
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | $(FLUTTER_BUILD_NAME)
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSMinimumSystemVersion
24 | $(MACOSX_DEPLOYMENT_TARGET)
25 | NSHumanReadableCopyright
26 | $(PRODUCT_COPYRIGHT)
27 | NSMainNibFile
28 | MainMenu
29 | NSPrincipalClass
30 | NSApplication
31 |
32 |
33 |
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | # See: https://dart-lang.github.io/linter/lints/
2 | include: package:lints/recommended.yaml
3 |
4 | analyzer:
5 | exclude:
6 | - '**.g.dart'
7 | - 'test_resources/**'
8 | errors:
9 | deprecated_member_use_from_same_package: ignore
10 | unnecessary_import: error
11 | unawaited_futures: error
12 |
13 | formatter:
14 | trailing_commas: preserve
15 |
16 | linter:
17 | rules:
18 | # always_use_package_imports: true
19 | avoid_classes_with_only_static_members: true
20 | avoid_equals_and_hash_code_on_mutable_classes: true
21 | curly_braces_in_flow_control_structures: true
22 | directives_ordering: true
23 | flutter_style_todos: true
24 | prefer_const_constructors: true
25 | prefer_const_constructors_in_immutables: true
26 | prefer_final_in_for_each: true
27 | prefer_int_literals: true
28 | prefer_single_quotes: true
29 | require_trailing_commas: true
30 | sort_constructors_first: true
31 | sort_unnamed_constructors_first: true
32 | unawaited_futures: true
33 | unnecessary_await_in_return: true
34 | unnecessary_lambdas: true
35 | use_to_and_as_if_applicable: true
36 | use_raw_strings: true
37 | use_super_parameters: false
38 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_assets_deferred_components.yaml:
--------------------------------------------------------------------------------
1 | name: test
2 |
3 | flutter_gen:
4 | output: lib/gen/ # Optional (default: lib/gen/)
5 | line_length: 80 # Optional (default: 80)
6 |
7 | integrations:
8 | flutter_svg: true
9 |
10 | flutter:
11 | assets:
12 | - assets/images
13 | - assets/images/chip3/chip3.jpg
14 | - assets/images/chip3/chip3.jpg # duplicated
15 | - assets/images/chip4/
16 | - assets/images/icons/fuchsia.svg
17 | - assets/images/icons/kmm.svg
18 | - assets/images/icons/paint.svg
19 | - assets/images/icons/dart@test.svg
20 | - assets/json/
21 | - pictures/chip5.jpg
22 | - assets/flare/
23 | - assets/movie/
24 | - assets/unknown/unknown_mime_type.bk
25 | - CHANGELOG.md
26 |
27 | deferred-components:
28 | - name: myDeferredComponent
29 | assets:
30 | - assets/deferred_component/images
31 | - assets/deferred_component/images/chip1.jpg
32 | - assets/deferred_component/images/component_logo.png
33 | # Deferred components can load assets from the main assets folder as well
34 | - assets/images/icons/fuchsia.svg
35 | - assets/images/2.0x/chip1.jpg
36 |
37 | - name: mySecondDeferredComponent
38 | assets:
39 | - assets/images/3.0x/chip1.jpg
40 |
--------------------------------------------------------------------------------
/packages/core/test_resources/pubspec_normal.yaml:
--------------------------------------------------------------------------------
1 | name: example
2 |
3 | environment:
4 | sdk: ^3.8.0
5 |
6 | flutter_gen:
7 | output: lib/gen/
8 |
9 | integrations:
10 | flutter_svg: true
11 |
12 | colors:
13 | inputs:
14 | - assets/color/colors.xml
15 | - assets/color/colors2.xml
16 | - assets/color/colors2.xml # duplicated
17 |
18 | flutter:
19 | uses-material-design: true
20 | assets:
21 | - assets/images/
22 | - assets/images/chip3/chip3.jpg
23 | - assets/images/chip3/chip3.jpg # duplicated
24 | - assets/images/chip4/
25 | - assets/images/icons/fuchsia.svg
26 | - assets/images/icons/kmm.svg
27 | - assets/images/icons/paint.svg
28 | - assets/images/icons/dart@test.svg
29 | - assets/json/
30 | - pictures/chip5.jpg
31 | fonts:
32 | - family: Raleway
33 | fonts:
34 | - asset: assets/fonts/Raleway-Regular.ttf
35 | - asset: assets/fonts/Raleway-Italic.ttf
36 | style: italic
37 | - family: RobotoMono
38 | fonts:
39 | - asset: assets/fonts/RobotoMono-Regular.ttf
40 | - asset: assets/fonts/RobotoMono-Bold.ttf
41 | weight: 700
42 |
43 | # duplicated
44 | - family: RobotoMono
45 | fonts:
46 | - asset: assets/fonts/RobotoMono-Regular.ttf
47 | - asset: assets/fonts/RobotoMono-Bold.ttf
48 | weight: 700
49 |
--------------------------------------------------------------------------------
/packages/core/lib/settings/config_default.dart:
--------------------------------------------------------------------------------
1 | const configDefaultYamlContent = '''
2 | name: UNKNOWN
3 |
4 | flutter_gen:
5 | output: lib/gen/ # Optional
6 | # line_length: 80 # Optional
7 | parse_metadata: false # Optional
8 |
9 | # Optional
10 | integrations:
11 | image: true
12 | flutter_svg: false
13 | rive: false
14 | lottie: false
15 |
16 | images:
17 | # Optional
18 | parse_animation: false
19 |
20 | assets:
21 | enabled: true # Optional
22 | outputs: # Optional
23 | # Set to true if you want this package to be a package dependency
24 | # See: https://flutter.dev/docs/development/ui/assets-and-images#from-packages
25 | package_parameter_enabled: false # Optional
26 | # Available values:
27 | # - camel-case
28 | # - snake-case
29 | # - dot-delimiter
30 | style: dot-delimiter # Optional
31 | class_name: Assets
32 | exclude: []
33 |
34 | fonts:
35 | enabled: true # Optional
36 | outputs: # Optional
37 | class_name: FontFamily
38 |
39 | colors:
40 | enabled: true # Optional
41 | inputs: [] # Optional
42 | outputs: # Optional
43 | class_name: ColorName
44 |
45 | flutter:
46 | # See: https://flutter.dev/docs/development/ui/assets-and-images#specifying-assets
47 | assets: []
48 | # See: https://flutter.dev/docs/cookbook/design/fonts#2-declare-the-font-in-the-pubspec
49 | fonts: []
50 | ''';
51 |
--------------------------------------------------------------------------------
/packages/core/lib/utils/map.dart:
--------------------------------------------------------------------------------
1 | // Copy from https://pub.dev/packages/merge_map
2 |
3 | /// Exposes the [mergeMap] function, which... merges Maps.
4 | void _copyValues(
5 | Map from,
6 | Map to,
7 | bool recursive,
8 | bool acceptNull,
9 | ) {
10 | for (final key in from.keys) {
11 | if (from[key] is Map && recursive) {
12 | if (to[key] is! Map) {
13 | to[key] = {} as V;
14 | }
15 | _copyValues(from[key] as Map, to[key] as Map, recursive, acceptNull);
16 | } else {
17 | if (from[key] != null || acceptNull) {
18 | to[key] = from[key] as V;
19 | }
20 | }
21 | }
22 | }
23 |
24 | /// Merges the values of the given maps together.
25 | ///
26 | /// `recursive` is set to `true` by default. If set to `true`,
27 | /// then nested maps will also be merged. Otherwise, nested maps
28 | /// will overwrite others.
29 | ///
30 | /// `acceptNull` is set to `false` by default. If set to `false`,
31 | /// then if the value on a map is `null`, it will be ignored, and
32 | /// that `null` will not be copied.
33 | Map mergeMap(
34 | Iterable