├── test_apps ├── weight_tracker │ ├── framy.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 │ │ │ └── AppDelegate.swift │ │ ├── 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 │ │ └── .gitignore │ ├── web │ │ ├── favicon.png │ │ ├── icons │ │ │ ├── Icon-192.png │ │ │ └── Icon-512.png │ │ ├── manifest.json │ │ └── index.html │ ├── macos │ │ ├── .gitignore │ │ ├── Runner │ │ │ ├── Configs │ │ │ │ ├── Debug.xcconfig │ │ │ │ ├── Release.xcconfig │ │ │ │ ├── Warnings.xcconfig │ │ │ │ └── AppInfo.xcconfig │ │ │ ├── Assets.xcassets │ │ │ │ └── AppIcon.appiconset │ │ │ │ │ ├── app_icon_128.png │ │ │ │ │ ├── app_icon_16.png │ │ │ │ │ ├── app_icon_256.png │ │ │ │ │ ├── app_icon_32.png │ │ │ │ │ ├── app_icon_512.png │ │ │ │ │ ├── app_icon_64.png │ │ │ │ │ └── app_icon_1024.png │ │ │ ├── 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 │ ├── 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 │ │ │ │ │ └── values │ │ │ │ │ │ └── styles.xml │ │ │ │ └── kotlin │ │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── weight_tracker │ │ │ │ │ └── MainActivity.kt │ │ │ │ ├── debug │ │ │ │ └── AndroidManifest.xml │ │ │ │ └── profile │ │ │ │ └── AndroidManifest.xml │ │ ├── gradle │ │ │ └── wrapper │ │ │ │ └── gradle-wrapper.properties │ │ ├── .gitignore │ │ ├── settings.gradle │ │ └── build.gradle │ ├── test │ │ ├── goldens │ │ │ ├── HistoryPage_default.png │ │ │ ├── ProfilePage_default.png │ │ │ ├── HistoryPage_emptyList.png │ │ │ ├── ProgressChart_default.png │ │ │ ├── StatisticsPage_default.png │ │ │ ├── UserDataCard_default.png │ │ │ ├── UserEmailsView_default.png │ │ │ ├── DummyTestWidget_default.png │ │ │ ├── ProfilePage_teenageJohn.png │ │ │ ├── ProgressChart_emptyList.png │ │ │ ├── UserDataCard_teenageJohn.png │ │ │ ├── UserEmailsView_teenageJohn.png │ │ │ ├── WeightEntryListItem_default.png │ │ │ ├── WeightUnitDisplay_default.png │ │ │ ├── BuiltValueExampleWidget_default.png │ │ │ ├── HistoryPage_fewElementsSameDay.png │ │ │ ├── HistoryPage_monthFullOfEntries.png │ │ │ ├── HistoryPage_oneEntryTwoMonthsAgo.png │ │ │ ├── HistoryPage_singleElementToday.png │ │ │ ├── ProgressChart_fewElementsSameDay.png │ │ │ ├── ProgressChart_monthFullOfEntries.png │ │ │ ├── ProgressChart_singleElementToday.png │ │ │ ├── WeightEntryListItem_presetEntry.png │ │ │ ├── HistoryPage_oneNowOneTwoMonthsAgo.png │ │ │ ├── ProgressChart_oneEntryTwoMonthsAgo.png │ │ │ └── ProgressChart_oneNowOneTwoMonthsAgo.png │ │ ├── golden_test.dart │ │ ├── profile_page_custom_page_test.dart │ │ ├── create_subdependencies_map_test.dart │ │ ├── available_constructor_names_map_test.dart │ │ ├── dummy_test_widget_page_test.dart │ │ ├── history_page_custom_page_test.dart │ │ ├── test_utils.dart │ │ ├── storyboard_page_test.dart │ │ ├── statistics_page_custom_page_test.dart │ │ ├── built_value_example_widget_custom_page_test.dart │ │ ├── framy_model_constructor_map_test.dart │ │ ├── drawer_test.dart │ │ └── dependency_model_test.dart │ ├── lib │ │ ├── models │ │ │ ├── utils.dart │ │ │ ├── weight_unit.dart │ │ │ ├── user.framy.dart │ │ │ ├── dummy_test_widget_model.dart │ │ │ ├── user.dart │ │ │ ├── built_value_user.dart │ │ │ ├── weight_entry.dart │ │ │ ├── statistics_page_state.dart │ │ │ └── weight_entry.framy.dart │ │ ├── app_theme.dart │ │ ├── widgets │ │ │ ├── built_value_example_widget.dart │ │ │ ├── weight_unit_display.dart │ │ │ ├── dummy_test_widget.dart │ │ │ ├── user_data_card.dart │ │ │ └── user_emails_view.dart │ │ ├── main.dart │ │ └── pages │ │ │ ├── profile_page.dart │ │ │ ├── statistics_page.dart │ │ │ └── history_page.dart │ ├── test_driver │ │ └── app.dart │ ├── .metadata │ ├── README.md │ ├── .gitignore │ └── pubspec.yaml └── counter_app │ ├── 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 │ │ └── AppDelegate.swift │ ├── 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 │ └── .gitignore │ ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ └── Icon-512.png │ ├── manifest.json │ └── index.html │ ├── macos │ ├── .gitignore │ ├── Runner │ │ ├── Configs │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ ├── Warnings.xcconfig │ │ │ └── AppInfo.xcconfig │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── app_icon_128.png │ │ │ │ ├── app_icon_16.png │ │ │ │ ├── app_icon_256.png │ │ │ │ ├── app_icon_32.png │ │ │ │ ├── app_icon_512.png │ │ │ │ ├── app_icon_64.png │ │ │ │ └── app_icon_1024.png │ │ ├── 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 │ ├── android │ ├── gradle.properties │ ├── .gitignore │ ├── 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 │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ └── kotlin │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── counter_app │ │ │ │ └── MainActivity.kt │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── settings.gradle │ └── build.gradle │ ├── test │ ├── goldens │ │ ├── CounterFAB_default.png │ │ └── CounterTitle_default.png │ ├── golden_test.dart │ ├── app_bar_page_test.dart │ ├── textfield_page_test.dart │ ├── test_utils.dart │ ├── counter_fab_page_test.dart │ ├── dependency_model_test.dart │ ├── toggle_page_test.dart │ └── callbacks_tab_test.dart │ ├── test_driver │ └── app.dart │ ├── .metadata │ ├── README.md │ ├── pubspec.yaml │ └── .gitignore ├── showcase ├── 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 │ │ └── AppDelegate.swift │ ├── Flutter │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ └── AppFrameworkInfo.plist │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── Runner.xcodeproj │ │ └── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── .gitignore ├── web │ ├── favicon.png │ ├── icons │ │ ├── Icon-192.png │ │ └── Icon-512.png │ ├── manifest.json │ └── index.html ├── assets │ ├── counter.png │ └── weight_tracker.png ├── macos │ ├── .gitignore │ ├── Runner │ │ ├── Configs │ │ │ ├── Debug.xcconfig │ │ │ ├── Release.xcconfig │ │ │ ├── Warnings.xcconfig │ │ │ └── AppInfo.xcconfig │ │ ├── Assets.xcassets │ │ │ └── AppIcon.appiconset │ │ │ │ ├── app_icon_1024.png │ │ │ │ ├── app_icon_128.png │ │ │ │ ├── app_icon_16.png │ │ │ │ ├── app_icon_256.png │ │ │ │ ├── app_icon_32.png │ │ │ │ ├── app_icon_512.png │ │ │ │ └── app_icon_64.png │ │ ├── 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 ├── 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 │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ └── kotlin │ │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── showcase │ │ │ │ └── MainActivity.kt │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ ├── .gitignore │ ├── settings.gradle │ └── build.gradle ├── .metadata ├── README.md ├── pubspec.yaml └── .gitignore ├── framy_generator ├── analysis_options.yaml ├── lib │ ├── fonts │ │ └── Roboto.ttf │ ├── generator │ │ ├── main_generator.dart │ │ ├── utils.dart │ │ ├── accessible_element_generator.dart │ │ ├── enum_map_generator.dart │ │ ├── available_constructor_names_generator.dart │ │ ├── utils_generator.dart │ │ ├── lint_ignores_generator.dart │ │ ├── app_bar_generator.dart │ │ ├── function_callbacks_generator.dart │ │ ├── presets_map_generator.dart │ │ ├── widget_page_generator.dart │ │ ├── subdependencies_map_generator.dart │ │ ├── imports_generator.dart │ │ ├── routing_generator.dart │ │ ├── datetime_dependency_input_generator.dart │ │ └── layout_template_generator.dart │ ├── json_formatter.dart │ ├── utils.dart │ ├── resolvers │ │ ├── metadata_resolver.dart │ │ ├── register_riverpod_resolver.dart │ │ └── preset_resolver.dart │ └── config │ │ ├── framy_config.dart │ │ └── yaml_config_loader.dart ├── .metadata ├── example │ ├── .metadata │ ├── pubspec.yaml │ ├── README.md │ └── .gitignore ├── test │ ├── generators │ │ ├── main_generator_test.dart │ │ ├── utils_generator_test.dart │ │ ├── text_field_page_generator_test.dart │ │ ├── datetime_dependency_input_generator_test.dart │ │ ├── app_bar_page_generator_test.dart │ │ ├── preset_dropdown_generator_test.dart │ │ ├── constructor_dropdown_generator_test.dart │ │ ├── toggle_page_generator_test.dart │ │ ├── available_constructor_names_generator_test.dart │ │ ├── enum_map_generator_test.dart │ │ ├── layout_template_generator_test.dart │ │ └── app_bar_generator_test.dart │ ├── test_generator │ │ └── generate_test_utils_test.dart │ ├── mocks.dart │ ├── resolvers │ │ ├── metadata_resolver_test.dart │ │ ├── dummy_classes.dart │ │ ├── register_riverpod_resolver_test.dart │ │ └── preset_resolver_test.dart │ └── json_formatter_test.dart └── pubspec.yaml ├── framy_annotation ├── lib │ └── framy_annotation.dart ├── pubspec.yaml ├── .metadata ├── example │ ├── .metadata │ ├── pubspec.yaml │ ├── README.md │ └── .gitignore └── CHANGELOG.md ├── .github └── workflows │ └── gh-pages.yaml └── run_all_tests.sh /test_apps/weight_tracker/framy.yaml: -------------------------------------------------------------------------------- 1 | framy: 2 | wrap-with-safearea: true -------------------------------------------------------------------------------- /showcase/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /framy_generator/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:pedantic/analysis_options.yaml 2 | -------------------------------------------------------------------------------- /showcase/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/web/favicon.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /showcase/assets/counter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/assets/counter.png -------------------------------------------------------------------------------- /showcase/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/web/icons/Icon-192.png -------------------------------------------------------------------------------- /showcase/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/web/icons/Icon-512.png -------------------------------------------------------------------------------- /framy_annotation/lib/framy_annotation.dart: -------------------------------------------------------------------------------- 1 | library framy_annotation; 2 | 3 | export 'src/framy_annotations.dart'; 4 | -------------------------------------------------------------------------------- /showcase/assets/weight_tracker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/assets/weight_tracker.png -------------------------------------------------------------------------------- /framy_generator/lib/fonts/Roboto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/framy_generator/lib/fonts/Roboto.ttf -------------------------------------------------------------------------------- /test_apps/counter_app/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/web/favicon.png -------------------------------------------------------------------------------- /showcase/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /showcase/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /showcase/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/web/favicon.png -------------------------------------------------------------------------------- /test_apps/counter_app/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/web/icons/Icon-192.png -------------------------------------------------------------------------------- /test_apps/counter_app/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/web/icons/Icon-512.png -------------------------------------------------------------------------------- /framy_generator/lib/generator/main_generator.dart: -------------------------------------------------------------------------------- 1 | String generateMain() => ''' 2 | void main() { 3 | runApp(FramyApp()); 4 | } 5 | '''; 6 | -------------------------------------------------------------------------------- /test_apps/counter_app/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/web/icons/Icon-192.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/web/icons/Icon-512.png -------------------------------------------------------------------------------- /showcase/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /showcase/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /showcase/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/counter_app/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/counter_app/test/goldens/CounterFAB_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/test/goldens/CounterFAB_default.png -------------------------------------------------------------------------------- /test_apps/counter_app/test/goldens/CounterTitle_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/test/goldens/CounterTitle_default.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /showcase/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /showcase/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/HistoryPage_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/HistoryPage_default.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/ProfilePage_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/ProfilePage_default.png -------------------------------------------------------------------------------- /showcase/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /showcase/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /showcase/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /showcase/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/counter_app/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/HistoryPage_emptyList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/HistoryPage_emptyList.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/ProgressChart_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/ProgressChart_default.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/StatisticsPage_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/StatisticsPage_default.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/UserDataCard_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/UserDataCard_default.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/UserEmailsView_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/UserEmailsView_default.png -------------------------------------------------------------------------------- /showcase/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/DummyTestWidget_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/DummyTestWidget_default.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/ProfilePage_teenageJohn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/ProfilePage_teenageJohn.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/ProgressChart_emptyList.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/ProgressChart_emptyList.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/UserDataCard_teenageJohn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/UserDataCard_teenageJohn.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/UserEmailsView_teenageJohn.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/UserEmailsView_teenageJohn.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/WeightEntryListItem_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/WeightEntryListItem_default.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/WeightUnitDisplay_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/WeightUnitDisplay_default.png -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /test_apps/counter_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/counter_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/models/utils.dart: -------------------------------------------------------------------------------- 1 | DateTime mockDateTime; 2 | 3 | extension CustomizableDateTime on DateTime { 4 | DateTime get current => mockDateTime ?? DateTime.now(); 5 | } 6 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/BuiltValueExampleWidget_default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/BuiltValueExampleWidget_default.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/HistoryPage_fewElementsSameDay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/HistoryPage_fewElementsSameDay.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/HistoryPage_monthFullOfEntries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/HistoryPage_monthFullOfEntries.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/HistoryPage_oneEntryTwoMonthsAgo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/HistoryPage_oneEntryTwoMonthsAgo.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/HistoryPage_singleElementToday.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/HistoryPage_singleElementToday.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/ProgressChart_fewElementsSameDay.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/ProgressChart_fewElementsSameDay.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/ProgressChart_monthFullOfEntries.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/ProgressChart_monthFullOfEntries.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/ProgressChart_singleElementToday.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/ProgressChart_singleElementToday.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/WeightEntryListItem_presetEntry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/WeightEntryListItem_presetEntry.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /test_apps/counter_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/counter_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/models/weight_unit.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | 3 | @FramyModel() 4 | enum WeightUnit { kg, lbs } 5 | 6 | const KG_LBS_RATIO = 2.2; 7 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/HistoryPage_oneNowOneTwoMonthsAgo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/HistoryPage_oneNowOneTwoMonthsAgo.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/ProgressChart_oneEntryTwoMonthsAgo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/ProgressChart_oneEntryTwoMonthsAgo.png -------------------------------------------------------------------------------- /test_apps/counter_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/goldens/ProgressChart_oneNowOneTwoMonthsAgo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/test/goldens/ProgressChart_oneNowOneTwoMonthsAgo.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/showcase/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/models/user.framy.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | 3 | import 'user.dart'; 4 | 5 | @FramyPreset() 6 | User teenageJohn() => User('John', 'Smith', 13); 7 | -------------------------------------------------------------------------------- /showcase/android/app/src/main/kotlin/com/example/showcase/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.showcase 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /showcase/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /showcase/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/counter_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /test_apps/counter_app/android/app/src/main/kotlin/com/example/counter_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.counter_app 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Fidev-io/framy/HEAD/test_apps/weight_tracker/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /test_apps/counter_app/test/golden_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | 3 | import 'golden_test.test.framy.dart' as generated_golden; 4 | 5 | @FramyGoldenTests() 6 | void main() => generated_golden.main(); 7 | -------------------------------------------------------------------------------- /test_apps/counter_app/test_driver/app.dart: -------------------------------------------------------------------------------- 1 | import 'package:counter_app/main.app.framy.dart' as app; 2 | import 'package:flutter_driver/driver_extension.dart'; 3 | 4 | void main() { 5 | enableFlutterDriverExtension(); 6 | app.main(); 7 | } 8 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/app/src/main/kotlin/com/example/weight_tracker/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.weight_tracker 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test_driver/app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_driver/driver_extension.dart'; 2 | import 'package:weight_tracker/main.app.framy.dart' as app; 3 | 4 | void main() { 5 | enableFlutterDriverExtension(); 6 | app.main(); 7 | } 8 | -------------------------------------------------------------------------------- /showcase/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /showcase/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 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/models/dummy_test_widget_model.dart: -------------------------------------------------------------------------------- 1 | // This is dummy model class that is used for testing that Framy App will work 2 | // with models that are not annotated with FramyModel 3 | class DummyTestWidgetModel { 4 | final String text; 5 | 6 | DummyTestWidgetModel(this.text); 7 | } -------------------------------------------------------------------------------- /test_apps/counter_app/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 | -------------------------------------------------------------------------------- /showcase/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /showcase/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/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 | -------------------------------------------------------------------------------- /test_apps/counter_app/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /showcase/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /framy_annotation/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: framy_annotation 2 | description: > 3 | Annotations for framy_generator. 4 | This package does nothing without framy_generator. 5 | version: 0.1.5 6 | repository: https://github.com/Fidev-io/framy 7 | homepage: https://framy.dev 8 | 9 | environment: 10 | sdk: ">=2.5.0 <3.0.0" 11 | 12 | -------------------------------------------------------------------------------- /showcase/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /showcase/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /showcase/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/models/user.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | 3 | @framyModel 4 | class User { 5 | final String firstName; 6 | final String lastName; 7 | final int age; 8 | final List emails; 9 | 10 | User(this.firstName, this.lastName, this.age, {this.emails}); 11 | } 12 | -------------------------------------------------------------------------------- /showcase/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /showcase/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /showcase/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /showcase/.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: 6135091de9f8f6befc2ec7f8835d28d43a21cd05 8 | channel: dev 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/golden_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | import 'package:weight_tracker/models/utils.dart'; 3 | 4 | import 'golden_test.test.framy.dart' as golden_tests; 5 | 6 | @FramyGoldenTests() 7 | void main() async { 8 | mockDateTime = DateTime(2020, 09, 05); 9 | await golden_tests.main(); 10 | } 11 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /framy_generator/.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: e4ebcdf6f4facee5779c38a04d91d08dc58ea7a4 8 | channel: beta 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /framy_annotation/.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: e4ebcdf6f4facee5779c38a04d91d08dc58ea7a4 8 | channel: beta 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /test_apps/counter_app/.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: 7f56b53de4e5da2147c4d30d857a72c6f2e4f42f 8 | channel: unknown 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/.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: 6135091de9f8f6befc2ec7f8835d28d43a21cd05 8 | channel: dev 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /framy_annotation/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: 7f56b53de4e5da2147c4d30d857a72c6f2e4f42f 8 | channel: unknown 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /framy_generator/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: 7f56b53de4e5da2147c4d30d857a72c6f2e4f42f 8 | channel: unknown 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /showcase/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import shared_preferences_macos 9 | 10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 11 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 12 | } 13 | -------------------------------------------------------------------------------- /showcase/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /showcase/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test_apps/counter_app/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import shared_preferences_macos 9 | 10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 11 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 12 | } 13 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | 3 | String dependencyInitializationLine(FramyObjectDependency dependency) { 4 | final type = dependency.type; 5 | final name = dependency.name; 6 | final defaultValue = dependency.defaultValueCode; 7 | 8 | return 'FramyDependencyModel<$type>(\'$name\', \'$type\', $defaultValue),\n'; 9 | } 10 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import shared_preferences_macos 9 | 10 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 11 | SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) 12 | } 13 | -------------------------------------------------------------------------------- /showcase/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. -------------------------------------------------------------------------------- /test_apps/counter_app/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test_apps/counter_app/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test_apps/counter_app/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. -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/app_theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:framy_annotation/framy_annotation.dart'; 3 | 4 | @framyTheme 5 | class AppTheme { 6 | static ThemeData get themeData => ThemeData( 7 | primarySwatch: Colors.green, 8 | visualDensity: VisualDensity.adaptivePlatformDensity, 9 | ); 10 | 11 | static const defaultAvatarColor = Color(0xFFB0DFB0); 12 | } 13 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/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. -------------------------------------------------------------------------------- /framy_generator/lib/json_formatter.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:framy_generator/framy_object.dart'; 4 | 5 | String fixJson(String generatedJson) { 6 | return generatedJson.replaceAll('\n]\n\n[\n', ',\n'); 7 | } 8 | 9 | extension JsonListExtension on List { 10 | String toJson() => JsonEncoder.withIndent(' ') 11 | .convert(map((framyObj) => framyObj.toMap()).toList()); 12 | } 13 | -------------------------------------------------------------------------------- /showcase/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 | -------------------------------------------------------------------------------- /test_apps/counter_app/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 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/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 | -------------------------------------------------------------------------------- /framy_annotation/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: counter_app 2 | description: An example app showing basic usage of Framy. 3 | version: 1.0.0+1 4 | environment: 5 | sdk: ">=2.7.0 <3.0.0" 6 | 7 | dependencies: 8 | flutter: 9 | sdk: flutter 10 | framy_annotation: ^0.1.1 11 | # path: ../ 12 | 13 | dev_dependencies: 14 | build_runner: any 15 | framy_generator: 16 | path: ../../framy_generator 17 | 18 | flutter: 19 | uses-material-design: true 20 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/models/built_value_user.dart: -------------------------------------------------------------------------------- 1 | import 'package:built_value/built_value.dart'; 2 | import 'package:framy_annotation/framy_annotation.dart'; 3 | 4 | part 'built_value_user.g.dart'; 5 | 6 | @framyModel 7 | abstract class BuiltUser implements Built { 8 | String get firstName; 9 | 10 | String get lastName; 11 | 12 | BuiltUser._(); 13 | 14 | factory BuiltUser([updates(BuiltUserBuilder b)]) = _$BuiltUser; 15 | } 16 | -------------------------------------------------------------------------------- /showcase/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 | -------------------------------------------------------------------------------- /showcase/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 | -------------------------------------------------------------------------------- /test_apps/counter_app/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 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/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 | -------------------------------------------------------------------------------- /test_apps/counter_app/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 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/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 | -------------------------------------------------------------------------------- /framy_generator/example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: counter_app 2 | description: An example app showing basic usage of Framy. 3 | version: 1.0.0+1 4 | environment: 5 | sdk: ">=2.7.0 <3.0.0" 6 | 7 | dependencies: 8 | flutter: 9 | sdk: flutter 10 | framy_annotation: ^0.1.4 11 | 12 | dev_dependencies: 13 | build_runner: any 14 | framy_generator: 15 | path: ../ 16 | 17 | flutter: 18 | uses-material-design: true 19 | 20 | #dependency_overrides: 21 | # framy_annotation: 22 | # path: ../../framy_annotation 23 | -------------------------------------------------------------------------------- /framy_generator/test/generators/main_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/generator/main_generator.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('Main generator result', () { 6 | test('should generate proper main', () { 7 | //when 8 | final result = generateMain(); 9 | //then 10 | final expectedResult = ''' 11 | void main() { 12 | runApp(FramyApp()); 13 | } 14 | '''; 15 | expect(result, equals(expectedResult)); 16 | }); 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /showcase/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /test_apps/counter_app/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /showcase/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 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/profile_page_custom_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:weight_tracker/main.app.framy.dart'; 3 | 4 | import 'test_utils.dart'; 5 | 6 | void main() { 7 | group('FramyProfilePageCustomPage', () { 8 | testWidgets('should build', (WidgetTester tester) async { 9 | await tester.pumpWidget( 10 | FramyAppWrapperWithScaffold(FramyProfilePageCustomPage()), 11 | ); 12 | expect(find.byType(FramyProfilePageCustomPage), findsOneWidget); 13 | }); 14 | }); 15 | } 16 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/accessible_element_generator.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | 3 | String generateAccessibleElement(FramyObject object) { 4 | var text = ''; 5 | 6 | if (object.parentObject != null) { 7 | text += object.parentObject.name; 8 | if (!object.isStatic) { 9 | text += '()'; 10 | } 11 | text += '.'; 12 | } 13 | text += object.name; 14 | if (object.kind == ElementKind.FUNCTION || 15 | object.kind == ElementKind.METHOD) { 16 | text += '()'; 17 | } 18 | return text; 19 | } 20 | -------------------------------------------------------------------------------- /test_apps/counter_app/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 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/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 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/models/weight_entry.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | 3 | import 'utils.dart'; 4 | 5 | @framyModel 6 | class WeightEntry { 7 | final double weight; 8 | final DateTime dateTime; 9 | final String note; 10 | 11 | WeightEntry(this.dateTime, this.weight, this.note); 12 | 13 | WeightEntry.now(this.weight) 14 | : note = '', 15 | dateTime = DateTime.now().current; 16 | 17 | @override 18 | String toString() { 19 | return 'WeightEntry(weight: $weight, date: $dateTime, note: $note)'; 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /framy_generator/test/generators/utils_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/generator/utils_generator.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('generateUtils result', () { 6 | test('should contain isDependencyAPreset method', () { 7 | final result = generateUtils(); 8 | expect(result.contains('bool isDependencyAPreset('), isTrue); 9 | }); 10 | 11 | test('should contain isValueAPreset method', () { 12 | final result = generateUtils(); 13 | expect(result.contains('bool isValueAPreset('), isTrue); 14 | }); 15 | }); 16 | } -------------------------------------------------------------------------------- /showcase/README.md: -------------------------------------------------------------------------------- 1 | # showcase 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /test_apps/counter_app/README.md: -------------------------------------------------------------------------------- 1 | # counter_app 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /framy_annotation/example/README.md: -------------------------------------------------------------------------------- 1 | # counter_app 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /framy_generator/example/README.md: -------------------------------------------------------------------------------- 1 | # counter_app 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/enum_map_generator.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | 3 | String generateEnumMap(List modelObjects) { 4 | final enumNames = {'MaterialTapTargetSize'}; 5 | enumNames.addAll(modelObjects 6 | .where((o) => o.type == FramyObjectType.enumModel) 7 | .map((fo) => fo.name)); 8 | 9 | return '''final framyEnumMap = >{ 10 | ${enumNames.fold('', (prev, enumName) => prev + _enumNameToMapEntry(enumName))} 11 | }; 12 | '''; 13 | } 14 | 15 | String _enumNameToMapEntry(String enumName) => 16 | '\'$enumName\': $enumName.values,\n'; 17 | -------------------------------------------------------------------------------- /framy_generator/test/test_generator/generate_test_utils_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/test_generator/generate_test_utils.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('generate test utils result', () { 6 | test('should contain extension on WidgetTester', () { 7 | final result = generateTestUtils([]); 8 | expect(result.contains('extension on WidgetTester {'), isTrue); 9 | }); 10 | 11 | test('should contain loadRobotoFont method', () { 12 | final result = generateTestUtils([]); 13 | expect(result.contains('loadRobotoFont'), isTrue); 14 | }); 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/README.md: -------------------------------------------------------------------------------- 1 | # weight_tracker 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/models/statistics_page_state.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | import 'package:freezed_annotation/freezed_annotation.dart'; 3 | import 'package:weight_tracker/models/weight_entry.dart'; 4 | 5 | part 'statistics_page_state.freezed.dart'; 6 | 7 | @framyModel 8 | @freezed 9 | abstract class StatisticsPageState with _$StatisticsPageState { 10 | const factory StatisticsPageState.loaded(List weightEntries) = 11 | Loaded; 12 | 13 | const factory StatisticsPageState.loading() = Loading; 14 | 15 | const factory StatisticsPageState.error([String message]) = Error; 16 | } 17 | -------------------------------------------------------------------------------- /showcase/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 | -------------------------------------------------------------------------------- /test_apps/counter_app/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 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/create_subdependencies_map_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:test/test.dart'; 2 | import 'package:weight_tracker/main.app.framy.dart'; 3 | 4 | void main() { 5 | group('createSubDependencies method', () { 6 | test('should return default subDependencies for WeightEntry', () { 7 | final subDependencies = createSubDependencies('WeightEntry'); 8 | expect(subDependencies, hasLength(3)); 9 | }); 10 | 11 | test('should return dependencies for .now constructor when its passed', () { 12 | final subDependencies = createSubDependencies('WeightEntry', '.now'); 13 | expect(subDependencies, hasLength(1)); 14 | }); 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/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 | -------------------------------------------------------------------------------- /showcase/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "showcase", 3 | "short_name": "showcase", 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 | } 24 | -------------------------------------------------------------------------------- /showcase/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 = showcase 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.showcase 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2020 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /showcase/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /showcase/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: showcase 2 | description: A new Flutter project. 3 | 4 | environment: 5 | sdk: ">=2.7.0 <3.0.0" 6 | 7 | dependencies: 8 | flutter: 9 | sdk: flutter 10 | counter_app: 11 | path: ../test_apps/counter_app 12 | weight_tracker: 13 | path: ../test_apps/weight_tracker 14 | cupertino_icons: ^0.1.3 15 | 16 | dev_dependencies: 17 | flutter_test: 18 | sdk: flutter 19 | 20 | #dependency_overrides: 21 | # freezed_annotation: ^0.11.0 #device preview uses old version 22 | # freezed: ^0.11.2 #device preview uses old version 23 | 24 | flutter: 25 | uses-material-design: true 26 | assets: 27 | - assets/weight_tracker.png 28 | - assets/counter.png 29 | -------------------------------------------------------------------------------- /test_apps/counter_app/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "counter_app", 3 | "short_name": "counter_app", 4 | "start_url": ".", 5 | "display": "minimal-ui", 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 | } 24 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/widgets/built_value_example_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:framy_annotation/framy_annotation.dart'; 3 | import 'package:weight_tracker/models/built_value_user.dart'; 4 | 5 | @FramyWidget(groupName: 'Dummy Widgets') 6 | class BuiltValueExampleWidget extends StatelessWidget { 7 | final BuiltUser user; 8 | 9 | const BuiltValueExampleWidget({Key key, this.user}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Text( 14 | '${user.firstName}\n${user.lastName}', 15 | style: Theme.of(context).textTheme.headline2, 16 | textAlign: TextAlign.center, 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /showcase/android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /test_apps/counter_app/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 = counter_app 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.counterApp 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2020 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /test_apps/counter_app/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /test_apps/counter_app/test/app_bar_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:counter_app/main.app.framy.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | import 'test_utils.dart'; 6 | 7 | void main() { 8 | group('FramyAppBarPage', () { 9 | testWidgets('should build', (tester) async { 10 | await tester.pumpWidget(FramyAppWrapper(FramyAppBarPage())); 11 | expect(find.byKey(Key('FramyAppBarPage')), findsOneWidget); 12 | }); 13 | 14 | testWidgets('should have 4 AppBars', (tester) async { 15 | await tester.pumpWidget(FramyAppWrapper(FramyAppBarPage())); 16 | expect(find.byType(AppBar), findsNWidgets(4)); 17 | }); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "weight_tracker", 3 | "short_name": "weight_tracker", 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 | } 24 | -------------------------------------------------------------------------------- /test_apps/counter_app/android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/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 = weight_tracker 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.weightTracker 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2020 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 3 | import 'package:framy_annotation/framy_annotation.dart'; 4 | import 'package:weight_tracker/app_theme.dart'; 5 | import 'package:weight_tracker/home_page.dart'; 6 | 7 | void main() { 8 | runApp(WeightTrackerApp()); 9 | } 10 | 11 | @FramyApp(useDevicePreview: true) 12 | class WeightTrackerApp extends StatelessWidget { 13 | @override 14 | Widget build(BuildContext context) { 15 | return ProviderScope( 16 | child: MaterialApp( 17 | title: 'Flutter Demo', 18 | theme: AppTheme.themeData, 19 | home: HomePage(), 20 | ), 21 | ); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /framy_generator/lib/utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:analyzer/dart/element/element.dart'; 2 | 3 | /// Returns the import which points to a given [element] 4 | String getImport(Element element) { 5 | // prefer library source, because otherwise "part of"-files will lead to 6 | // compile errors due to bad imports in the generated code 7 | final source = element.librarySource ?? element.source; 8 | 9 | //return early if element has no source 10 | if (source == null) { 11 | return null; 12 | } 13 | 14 | // we don't need to import core dart types 15 | // or core flutter types 16 | if (!source.isInSystemLibrary) { 17 | final path = source.uri.toString(); 18 | 19 | return path; 20 | } 21 | return null; 22 | } 23 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/widgets/weight_unit_display.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:framy_annotation/framy_annotation.dart'; 3 | import 'package:weight_tracker/models/weight_unit.dart'; 4 | 5 | @FramyWidget() 6 | class WeightUnitDisplay extends StatelessWidget { 7 | final WeightUnit weightUnit; 8 | 9 | const WeightUnitDisplay({Key key, this.weightUnit = WeightUnit.kg}) 10 | : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return ListTile( 15 | title: Text('Weight unit'), 16 | trailing: Text(weightUnit == null 17 | ? 'Default' 18 | : (weightUnit == WeightUnit.lbs ? 'lbs' : 'kg')), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /test_apps/counter_app/test/textfield_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:counter_app/main.app.framy.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | import 'test_utils.dart'; 6 | 7 | void main() { 8 | group('TextFieldPage', () { 9 | testWidgets('should build', (tester) async { 10 | await tester.pumpWidget(FramyAppWrapperWithScaffold(FramyTextFieldPage())); 11 | expect(find.byType(FramyTextFieldPage), findsOneWidget); 12 | }); 13 | 14 | testWidgets('have 8 textfields', (tester) async { 15 | await tester.pumpWidget(FramyAppWrapperWithScaffold(FramyTextFieldPage())); 16 | expect(find.byType(TextField), findsNWidgets(8)); 17 | }); 18 | }); 19 | } -------------------------------------------------------------------------------- /framy_generator/lib/generator/available_constructor_names_generator.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | 3 | String generateAvailableConstructorNames(List modelObjects) => ''' 4 | Map> framyAvailableConstructorNames = { 5 | ${modelObjects.fold('', (prev, model) => prev + _modelToConstructorNames(model))} 6 | }; 7 | '''; 8 | 9 | String _modelToConstructorNames(FramyObject modelObject) { 10 | final name = modelObject.name; 11 | final constructorNames = modelObject.constructors 12 | .map((constructor) => "'${constructor.name}'") 13 | .toList(); 14 | if (constructorNames?.isEmpty ?? true) { 15 | return ''; 16 | } 17 | return "'$name': $constructorNames,"; 18 | } 19 | -------------------------------------------------------------------------------- /framy_generator/test/mocks.dart: -------------------------------------------------------------------------------- 1 | import 'package:analyzer/src/generated/source.dart'; 2 | import 'package:framy_generator/framy_object.dart'; 3 | import 'package:mockito/mockito.dart'; 4 | import 'package:source_gen/source_gen.dart'; 5 | 6 | class ElementMock extends Mock implements Element {} 7 | 8 | class LibraryElementMock extends Mock implements LibraryElement {} 9 | 10 | class FieldElementMock extends Mock implements FieldElement {} 11 | 12 | class ExecutableElementMock extends Mock implements ExecutableElement {} 13 | 14 | class AnnotatedElementMock extends Mock implements AnnotatedElement {} 15 | 16 | class ElementLocationMock extends Mock implements ElementLocation {} 17 | 18 | class SourceMock extends Mock implements Source {} 19 | -------------------------------------------------------------------------------- /framy_generator/test/resolvers/metadata_resolver_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | import 'package:framy_generator/resolvers/metadata_resolver.dart'; 3 | import 'package:source_gen_test/source_gen_test.dart'; 4 | 5 | Future main() async { 6 | final reader = await initializeLibraryReaderForDirectory( 7 | 'test/resolvers', 8 | 'metadata_resolver_test.dart', 9 | ); 10 | 11 | initializeBuildLogTracking(); 12 | testAnnotatedElements( 13 | reader, 14 | MetadataResolver(), 15 | useDartFormatter: false, 16 | ); 17 | } 18 | 19 | @ShouldGenerate(''' 20 | {"pathToFramyApp":"package:__test__/metadata_resolver_test.app.framy.dart"}''') 21 | @FramyApp() 22 | class MyApp {} 23 | -------------------------------------------------------------------------------- /showcase/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /test_apps/counter_app/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: counter_app 2 | description: A new Flutter project. 3 | version: 1.0.0+1 4 | environment: 5 | sdk: ">=2.7.0 <3.0.0" 6 | 7 | dependencies: 8 | flutter: 9 | sdk: flutter 10 | framy_annotation: ^0.1.5 11 | device_preview: ^0.4.8 12 | 13 | dev_dependencies: 14 | build_runner: any 15 | flutter_test: 16 | sdk: flutter 17 | framy_generator: 18 | path: ../../framy_generator 19 | flutter_driver: 20 | sdk: flutter 21 | test: any 22 | ozzie: ^2.2.3 23 | 24 | framy: 25 | wrap-with-center: true 26 | wrap-with-safearea: true 27 | 28 | #dependency_overrides: 29 | # framy_annotation: 30 | # path: ../../framy_annotation 31 | 32 | flutter: 33 | uses-material-design: true 34 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/widgets/dummy_test_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:framy_annotation/framy_annotation.dart'; 3 | import 'package:weight_tracker/models/dummy_test_widget_model.dart'; 4 | 5 | // This is dummy widget that is used for testing that Framy App will work 6 | // with widgets that are using models not annotated with FramyModel 7 | @FramyWidget(groupName: 'Dummy Widgets') 8 | class DummyTestWidget extends StatelessWidget { 9 | final DummyTestWidgetModel model; 10 | 11 | const DummyTestWidget({Key key, this.model}) : super(key: key); 12 | @override 13 | Widget build(BuildContext context) { 14 | return Text('This is dummy widget used only to test: ${model?.text}'); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /test_apps/counter_app/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/available_constructor_names_map_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:test/test.dart'; 2 | import 'package:weight_tracker/main.app.framy.dart'; 3 | 4 | void main() { 5 | group('framyAvailableConstructorNames', () { 6 | test('contains two constructors of WeightEntry', () { 7 | final constructors = framyAvailableConstructorNames['WeightEntry']; 8 | expect(constructors, hasLength(2)); 9 | expect(constructors[0], ''); 10 | expect(constructors[1], '.now'); 11 | }); 12 | 13 | test('contains the only User constructor', () { 14 | final constructors = framyAvailableConstructorNames['User']; 15 | expect(constructors, hasLength(1)); 16 | expect(constructors[0], ''); 17 | }); 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /framy_annotation/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [0.1.5] 4 | 5 | - Added `FramyGoldenTests` annotation for generating golden tests [#145](https://github.com/Fidev-io/framy/issues/145) 6 | 7 | ## [0.1.4] 8 | 9 | - Added `groupName` parameter to group widgets in directories 10 | 11 | ## [0.1.3] 12 | 13 | - Added isPage param to FramyWidget annotation 14 | 15 | ## [0.1.2] 16 | 17 | - Added `FramyRegisterRiverpod` and `FramyUseRiverpod` annotations 18 | 19 | ## [0.1.1] 20 | 21 | - Publish changes from `0.1.0-dev.2` 22 | 23 | ## [0.1.0-dev.2] 24 | - Removed device_preview from dependencies 25 | - Added useDevicePreview as param to FramyApp annotation 26 | 27 | ## [0.1.0-dev.1] 28 | - Added device_preview as a dependency 29 | 30 | ## [0.1.0] 31 | 32 | - initial release 33 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/widgets/user_data_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:framy_annotation/framy_annotation.dart'; 3 | import 'package:weight_tracker/models/user.dart'; 4 | 5 | import '../app_theme.dart'; 6 | 7 | @framyWidget 8 | class UserDataCard extends StatelessWidget { 9 | final User user; 10 | 11 | const UserDataCard({Key key, @required this.user}) 12 | : super(key: key ?? const Key('UserDataCard')); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return ListTile( 17 | leading: CircleAvatar( 18 | backgroundColor: AppTheme.defaultAvatarColor, 19 | ), 20 | title: Text('${user?.firstName} ${user?.lastName}'), 21 | subtitle: Text('Age: ${user?.age}'), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/utils_generator.dart: -------------------------------------------------------------------------------- 1 | String generateUtils() => ''' 2 | class FramyHeaderText extends StatelessWidget { 3 | final String text; 4 | 5 | const FramyHeaderText(this.text); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return Text( 10 | text, 11 | style: Theme.of(context).textTheme.headline5, 12 | ); 13 | } 14 | } 15 | 16 | bool isDependencyAPreset( 17 | Map> presets, 18 | FramyDependencyModel dependency, 19 | ) => 20 | isValueAPreset(presets, dependency.type, dependency.value); 21 | 22 | bool isValueAPreset( 23 | Map> presets, 24 | String type, 25 | dynamic value, 26 | ) => 27 | presets.containsKey(type) && presets[type].containsValue(value); 28 | 29 | '''; 30 | -------------------------------------------------------------------------------- /framy_generator/lib/resolvers/metadata_resolver.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:analyzer/dart/element/element.dart'; 4 | import 'package:build/build.dart'; 5 | import 'package:framy_annotation/framy_annotation.dart'; 6 | import 'package:framy_generator/framy_object.dart'; 7 | import 'package:framy_generator/utils.dart'; 8 | import 'package:source_gen/source_gen.dart'; 9 | 10 | class MetadataResolver extends GeneratorForAnnotation { 11 | @override 12 | String generateForAnnotatedElement( 13 | Element element, ConstantReader annotation, BuildStep buildStep) { 14 | final pathToFramyApp = 15 | getImport(element).replaceFirst('\.dart', '\.app\.framy\.dart'); 16 | return json.encode({ 17 | 'pathToFramyApp': pathToFramyApp, 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /framy_generator/lib/config/framy_config.dart: -------------------------------------------------------------------------------- 1 | class FramyConfig { 2 | /// Specified in FramyApp annotation 3 | bool useDevicePreview; 4 | 5 | /// Specified in config yaml file 6 | /// wrap-with-devicepreview: true 7 | bool wrapWithDevicePreview; 8 | 9 | /// Specified in config yaml file 10 | /// wrap-with-scaffold: true 11 | bool wrapWithScaffold; 12 | 13 | /// Specified in config yaml file 14 | /// wrap-with-center: true 15 | bool wrapWithCenter; 16 | 17 | /// Specified in config yaml file 18 | /// wrap-with-safearea: true 19 | bool wrapWithSafeArea; 20 | 21 | /// Specified in config yaml file 22 | /// show-material-components: true 23 | bool showMaterialComponents; 24 | 25 | /// Specified in config yaml file 26 | /// show-storyboard: true 27 | bool showStoryboard; 28 | } 29 | -------------------------------------------------------------------------------- /framy_generator/test/generators/text_field_page_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/generator/text_field_generator.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('TextFieldPage generator result', () { 6 | test('should contain class FramyTextFieldPage', () { 7 | final result = generateTextFieldPage(); 8 | expect(result.contains('class FramyTextFieldPage'), isTrue); 9 | }); 10 | 11 | test('should contain proper key', () { 12 | final result = generateTextFieldPage(); 13 | expect(result.contains('Key(\'FramyTextFieldPage\')'), isTrue); 14 | }); 15 | 16 | test('should contain 8 textfields', () { 17 | final result = generateTextFieldPage(); 18 | expect('TextField('.allMatches(result), hasLength(8)); 19 | }); 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /framy_generator/test/resolvers/dummy_classes.dart: -------------------------------------------------------------------------------- 1 | class Color { 2 | final int value; 3 | 4 | const Color(int value) : value = value & 0xFFFFFFFF; 5 | } 6 | 7 | class MaterialColor extends Color { 8 | const MaterialColor(int value) : super(value); 9 | } 10 | 11 | class MaterialAccentColor extends Color { 12 | const MaterialAccentColor(int value) : super(value); 13 | } 14 | 15 | class ThemeData { 16 | final Color errorColor; 17 | 18 | ThemeData({this.errorColor}); 19 | } 20 | 21 | class Key {} 22 | 23 | class User { 24 | String firstName; 25 | } 26 | 27 | class Provider { 28 | final T Function(dynamic x) create; 29 | 30 | Provider(this.create); 31 | } 32 | 33 | abstract class Built, B> { 34 | V rebuild(Function(B) updates); 35 | 36 | B toBuilder(); 37 | } 38 | 39 | class BuiltUserBuilder {} 40 | -------------------------------------------------------------------------------- /framy_generator/test/generators/datetime_dependency_input_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/generator/datetime_dependency_input_generator.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('generateDateTimeDependencyInput result', () { 6 | test('should start with FramyDateTimeDependencyInput class', () { 7 | final result = generateDateTimeDependencyInput(); 8 | expect(result.startsWith('class FramyDateTimeDependencyInput'), isTrue); 9 | }); 10 | 11 | test('should contain InkWell', () { 12 | final result = generateDateTimeDependencyInput(); 13 | expect(result.contains('InkWell'), isTrue); 14 | }); 15 | 16 | test('should contain showDatePicker', () { 17 | final result = generateDateTimeDependencyInput(); 18 | expect(result.contains('showDatePicker('), isTrue); 19 | }); 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/dummy_test_widget_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:weight_tracker/main.app.framy.dart'; 3 | 4 | import 'test_utils.dart'; 5 | 6 | void main() { 7 | group('FramyDummyTestWidgetCustomPage', () { 8 | testWidgets('should build', (WidgetTester tester) async { 9 | await tester.pumpWidget( 10 | FramyAppWrapperWithScaffold(FramyDummyTestWidgetCustomPage()), 11 | ); 12 | expect(find.byType(FramyDummyTestWidgetCustomPage), findsOneWidget); 13 | }); 14 | 15 | testWidgets('should display \'Not supported type\' text', 16 | (WidgetTester tester) async { 17 | await tester.pumpWidget( 18 | FramyAppWrapperWithScaffold(FramyDummyTestWidgetCustomPage()), 19 | ); 20 | expect(find.text('Not supported type'), findsOneWidget); 21 | }); 22 | }); 23 | } 24 | -------------------------------------------------------------------------------- /framy_generator/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: framy_generator 2 | description: A convenient code generator for app styleguide, gallery, storyboard and more. 3 | version: 0.3.3 4 | repository: https://github.com/Fidev-io/framy 5 | homepage: https://framy.dev 6 | 7 | environment: 8 | sdk: ">=2.7.0 <3.0.0" 9 | 10 | dependencies: 11 | build: ^1.3.0 12 | source_gen: ^0.9.6 13 | glob: ^1.2.0 14 | analyzer: ">0.39.10 <0.40.0" #https://github.com/flutter/flutter/issues/56779 15 | framy_annotation: ^0.1.5 16 | yaml: ^2.2.1 17 | pedantic: ^1.9.2 18 | 19 | dev_dependencies: 20 | build_runner: ^1.10.0 21 | test: any 22 | mockito: any 23 | source_gen_test: 24 | git: 25 | url: https://github.com/Fidev-io/source_gen_test.git 26 | 27 | #dependency_overrides: 28 | # framy_annotation: 29 | # path: ../framy_annotation 30 | 31 | analyzer: 32 | enable-experiment: 33 | - non-nullable 34 | -------------------------------------------------------------------------------- /showcase/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /showcase/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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/pages/profile_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:framy_annotation/framy_annotation.dart'; 3 | import 'package:provider/provider.dart'; 4 | import 'package:weight_tracker/models/user.dart'; 5 | import 'package:weight_tracker/widgets/user_data_card.dart'; 6 | import 'package:weight_tracker/widgets/user_emails_view.dart'; 7 | import 'package:weight_tracker/widgets/weight_unit_display.dart'; 8 | 9 | @FramyUseProvider(User) 10 | @FramyWidget(isPage: true) 11 | class ProfilePage extends StatelessWidget { 12 | @override 13 | Widget build(BuildContext context) { 14 | return Consumer( 15 | builder: (context, user, child) { 16 | return Column( 17 | children: [ 18 | UserDataCard(user: user), 19 | UserEmailsView(user: user), 20 | WeightUnitDisplay(), 21 | ], 22 | ); 23 | }, 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /test_apps/counter_app/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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /test_apps/counter_app/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | /ozzie/ 46 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/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 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /framy_annotation/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | /ozzie/ 46 | -------------------------------------------------------------------------------- /framy_generator/example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | /ozzie/ 46 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/lint_ignores_generator.dart: -------------------------------------------------------------------------------- 1 | String generateLintIgnores() => ''' 2 | // ignore_for_file: unused_import 3 | // ignore_for_file: directives_ordering 4 | // ignore_for_file: type_annotate_public_apis 5 | // ignore_for_file: prefer_const_constructors 6 | // ignore_for_file: invalid_assignment 7 | // ignore_for_file: argument_type_not_assignable 8 | // ignore_for_file: prefer_const_constructors_in_immutables 9 | // ignore_for_file: avoid_return_types_on_setters 10 | // ignore_for_file: avoid_setters_without_getters 11 | // ignore_for_file: sort_child_properties_last 12 | // ignore_for_file: prefer_const_literals_to_create_immutables 13 | // ignore_for_file: prefer_generic_function_type_aliases 14 | // ignore_for_file: prefer_conditional_assignment 15 | // ignore_for_file: avoid_unused_constructor_parameters 16 | // ignore_for_file: prefer_typing_uninitialized_variables 17 | // ignore_for_file: curly_braces_in_flow_control_structures 18 | '''; 19 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/app_bar_generator.dart: -------------------------------------------------------------------------------- 1 | String generateAppBar() => ''' 2 | class FramyAppBar extends StatelessWidget with PreferredSizeWidget { 3 | final Widget leading; 4 | 5 | const FramyAppBar({Key key, @required this.leading}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return AppBar( 10 | key: Key('FramyAppBar'), 11 | title: Text('Framy App'), 12 | leading: leading, 13 | actions: [ 14 | IconButton( 15 | key: ValueKey('FramyAppBarSettingsButton'), 16 | icon: Icon(Icons.settings), 17 | onPressed: () => 18 | showDialog( 19 | context: context, 20 | useRootNavigator: false, 21 | builder: (context) => FramySettingsDialog(), 22 | ), 23 | ) 24 | ], 25 | ); 26 | } 27 | 28 | @override 29 | Size get preferredSize => Size.fromHeight(kToolbarHeight); 30 | } 31 | '''; 32 | -------------------------------------------------------------------------------- /framy_generator/test/json_formatter_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/json_formatter.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('fixJson', () { 6 | final generatedJson = ''' 7 | [ 8 | { 9 | "name": "TestWidget", 10 | } 11 | ]'''; 12 | test('should return the same string when only one element', () { 13 | //when 14 | final formattedJson = fixJson(generatedJson); 15 | //then 16 | expect(formattedJson, generatedJson); 17 | }); 18 | 19 | test('should combine two lists of elements into one', () { 20 | //given 21 | final multipleJsons = '$generatedJson\n\n$generatedJson'; 22 | //when 23 | final formattedJson = fixJson(multipleJsons); 24 | //then 25 | final expectedJson = ''' 26 | [ 27 | { 28 | "name": "TestWidget", 29 | }, 30 | { 31 | "name": "TestWidget", 32 | } 33 | ]'''; 34 | expect(formattedJson, expectedJson); 35 | }); 36 | }); 37 | } 38 | -------------------------------------------------------------------------------- /framy_generator/test/generators/app_bar_page_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/generator/app_bar_page_generator.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('AppBarPage generator result', () { 6 | test('should start with FramyAppBarPage class', () { 7 | final result = generateAppBarPage(); 8 | expect(result.startsWith('class FramyAppBarPage'), isTrue); 9 | }); 10 | 11 | test('should contain key FramyAppBarPage', () { 12 | final result = generateAppBarPage(); 13 | expect(result.contains('Key(\'FramyAppBarPage\')'), isTrue); 14 | }); 15 | 16 | test('should contain 4 AppBars', () { 17 | final result = generateAppBarPage(); 18 | expect('AppBar('.allMatches(result), hasLength(4)); 19 | }); 20 | 21 | test('should contain header', () { 22 | final result = generateAppBarPage(); 23 | expect(result.contains('const FramyHeaderText(\'AppBar\'),'), isTrue); 24 | }); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/function_callbacks_generator.dart: -------------------------------------------------------------------------------- 1 | String generateFunctionCallbacks() => ''' 2 | dynamic getFunctionCallback(FramyDependencyModel dependency) { 3 | final callbacks = [ 4 | () => dependency.functionCalls.addCall(dependency.name, []), 5 | (a) => dependency.functionCalls.addCall(dependency.name, [a]), 6 | (a, b) => dependency.functionCalls.addCall(dependency.name, [a, b]), 7 | (a, b, c) => dependency.functionCalls.addCall(dependency.name, [a, b, c]), 8 | (a, b, c, d) => 9 | dependency.functionCalls.addCall(dependency.name, [a, b, c, d]), 10 | (a, b, c, d, e) => 11 | dependency.functionCalls.addCall(dependency.name, [a, b, c, d, e]), 12 | (a, b, c, d, e, f) => 13 | dependency.functionCalls.addCall(dependency.name, [a, b, c, d, e, f]), 14 | ]; 15 | if (dependency.type.contains('()')) { 16 | return callbacks[0]; 17 | } else { 18 | return callbacks[','.allMatches(dependency.type).length + 1]; 19 | } 20 | } 21 | '''; 22 | -------------------------------------------------------------------------------- /framy_generator/test/generators/preset_dropdown_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/generator/preset_dropdown_generator.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('PresetDropdownGenerator result', () { 6 | test('should start with class FramyPresetDropdown', () { 7 | final result = generatePresetDropdown(); 8 | expect(result.startsWith('class FramyPresetDropdown'), isTrue); 9 | }); 10 | 11 | test('should contain DropdownButton', () { 12 | final result = generatePresetDropdown(); 13 | expect(result.contains('DropdownButton'), isTrue); 14 | }); 15 | 16 | test('should contain check for isFunction', () { 17 | final result = generatePresetDropdown(); 18 | expect(result.contains('dependency.isFunction'), isTrue); 19 | }); 20 | 21 | test('should contain Logger label', () { 22 | final result = generatePresetDropdown(); 23 | expect(result.contains('\'Logger\''), isTrue); 24 | }); 25 | }); 26 | } 27 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/presets_map_generator.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | import 'package:framy_generator/generator/accessible_element_generator.dart'; 3 | 4 | String generatePresets(List presets) { 5 | final presetsByType = >{}; 6 | presets.forEach((element) { 7 | if (presetsByType.containsKey(element.returnType)) { 8 | presetsByType[element.returnType].add(element); 9 | } else { 10 | presetsByType[element.returnType] = [element]; 11 | } 12 | }); 13 | 14 | final presetsString = presetsByType.entries.fold( 15 | '', (p, entry) => p + _generatePresetsForType(entry.key, entry.value)); 16 | 17 | return 'Map> createFramyPresets() => {$presetsString};'; 18 | } 19 | 20 | String _generatePresetsForType(String type, List presets) { 21 | return '\'$type\': {${presets.fold('', (p, presetObject) => p + '\'${presetObject.name}\': ${generateAccessibleElement(presetObject)},')}},'; 22 | } 23 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/widget_page_generator.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | import 'package:framy_generator/generator/widget_dependency_utils.dart'; 3 | 4 | String generateWidgetPages(List widgetFramyObjects) { 5 | return widgetFramyObjects.fold( 6 | '', 7 | (previousValue, element) => previousValue + _generateWidgetPage(element), 8 | ); 9 | } 10 | 11 | String _generateWidgetPage(FramyObject framyObject) { 12 | 13 | final className = 'Framy${framyObject.name}CustomPage'; 14 | final key = 'Framy_${framyObject.name}_Page'; 15 | 16 | return ''' 17 | class $className extends StatelessWidget { 18 | @override 19 | Widget build(BuildContext context) { 20 | return FramyCustomPage( 21 | key: Key('$key'), 22 | dependencies: [ 23 | ${initializeFramyObjectDependencies(framyObject)} 24 | ], 25 | builder: (DependencyValueGetter valueGetter) { 26 | return ${wrapConstructor(framyObject)}; 27 | }, 28 | ); 29 | } 30 | } 31 | '''; 32 | } 33 | 34 | -------------------------------------------------------------------------------- /showcase/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/history_page_custom_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:weight_tracker/main.app.framy.dart'; 3 | 4 | import 'test_utils.dart'; 5 | 6 | void main() { 7 | group('HistoryPageCustomPage', () { 8 | testWidgets('should build', (WidgetTester tester) async { 9 | await tester.pumpWidget( 10 | FramyAppWrapperWithScaffold(FramyHistoryPageCustomPage())); 11 | expect(find.byType(FramyHistoryPageCustomPage), findsOneWidget); 12 | }); 13 | 14 | testWidgets('should allow to change dependency passed by riverpod', 15 | (WidgetTester tester) async { 16 | //given 17 | await tester.pumpWidget( 18 | FramyAppWrapperWithScaffold(FramyHistoryPageCustomPage())); 19 | expect(find.text('No entries'), findsOneWidget); 20 | //when 21 | await tester.tap(find.text('+ Add weightEntries element')); 22 | await tester.pump(); 23 | //expect 24 | expect(find.text('No entries'), findsNothing); 25 | }); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /test_apps/counter_app/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/test_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:weight_tracker/app_theme.dart'; 3 | import 'package:weight_tracker/main.app.framy.dart'; 4 | 5 | class FramyAppWrapper extends StatelessWidget { 6 | final Widget child; 7 | 8 | const FramyAppWrapper(this.child); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return FramyAppSettings( 13 | wrapWithScaffold: true, 14 | wrapWithSafeArea: false, 15 | wrapWithCenter: false, 16 | showNavigationMenu: true, 17 | wrapWithDevicePreview: true, 18 | child: MaterialApp( 19 | theme: AppTheme.themeData, 20 | home: child, 21 | ), 22 | ); 23 | } 24 | } 25 | 26 | class FramyAppWrapperWithScaffold extends StatelessWidget { 27 | final Widget child; 28 | 29 | const FramyAppWrapperWithScaffold(this.child); 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return FramyAppWrapper( 34 | Scaffold( 35 | body: child, 36 | ), 37 | ); 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: weight_tracker 2 | description: A new Flutter project. 3 | 4 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 5 | version: 1.0.0+1 6 | 7 | environment: 8 | sdk: ">=2.7.0 <3.0.0" 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | framy_annotation: ^0.1.5 14 | device_preview: ^0.4.8 15 | provider: ^4.3.1 16 | intl: ^0.16.1 17 | freezed_annotation: ^0.11.0 18 | flutter_riverpod: ^0.5.1 19 | built_value: ^7.1.0 20 | 21 | dev_dependencies: 22 | build_runner: any 23 | flutter_test: 24 | sdk: flutter 25 | framy_generator: 26 | path: ../../framy_generator 27 | flutter_driver: 28 | sdk: flutter 29 | test: any 30 | ozzie: ^2.2.3 31 | freezed: ^0.11.0 32 | built_value_generator: ^7.1.0 33 | 34 | #dependency_overrides: 35 | # freezed_annotation: ^0.11.0 #device preview uses old version 36 | # freezed: ^0.11.2 #device preview uses old version 37 | # framy_annotation: 38 | # path: ../../framy_annotation 39 | 40 | flutter: 41 | uses-material-design: true 42 | -------------------------------------------------------------------------------- /test_apps/counter_app/test/test_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:counter_app/main.app.framy.dart'; 2 | import 'package:counter_app/main.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class FramyAppWrapper extends StatelessWidget { 6 | final Widget child; 7 | 8 | const FramyAppWrapper(this.child); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return FramyAppSettings( 13 | wrapWithScaffold: true, 14 | wrapWithCenter: false, 15 | wrapWithSafeArea: false, 16 | showNavigationMenu: true, 17 | wrapWithDevicePreview: true, 18 | child: MaterialApp( 19 | theme: getThemeData(), 20 | debugShowCheckedModeBanner: false, 21 | home: child, 22 | ), 23 | ); 24 | } 25 | } 26 | 27 | class FramyAppWrapperWithScaffold extends StatelessWidget { 28 | final Widget child; 29 | 30 | const FramyAppWrapperWithScaffold(this.child); 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return FramyAppWrapper( 35 | Scaffold( 36 | body: child, 37 | ), 38 | ); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/storyboard_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:weight_tracker/main.app.framy.dart'; 3 | import 'package:weight_tracker/pages/history_page.dart'; 4 | import 'package:weight_tracker/pages/profile_page.dart'; 5 | import 'package:weight_tracker/pages/statistics_page.dart'; 6 | 7 | import 'test_utils.dart'; 8 | 9 | void main() { 10 | group('StoryboardPage', () { 11 | testWidgets('should build', (WidgetTester tester) async { 12 | await tester.pumpWidget( 13 | FramyAppWrapperWithScaffold(FramyStoryboardPage()), 14 | ); 15 | expect(find.byType(FramyStoryboardPage), findsOneWidget); 16 | }); 17 | 18 | testWidgets('should have proper pages', (WidgetTester tester) async { 19 | await tester.pumpWidget( 20 | FramyAppWrapperWithScaffold(FramyStoryboardPage()), 21 | ); 22 | expect(find.byType(StatisticsPage), findsOneWidget); 23 | expect(find.byType(ProfilePage), findsOneWidget); 24 | expect(find.byType(HistoryPage), findsOneWidget); 25 | }); 26 | }); 27 | } 28 | -------------------------------------------------------------------------------- /.github/workflows/gh-pages.yaml: -------------------------------------------------------------------------------- 1 | name: Github Pages 2 | on: 3 | push: 4 | branches: 5 | - master 6 | 7 | jobs: 8 | build: 9 | name: Github Pages Showcase 10 | env: 11 | my_secret: ${{secrets.commit_secret}} 12 | runs-on: ubuntu-latest 13 | steps: 14 | - uses: actions/checkout@v1 15 | - uses: subosito/flutter-action@v1.3.0 16 | with: 17 | channel: 'dev' 18 | - run: flutter config --enable-web 19 | - run: flutter pub get 20 | working-directory: showcase 21 | - run: flutter build web --release --dart-define=FLUTTER_WEB_USE_SKIA=true 22 | working-directory: showcase 23 | - run: | 24 | cd showcase/build/web 25 | git init 26 | git config --global user.email marcin.szalek1@gmail.com 27 | git config --global user.name MarcinusX 28 | git status 29 | git remote add origin https://${{secrets.commit_secret}}@github.com/Fidev-io/framy.git 30 | git checkout -b gh-pages 31 | git add --all 32 | git commit -m "github pages CI deploy" 33 | git push origin gh-pages -f 34 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/widgets/user_emails_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:framy_annotation/framy_annotation.dart'; 3 | import 'package:weight_tracker/models/user.dart'; 4 | 5 | @framyWidget 6 | class UserEmailsView extends StatelessWidget { 7 | final User user; 8 | 9 | const UserEmailsView({Key key, @required this.user}) 10 | : super(key: key ?? const Key('UserEmailsView')); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | if (user?.emails?.isEmpty ?? true) { 15 | return Text('No email'); 16 | } else if (user.emails.length == 1) { 17 | return ListTile( 18 | title: Text('${user.emails.first}'), 19 | subtitle: Text('Email'), 20 | leading: Icon(Icons.email), 21 | ); 22 | } else { 23 | return Column( 24 | crossAxisAlignment: CrossAxisAlignment.start, 25 | children: [ 26 | Text('Emails:'), 27 | ...user.emails.map((email) => ListTile( 28 | title: Text('$email'), 29 | leading: Icon(Icons.email), 30 | )), 31 | ], 32 | ); 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/subdependencies_map_generator.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | import 'package:framy_generator/generator/utils.dart'; 3 | 4 | String generateSubDependenciesMap(List modelObjects) { 5 | final models = modelObjects 6 | .where((element) => element.type == FramyObjectType.model) 7 | .toList(); 8 | return ''' 9 | List createSubDependencies(String type, [String constructor = '']) { 10 | switch (type + constructor) { 11 | ${models.fold('', (prev, model) => prev + _generateForModel(model))} 12 | default: return []; 13 | } 14 | } 15 | 16 | '''; 17 | } 18 | 19 | String _generateForModel(FramyObject object) { 20 | return ''' 21 | ${object.constructors.fold('', (prev, cons) => prev + _generateForConstructor(object, cons))} 22 | '''; 23 | } 24 | 25 | String _generateForConstructor( 26 | FramyObject object, FramyObjectConstructor constructor) { 27 | return ''' 28 | case '${object.name + constructor.name}': 29 | return [ 30 | ${constructor.dependencies.fold('', (prev, dep) => prev + dependencyInitializationLine(dep))} 31 | ]; 32 | '''; 33 | } 34 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/statistics_page_custom_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:weight_tracker/main.app.framy.dart'; 4 | 5 | import 'test_utils.dart'; 6 | 7 | void main() { 8 | group('StatisticsPageCustomPage', () { 9 | testWidgets('should build', (WidgetTester tester) async { 10 | await tester.pumpWidget( 11 | FramyAppWrapperWithScaffold(FramyStatisticsPageCustomPage())); 12 | expect(find.byType(FramyStatisticsPageCustomPage), findsOneWidget); 13 | }); 14 | 15 | testWidgets( 16 | 'should show circular progress indicator after change to loading', 17 | (WidgetTester tester) async { 18 | //given 19 | await tester.pumpWidget( 20 | FramyAppWrapperWithScaffold(FramyStatisticsPageCustomPage())); 21 | //when 22 | await tester.tap(find.text('loaded')); 23 | await tester.pump(); 24 | await tester.tap(find.text('loading').last); 25 | await tester.pump(); 26 | //expect 27 | expect(find.byType(CircularProgressIndicator), findsOneWidget); 28 | }); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/pages/statistics_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:framy_annotation/framy_annotation.dart'; 3 | import 'package:weight_tracker/models/statistics_page_state.dart'; 4 | 5 | @FramyWidget(isPage: true) 6 | class StatisticsPage extends StatelessWidget { 7 | final StatisticsPageState state; 8 | 9 | const StatisticsPage({Key key, this.state}) : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Center( 14 | child: state.when( 15 | loaded: (entries) { 16 | final sortedEntries = [...entries] 17 | ..sort((a, b) => a.dateTime?.compareTo(b.dateTime) ?? 0); 18 | final currentWeight = 19 | sortedEntries.isEmpty ? 0 : sortedEntries.first.weight; 20 | return Text('Current weight: $currentWeight'); 21 | }, 22 | loading: () => CircularProgressIndicator( 23 | key: Key('loading'), 24 | ), 25 | error: (message) => Text( 26 | '$message', 27 | style: TextStyle(color: Theme.of(context).errorColor), 28 | ), 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /run_all_tests.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | shouldRunIntegration=${1-false} 4 | shouldRebuild=${2-false} 5 | 6 | echo "==== Testing generator ====" 7 | cd framy_generator || exit 8 | ./fvm pub get 9 | ./fvm analyze 10 | ./fvm pub test 11 | 12 | run_app_tests () { 13 | ./fvm pub get 14 | if [ "$shouldRebuild" = "true" ]; then 15 | echo "Rebuilding...." 16 | ./fvm pub run build_runner build --delete-conflicting-outputs 17 | fi 18 | ./fvm test 19 | 20 | if [ "$shouldRunIntegration" = "true" ]; then 21 | rm -rf ozzie 22 | UDID=$( 23 | xcrun instruments -s | 24 | awk \ 25 | -F ' *[][]' \ 26 | -v 'device=iPhone 12 Pro (14.1)' \ 27 | '$1 == device { print $2 }' 28 | ) 29 | xcrun simctl boot "${UDID:?No Simulator with this name found}" 30 | 31 | PLATFORM="macos" ./fvm driver --target=test_driver/app.dart -d macos 32 | 33 | PLATFORM="ios" ./fvm driver --target=test_driver/app.dart -d 'iPhone 12 Pro' 34 | fi 35 | } 36 | 37 | echo "==== Testing counter app ====" 38 | cd ../test_apps/counter_app || exit 39 | run_app_tests 40 | 41 | echo "==== Testing weight_tracker app ====" 42 | cd ../weight_tracker || exit 43 | run_app_tests 44 | -------------------------------------------------------------------------------- /showcase/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 | -------------------------------------------------------------------------------- /test_apps/counter_app/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 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/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 | -------------------------------------------------------------------------------- /framy_generator/lib/resolvers/register_riverpod_resolver.dart: -------------------------------------------------------------------------------- 1 | import 'package:analyzer/dart/element/element.dart'; 2 | import 'package:build/build.dart'; 3 | import 'package:framy_annotation/framy_annotation.dart'; 4 | import 'package:framy_generator/framy_object.dart'; 5 | import 'package:framy_generator/json_formatter.dart'; 6 | import 'package:source_gen/source_gen.dart'; 7 | 8 | class RegisterRiverpodResolver 9 | extends GeneratorForAnnotation { 10 | @override 11 | String generateForAnnotatedElement( 12 | Element element, ConstantReader annotation, BuildStep buildStep) { 13 | final framyObjectsToReturn = []; 14 | if (element is TopLevelVariableElement) { 15 | final framyObject = _riverpodObjectFromElement(element); 16 | final type = element.type.getDisplayString(); 17 | framyObject.returnType = type.substring( 18 | type.indexOf('<') + 1, 19 | type.lastIndexOf('>'), 20 | ); 21 | framyObjectsToReturn.add(framyObject); 22 | } 23 | return framyObjectsToReturn.toJson(); 24 | } 25 | 26 | FramyObject _riverpodObjectFromElement(Element element) => 27 | FramyObject.fromElement(element)..type = FramyObjectType.riverpod; 28 | } 29 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/pages/history_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_riverpod/flutter_riverpod.dart'; 3 | import 'package:framy_annotation/framy_annotation.dart'; 4 | import 'package:weight_tracker/models/weight_entry.dart'; 5 | import 'package:weight_tracker/widgets/weight_entry_list_item.dart'; 6 | 7 | @FramyRegisterRiverpod() 8 | final weightEntries = Provider((ref) => [ 9 | WeightEntry(DateTime(2020, 07, 01), 79, ''), 10 | WeightEntry(DateTime(2020, 07, 02), 78.6, ''), 11 | WeightEntry(DateTime(2020, 07, 03), 78.3, ''), 12 | ]); 13 | 14 | @FramyUseRiverpod('weightEntries') 15 | @FramyWidget(isPage: true) 16 | class HistoryPage extends StatelessWidget { 17 | @override 18 | Widget build(BuildContext context) { 19 | return Consumer((context, read) { 20 | final entries = read(weightEntries); 21 | if (entries?.isEmpty ?? true) { 22 | return Center( 23 | child: Text('No entries'), 24 | ); 25 | } 26 | return ListView.builder( 27 | itemCount: entries.length, 28 | itemBuilder: (context, index) { 29 | return WeightEntryListItem(weightEntry: entries[index]); 30 | }, 31 | ); 32 | }); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/built_value_example_widget_custom_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | import 'package:weight_tracker/main.app.framy.dart'; 4 | 5 | import 'test_utils.dart'; 6 | 7 | void main() { 8 | group('BuiltValueExampleWidget', () { 9 | testWidgets('should build', (WidgetTester tester) async { 10 | await tester.pumpWidget(FramyAppWrapperWithScaffold( 11 | FramyBuiltValueExampleWidgetCustomPage())); 12 | expect( 13 | find.byType(FramyBuiltValueExampleWidgetCustomPage), findsOneWidget); 14 | }); 15 | 16 | testWidgets('should allow to change fields from model', 17 | (WidgetTester tester) async { 18 | //given 19 | await tester.pumpWidget(FramyAppWrapperWithScaffold( 20 | FramyBuiltValueExampleWidgetCustomPage())); 21 | //when 22 | await tester.enterText( 23 | find.byKey(Key('framy_dependency_firstName_input')), 'Adam'); 24 | await tester.enterText( 25 | find.byKey(Key('framy_dependency_lastName_input')), 'Mickiewicz'); 26 | await tester.pump(); 27 | //then 28 | expect(find.text('Adam\nMickiewicz'), findsOneWidget); 29 | }); 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /showcase/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | showcase 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test_apps/counter_app/test/counter_fab_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:counter_app/main.app.framy.dart'; 2 | import 'package:counter_app/main.dart'; 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | 6 | import 'test_utils.dart'; 7 | 8 | void main() { 9 | group('FramyCounterFABCustomPage', () { 10 | testWidgets('should build', (tester) async { 11 | await tester 12 | .pumpWidget(FramyAppWrapperWithScaffold(FramyCounterFABCustomPage())); 13 | expect(find.byKey(Key('Framy_CounterFAB_Page')), findsOneWidget); 14 | }); 15 | 16 | testWidgets('should have CounterFAB', (tester) async { 17 | await tester 18 | .pumpWidget(FramyAppWrapperWithScaffold(FramyCounterFABCustomPage())); 19 | expect(find.byType(CounterFAB), findsOneWidget); 20 | }); 21 | 22 | testWidgets('should show Callbacks page on tap', 23 | (WidgetTester tester) async { 24 | //given 25 | await tester 26 | .pumpWidget(FramyAppWrapperWithScaffold(FramyCounterFABCustomPage())); 27 | //when 28 | await tester.tap(find.text('Callbacks')); 29 | await tester.pump(); 30 | //then 31 | expect(find.byType(FramyCallbacksTab), findsOneWidget); 32 | }); 33 | }); 34 | } 35 | -------------------------------------------------------------------------------- /test_apps/counter_app/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | counter_app 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /framy_generator/test/generators/constructor_dropdown_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/generator/constructor_dropdown_generator.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('generateConstructorDropdown result', () { 6 | test('should start with FramyConstructorDropdown class', () { 7 | final result = generateConstructorDropdown(); 8 | expect(result.startsWith('class FramyConstructorDropdown'), isTrue); 9 | }); 10 | 11 | test('should contain DropdownButton', () { 12 | final result = generateConstructorDropdown(); 13 | expect(result.contains('DropdownButton'), isTrue); 14 | }); 15 | 16 | test('should contain framyAvailableConstructorNames reference', () { 17 | final result = generateConstructorDropdown(); 18 | expect(result.contains('framyAvailableConstructorNames'), isTrue); 19 | }); 20 | 21 | test('should contain Default label string', () { 22 | final result = generateConstructorDropdown(); 23 | expect(result.contains('\'Default\''), isTrue); 24 | }); 25 | 26 | test('should contain updateValue call', () { 27 | final result = generateConstructorDropdown(); 28 | expect(result.contains('dependency.updateValue();'), isTrue); 29 | }); 30 | }); 31 | } 32 | -------------------------------------------------------------------------------- /framy_generator/lib/config/yaml_config_loader.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:framy_generator/config/framy_config.dart'; 4 | import 'package:yaml/yaml.dart'; 5 | 6 | Future loadFramyConfig() async { 7 | var yamlMap = await loadConfigFile('framy.yaml'); 8 | if (yamlMap.isEmpty) { 9 | yamlMap = await loadConfigFile('pubspec.yaml'); 10 | } 11 | 12 | final config = FramyConfig() 13 | ..wrapWithDevicePreview = yamlMap['wrap-with-devicepreview'] ?? true 14 | ..wrapWithScaffold = yamlMap['wrap-with-scaffold'] ?? true 15 | ..wrapWithCenter = yamlMap['wrap-with-center'] ?? false 16 | ..wrapWithSafeArea = yamlMap['wrap-with-safearea'] ?? false 17 | ..showMaterialComponents = yamlMap['show-material-components'] ?? true 18 | ..showStoryboard = yamlMap['show-storyboard'] ?? true; 19 | return config; 20 | } 21 | 22 | Future> loadConfigFile(String path) async { 23 | final file = File(path); 24 | if (!await file.exists()) { 25 | return {}; 26 | } 27 | final yamlString = file.readAsStringSync(); 28 | final yamlMap = loadYaml(yamlString); 29 | 30 | if ((yamlMap?.containsKey('framy') ?? false) && yamlMap['framy'] is Map) { 31 | return Map.from(yamlMap['framy']); 32 | } else { 33 | return {}; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | weight_tracker 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/imports_generator.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | 3 | String generateImports(List framyObjects, 4 | {bool useDevicePreview = false, List extraImports = const []}) { 5 | final imports = {}; 6 | imports.addAll(extraImports); 7 | imports.add('package:flutter/foundation.dart'); 8 | imports.add('package:flutter/material.dart'); 9 | if (useDevicePreview) { 10 | imports.add('package:device_preview/device_preview.dart'); 11 | } 12 | framyObjects.forEach((object) { 13 | imports.add(object.import); 14 | imports.addAll(object.imports); 15 | if (object.type == FramyObjectType.widget && 16 | object.constructors.first.dependencies.any((element) => 17 | element.dependencyType == FramyDependencyType.provider)) { 18 | imports.add('package:provider/provider.dart'); 19 | } 20 | }); 21 | var importsStr = ''; 22 | final hasProviderDependency = 23 | imports.contains('package:provider/provider.dart'); 24 | if (hasProviderDependency) { 25 | imports.remove('package:provider/provider.dart'); 26 | importsStr = 'import \'package:provider/provider.dart\' as provider;\n'; 27 | } 28 | return imports.fold(importsStr, (s, import) => '${s}import \'$import\';\n'); 29 | } 30 | -------------------------------------------------------------------------------- /framy_generator/test/generators/toggle_page_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/generator/toggle_page_generator.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('TogglePage generator result', () { 6 | test('should start with FramyTogglePage class', () { 7 | final result = generateTogglePage(); 8 | expect(result.startsWith('class FramyTogglePage'), isTrue); 9 | }); 10 | 11 | test('should contain key FramyColorsPage', () { 12 | final result = generateTogglePage(); 13 | expect(result.contains('Key(\'FramyTogglePage\')'), isTrue); 14 | }); 15 | 16 | test('should contain Switch', () { 17 | final result = generateTogglePage(); 18 | expect(result.contains('Switch('), isTrue); 19 | }); 20 | 21 | test('should contain ToggleButtons', () { 22 | final result = generateTogglePage(); 23 | expect(result.contains('ToggleButtons('), isTrue); 24 | }); 25 | 26 | test('should contain CheckboxListTile', () { 27 | final result = generateTogglePage(); 28 | expect(result.contains('CheckboxListTile('), isTrue); 29 | }); 30 | 31 | test('should contain RadioListTiles', () { 32 | final result = generateTogglePage(); 33 | expect('RadioListTile('.allMatches(result), hasLength(2)); 34 | }); 35 | }); 36 | } 37 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/routing_generator.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | 3 | String generateRouting(List widgetFramyObjects) => ''' 4 | Route onGenerateRoute(RouteSettings settings) { 5 | final routes = { 6 | '/typography': FramyFontsPage(), 7 | '/colors': FramyColorsPage(), 8 | '/appbar': FramyAppBarPage(), 9 | '/button': FramyButtonPage(), 10 | '/toggle': FramyTogglePage(), 11 | '/textfield': FramyTextFieldPage(), 12 | ${_generateCustomWidgetPages(widgetFramyObjects)} 13 | '/storyboard': FramyStoryboardPage(), 14 | }; 15 | final page = routes[settings.name] ?? FramyFontsPage(); 16 | return PageRouteBuilder( 17 | pageBuilder: (_, __, ___) => FramyLayoutTemplate(child: page), 18 | settings: settings, 19 | ); 20 | } 21 | '''; 22 | 23 | String _generateCustomWidgetPages(List widgetObjects) { 24 | var result = ''; 25 | widgetObjects 26 | .where((framyObject) => 27 | framyObject.type == FramyObjectType.widget || 28 | framyObject.type == FramyObjectType.page) 29 | .forEach( 30 | (widgetFramyObject) { 31 | final className = widgetFramyObject.name; 32 | final pageName = 'Framy${className}CustomPage'; 33 | result += '\'/$className\': $pageName(),'; 34 | }, 35 | ); 36 | return result; 37 | } 38 | -------------------------------------------------------------------------------- /framy_generator/test/resolvers/register_riverpod_resolver_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | import 'package:framy_generator/resolvers/register_riverpod_resolver.dart'; 3 | import 'package:source_gen_test/source_gen_test.dart'; 4 | 5 | import 'dummy_classes.dart'; 6 | 7 | Future main() async { 8 | final reader = await initializeLibraryReaderForDirectory( 9 | 'test/resolvers', 10 | 'register_riverpod_resolver_test.dart', 11 | ); 12 | 13 | initializeBuildLogTracking(); 14 | testAnnotatedElements( 15 | reader, 16 | RegisterRiverpodResolver(), 17 | useDartFormatter: false, 18 | ); 19 | } 20 | 21 | @ShouldGenerate(''' 22 | [ 23 | { 24 | "type": "FramyObjectType.riverpod", 25 | "import": "package:__test__/register_riverpod_resolver_test.dart", 26 | "imports": [ 27 | "package:source_gen_test/source_gen_test.dart", 28 | "package:__test__/dummy_classes.dart", 29 | "package:framy_annotation/framy_annotation.dart", 30 | "dart:core", 31 | "package:framy_generator/resolvers/register_riverpod_resolver.dart" 32 | ], 33 | "name": "simpleProvider", 34 | "isStatic": false, 35 | "kind": "TOP_LEVEL_VARIABLE", 36 | "returnType": "String" 37 | } 38 | ]''') 39 | @FramyRegisterRiverpod() 40 | final simpleProvider = Provider((ref) => 'Value'); 41 | -------------------------------------------------------------------------------- /test_apps/counter_app/test/dependency_model_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:counter_app/main.app.framy.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | ///Some of dependency model tests are in WeightTracker App as well 5 | void main() { 6 | group('FramyDependencyModel', () { 7 | test('isFunction returns false for String', () { 8 | final model = FramyDependencyModel('', 'String', null); 9 | expect(model.isFunction, isFalse); 10 | }); 11 | 12 | test('isFunction returns true for functions', () { 13 | final model = 14 | FramyDependencyModel('', 'void Function()', null); 15 | expect(model.isFunction, isTrue); 16 | }); 17 | 18 | test('function model has default callback', () { 19 | final model = 20 | FramyDependencyModel('', 'void Function()', null); 21 | expect(model.value, isNotNull); 22 | }); 23 | 24 | test('default function callback adds calls to the model', () { 25 | //given 26 | final model = 27 | FramyDependencyModel('foo', 'void Function()', null); 28 | //when 29 | model.value(); 30 | model.value(); 31 | //then 32 | expect(model.functionCalls.calls, hasLength(2)); 33 | expect(model.functionCalls.calls.first.functionName, 'foo'); 34 | expect(model.functionCalls.calls.first.params, []); 35 | }); 36 | }); 37 | } 38 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/datetime_dependency_input_generator.dart: -------------------------------------------------------------------------------- 1 | String generateDateTimeDependencyInput() => ''' 2 | class FramyDateTimeDependencyInput extends StatelessWidget { 3 | final FramyDependencyModel dependency; 4 | final ValueChanged onChanged; 5 | final Map> presets; 6 | 7 | const FramyDateTimeDependencyInput( 8 | {Key key, this.dependency, this.onChanged, this.presets}) 9 | : super(key: key); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | final text = dependency.value == null 14 | ? '-' 15 | : (dependency.value as DateTime) 16 | .toIso8601String() 17 | .replaceFirst('T', ' ') 18 | .replaceFirst(RegExp('\\\\..*'), ''); 19 | return InkWell( 20 | onTap: () { 21 | showDatePicker( 22 | context: context, 23 | initialDate: dependency.value ?? DateTime.now(), 24 | firstDate: DateTime(1000), 25 | lastDate: DateTime(3000), 26 | ).then((value) { 27 | if (value != null) { 28 | onChanged(value); 29 | } 30 | }); 31 | }, 32 | child: InputDecorator( 33 | decoration: _framyInputDecoration.copyWith( 34 | suffixIcon: Icon(Icons.calendar_today), 35 | ), 36 | child: Text(text), 37 | ), 38 | ); 39 | } 40 | } 41 | '''; 42 | -------------------------------------------------------------------------------- /test_apps/counter_app/test/toggle_page_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:counter_app/main.app.framy.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_test/flutter_test.dart'; 4 | 5 | import 'test_utils.dart'; 6 | 7 | void main() { 8 | group('TogglePage', () { 9 | testWidgets('should build', (tester) async { 10 | await tester.pumpWidget(FramyAppWrapperWithScaffold(FramyTogglePage())); 11 | expect(find.byType(FramyTogglePage), findsOneWidget); 12 | }); 13 | 14 | testWidgets('should have Switch', (tester) async { 15 | await tester.pumpWidget(FramyAppWrapperWithScaffold(FramyTogglePage())); 16 | expect(find.byType(Switch), findsOneWidget); 17 | }); 18 | 19 | testWidgets('should have ToggleButtons', (tester) async { 20 | await tester.pumpWidget(FramyAppWrapperWithScaffold(FramyTogglePage())); 21 | expect(find.byType(ToggleButtons), findsOneWidget); 22 | }); 23 | 24 | testWidgets('should have Checkbox', (tester) async { 25 | await tester.pumpWidget(FramyAppWrapperWithScaffold(FramyTogglePage())); 26 | expect(find.byType(Checkbox), findsOneWidget); 27 | }); 28 | 29 | testWidgets('should have Radio buttons', (tester) async { 30 | await tester.pumpWidget(FramyAppWrapperWithScaffold(FramyTogglePage())); 31 | // ignore: missing_required_param 32 | expect(find.byType(Radio().runtimeType), findsNWidgets(2)); 33 | }); 34 | }); 35 | } 36 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/lib/models/weight_entry.framy.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | import 'package:weight_tracker/models/weight_entry.dart'; 3 | 4 | import 'utils.dart'; 5 | 6 | @framyPreset 7 | WeightEntry presetEntry() => 8 | WeightEntry(DateTime(2020, 9, 5), 70.0, 'Some note'); 9 | 10 | @framyPreset 11 | List emptyList() => []; 12 | 13 | @framyPreset 14 | List singleElementToday() => [WeightEntry.now(70.0)]; 15 | 16 | @framyPreset 17 | List fewElementsSameDay() => [ 18 | WeightEntry(DateTime.now().current, 50.0, ''), 19 | WeightEntry(DateTime.now().current.add(Duration(minutes: 10)), 60.0, ''), 20 | WeightEntry(DateTime.now().current.add(Duration(minutes: 20)), 70.0, ''), 21 | ]; 22 | 23 | @framyPreset 24 | List monthFullOfEntries() => List.generate( 25 | 31, 26 | (index) => WeightEntry( 27 | DateTime.now().current.subtract(Duration(days: index)), 28 | 90 - index * 0.5, 29 | 'day $index'), 30 | ); 31 | 32 | @framyPreset 33 | List oneEntryTwoMonthsAgo() => [ 34 | WeightEntry( 35 | DateTime.now().current.subtract(Duration(days: 61)), 70.0, ''), 36 | ]; 37 | 38 | @framyPreset 39 | List oneNowOneTwoMonthsAgo() => [ 40 | WeightEntry( 41 | DateTime.now().current.subtract(Duration(days: 61)), 80.0, ''), 42 | WeightEntry(DateTime.now().current, 60.0, ''), 43 | ]; 44 | -------------------------------------------------------------------------------- /framy_generator/lib/generator/layout_template_generator.dart: -------------------------------------------------------------------------------- 1 | String generateLayoutTemplate() => ''' 2 | class FramyLayoutTemplate extends StatelessWidget { 3 | final Widget child; 4 | 5 | const FramyLayoutTemplate({Key key, this.child}) : super(key: key); 6 | 7 | @override 8 | Widget build(BuildContext context) { 9 | return LayoutBuilder( 10 | builder: (context, constraints) { 11 | final isSmallDevice = constraints.maxWidth < 1000; 12 | final leading = isSmallDevice 13 | ? null 14 | : IconButton( 15 | icon: const Icon(Icons.menu), 16 | onPressed: () => 17 | framyAppStateKey.currentState.toggleNavigationMenu(), 18 | tooltip: FramyAppSettings.of(context).showNavigationMenu 19 | ? 'Close navigation menu' 20 | : 'Open navigation menu', 21 | ); 22 | return Scaffold( 23 | appBar: FramyAppBar(leading: leading), 24 | body: Row( 25 | crossAxisAlignment: CrossAxisAlignment.start, 26 | children: [ 27 | if (!isSmallDevice && FramyAppSettings.of(context).showNavigationMenu) 28 | FramyDrawer(), 29 | Expanded( 30 | child: child, 31 | ), 32 | ], 33 | ), 34 | drawer: isSmallDevice ? FramyDrawer(showHeader: true) : null, 35 | ); 36 | }, 37 | ); 38 | } 39 | } 40 | '''; 41 | -------------------------------------------------------------------------------- /framy_generator/lib/resolvers/preset_resolver.dart: -------------------------------------------------------------------------------- 1 | import 'package:analyzer/dart/element/element.dart'; 2 | import 'package:build/build.dart'; 3 | import 'package:framy_annotation/framy_annotation.dart'; 4 | import 'package:framy_generator/framy_object.dart'; 5 | import 'package:framy_generator/json_formatter.dart'; 6 | import 'package:source_gen/source_gen.dart'; 7 | 8 | class PresetResolver extends GeneratorForAnnotation { 9 | @override 10 | String generateForAnnotatedElement( 11 | Element element, ConstantReader annotation, BuildStep buildStep) { 12 | if (element.isPrivate) { 13 | throw InvalidGenerationSourceError( 14 | 'Framy annotations cannot be applied to private methods', 15 | element: element, 16 | ); 17 | } else if (element.kind != ElementKind.FUNCTION && 18 | element.kind != ElementKind.METHOD) { 19 | throw InvalidGenerationSourceError( 20 | 'Framy preset can be applied only to functions and methods', 21 | element: element, 22 | ); 23 | } 24 | 25 | final execElement = element as ExecutableElement; 26 | final framyObject = _presetObjectFromElement(element); 27 | framyObject.returnType = execElement.returnType.getDisplayString(); 28 | 29 | return [framyObject].toJson(); 30 | } 31 | 32 | FramyObject _presetObjectFromElement(ExecutableElement element, 33 | [FramyObject parent]) => 34 | FramyObject.fromElement(element) 35 | ..type = FramyObjectType.preset 36 | ..parentObject = parent; 37 | } 38 | -------------------------------------------------------------------------------- /framy_generator/test/generators/available_constructor_names_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | import 'package:framy_generator/generator/available_constructor_names_generator.dart'; 3 | import 'package:test/test.dart'; 4 | 5 | void main() { 6 | group('generateAvailableConstructorNames result', () { 7 | test('should contain map of >', () { 8 | final result = generateAvailableConstructorNames([]); 9 | expect( 10 | result.contains( 11 | 'Map> framyAvailableConstructorNames'), 12 | isTrue, 13 | ); 14 | }); 15 | 16 | test('should add list of constructors for a model', () { 17 | //given 18 | final modelObject = FramyObject() 19 | ..name = 'Foo' 20 | ..constructors = [ 21 | FramyObjectConstructor('', []), 22 | FramyObjectConstructor('.fromJson', []), 23 | ]; 24 | //when 25 | final result = generateAvailableConstructorNames([modelObject]); 26 | //then 27 | expect(result.contains("'Foo': ['', '.fromJson'],"), isTrue); 28 | }); 29 | 30 | test('should skip models with no constructors', () { 31 | //given 32 | final modelObject = FramyObject() 33 | ..name = 'FooNoConstructor' 34 | ..constructors = []; 35 | //when 36 | final result = generateAvailableConstructorNames([modelObject]); 37 | //then 38 | expect(result.contains('FooNoConstructor'), isFalse); 39 | }); 40 | }); 41 | } 42 | -------------------------------------------------------------------------------- /test_apps/counter_app/test/callbacks_tab_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:counter_app/main.app.framy.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | import 'test_utils.dart'; 5 | 6 | void main() { 7 | group('Callbacks tab', () { 8 | testWidgets('it builds', (tester) async { 9 | await tester.pumpWidget(FramyAppWrapperWithScaffold( 10 | FramyCallbacksTab( 11 | dependencies: [], 12 | ), 13 | )); 14 | expect(find.byType(FramyCallbacksTab), findsOneWidget); 15 | }); 16 | 17 | testWidgets('it shows function calls', (tester) async { 18 | //given 19 | final model = 20 | FramyDependencyModel('foo', 'void Function()', null); 21 | model.value(); 22 | model.value(); 23 | //when 24 | await tester.pumpWidget(FramyAppWrapperWithScaffold( 25 | FramyCallbacksTab( 26 | dependencies: [model], 27 | ), 28 | )); 29 | //then 30 | expect(find.text('foo'), findsNWidgets(2)); 31 | }); 32 | 33 | testWidgets('it rebuilds after added function calls', (tester) async { 34 | //given 35 | final model = 36 | FramyDependencyModel('foo', 'void Function()', null); 37 | await tester.pumpWidget(FramyAppWrapperWithScaffold( 38 | FramyCallbacksTab( 39 | dependencies: [model], 40 | ), 41 | )); 42 | //when 43 | model.value(); 44 | await tester.pump(); 45 | //then 46 | expectLater(find.text('foo'), findsOneWidget); 47 | }); 48 | }); 49 | } 50 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/framy_model_constructor_map_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:test/test.dart'; 2 | import 'package:weight_tracker/main.app.framy.dart'; 3 | import 'package:weight_tracker/models/weight_entry.dart'; 4 | 5 | void main() { 6 | FramyDependencyModel _getWeightEntryModel( 7 | {WeightEntry defaultValue, String constructor = ''}) => 8 | FramyDependencyModel( 9 | 'weightEntry', 10 | 'WeightEntry', 11 | defaultValue, 12 | constructor: constructor, 13 | ); 14 | 15 | group('framyModelConstructorMap', () { 16 | test('should use default constructor for WeightEntry', () { 17 | //given 18 | final model = _getWeightEntryModel(); 19 | model.subDependencies 20 | .singleWhere((element) => element.name == 'note') 21 | .value = 'Foo'; 22 | //when 23 | final weighEntry = framyModelConstructorMap['WeightEntry'](model); 24 | //then 25 | expect(weighEntry.note, 'Foo'); 26 | }); 27 | 28 | test('should use named for WeightEntry when its name is passed', () { 29 | //given 30 | final model = _getWeightEntryModel(constructor: '.now'); 31 | //just to confirm: 32 | expect( 33 | model.subDependencies.any((element) => element.name == 'note'), 34 | isFalse, 35 | ); 36 | //when 37 | final weighEntry = framyModelConstructorMap['WeightEntry'](model); 38 | //then 39 | //its empty because now constructor doesnt use note 40 | expect(weighEntry.note, ''); 41 | }); 42 | }); 43 | } 44 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/drawer_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:weight_tracker/main.app.framy.dart'; 3 | 4 | import 'test_utils.dart'; 5 | 6 | void main() { 7 | group('FramyDrawer', () { 8 | testWidgets('should build', (WidgetTester tester) async { 9 | await tester.pumpWidget(FramyAppWrapper(FramyDrawer())); 10 | expect(find.byType(FramyDrawer), findsOneWidget); 11 | }); 12 | 13 | testWidgets('should have a Material components group', 14 | (WidgetTester tester) async { 15 | await tester.pumpWidget(FramyAppWrapper(FramyDrawer())); 16 | expect(find.text('Material components'), findsOneWidget); 17 | }); 18 | 19 | testWidgets('should have a Dummy Widgets group', 20 | (WidgetTester tester) async { 21 | await tester.pumpWidget(FramyAppWrapper(FramyDrawer())); 22 | expect(find.text('Dummy Widgets'), findsOneWidget); 23 | }); 24 | 25 | testWidgets( 26 | 'Dummy Widgets group should show two dummy widgets when clicked', 27 | (WidgetTester tester) async { 28 | //given 29 | await tester.pumpWidget(FramyAppWrapper(FramyDrawer())); 30 | expect(find.text('DummyTestWidget'), findsNothing); 31 | expect(find.text('BuiltValueExampleWidget'), findsNothing); 32 | //when 33 | await tester.tap(find.text('Dummy Widgets')); 34 | await tester.pump(); 35 | //then 36 | expect(find.text('DummyTestWidget'), findsOneWidget); 37 | expect(find.text('BuiltValueExampleWidget'), findsOneWidget); 38 | }); 39 | }); 40 | } 41 | -------------------------------------------------------------------------------- /test_apps/weight_tracker/test/dependency_model_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:test/test.dart'; 2 | import 'package:weight_tracker/main.app.framy.dart'; 3 | import 'package:weight_tracker/models/user.dart'; 4 | 5 | ///Some of dependency model tests are in Counter App as well 6 | void main() { 7 | group('FramyDependencyModel', () { 8 | test('uses default empty value for String', () { 9 | final model = FramyDependencyModel('', 'String', null); 10 | expect(model.value, ''); 11 | }); 12 | 13 | test('uses default 0.0 value for double', () { 14 | final model = FramyDependencyModel('', 'double', null); 15 | expect(model.value, 0); 16 | }); 17 | 18 | test('uses default 0 value for int', () { 19 | final model = FramyDependencyModel('', 'int', null); 20 | expect(model.value, 0); 21 | }); 22 | 23 | test('uses default false value for boolean', () { 24 | final model = FramyDependencyModel('', 'bool', null); 25 | expect(model.value, false); 26 | }); 27 | 28 | test('uses default custom value for models', () { 29 | final model = FramyDependencyModel('', 'User', null); 30 | expect(model.value, isNotNull); 31 | expect(model.value.firstName, ''); 32 | expect(model.value.lastName, ''); 33 | expect(model.value.age, 0); 34 | expect(model.value.emails, isEmpty); 35 | }); 36 | 37 | test('creates default subDependencies', () { 38 | final model = FramyDependencyModel('', 'User', null); 39 | expect(model.subDependencies, hasLength(4)); 40 | }); 41 | }); 42 | } 43 | -------------------------------------------------------------------------------- /framy_generator/test/generators/enum_map_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/framy_object.dart'; 2 | import 'package:framy_generator/generator/enum_map_generator.dart'; 3 | import 'package:test/test.dart'; 4 | 5 | void main() { 6 | group('generateEnumMap result', () { 7 | test('should contain map declaration', () { 8 | final result = generateEnumMap([]); 9 | expect(result.contains('final framyEnumMap = >{'), 10 | isTrue); 11 | }); 12 | 13 | test('should contain default Material enums', () { 14 | //given 15 | final materialEnums = ['MaterialTapTargetSize']; 16 | //when 17 | final result = generateEnumMap([]); 18 | //then 19 | materialEnums.forEach((enumName) { 20 | expect(result.contains('\'$enumName\': $enumName.values,'), isTrue); 21 | }); 22 | }); 23 | 24 | test('should contain passed enum models', () { 25 | //given 26 | final enumModel = FramyObject() 27 | ..name = 'Foo' 28 | ..type = FramyObjectType.enumModel; 29 | //when 30 | final result = generateEnumMap([enumModel]); 31 | //then 32 | expect(result.contains('\'Foo\': Foo.values,'), isTrue); 33 | }); 34 | 35 | test('should not contain passed non-enum models', () { 36 | //given 37 | final classModel = FramyObject() 38 | ..name = 'Foo' 39 | ..type = FramyObjectType.model; 40 | //when 41 | final result = generateEnumMap([classModel]); 42 | //then 43 | expect(result.contains('\'Foo\': Foo.values,'), isFalse); 44 | }); 45 | }); 46 | } 47 | -------------------------------------------------------------------------------- /framy_generator/test/resolvers/preset_resolver_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_annotation/framy_annotation.dart'; 2 | import 'package:framy_generator/resolvers/preset_resolver.dart'; 3 | import 'package:source_gen_test/source_gen_test.dart'; 4 | 5 | import 'dummy_classes.dart'; 6 | 7 | Future main() async { 8 | final reader = await initializeLibraryReaderForDirectory( 9 | 'test/resolvers', 10 | 'preset_resolver_test.dart', 11 | ); 12 | 13 | initializeBuildLogTracking(); 14 | testAnnotatedElements( 15 | reader, 16 | PresetResolver(), 17 | useDartFormatter: false, 18 | ); 19 | } 20 | 21 | @ShouldGenerate(''' 22 | [ 23 | { 24 | "type": "FramyObjectType.preset", 25 | "import": "package:__test__/preset_resolver_test.dart", 26 | "imports": [ 27 | "package:source_gen_test/source_gen_test.dart", 28 | "package:__test__/dummy_classes.dart", 29 | "package:framy_annotation/framy_annotation.dart", 30 | "dart:core", 31 | "package:framy_generator/resolvers/preset_resolver.dart" 32 | ], 33 | "name": "authenticatedUser", 34 | "isStatic": true, 35 | "kind": "FUNCTION", 36 | "returnType": "User" 37 | } 38 | ]''') 39 | @FramyPreset() 40 | User authenticatedUser() => User()..firstName = 'John'; 41 | 42 | @ShouldThrow('Framy annotations cannot be applied to private methods') 43 | @FramyPreset() 44 | // ignore: unused_element 45 | User _authenticatedUser() => User()..firstName = 'John'; 46 | 47 | @ShouldThrow('Framy preset can be applied only to functions and methods') 48 | @FramyPreset() 49 | User fieldUser = User()..firstName = 'John'; 50 | -------------------------------------------------------------------------------- /framy_generator/test/generators/layout_template_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/generator/layout_template_generator.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('LayoutTemplate generator result', () { 6 | test('should start with FramyLayoutTemplate class', () { 7 | final result = generateLayoutTemplate(); 8 | expect(result.startsWith('class FramyLayoutTemplate'), isTrue); 9 | }); 10 | 11 | test('should contain child field', () { 12 | final result = generateLayoutTemplate(); 13 | expect(result.contains('final Widget child'), isTrue); 14 | }); 15 | 16 | test('should contain FramyAppBar', () { 17 | final result = generateLayoutTemplate(); 18 | expect(result.contains('FramyAppBar'), isTrue); 19 | }); 20 | 21 | test('should contain FramyDrawer or null', () { 22 | final result = generateLayoutTemplate(); 23 | expect(result.contains('FramyDrawer(showHeader: true) : null'), isTrue); 24 | }); 25 | 26 | test('should contain LayoutBuilder', () { 27 | final result = generateLayoutTemplate(); 28 | expect(result.contains('LayoutBuilder'), isTrue); 29 | }); 30 | 31 | // one for small screens, one for big screens 32 | test('should contain two FramyDrawers', () { 33 | final result = generateLayoutTemplate(); 34 | expect('FramyDrawer'.allMatches(result), hasLength(2)); 35 | }); 36 | 37 | test('should contain IconButton for leading icon', () { 38 | final result = generateLayoutTemplate(); 39 | expect(result.contains('IconButton'), isTrue); 40 | }); 41 | }); 42 | } 43 | -------------------------------------------------------------------------------- /framy_generator/test/generators/app_bar_generator_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:framy_generator/generator/app_bar_generator.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('AppBar Generator result', () { 6 | test('should start with class declaration', () { 7 | final result = generateAppBar(); 8 | expect(result.startsWith('class FramyAppBar'), isTrue); 9 | }); 10 | 11 | test('should have a key', () { 12 | final result = generateAppBar(); 13 | expect(result.contains('Key(\'FramyAppBar\')'), isTrue); 14 | }); 15 | 16 | test('should have a proper title', () { 17 | final result = generateAppBar(); 18 | expect(result.contains('title: Text(\'Framy App\')'), isTrue); 19 | }); 20 | 21 | test('should use PreferredSizeWidget', () { 22 | final result = generateAppBar(); 23 | expect(result.contains('with PreferredSizeWidget'), isTrue); 24 | }); 25 | 26 | test('should return AppBar height size', () { 27 | final result = generateAppBar(); 28 | expect( 29 | result.contains( 30 | 'Size get preferredSize => Size.fromHeight(kToolbarHeight);'), 31 | isTrue, 32 | ); 33 | }); 34 | 35 | test('should contain key for Settings button', () { 36 | final result = generateAppBar(); 37 | expect( 38 | result.contains('key: ValueKey(\'FramyAppBarSettingsButton\')'), 39 | isTrue, 40 | ); 41 | }); 42 | 43 | test('should contain leading icon', () { 44 | final result = generateAppBar(); 45 | expect(result.contains('leading: leading,'), isTrue); 46 | }); 47 | }); 48 | } 49 | --------------------------------------------------------------------------------