├── integration_test ├── integration_response_data.json ├── robots │ ├── secondscreen_robot.dart │ ├── thirdscreen_robot.dart │ └── home_robot.dart └── app_test.dart ├── ios ├── Flutter │ ├── .last_build_id │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── .gitignore ├── Podfile └── Podfile.lock ├── packages ├── app_theme │ ├── LICENSE │ ├── test │ │ └── app_theme_test.dart │ ├── CHANGELOG.md │ ├── lib │ │ ├── app_theme.dart │ │ └── src │ │ │ ├── theme.dart │ │ │ ├── colors.dart │ │ │ ├── extensions │ │ │ └── color.dart │ │ │ └── text_styles.dart │ ├── .metadata │ ├── README.md │ ├── pubspec.yaml │ └── .gitignore └── shared_components │ ├── LICENSE │ ├── CHANGELOG.md │ ├── test │ ├── goldens │ │ └── flutter_h3_text_component.png │ ├── flutter_test_config.dart │ ├── h3_golden_test.dart │ └── h3_text_test.dart │ ├── lib │ ├── src │ │ ├── loading │ │ │ └── loading.component.dart │ │ ├── spacers │ │ │ ├── spacer.component.dart │ │ │ ├── row_spacer.component.dart │ │ │ └── column_spacer.component.dart │ │ ├── text │ │ │ └── h3_text.component.dart │ │ ├── image │ │ │ ├── image.component.dart │ │ │ └── image_cacher.component.dart │ │ ├── bootstrap │ │ │ └── bootstrap.component.dart │ │ └── scaffold │ │ │ └── custom.scaffold.dart │ └── shared_components.dart │ ├── .metadata │ ├── README.md │ ├── pubspec.yaml │ └── .gitignore ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ └── Icon-512.png ├── manifest.json └── index.html ├── assets ├── images │ ├── 300.png │ ├── 400.png │ ├── 2.0x │ │ ├── 300.png │ │ └── 400.png │ └── 3.0x │ │ ├── 300.png │ │ └── 400.png ├── fonts │ ├── Roboto-Bold.ttf │ ├── Roboto-Light.ttf │ ├── Roboto-Medium.ttf │ └── Roboto-Regular.ttf └── data │ ├── first_screen.json │ └── third_screen.json ├── macos ├── .gitignore ├── Runner │ ├── Configs │ │ ├── Debug.xcconfig │ │ ├── Release.xcconfig │ │ ├── Warnings.xcconfig │ │ └── AppInfo.xcconfig │ ├── Assets.xcassets │ │ └── AppIcon.appiconset │ │ │ ├── app_icon_16.png │ │ │ ├── app_icon_32.png │ │ │ ├── app_icon_64.png │ │ │ ├── app_icon_1024.png │ │ │ ├── app_icon_128.png │ │ │ ├── app_icon_256.png │ │ │ ├── app_icon_512.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Release.entitlements │ ├── DebugProfile.entitlements │ ├── MainFlutterWindow.swift │ ├── Info.plist │ └── Base.lproj │ │ └── MainMenu.xib ├── Flutter │ ├── Flutter-Debug.xcconfig │ ├── Flutter-Release.xcconfig │ └── GeneratedPluginRegistrant.swift ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Podfile.lock └── Podfile ├── android ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ ├── dynamism │ │ │ │ │ └── MainActivity.kt │ │ │ │ │ └── screener │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle ├── build.gradle ├── dynamism_android.iml └── screener_android.iml ├── lib ├── pellen │ ├── model │ │ └── pellen.model.dart │ ├── components │ │ ├── text │ │ │ └── caption_text.component.dart │ │ └── row_with_number │ │ │ └── numbered_row.component.dart │ ├── view_models │ │ └── pellen.viewmodel.dart │ ├── utils │ │ └── strings.dart │ ├── repository │ │ └── pellen_repo.dart │ └── view │ │ └── pellen.view.dart ├── shared │ ├── commands │ │ └── base_command.dart │ ├── assets │ │ └── image.assets.dart │ ├── services │ │ └── navigation.service.dart │ ├── view_models │ │ └── loading.viewmodel.dart │ ├── components │ │ └── notifier │ │ │ └── notifier.component.dart │ └── routes │ │ └── routes.dart ├── fringilla │ ├── utils │ │ └── strings.dart │ ├── repository │ │ └── fringilla_repo.dart │ ├── components │ │ ├── button │ │ │ └── button.component.dart │ │ ├── card │ │ │ └── card.component.dart │ │ └── webview │ │ │ └── webview.component.dart │ ├── view_models │ │ └── fringilla.viewmodel.dart │ ├── model │ │ └── fringilla.model.dart │ └── view │ │ └── fringilla.view.dart ├── home │ ├── repository │ │ └── home_repo.dart │ ├── utils │ │ └── strings.dart │ ├── components │ │ ├── indicator │ │ │ └── dot_indicator.component.dart │ │ ├── list │ │ │ └── list.component.dart │ │ └── carousel_card │ │ │ └── carousel_card.component.dart │ ├── view_models │ │ └── home.viewmodel.dart │ ├── model │ │ └── carousel.model.dart │ ├── templates │ │ └── carousel │ │ │ └── carousel.template.dart │ └── view │ │ └── home.view.dart ├── locator.dart └── main.dart ├── .idea ├── runConfigurations │ └── main_dart.xml ├── modules.xml ├── libraries │ ├── KotlinJavaRuntime.xml │ └── Dart_SDK.xml └── workspace.xml ├── .metadata ├── analysis_options.yaml ├── .gitignore ├── dynamism.iml ├── screener.iml ├── test_driver └── integration_test.dart ├── .vscode └── launch.json ├── test ├── home │ ├── home_repo_test.dart │ ├── home_viewmodel_test.dart │ └── home_repo_test.mocks.dart └── fringilla │ ├── fringilla_viewmodel_test.dart │ ├── fringilla_repo_test.dart │ └── fringilla_repo_test.mocks.dart ├── .flutter-plugins ├── coverage └── lcov.info ├── pubspec.yaml ├── .flutter-plugins-dependencies └── README.md /integration_test/integration_response_data.json: -------------------------------------------------------------------------------- 1 | null -------------------------------------------------------------------------------- /ios/Flutter/.last_build_id: -------------------------------------------------------------------------------- 1 | 5cc58231358622af0413ff64411ee7c7 -------------------------------------------------------------------------------- /packages/app_theme/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /packages/app_theme/test/app_theme_test.dart: -------------------------------------------------------------------------------- 1 | void main() {} 2 | -------------------------------------------------------------------------------- /packages/shared_components/LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/web/favicon.png -------------------------------------------------------------------------------- /assets/images/300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/assets/images/300.png -------------------------------------------------------------------------------- /assets/images/400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/assets/images/400.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /assets/images/2.0x/300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/assets/images/2.0x/300.png -------------------------------------------------------------------------------- /assets/images/2.0x/400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/assets/images/2.0x/400.png -------------------------------------------------------------------------------- /assets/images/3.0x/300.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/assets/images/3.0x/300.png -------------------------------------------------------------------------------- /assets/images/3.0x/400.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/assets/images/3.0x/400.png -------------------------------------------------------------------------------- /assets/fonts/Roboto-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/assets/fonts/Roboto-Bold.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/assets/fonts/Roboto-Light.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/assets/fonts/Roboto-Medium.ttf -------------------------------------------------------------------------------- /assets/fonts/Roboto-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/assets/fonts/Roboto-Regular.ttf -------------------------------------------------------------------------------- /packages/app_theme/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.0.1] - TODO: Add release date. 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /macos/.gitignore: -------------------------------------------------------------------------------- 1 | # Flutter-related 2 | **/Flutter/ephemeral/ 3 | **/Pods/ 4 | 5 | # Xcode-related 6 | **/xcuserdata/ 7 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Debug.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /packages/shared_components/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [0.0.1] - TODO: Add release date. 2 | 3 | * TODO: Describe initial release. 4 | -------------------------------------------------------------------------------- /macos/Runner/Configs/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "../../Flutter/Flutter-Release.xcconfig" 2 | #include "Warnings.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | android.enableR8=true 5 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /packages/app_theme/lib/app_theme.dart: -------------------------------------------------------------------------------- 1 | library app_theme; 2 | 3 | export 'src/colors.dart'; 4 | export 'src/text_styles.dart'; 5 | export 'src/theme.dart'; 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /lib/pellen/model/pellen.model.dart: -------------------------------------------------------------------------------- 1 | class PellenModel { 2 | final String url; 3 | final List text; 4 | 5 | PellenModel(this.text, this.url); 6 | } 7 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /macos/Flutter/Flutter-Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "ephemeral/Flutter-Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /packages/shared_components/test/goldens/flutter_h3_text_component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AseemWangoo/dynamism/HEAD/packages/shared_components/test/goldens/flutter_h3_text_component.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/dynamism/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.dynamism 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/screener/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.screener 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /lib/shared/commands/base_command.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart' show BuildContext; 2 | 3 | class BaseCommand { 4 | BuildContext c; 5 | 6 | BaseCommand(this.c) { 7 | c = c; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/fringilla/utils/strings.dart: -------------------------------------------------------------------------------- 1 | class FringillaStrings { 2 | FringillaStrings._(); 3 | 4 | static const String title = 'Fringilla vulputate.'; 5 | static const String subtitle = 'Massa risus.'; 6 | 7 | static const String btn = 'Lorem Ipsum'; 8 | } 9 | -------------------------------------------------------------------------------- /packages/shared_components/test/flutter_test_config.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:golden_toolkit/golden_toolkit.dart'; 4 | 5 | Future testExecutable(FutureOr Function() testMain) async { 6 | await loadAppFonts(); 7 | return testMain(); 8 | } 9 | -------------------------------------------------------------------------------- /lib/shared/assets/image.assets.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | 3 | class ImageAssets { 4 | ImageAssets._(); 5 | 6 | static const AssetImage img300 = AssetImage('assets/images/300.png'); 7 | static const AssetImage img400 = AssetImage('assets/images/400.png'); 8 | } 9 | -------------------------------------------------------------------------------- /lib/shared/services/navigation.service.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavigationService { 4 | NavigationService(); 5 | 6 | GlobalKey rootNavKey = GlobalKey(); 7 | 8 | NavigatorState get nav => rootNavKey.currentState!; 9 | } 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /macos/Runner/Release.entitlements: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | com.apple.security.app-sandbox 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /packages/shared_components/lib/src/loading/loading.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class LoadingComponent extends StatelessWidget { 4 | @override 5 | Widget build(BuildContext context) { 6 | return const Center(child: CircularProgressIndicator()); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/runConfigurations/main_dart.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.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: d79295af24c3ed621c33713ecda14ad196fd9c31 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /lib/shared/view_models/loading.viewmodel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart' show ChangeNotifier; 2 | 3 | class LoadingViewModel with ChangeNotifier { 4 | bool _isLoading = false; 5 | 6 | bool get isLoading => _isLoading; 7 | 8 | set isLoading(bool isLoading) { 9 | _isLoading = isLoading; 10 | notifyListeners(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /packages/shared_components/lib/src/spacers/spacer.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart' show SizedBox; 2 | 3 | class SpacerVertical extends SizedBox { 4 | const SpacerVertical(double height) : super(height: height); 5 | } 6 | 7 | class SpacerHorizontal extends SizedBox { 8 | const SpacerHorizontal(double width) : super(width: width); 9 | } 10 | -------------------------------------------------------------------------------- /packages/app_theme/.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: c5a4b4029c0798f37c4a39b479d7cb75daa7b05c 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /packages/shared_components/.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: c5a4b4029c0798f37c4a39b479d7cb75daa7b05c 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /packages/shared_components/lib/src/text/h3_text.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class H3TextComponent extends StatelessWidget { 4 | const H3TextComponent({Key? key, this.text = 'Some text'}) : super(key: key); 5 | 6 | final String text; 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Text(text, style: Theme.of(context).textTheme.headline3); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /lib/pellen/components/text/caption_text.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CaptionTextComponent extends StatelessWidget { 4 | const CaptionTextComponent({Key? key, this.text = 'Some text'}) 5 | : super(key: key); 6 | 7 | final String text; 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Text(text, style: Theme.of(context).textTheme.caption); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /macos/Flutter/GeneratedPluginRegistrant.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | import FlutterMacOS 6 | import Foundation 7 | 8 | import path_provider_macos 9 | import sqflite 10 | 11 | func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { 12 | PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) 13 | SqflitePlugin.register(with: registry.registrar(forPlugin: "SqflitePlugin")) 14 | } 15 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/shared_components/lib/shared_components.dart: -------------------------------------------------------------------------------- 1 | library shared_components; 2 | 3 | export 'src/bootstrap/bootstrap.component.dart'; 4 | export 'src/text/h3_text.component.dart'; 5 | export 'src/image/image.component.dart'; 6 | export 'src/image/image_cacher.component.dart'; 7 | export 'src/loading/loading.component.dart'; 8 | export 'src/spacers/column_spacer.component.dart'; 9 | export 'src/spacers/row_spacer.component.dart'; 10 | export 'src/spacers/spacer.component.dart'; 11 | export 'src/scaffold/custom.scaffold.dart'; 12 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:lint/analysis_options.yaml 2 | 3 | analyzer: 4 | strong-mode: 5 | implicit-casts: false 6 | # implicit-dynamic: false 7 | exclude: 8 | - lib/home/model/*.model.dart 9 | - lib/fringilla/model/*.model.dart 10 | errors: 11 | missing_required_param: error 12 | parameter_assignments: error 13 | missing_return: error 14 | # allow having TODOs in the code 15 | todo: warning 16 | 17 | linter: 18 | rules: 19 | - camel_case_types 20 | - flutter_style_todos 21 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /packages/app_theme/README.md: -------------------------------------------------------------------------------- 1 | # app_theme 2 | 3 | A new Flutter package project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Dart 8 | [package](https://flutter.dev/developing-packages/), 9 | a library module containing code that can be shared easily across 10 | multiple Flutter or Dart projects. 11 | 12 | For help getting started with Flutter, view our 13 | [online documentation](https://flutter.dev/docs), which offers tutorials, 14 | samples, guidance on mobile development, and a full API reference. 15 | -------------------------------------------------------------------------------- /lib/home/repository/home_repo.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:screener/home/model/carousel.model.dart'; 3 | 4 | abstract class HomeRepo { 5 | Future fetchData(); 6 | } 7 | 8 | class HomeRepoImpl extends HomeRepo { 9 | @override 10 | Future fetchData() async { 11 | await Future.delayed(const Duration(milliseconds: 1800)); 12 | 13 | final resp = await rootBundle.loadString('assets/data/first_screen.json'); 14 | return carouselModelFromJson(resp); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /packages/shared_components/README.md: -------------------------------------------------------------------------------- 1 | # shared_components 2 | 3 | A new Flutter package project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Dart 8 | [package](https://flutter.dev/developing-packages/), 9 | a library module containing code that can be shared easily across 10 | multiple Flutter or Dart projects. 11 | 12 | For help getting started with Flutter, view our 13 | [online documentation](https://flutter.dev/docs), which offers tutorials, 14 | samples, guidance on mobile development, and a full API reference. 15 | -------------------------------------------------------------------------------- /packages/shared_components/test/h3_golden_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:golden_toolkit/golden_toolkit.dart'; 2 | import 'package:shared_components/shared_components.dart'; 3 | 4 | void main() { 5 | testGoldens('h3 text component', (tester) async { 6 | final builder = DeviceBuilder() 7 | ..addScenario( 8 | widget: H3TextComponent(), 9 | name: 'default h3 text component', 10 | ); 11 | 12 | await tester.pumpDeviceBuilder(builder); 13 | 14 | await screenMatchesGolden(tester, 'flutter_h3_text_component'); 15 | }); 16 | } 17 | -------------------------------------------------------------------------------- /packages/shared_components/lib/src/image/image.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ImageComponent extends StatelessWidget { 4 | const ImageComponent({Key? key, required this.assetName, this.height = 200}) 5 | : super(key: key); 6 | 7 | final String assetName; 8 | final double height; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Image( 13 | height: height, 14 | image: AssetImage(assetName), 15 | fit: BoxFit.fitWidth, 16 | width: double.maxFinite, 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/fringilla/repository/fringilla_repo.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/services.dart'; 2 | import 'package:screener/fringilla/model/fringilla.model.dart'; 3 | 4 | abstract class FringillaRepo { 5 | Future fetchData(); 6 | } 7 | 8 | class FringillaRepoImpl implements FringillaRepo { 9 | @override 10 | Future fetchData() async { 11 | await Future.delayed(const Duration(milliseconds: 1800)); 12 | 13 | final resp = await rootBundle.loadString('assets/data/third_screen.json'); 14 | final model = fringillaModelFromJson(resp); 15 | 16 | return model; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/home/utils/strings.dart: -------------------------------------------------------------------------------- 1 | class HomeStrings { 2 | HomeStrings._(); 3 | 4 | static const String title = 'Fames volutpat.'; 5 | static const String nam = 'Nam.'; 6 | static const String euismod = 'Euismod.'; 7 | 8 | static const String crslTitle = 'Suspendisse vel.'; 9 | 10 | static const String bottom = 'Sollicitudin in tortor.'; 11 | static const String bottomDesc = 12 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Platea sollicitudin platea habitant senectus. Placerat.'; 13 | 14 | static const String bOp1 = 'Egestas scleri'; 15 | static const String bOp2 = 'Consectur'; 16 | } 17 | -------------------------------------------------------------------------------- /lib/pellen/view_models/pellen.viewmodel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:screener/pellen/model/pellen.model.dart'; 4 | import 'package:screener/pellen/repository/pellen_repo.dart'; 5 | 6 | class PellenViewModel extends ChangeNotifier { 7 | PellenViewModel({ 8 | required this.repo, 9 | }); 10 | 11 | final PellenRepo repo; 12 | 13 | List topSection() { 14 | final list = repo.topSection(); 15 | return list; 16 | } 17 | 18 | List bottomSection() { 19 | final list = repo.bottomSection(); 20 | 21 | return list; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /lib/locator.dart: -------------------------------------------------------------------------------- 1 | import 'package:get_it/get_it.dart'; 2 | import 'package:screener/fringilla/repository/fringilla_repo.dart'; 3 | import 'package:screener/home/repository/home_repo.dart'; 4 | 5 | import 'pellen/repository/pellen_repo.dart'; 6 | import 'shared/services/navigation.service.dart'; 7 | 8 | final GetIt locator = GetIt.instance; 9 | 10 | void setupLocator() { 11 | locator.registerLazySingleton(() => NavigationService()); 12 | 13 | locator.registerFactory(() => FringillaRepoImpl()); 14 | locator.registerFactory(() => HomeRepoImpl()); 15 | locator.registerFactory(() => PellenRepoImpl()); 16 | } 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "dynamism", 3 | "short_name": "dynamism", 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 | -------------------------------------------------------------------------------- /.idea/libraries/KotlinJavaRuntime.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /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 = dynamism 9 | 10 | // The application's bundle identifier 11 | PRODUCT_BUNDLE_IDENTIFIER = com.example.dynamism 12 | 13 | // The copyright displayed in application information 14 | PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved. 15 | -------------------------------------------------------------------------------- /packages/shared_components/test/h3_text_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | import '../lib/shared_components.dart'; 5 | 6 | void main() { 7 | Widget makeTestableWidget(Widget child) { 8 | return MaterialApp(home: child); 9 | } 10 | 11 | group('test for h3 text', () { 12 | testWidgets('H3 Widget has text', (WidgetTester tester) async { 13 | final widget = H3TextComponent(text: 'Test text'); 14 | 15 | await tester.pumpWidget(makeTestableWidget(widget)); 16 | 17 | final textFinder = find.text('Test text'); 18 | expect(textFinder, findsOneWidget); 19 | }); 20 | }); 21 | } 22 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # See https://www.dartlang.org/guides/libraries/private-files 2 | 3 | # Files and directories created by pub 4 | .dart_tool/ 5 | .packages 6 | build/ 7 | # If you're building an application, you may want to check-in your pubspec.lock 8 | pubspec.lock 9 | 10 | # Directory created by dartdoc 11 | # If you don't generate documentation locally you can remove this line. 12 | doc/api/ 13 | 14 | # Avoid committing generated Javascript files: 15 | *.dart.js 16 | *.info.json # Produced by the --dump-info flag. 17 | *.js # When generated by dart2js. Don't specify *.js if your 18 | # project includes source files written in JavaScript. 19 | *.js_ 20 | *.js.deps 21 | *.js.map 22 | 23 | .flutter-plugins-dependencies 24 | -------------------------------------------------------------------------------- /packages/app_theme/lib/src/theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'colors.dart'; 4 | import 'text_styles.dart'; 5 | 6 | class AppTheme { 7 | AppTheme._(); 8 | 9 | static final theme = ThemeData( 10 | colorScheme: ColorScheme.fromSwatch( 11 | backgroundColor: AppColors.bg, 12 | errorColor: AppColors.error, 13 | ), 14 | textTheme: TextTheme( 15 | headline1: TextStyles.headline1, 16 | headline2: TextStyles.headline2, 17 | headline3: TextStyles.headline3, 18 | headline4: TextStyles.headline4, 19 | button: TextStyles.subtitle, 20 | caption: TextStyles.caption, 21 | bodyText1: TextStyles.bodyRegular, 22 | bodyText2: TextStyles.bodyBold, 23 | ), 24 | visualDensity: VisualDensity.adaptivePlatformDensity, 25 | ); 26 | } 27 | -------------------------------------------------------------------------------- /packages/shared_components/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: shared_components 2 | description: Shared Components. 3 | version: 0.0.1 4 | 5 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 6 | 7 | environment: 8 | sdk: ">=2.15.0 <3.0.0" 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | 14 | # CACHING 15 | cached_network_image: ^3.2.0 16 | 17 | # INTERNAL PACKAGES 18 | app_theme: 19 | path: ../app_theme 20 | 21 | dev_dependencies: 22 | flutter_test: 23 | sdk: flutter 24 | 25 | golden_toolkit: ^0.9.0 26 | 27 | # For information on the generic Dart part of this file, see the 28 | # following page: https://dart.dev/tools/pub/pubspec 29 | 30 | # The following section is specific to Flutter. 31 | flutter: 32 | uses-material-design: true 33 | 34 | assets: 35 | - images/ 36 | -------------------------------------------------------------------------------- /packages/shared_components/lib/src/bootstrap/bootstrap.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BootstrapComponent extends StatelessWidget { 4 | const BootstrapComponent({ 5 | Key? key, 6 | required this.child, 7 | this.flexFactor = 4, 8 | this.alignment = Alignment.center, 9 | }) : assert( 10 | flexFactor >= 1 && flexFactor <= 4, 11 | 'Flex factor should be between 1 and 4', 12 | ), 13 | super(key: key); 14 | 15 | final Widget child; 16 | final int flexFactor; 17 | final AlignmentGeometry alignment; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | // 22 | return FractionallySizedBox( 23 | alignment: alignment, 24 | widthFactor: flexFactor / 4, 25 | child: child, 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /lib/home/components/indicator/dot_indicator.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:app_theme/app_theme.dart' show AppColors; 4 | 5 | class DotIndicatorComponent extends StatelessWidget { 6 | const DotIndicatorComponent({ 7 | Key? key, 8 | this.isSelected = false, 9 | }) : super(key: key); 10 | 11 | final bool isSelected; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container( 16 | width: 8.0, 17 | height: 8.0, 18 | padding: const EdgeInsets.symmetric(vertical: 8, horizontal: 4), 19 | decoration: BoxDecoration( 20 | shape: BoxShape.circle, 21 | border: Border.all(color: AppColors.cardBorder), 22 | color: isSelected ? AppColors.primaryBlue : Colors.transparent, 23 | ), 24 | ); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/fringilla/components/button/button.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:app_theme/app_theme.dart' show AppColors; 4 | 5 | typedef ButtonPressed = void Function(); 6 | 7 | class ButtonComponent extends StatelessWidget { 8 | const ButtonComponent({ 9 | Key? key, 10 | required this.onPressed, 11 | this.text = 'Lorem Ipsum', 12 | }) : super(key: key); 13 | 14 | final ButtonPressed onPressed; 15 | final String text; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return SizedBox( 20 | width: double.maxFinite, 21 | child: OutlinedButton( 22 | onPressed: onPressed, 23 | style: OutlinedButton.styleFrom( 24 | side: BorderSide(color: AppColors.buttonOutline), 25 | ), 26 | child: Text(text, style: Theme.of(context).textTheme.button), 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /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 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /packages/shared_components/lib/src/scaffold/custom.scaffold.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:app_theme/app_theme.dart' show AppColors; 4 | 5 | class CustomScaffold extends StatelessWidget { 6 | const CustomScaffold({ 7 | Key? key, 8 | required this.child, 9 | this.enableGutter = true, 10 | }) : super(key: key); 11 | 12 | final Widget child; 13 | final bool enableGutter; 14 | 15 | Widget get _checkGutter { 16 | if (enableGutter) { 17 | return Padding( 18 | padding: const EdgeInsets.symmetric(horizontal: 24), 19 | child: child, 20 | ); 21 | } 22 | 23 | return child; 24 | } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return Scaffold( 29 | appBar: AppBar(backgroundColor: AppColors.bg), 30 | backgroundColor: AppColors.bg, 31 | body: SafeArea(child: _checkGutter), 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /dynamism.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /screener.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | -------------------------------------------------------------------------------- /packages/app_theme/lib/src/colors.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/rendering.dart' show Color; 2 | 3 | import '../src/extensions/color.dart'; 4 | 5 | class AppColors { 6 | AppColors._(); 7 | 8 | static Color darkblue = HexColor.fromHex('#0A0E14'); 9 | static Color bg = HexColor.fromHex('#141D28'); 10 | static Color error = HexColor.fromHex('#D0353F'); 11 | static Color success = HexColor.fromHex('#9BC438'); 12 | static Color pending = HexColor.fromHex('#E6AC28'); 13 | 14 | static Color pressedBlue = HexColor.fromHex('#0A497B'); 15 | static Color primaryBlue = HexColor.fromHex('#0076CE'); 16 | 17 | static Color baseElevation = const Color.fromRGBO(126, 126, 126, 0.7); 18 | 19 | static Color textGrey = HexColor.fromHex('#A0AEBB'); 20 | static Color cardGrey = const Color.fromRGBO(126, 126, 126, 0.15); 21 | static Color buttonOutline = const Color.fromRGBO(0, 118, 206, 1); 22 | 23 | static Color cardBorder = const Color.fromRGBO(113, 116, 123, 1); 24 | } 25 | -------------------------------------------------------------------------------- /lib/pellen/utils/strings.dart: -------------------------------------------------------------------------------- 1 | class PellenStrings { 2 | PellenStrings._(); 3 | 4 | static const String title = 'Pellentesque nulla enim sed.'; 5 | static const String subtitle = 6 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mattis praesent lorem egestas tellus orci leo.'; 7 | 8 | static const String topPt1 = 'Mus sed at ligula.'; 9 | static const String topPt2 = 'Tortor sem.'; 10 | static const String topPt3 = 'Quam in nunc nibh mattis in diam.'; 11 | 12 | static const String btmPt1 = 'A sodales et purus leo.'; 13 | static const String btmPt2 = 'Est lorem.'; 14 | static const String btmPt3 = 15 | 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Semper amet viverra non justo a morbi blandit.'; 16 | 17 | static const String btmPt4 = 'Lacinia nunc curabitur velit.'; 18 | static const String btmPt5 = 'Lacinia non.'; 19 | static const String btmPt6 = 'Diam ac molestie.'; 20 | static const String btmPt7 = 'Volutpat id sed.'; 21 | } 22 | -------------------------------------------------------------------------------- /lib/fringilla/view_models/fringilla.viewmodel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:screener/fringilla/model/fringilla.model.dart'; 4 | import 'package:screener/fringilla/repository/fringilla_repo.dart'; 5 | 6 | import 'package:screener/shared/view_models/loading.viewmodel.dart'; 7 | 8 | class FringillaViewModel extends LoadingViewModel { 9 | FringillaViewModel({ 10 | required this.repo, 11 | }); 12 | 13 | final FringillaRepo repo; 14 | 15 | FringillaModel get model => _model; 16 | 17 | Future fetchData() async { 18 | try { 19 | isLoading = true; 20 | 21 | model = await repo.fetchData(); 22 | } catch (exc) { 23 | debugPrint('Error in _fetchData : ${exc.toString()}'); 24 | } 25 | 26 | isLoading = false; 27 | } 28 | 29 | set model(FringillaModel model) { 30 | _model = model; 31 | notifyListeners(); 32 | } 33 | 34 | // INTERNALS 35 | 36 | FringillaModel _model = FringillaModel(); 37 | } 38 | -------------------------------------------------------------------------------- /lib/home/view_models/home.viewmodel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | 3 | import 'package:screener/home/model/carousel.model.dart'; 4 | import 'package:screener/home/repository/home_repo.dart'; 5 | 6 | import 'package:screener/shared/view_models/loading.viewmodel.dart'; 7 | 8 | class HomeViewModel extends LoadingViewModel { 9 | HomeViewModel({ 10 | required this.repo, 11 | }); 12 | 13 | final HomeRepo repo; 14 | 15 | CarouselModel get homeModel => _homeModel; 16 | 17 | set homeModel(CarouselModel homeModel) { 18 | _homeModel = homeModel; 19 | notifyListeners(); 20 | } 21 | 22 | Future fetchData() async { 23 | try { 24 | isLoading = true; 25 | 26 | _homeModel = await repo.fetchData(); 27 | } catch (exc) { 28 | debugPrint('Error in _fetchData : ${exc.toString()}'); 29 | } 30 | 31 | isLoading = false; 32 | notifyListeners(); 33 | } 34 | 35 | // INTERNALS 36 | CarouselModel _homeModel = CarouselModel(); 37 | } 38 | -------------------------------------------------------------------------------- /assets/data/first_screen.json: -------------------------------------------------------------------------------- 1 | { 2 | "items": [{ 3 | "id": "id1", 4 | "header": "1", 5 | "title": "Lorem Ipsum", 6 | "subtitle": "Dui mattis risus elit purus feugiat quis in sit.", 7 | "desc": "Egestas scelerisque vel.", 8 | "image_url": "https://via.placeholder.com/300.png" 9 | }, 10 | { 11 | "id": "id2", 12 | "header": "2", 13 | "title": "Lorem Ipsum2", 14 | "subtitle": "Dui mattis risus elit purus feugiat quis in sit.", 15 | "desc": "Egestas scelerisque vel.", 16 | "image_url": "https://via.placeholder.com/400.png" 17 | }, 18 | { 19 | "id": "id3", 20 | "header": "3", 21 | "title": "Lorem Ipsum3", 22 | "subtitle": "Dui mattis risus elit purus feugiat quis in sit.", 23 | "desc": "Egestas scelerisque vel.", 24 | "image_url": "https://via.placeholder.com/500.png" 25 | } 26 | ] 27 | } -------------------------------------------------------------------------------- /lib/pellen/components/row_with_number/numbered_row.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:screener/pellen/components/text/caption_text.component.dart'; 4 | 5 | import 'package:app_theme/app_theme.dart' show AppColors; 6 | 7 | import 'package:shared_components/shared_components.dart' show SpacerHorizontal; 8 | 9 | class NumberedRowComponent extends CaptionTextComponent { 10 | const NumberedRowComponent({ 11 | Key? key, 12 | String text = 'Some text', 13 | this.number = 1, 14 | }) : super(text: text, key: key); 15 | 16 | final int number; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Row( 21 | children: [ 22 | Text( 23 | '$number.', 24 | style: Theme.of(context) 25 | .textTheme 26 | .caption! 27 | .copyWith(color: AppColors.textGrey), 28 | ), 29 | const SpacerHorizontal(12), 30 | Expanded(child: Text(text)), 31 | ], 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /test_driver/integration_test.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:integration_test/integration_test_driver.dart'; 4 | import 'package:path/path.dart' as path; 5 | 6 | import 'package:flutter_driver/flutter_driver.dart'; 7 | 8 | Future main() async { 9 | integrationDriver( 10 | responseDataCallback: (Map? data) async { 11 | await fs.directory(_destinationDirectory).create(recursive: true); 12 | 13 | final file = fs.file( 14 | path.join( 15 | _destinationDirectory, 16 | '$_testOutputFilename.json', 17 | ), 18 | ); 19 | 20 | if (data != null) { 21 | final resultString = _encodeJson(data); 22 | await file.writeAsString(resultString); 23 | } 24 | }, 25 | ); 26 | } 27 | 28 | String _encodeJson(Map jsonObject) { 29 | return _prettyEncoder.convert(jsonObject); 30 | } 31 | 32 | const _prettyEncoder = JsonEncoder.withIndent(' '); 33 | const _testOutputFilename = 'integration_response_data'; 34 | const _destinationDirectory = 'integration_test'; 35 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /assets/data/third_screen.json: -------------------------------------------------------------------------------- 1 | { 2 | "items": [{ 3 | "id": "id1", 4 | "index": "0", 5 | "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. ", 6 | "url_link": "https://flutter.io" 7 | }, { 8 | "id": "id2", 9 | "index": "1", 10 | "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. ", 11 | "url_link": "https://www.google.com/" 12 | }, { 13 | "id": "id3", 14 | "index": "2", 15 | "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. ", 16 | "url_link": "https://flutter.io" 17 | }, { 18 | "id": "id4", 19 | "index": "3", 20 | "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Facilisi nunc non, luctus fringilla tempus. Curabitur est.", 21 | "url_link": "https://www.google.com/" 22 | }, { 23 | "id": "id5", 24 | "index": "4", 25 | "description": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut id vestibulum nisl auctor.", 26 | "url_link": "https://flutter.io" 27 | }] 28 | } -------------------------------------------------------------------------------- /lib/shared/components/notifier/notifier.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:provider/provider.dart'; 4 | 5 | class NotifierWidget extends StatefulWidget { 6 | const NotifierWidget({ 7 | Key? key, 8 | required this.builder, 9 | required this.model, 10 | this.child, 11 | }) : super(key: key); 12 | 13 | final T model; 14 | 15 | final Widget? child; 16 | 17 | final Widget Function(BuildContext context, T model, Widget? child) builder; 18 | 19 | @override 20 | _NotifierWidgetState createState() => _NotifierWidgetState(); 21 | } 22 | 23 | class _NotifierWidgetState 24 | extends State> { 25 | late T model; 26 | 27 | @override 28 | void initState() { 29 | model = widget.model; 30 | super.initState(); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return ChangeNotifierProvider( 36 | create: (context) => model, 37 | child: Consumer( 38 | builder: widget.builder, 39 | child: widget.child, 40 | ), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /packages/app_theme/lib/src/extensions/color.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | extension HexColor on Color { 4 | /// String is in the format "aabbcc" or "ffaabbcc" with an optional leading "#". 5 | 6 | static Color fromHex(String hexString) { 7 | final buffer = StringBuffer(); 8 | 9 | if (hexString.length == 6 || hexString.length == 7) { 10 | buffer.write('ff'); 11 | } 12 | buffer.write(hexString.replaceFirst('#', '')); 13 | 14 | return Color(int.parse(buffer.toString(), radix: 16)); 15 | } 16 | 17 | static Color shiftHsl(Color c, [double amt = 0]) { 18 | final hslc = HSLColor.fromColor(c); 19 | return hslc 20 | .withLightness((hslc.lightness + amt).clamp(0.0, 1.0) as double) 21 | .toColor(); 22 | } 23 | 24 | /// Prefixes a hash sign if [leadingHashSign] is set to `true` (default is `true`). 25 | String toHex({bool leadingHashSign = true}) => '${leadingHashSign ? '#' : ''}' 26 | '${alpha.toRadixString(16).padLeft(2, '0')}' 27 | '${red.toRadixString(16).padLeft(2, '0')}' 28 | '${green.toRadixString(16).padLeft(2, '0')}' 29 | '${blue.toRadixString(16).padLeft(2, '0')}'; 30 | } 31 | -------------------------------------------------------------------------------- /lib/home/components/list/list.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:app_theme/app_theme.dart' show AppColors; 4 | 5 | typedef CardPressed = void Function(); 6 | 7 | class ListComponent extends StatelessWidget { 8 | const ListComponent({ 9 | Key? key, 10 | required this.onPressed, 11 | this.text = 'Some text', 12 | }) : super(key: key); 13 | 14 | final String text; 15 | final CardPressed onPressed; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return GestureDetector( 20 | onTap: onPressed, 21 | child: Container( 22 | padding: const EdgeInsets.all(16), 23 | decoration: BoxDecoration( 24 | border: Border.all(color: AppColors.baseElevation), 25 | ), 26 | child: Row( 27 | children: [ 28 | Text( 29 | text, 30 | style: Theme.of(context).textTheme.caption, 31 | ), 32 | const Spacer(), 33 | const Icon( 34 | Icons.arrow_forward, 35 | color: Colors.white, 36 | ), 37 | ], 38 | ), 39 | ), 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /macos/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - FlutterMacOS (1.0.0) 3 | - FMDB (2.7.5): 4 | - FMDB/standard (= 2.7.5) 5 | - FMDB/standard (2.7.5) 6 | - path_provider_macos (0.0.1): 7 | - FlutterMacOS 8 | - sqflite (0.0.2): 9 | - FlutterMacOS 10 | - FMDB (>= 2.7.5) 11 | 12 | DEPENDENCIES: 13 | - FlutterMacOS (from `Flutter/ephemeral`) 14 | - path_provider_macos (from `Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos`) 15 | - sqflite (from `Flutter/ephemeral/.symlinks/plugins/sqflite/macos`) 16 | 17 | SPEC REPOS: 18 | trunk: 19 | - FMDB 20 | 21 | EXTERNAL SOURCES: 22 | FlutterMacOS: 23 | :path: Flutter/ephemeral 24 | path_provider_macos: 25 | :path: Flutter/ephemeral/.symlinks/plugins/path_provider_macos/macos 26 | sqflite: 27 | :path: Flutter/ephemeral/.symlinks/plugins/sqflite/macos 28 | 29 | SPEC CHECKSUMS: 30 | FlutterMacOS: 57701585bf7de1b3fc2bb61f6378d73bbdea8424 31 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 32 | path_provider_macos: 160cab0d5461f0c0e02995469a98f24bdb9a3f1f 33 | sqflite: a5789cceda41d54d23f31d6de539d65bb14100ea 34 | 35 | PODFILE CHECKSUM: 6eac6b3292e5142cfc23bdeb71848a40ec51c14c 36 | 37 | COCOAPODS: 1.10.1 38 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "dynamism", 9 | "request": "launch", 10 | "type": "dart" 11 | }, 12 | { 13 | "name": "app_theme", 14 | "cwd": "packages/app_theme", 15 | "request": "launch", 16 | "type": "dart" 17 | }, 18 | { 19 | "name": "shared_components", 20 | "cwd": "packages/shared_components", 21 | "request": "launch", 22 | "type": "dart" 23 | }, 24 | { 25 | "name": "Golden", 26 | "request": "launch", 27 | "type": "dart", 28 | "codeLens": { 29 | "for": [ 30 | "run-test", 31 | "run-test-file" 32 | ] 33 | }, 34 | "args": [ 35 | "--update-goldens" 36 | ] 37 | } 38 | ] 39 | } -------------------------------------------------------------------------------- /lib/pellen/repository/pellen_repo.dart: -------------------------------------------------------------------------------- 1 | import 'package:screener/pellen/model/pellen.model.dart'; 2 | import 'package:screener/pellen/utils/strings.dart'; 3 | import 'package:screener/shared/assets/image.assets.dart'; 4 | 5 | abstract class PellenRepo { 6 | List topSection(); 7 | List bottomSection(); 8 | } 9 | 10 | class PellenRepoImpl extends PellenRepo { 11 | @override 12 | List bottomSection() { 13 | final list = [ 14 | PellenModel( 15 | [PellenStrings.topPt1, PellenStrings.topPt2, PellenStrings.topPt3], 16 | ImageAssets.img300.assetName, 17 | ), 18 | ]; 19 | 20 | return list; 21 | } 22 | 23 | @override 24 | List topSection() { 25 | final list = [ 26 | PellenModel( 27 | [ 28 | PellenStrings.btmPt1, 29 | PellenStrings.btmPt2, 30 | PellenStrings.btmPt3, 31 | PellenStrings.btmPt4, 32 | PellenStrings.btmPt5, 33 | PellenStrings.btmPt6, 34 | PellenStrings.btmPt7, 35 | ], 36 | ImageAssets.img300.assetName, 37 | ), 38 | ]; 39 | 40 | return list; 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/fringilla/components/card/card.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:app_theme/app_theme.dart' show AppColors; 4 | 5 | typedef CardPressed = void Function(); 6 | 7 | class CardComponent extends StatelessWidget { 8 | const CardComponent({ 9 | Key? key, 10 | required this.onPressed, 11 | this.text = 'Some text', 12 | }) : super(key: key); 13 | 14 | final CardPressed onPressed; 15 | final String text; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return GestureDetector( 20 | onTap: onPressed, 21 | child: Container( 22 | color: AppColors.cardGrey, 23 | child: Padding( 24 | padding: const EdgeInsets.all(16), 25 | child: Row( 26 | children: [ 27 | Expanded( 28 | child: Text( 29 | text, 30 | style: Theme.of(context).textTheme.headline4, 31 | ), 32 | ), 33 | const Icon( 34 | Icons.arrow_forward, 35 | color: Colors.white, 36 | ), 37 | ], 38 | ), 39 | ), 40 | ), 41 | ); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /test/home/home_repo_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:mockito/annotations.dart'; 3 | import 'package:mockito/mockito.dart'; 4 | import 'package:screener/home/model/carousel.model.dart'; 5 | import 'package:screener/home/repository/home_repo.dart'; 6 | 7 | import 'home_repo_test.mocks.dart'; 8 | 9 | class HomeRepoTest extends Mock implements HomeRepo {} 10 | 11 | @GenerateMocks([HomeRepoTest]) 12 | Future main() async { 13 | late MockHomeRepoTest homeRepo; 14 | 15 | setUpAll(() { 16 | homeRepo = MockHomeRepoTest(); 17 | }); 18 | 19 | group('home repo test', () { 20 | test('test fetchData', () async { 21 | final model = CarouselModel(); 22 | 23 | when(homeRepo.fetchData()).thenAnswer((_) async { 24 | return model; 25 | }); 26 | 27 | final res = await homeRepo.fetchData(); 28 | 29 | expect(res, isA()); 30 | expect(res, model); 31 | }); 32 | 33 | test('test fetchData throws Exception', () { 34 | when(homeRepo.fetchData()).thenAnswer((_) async { 35 | throw Exception(); 36 | }); 37 | 38 | final res = homeRepo.fetchData(); 39 | 40 | expect(res, throwsException); 41 | }); 42 | }); 43 | } 44 | -------------------------------------------------------------------------------- /.flutter-plugins: -------------------------------------------------------------------------------- 1 | # This is a generated file; do not edit or check into version control. 2 | integration_test=/Users/aseemwangoo/flutter/packages/integration_test/ 3 | path_provider=/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider-2.0.11/ 4 | path_provider_android=/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.14/ 5 | path_provider_ios=/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.9/ 6 | path_provider_linux=/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/ 7 | path_provider_macos=/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.6/ 8 | path_provider_windows=/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.0/ 9 | sqflite=/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2+1/ 10 | webview_flutter=/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter-3.0.4/ 11 | webview_flutter_android=/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_android-2.8.11/ 12 | webview_flutter_wkwebview=/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.8.1/ 13 | -------------------------------------------------------------------------------- /test/home/home_viewmodel_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:mockito/mockito.dart'; 3 | import 'package:screener/home/model/carousel.model.dart'; 4 | import 'package:screener/home/view_models/home.viewmodel.dart'; 5 | 6 | import 'home_repo_test.mocks.dart'; 7 | 8 | Future main() async { 9 | late MockHomeRepoTest homeRepo; 10 | late HomeViewModel viewModel; 11 | 12 | setUpAll(() { 13 | homeRepo = MockHomeRepoTest(); 14 | viewModel = HomeViewModel(repo: homeRepo); 15 | }); 16 | 17 | group('home viewmodel test', () { 18 | test('test fetchData', () async { 19 | final model = CarouselModel(); 20 | 21 | when(homeRepo.fetchData()).thenAnswer((_) async { 22 | return model; 23 | }); 24 | 25 | await viewModel.fetchData(); 26 | 27 | expect(viewModel.homeModel, model); 28 | }); 29 | 30 | test('test fetchData for repository', () async { 31 | final model = CarouselModel(); 32 | 33 | when(homeRepo.fetchData()).thenAnswer((_) async { 34 | return model; 35 | }); 36 | 37 | final resp = await homeRepo.fetchData(); 38 | viewModel.homeModel = resp; 39 | 40 | expect(viewModel.homeModel, model); 41 | }); 42 | }); 43 | } 44 | -------------------------------------------------------------------------------- /integration_test/robots/secondscreen_robot.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | import 'package:screener/pellen/utils/strings.dart'; 6 | 7 | class SecondScreenRobot { 8 | const SecondScreenRobot(this.tester); 9 | 10 | final WidgetTester tester; 11 | 12 | Future findTitle() async { 13 | await tester.pumpAndSettle(); 14 | final pellenFinder = find.text(PellenStrings.title); 15 | expect(pellenFinder, findsOneWidget); 16 | sleep(const Duration(seconds: 2)); 17 | } 18 | 19 | Future goBack() async { 20 | await tester.pageBack(); 21 | await tester.pumpAndSettle(); 22 | sleep(const Duration(seconds: 2)); 23 | } 24 | 25 | Future scrollThePage({bool scrollUp = false}) async { 26 | final listFinder = find.byKey(const Key('pellen singleChildScrollView')); 27 | 28 | if (scrollUp) { 29 | await tester.fling(listFinder, const Offset(0, 500), 10000); 30 | await tester.pumpAndSettle(); 31 | 32 | expect(find.text(PellenStrings.title), findsOneWidget); 33 | } else { 34 | await tester.fling(listFinder, const Offset(0, -500), 10000); 35 | await tester.pumpAndSettle(); 36 | 37 | expect(find.text('Lorem Ipsum'), findsNothing); 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /test/fringilla/fringilla_viewmodel_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:mockito/mockito.dart'; 3 | import 'package:screener/fringilla/model/fringilla.model.dart'; 4 | import 'package:screener/fringilla/view_models/fringilla.viewmodel.dart'; 5 | 6 | import 'fringilla_repo_test.mocks.dart'; 7 | 8 | Future main() async { 9 | late MockFringillaRepoTest fringillaRepo; 10 | late FringillaViewModel viewModel; 11 | 12 | setUpAll(() { 13 | fringillaRepo = MockFringillaRepoTest(); 14 | viewModel = FringillaViewModel(repo: fringillaRepo); 15 | }); 16 | 17 | group('fringilla viewmodel test', () { 18 | test('test fetchData', () async { 19 | final model = FringillaModel(); 20 | 21 | when(fringillaRepo.fetchData()).thenAnswer((_) async { 22 | return model; 23 | }); 24 | 25 | await viewModel.fetchData(); 26 | 27 | expect(viewModel.model, model); 28 | }); 29 | 30 | test('test fetchData for repository', () async { 31 | final model = FringillaModel(); 32 | 33 | when(fringillaRepo.fetchData()).thenAnswer((_) async { 34 | return model; 35 | }); 36 | 37 | final resp = await fringillaRepo.fetchData(); 38 | viewModel.model = resp; 39 | 40 | expect(viewModel.model, model); 41 | }); 42 | }); 43 | } 44 | -------------------------------------------------------------------------------- /test/fringilla/fringilla_repo_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:mockito/annotations.dart'; 3 | import 'package:mockito/mockito.dart'; 4 | import 'package:screener/fringilla/model/fringilla.model.dart'; 5 | import 'package:screener/fringilla/repository/fringilla_repo.dart'; 6 | 7 | import 'fringilla_repo_test.mocks.dart'; 8 | 9 | class FringillaRepoTest extends Mock implements FringillaRepo {} 10 | 11 | @GenerateMocks([FringillaRepoTest]) 12 | Future main() async { 13 | late MockFringillaRepoTest fringillaRepo; 14 | 15 | setUpAll(() { 16 | fringillaRepo = MockFringillaRepoTest(); 17 | }); 18 | 19 | group('fringilla repo test', () { 20 | test('test fetchData', () async { 21 | final model = FringillaModel(); 22 | 23 | when(fringillaRepo.fetchData()).thenAnswer((_) async { 24 | return model; 25 | }); 26 | 27 | final res = await fringillaRepo.fetchData(); 28 | 29 | expect(res, isA()); 30 | expect(res, model); 31 | }); 32 | 33 | test('test fetchData throws Exception', () { 34 | when(fringillaRepo.fetchData()).thenAnswer((_) async { 35 | throw Exception(); 36 | }); 37 | 38 | final res = fringillaRepo.fetchData(); 39 | 40 | expect(res, throwsException); 41 | }); 42 | }); 43 | } 44 | -------------------------------------------------------------------------------- /lib/fringilla/model/fringilla.model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | FringillaModel fringillaModelFromJson(String str) => 4 | FringillaModel.fromJson(json.decode(str)); 5 | 6 | String fringillaModelToJson(FringillaModel data) => json.encode(data.toJson()); 7 | 8 | class FringillaModel { 9 | FringillaModel({ 10 | this.items = const [], 11 | }); 12 | 13 | List items; 14 | 15 | factory FringillaModel.fromJson(Map json) => FringillaModel( 16 | items: List.from(json["items"].map((x) => Item.fromJson(x))), 17 | ); 18 | 19 | Map toJson() => { 20 | "items": List.from(items.map((x) => x.toJson())), 21 | }; 22 | } 23 | 24 | class Item { 25 | Item({ 26 | this.id, 27 | this.index, 28 | this.description, 29 | this.urlLink, 30 | }); 31 | 32 | String? id; 33 | String? index; 34 | String? description; 35 | String? urlLink; 36 | 37 | factory Item.fromJson(Map json) => Item( 38 | id: json["id"], 39 | index: json["index"], 40 | description: json["description"], 41 | urlLink: json["url_link"], 42 | ); 43 | 44 | Map toJson() => { 45 | "id": id, 46 | "index": index, 47 | "description": description, 48 | "url_link": urlLink, 49 | }; 50 | } 51 | -------------------------------------------------------------------------------- /test/home/home_repo_test.mocks.dart: -------------------------------------------------------------------------------- 1 | // Mocks generated by Mockito 5.1.0 from annotations 2 | // in screener/test/home/home_repo_test.dart. 3 | // Do not manually edit this file. 4 | 5 | import 'dart:async' as _i4; 6 | 7 | import 'package:mockito/mockito.dart' as _i1; 8 | import 'package:screener/home/model/carousel.model.dart' as _i2; 9 | 10 | import 'home_repo_test.dart' as _i3; 11 | 12 | // ignore_for_file: type=lint 13 | // ignore_for_file: avoid_redundant_argument_values 14 | // ignore_for_file: avoid_setters_without_getters 15 | // ignore_for_file: comment_references 16 | // ignore_for_file: implementation_imports 17 | // ignore_for_file: invalid_use_of_visible_for_testing_member 18 | // ignore_for_file: prefer_const_constructors 19 | // ignore_for_file: unnecessary_parenthesis 20 | // ignore_for_file: camel_case_types 21 | 22 | class _FakeCarouselModel_0 extends _i1.Fake implements _i2.CarouselModel {} 23 | 24 | /// A class which mocks [HomeRepoTest]. 25 | /// 26 | /// See the documentation for Mockito's code generation for more information. 27 | class MockHomeRepoTest extends _i1.Mock implements _i3.HomeRepoTest { 28 | MockHomeRepoTest() { 29 | _i1.throwOnMissingStub(this); 30 | } 31 | 32 | @override 33 | _i4.Future<_i2.CarouselModel> fetchData() => (super.noSuchMethod( 34 | Invocation.method(#fetchData, []), 35 | returnValue: Future<_i2.CarouselModel>.value(_FakeCarouselModel_0())) 36 | as _i4.Future<_i2.CarouselModel>); 37 | } 38 | -------------------------------------------------------------------------------- /macos/Podfile: -------------------------------------------------------------------------------- 1 | platform :osx, '10.11' 2 | 3 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 4 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 5 | 6 | project 'Runner', { 7 | 'Debug' => :debug, 8 | 'Profile' => :release, 9 | 'Release' => :release, 10 | } 11 | 12 | def flutter_root 13 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__) 14 | unless File.exist?(generated_xcode_build_settings_path) 15 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first" 16 | end 17 | 18 | File.foreach(generated_xcode_build_settings_path) do |line| 19 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 20 | return matches[1].strip if matches 21 | end 22 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\"" 23 | end 24 | 25 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 26 | 27 | flutter_macos_podfile_setup 28 | 29 | target 'Runner' do 30 | use_frameworks! 31 | use_modular_headers! 32 | 33 | flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__)) 34 | end 35 | 36 | post_install do |installer| 37 | installer.pods_project.targets.each do |target| 38 | flutter_additional_macos_build_settings(target) 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | end 36 | 37 | post_install do |installer| 38 | installer.pods_project.targets.each do |target| 39 | flutter_additional_ios_build_settings(target) 40 | end 41 | end 42 | -------------------------------------------------------------------------------- /lib/home/model/carousel.model.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | CarouselModel carouselModelFromJson(String str) => 4 | CarouselModel.fromJson(json.decode(str)); 5 | 6 | String carouselModelToJson(CarouselModel data) => json.encode(data.toJson()); 7 | 8 | class CarouselModel { 9 | CarouselModel({ 10 | this.items = const [], 11 | }); 12 | 13 | List items; 14 | 15 | factory CarouselModel.fromJson(Map json) => CarouselModel( 16 | items: List.from(json["items"].map((x) => Item.fromJson(x))), 17 | ); 18 | 19 | Map toJson() => { 20 | "items": List.from(items.map((x) => x.toJson())), 21 | }; 22 | } 23 | 24 | class Item { 25 | Item({ 26 | this.id, 27 | this.header, 28 | this.title, 29 | this.subtitle, 30 | this.desc, 31 | this.imageUrl, 32 | }); 33 | 34 | String? id; 35 | String? header; 36 | String? title; 37 | String? subtitle; 38 | String? desc; 39 | String? imageUrl; 40 | 41 | factory Item.fromJson(Map json) => Item( 42 | id: json["id"], 43 | header: json["header"], 44 | title: json["title"], 45 | subtitle: json["subtitle"], 46 | desc: json["desc"], 47 | imageUrl: json["image_url"], 48 | ); 49 | 50 | Map toJson() => { 51 | "id": id, 52 | "header": header, 53 | "title": title, 54 | "subtitle": subtitle, 55 | "desc": desc, 56 | "image_url": imageUrl, 57 | }; 58 | } 59 | -------------------------------------------------------------------------------- /test/fringilla/fringilla_repo_test.mocks.dart: -------------------------------------------------------------------------------- 1 | // Mocks generated by Mockito 5.1.0 from annotations 2 | // in screener/test/fringilla/fringilla_repo_test.dart. 3 | // Do not manually edit this file. 4 | 5 | import 'dart:async' as _i4; 6 | 7 | import 'package:mockito/mockito.dart' as _i1; 8 | import 'package:screener/fringilla/model/fringilla.model.dart' as _i2; 9 | 10 | import 'fringilla_repo_test.dart' as _i3; 11 | 12 | // ignore_for_file: type=lint 13 | // ignore_for_file: avoid_redundant_argument_values 14 | // ignore_for_file: avoid_setters_without_getters 15 | // ignore_for_file: comment_references 16 | // ignore_for_file: implementation_imports 17 | // ignore_for_file: invalid_use_of_visible_for_testing_member 18 | // ignore_for_file: prefer_const_constructors 19 | // ignore_for_file: unnecessary_parenthesis 20 | // ignore_for_file: camel_case_types 21 | 22 | class _FakeFringillaModel_0 extends _i1.Fake implements _i2.FringillaModel {} 23 | 24 | /// A class which mocks [FringillaRepoTest]. 25 | /// 26 | /// See the documentation for Mockito's code generation for more information. 27 | class MockFringillaRepoTest extends _i1.Mock implements _i3.FringillaRepoTest { 28 | MockFringillaRepoTest() { 29 | _i1.throwOnMissingStub(this); 30 | } 31 | 32 | @override 33 | _i4.Future<_i2.FringillaModel> fetchData() => 34 | (super.noSuchMethod(Invocation.method(#fetchData, []), 35 | returnValue: 36 | Future<_i2.FringillaModel>.value(_FakeFringillaModel_0())) 37 | as _i4.Future<_i2.FringillaModel>); 38 | } 39 | -------------------------------------------------------------------------------- /macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "16x16", 5 | "idiom" : "mac", 6 | "filename" : "app_icon_16.png", 7 | "scale" : "1x" 8 | }, 9 | { 10 | "size" : "16x16", 11 | "idiom" : "mac", 12 | "filename" : "app_icon_32.png", 13 | "scale" : "2x" 14 | }, 15 | { 16 | "size" : "32x32", 17 | "idiom" : "mac", 18 | "filename" : "app_icon_32.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "32x32", 23 | "idiom" : "mac", 24 | "filename" : "app_icon_64.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "128x128", 29 | "idiom" : "mac", 30 | "filename" : "app_icon_128.png", 31 | "scale" : "1x" 32 | }, 33 | { 34 | "size" : "128x128", 35 | "idiom" : "mac", 36 | "filename" : "app_icon_256.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "256x256", 41 | "idiom" : "mac", 42 | "filename" : "app_icon_256.png", 43 | "scale" : "1x" 44 | }, 45 | { 46 | "size" : "256x256", 47 | "idiom" : "mac", 48 | "filename" : "app_icon_512.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "512x512", 53 | "idiom" : "mac", 54 | "filename" : "app_icon_512.png", 55 | "scale" : "1x" 56 | }, 57 | { 58 | "size" : "512x512", 59 | "idiom" : "mac", 60 | "filename" : "app_icon_1024.png", 61 | "scale" : "2x" 62 | } 63 | ], 64 | "info" : { 65 | "version" : 1, 66 | "author" : "xcode" 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - FMDB (2.7.5): 4 | - FMDB/standard (= 2.7.5) 5 | - FMDB/standard (2.7.5) 6 | - integration_test (0.0.1): 7 | - Flutter 8 | - path_provider_ios (0.0.1): 9 | - Flutter 10 | - sqflite (0.0.2): 11 | - Flutter 12 | - FMDB (>= 2.7.5) 13 | - webview_flutter_wkwebview (0.0.1): 14 | - Flutter 15 | 16 | DEPENDENCIES: 17 | - Flutter (from `Flutter`) 18 | - integration_test (from `.symlinks/plugins/integration_test/ios`) 19 | - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) 20 | - sqflite (from `.symlinks/plugins/sqflite/ios`) 21 | - webview_flutter_wkwebview (from `.symlinks/plugins/webview_flutter_wkwebview/ios`) 22 | 23 | SPEC REPOS: 24 | trunk: 25 | - FMDB 26 | 27 | EXTERNAL SOURCES: 28 | Flutter: 29 | :path: Flutter 30 | integration_test: 31 | :path: ".symlinks/plugins/integration_test/ios" 32 | path_provider_ios: 33 | :path: ".symlinks/plugins/path_provider_ios/ios" 34 | sqflite: 35 | :path: ".symlinks/plugins/sqflite/ios" 36 | webview_flutter_wkwebview: 37 | :path: ".symlinks/plugins/webview_flutter_wkwebview/ios" 38 | 39 | SPEC CHECKSUMS: 40 | Flutter: 50d75fe2f02b26cc09d224853bb45737f8b3214a 41 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 42 | integration_test: a1e7d09bd98eca2fc37aefd79d4f41ad37bdbbe5 43 | path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 44 | sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 45 | webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f 46 | 47 | PODFILE CHECKSUM: aafe91acc616949ddb318b77800a7f51bffa2a4c 48 | 49 | COCOAPODS: 1.11.3 50 | -------------------------------------------------------------------------------- /coverage/lcov.info: -------------------------------------------------------------------------------- 1 | SF:lib/home/model/carousel.model.dart 2 | DA:3,0 3 | DA:4,0 4 | DA:6,0 5 | DA:9,2 6 | DA:15,0 7 | DA:16,0 8 | DA:19,0 9 | DA:20,0 10 | DA:25,0 11 | DA:41,0 12 | DA:42,0 13 | DA:43,0 14 | DA:44,0 15 | DA:45,0 16 | DA:46,0 17 | DA:47,0 18 | DA:50,0 19 | DA:51,0 20 | DA:52,0 21 | DA:53,0 22 | DA:54,0 23 | DA:55,0 24 | DA:56,0 25 | LF:23 26 | LH:1 27 | end_of_record 28 | SF:lib/home/repository/home_repo.dart 29 | DA:10,0 30 | DA:11,0 31 | DA:13,0 32 | DA:14,0 33 | LF:4 34 | LH:0 35 | end_of_record 36 | SF:lib/home/view_models/home.viewmodel.dart 37 | DA:9,1 38 | DA:15,2 39 | DA:17,1 40 | DA:18,1 41 | DA:19,1 42 | DA:22,1 43 | DA:24,1 44 | DA:26,4 45 | DA:28,0 46 | DA:31,1 47 | DA:32,1 48 | LF:11 49 | LH:10 50 | end_of_record 51 | SF:lib/shared/view_models/loading.viewmodel.dart 52 | DA:6,0 53 | DA:8,2 54 | DA:9,2 55 | DA:10,2 56 | LF:4 57 | LH:3 58 | end_of_record 59 | SF:lib/fringilla/model/fringilla.model.dart 60 | DA:3,0 61 | DA:4,0 62 | DA:6,0 63 | DA:9,2 64 | DA:15,0 65 | DA:16,0 66 | DA:19,0 67 | DA:20,0 68 | DA:25,0 69 | DA:37,0 70 | DA:38,0 71 | DA:39,0 72 | DA:40,0 73 | DA:41,0 74 | DA:44,0 75 | DA:45,0 76 | DA:46,0 77 | DA:47,0 78 | DA:48,0 79 | LF:19 80 | LH:1 81 | end_of_record 82 | SF:lib/fringilla/repository/fringilla_repo.dart 83 | DA:10,0 84 | DA:11,0 85 | DA:13,0 86 | DA:14,0 87 | LF:4 88 | LH:0 89 | end_of_record 90 | SF:lib/fringilla/view_models/fringilla.viewmodel.dart 91 | DA:9,1 92 | DA:15,2 93 | DA:17,1 94 | DA:19,1 95 | DA:21,4 96 | DA:23,0 97 | DA:26,1 98 | DA:29,1 99 | DA:30,1 100 | DA:31,1 101 | LF:10 102 | LH:9 103 | end_of_record 104 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /packages/app_theme/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: app_theme 2 | description: Theme of the app. 3 | version: 0.0.1 4 | 5 | environment: 6 | sdk: ">=2.15.0 <3.0.0" 7 | 8 | dependencies: 9 | flutter: 10 | sdk: flutter 11 | 12 | dev_dependencies: 13 | flutter_test: 14 | sdk: flutter 15 | 16 | # For information on the generic Dart part of this file, see the 17 | # following page: https://dart.dev/tools/pub/pubspec 18 | 19 | # The following section is specific to Flutter. 20 | flutter: 21 | # To add assets to your package, add an assets section, like this: 22 | # assets: 23 | # - images/a_dot_burr.jpeg 24 | # - images/a_dot_ham.jpeg 25 | # 26 | # For details regarding assets in packages, see 27 | # https://flutter.dev/assets-and-images/#from-packages 28 | # 29 | # An image asset can refer to one or more resolution-specific "variants", see 30 | # https://flutter.dev/assets-and-images/#resolution-aware. 31 | # To add custom fonts to your package, add a fonts section here, 32 | # in this "flutter" section. Each entry in this list should have a 33 | # "family" key with the font family name, and a "fonts" key with a 34 | # list giving the asset and other descriptors for the font. For 35 | # example: 36 | # fonts: 37 | # - family: Schyler 38 | # fonts: 39 | # - asset: fonts/Schyler-Regular.ttf 40 | # - asset: fonts/Schyler-Italic.ttf 41 | # style: italic 42 | # - family: Trajan Pro 43 | # fonts: 44 | # - asset: fonts/TrajanPro.ttf 45 | # - asset: fonts/TrajanPro_Bold.ttf 46 | # weight: 700 47 | # 48 | # For details regarding fonts in packages, see 49 | # https://flutter.dev/custom-fonts/#from-packages 50 | -------------------------------------------------------------------------------- /packages/shared_components/lib/src/spacers/row_spacer.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'spacer.component.dart'; 4 | 5 | class RowSpacer extends StatelessWidget { 6 | /// This snippet shows O/P of [RowSpacer]. 7 | /// 8 | /// ```dart 9 | /// I/P : [19, 21] 10 | /// O/P : [19, 7, 21] 11 | /// 12 | /// I/P : [19, 21, 23] 13 | /// O/P : [19, 7, 21, 7, 23] 14 | /// ``` 15 | /// {@end-tool} 16 | const RowSpacer({ 17 | Key? key, 18 | required this.children, 19 | this.spacerWidget = const SpacerHorizontal(8), 20 | this.crossAxisAlignment = CrossAxisAlignment.center, 21 | this.mainAxisSize = MainAxisSize.min, 22 | }) : assert( 23 | children.length > 1, 24 | 'children should be more than 1', 25 | ), 26 | super(key: key); 27 | 28 | final List children; 29 | 30 | final Widget spacerWidget; 31 | 32 | final CrossAxisAlignment crossAxisAlignment; 33 | 34 | final MainAxisSize mainAxisSize; 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | final List _spacedChildren = []; 39 | 40 | for (int i = 0; i < children.length; i++) { 41 | if (i == 0) { 42 | _spacedChildren.add(children[i]); 43 | } else if (i == children.length - 1) { 44 | _spacedChildren.add(spacerWidget); 45 | _spacedChildren.add(children[i]); 46 | } else { 47 | _spacedChildren.add(spacerWidget); 48 | _spacedChildren.add(children[i]); 49 | } 50 | } 51 | 52 | return Row( 53 | crossAxisAlignment: crossAxisAlignment, 54 | mainAxisSize: mainAxisSize, 55 | children: _spacedChildren, 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/dynamism_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /android/screener_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /lib/fringilla/components/webview/webview.component.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async' show Completer; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | import 'package:app_theme/app_theme.dart' show AppColors; 6 | 7 | import 'package:webview_flutter/webview_flutter.dart'; 8 | 9 | class WebViewComponent extends StatefulWidget { 10 | const WebViewComponent({Key? key, required this.url}) : super(key: key); 11 | 12 | final String url; 13 | 14 | @override 15 | _WebViewComponentState createState() => _WebViewComponentState(); 16 | } 17 | 18 | class _WebViewComponentState extends State { 19 | late Completer _controller; 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | _controller = Completer(); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext context) { 29 | return Scaffold( 30 | appBar: AppBar( 31 | backgroundColor: AppColors.bg, 32 | leading: IconButton( 33 | hoverColor: Colors.transparent, 34 | highlightColor: Colors.transparent, 35 | icon: const Icon(Icons.close), 36 | onPressed: () { 37 | Navigator.of(context).pop(); 38 | }, 39 | ), 40 | ), 41 | body: Builder( 42 | builder: (BuildContext context) { 43 | return WebView( 44 | initialUrl: widget.url, 45 | javascriptMode: JavascriptMode.unrestricted, 46 | onWebViewCreated: (WebViewController webViewController) { 47 | _controller.complete(webViewController); 48 | }, 49 | gestureNavigationEnabled: true, 50 | ); 51 | }, 52 | ), 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /packages/shared_components/lib/src/spacers/column_spacer.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'spacer.component.dart'; 4 | 5 | class ColumnSpacer extends StatelessWidget { 6 | /// This snippet shows O/P of [ColumnSpacer]. 7 | /// 8 | /// ```dart 9 | /// I/P : [19, 21] 10 | /// O/P : [19, 7, 21] 11 | /// 12 | /// I/P : [19, 21, 23] 13 | /// O/P : [19, 7, 21, 7, 23] 14 | /// ``` 15 | /// {@end-tool} 16 | const ColumnSpacer({ 17 | Key? key, 18 | required this.children, 19 | this.spacerWidget = const SpacerVertical(8), 20 | this.crossAxisAlignment = CrossAxisAlignment.center, 21 | this.mainAxisSize = MainAxisSize.min, 22 | }) : assert( 23 | children.length > 1, 24 | 'children should be more than 1', 25 | ), 26 | super(key: key); 27 | 28 | final CrossAxisAlignment crossAxisAlignment; 29 | 30 | final List children; 31 | 32 | final Widget spacerWidget; 33 | 34 | final MainAxisSize mainAxisSize; 35 | 36 | @override 37 | Widget build(BuildContext context) { 38 | // 39 | 40 | final List _spacedChildren = []; 41 | 42 | for (int i = 0; i < children.length; i++) { 43 | if (i == 0) { 44 | _spacedChildren.add(children[i]); 45 | } else if (i == children.length - 1) { 46 | _spacedChildren.add(spacerWidget); 47 | _spacedChildren.add(children[i]); 48 | } else { 49 | _spacedChildren.add(spacerWidget); 50 | _spacedChildren.add(children[i]); 51 | } 52 | } 53 | 54 | return Column( 55 | crossAxisAlignment: crossAxisAlignment, 56 | mainAxisSize: mainAxisSize, 57 | children: _spacedChildren, 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/shared/routes/routes.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:screener/fringilla/view/fringilla.view.dart'; 3 | 4 | import 'package:screener/home/view/home.view.dart'; 5 | import 'package:screener/pellen/view/pellen.view.dart'; 6 | 7 | class AppRoutes { 8 | AppRoutes._(); 9 | 10 | static Route generateRoute(RouteSettings settings) { 11 | switch (settings.name) { 12 | case NamedRoute.home: 13 | return MaterialPageRoute( 14 | builder: (context) => const HomeView(), 15 | settings: settings, 16 | ); 17 | 18 | case NamedRoute.pellen: 19 | return MaterialPageRoute( 20 | builder: (context) => const PellenView(), 21 | settings: settings, 22 | ); 23 | 24 | case NamedRoute.fringilla: 25 | return MaterialPageRoute( 26 | builder: (context) => const FringillaView(), 27 | settings: settings, 28 | ); 29 | 30 | default: 31 | return MaterialPageRoute( 32 | builder: (_) => _UndefinedView(name: settings.name), 33 | settings: settings, 34 | ); 35 | } 36 | } 37 | } 38 | 39 | class _UndefinedView extends StatelessWidget { 40 | const _UndefinedView({Key? key, this.name}) : super(key: key); 41 | final String? name; 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | return Scaffold( 46 | body: Center( 47 | child: Text('Something went wrong for $name'), 48 | ), 49 | ); 50 | } 51 | } 52 | 53 | class NamedRoute { 54 | NamedRoute._(); 55 | 56 | static const String home = '/'; 57 | static const String pellen = '/pellen'; 58 | static const String fringilla = '/fringilla'; 59 | } 60 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | screener 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | CADisableMinimumFrameDurationOnPhone 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /packages/shared_components/lib/src/image/image_cacher.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | 3 | import 'package:app_theme/app_theme.dart' show AppColors; 4 | 5 | import 'package:flutter/material.dart'; 6 | 7 | class ImageCacherComponent extends StatelessWidget { 8 | const ImageCacherComponent({ 9 | Key? key, 10 | required this.imageUrl, 11 | this.width = double.maxFinite, 12 | this.fit = BoxFit.fitWidth, 13 | this.height = 300, 14 | }) : super(key: key); 15 | 16 | final String imageUrl; 17 | final double height; 18 | final double width; 19 | final BoxFit fit; 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return SizedBox( 24 | width: width, 25 | height: height, 26 | child: CachedNetworkImage( 27 | imageBuilder: (context, imageProvider) => Container( 28 | decoration: BoxDecoration( 29 | image: DecorationImage( 30 | image: imageProvider, 31 | fit: fit, 32 | ), 33 | ), 34 | ), 35 | imageUrl: imageUrl, 36 | errorWidget: (context, _, __) => const _Placeholder(), 37 | placeholder: (context, _) => const _Placeholder(), 38 | fit: fit, 39 | width: width, 40 | ), 41 | ); 42 | } 43 | } 44 | 45 | class _Placeholder extends StatelessWidget { 46 | const _Placeholder({Key? key}) : super(key: key); 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | return DecoratedBox( 51 | decoration: BoxDecoration( 52 | gradient: LinearGradient( 53 | begin: Alignment.topCenter, 54 | end: Alignment.bottomCenter, 55 | colors: [AppColors.darkblue, AppColors.bg], 56 | ), 57 | ), 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /packages/app_theme/.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 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | build/ 32 | 33 | # Android related 34 | **/android/**/gradle-wrapper.jar 35 | **/android/.gradle 36 | **/android/captures/ 37 | **/android/gradlew 38 | **/android/gradlew.bat 39 | **/android/local.properties 40 | **/android/**/GeneratedPluginRegistrant.java 41 | 42 | # iOS/XCode related 43 | **/ios/**/*.mode1v3 44 | **/ios/**/*.mode2v3 45 | **/ios/**/*.moved-aside 46 | **/ios/**/*.pbxuser 47 | **/ios/**/*.perspectivev3 48 | **/ios/**/*sync/ 49 | **/ios/**/.sconsign.dblite 50 | **/ios/**/.tags* 51 | **/ios/**/.vagrant/ 52 | **/ios/**/DerivedData/ 53 | **/ios/**/Icon? 54 | **/ios/**/Pods/ 55 | **/ios/**/.symlinks/ 56 | **/ios/**/profile 57 | **/ios/**/xcuserdata 58 | **/ios/.generated/ 59 | **/ios/Flutter/App.framework 60 | **/ios/Flutter/Flutter.framework 61 | **/ios/Flutter/Flutter.podspec 62 | **/ios/Flutter/Generated.xcconfig 63 | **/ios/Flutter/app.flx 64 | **/ios/Flutter/app.zip 65 | **/ios/Flutter/flutter_assets/ 66 | **/ios/Flutter/flutter_export_environment.sh 67 | **/ios/ServiceDefinitions.json 68 | **/ios/Runner/GeneratedPluginRegistrant.* 69 | 70 | # Exceptions to above rules. 71 | !**/ios/**/default.mode1v3 72 | !**/ios/**/default.mode2v3 73 | !**/ios/**/default.pbxuser 74 | !**/ios/**/default.perspectivev3 75 | -------------------------------------------------------------------------------- /packages/shared_components/.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 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | build/ 32 | 33 | # Android related 34 | **/android/**/gradle-wrapper.jar 35 | **/android/.gradle 36 | **/android/captures/ 37 | **/android/gradlew 38 | **/android/gradlew.bat 39 | **/android/local.properties 40 | **/android/**/GeneratedPluginRegistrant.java 41 | 42 | # iOS/XCode related 43 | **/ios/**/*.mode1v3 44 | **/ios/**/*.mode2v3 45 | **/ios/**/*.moved-aside 46 | **/ios/**/*.pbxuser 47 | **/ios/**/*.perspectivev3 48 | **/ios/**/*sync/ 49 | **/ios/**/.sconsign.dblite 50 | **/ios/**/.tags* 51 | **/ios/**/.vagrant/ 52 | **/ios/**/DerivedData/ 53 | **/ios/**/Icon? 54 | **/ios/**/Pods/ 55 | **/ios/**/.symlinks/ 56 | **/ios/**/profile 57 | **/ios/**/xcuserdata 58 | **/ios/.generated/ 59 | **/ios/Flutter/App.framework 60 | **/ios/Flutter/Flutter.framework 61 | **/ios/Flutter/Flutter.podspec 62 | **/ios/Flutter/Generated.xcconfig 63 | **/ios/Flutter/app.flx 64 | **/ios/Flutter/app.zip 65 | **/ios/Flutter/flutter_assets/ 66 | **/ios/Flutter/flutter_export_environment.sh 67 | **/ios/ServiceDefinitions.json 68 | **/ios/Runner/GeneratedPluginRegistrant.* 69 | 70 | # Exceptions to above rules. 71 | !**/ios/**/default.mode1v3 72 | !**/ios/**/default.mode2v3 73 | !**/ios/**/default.pbxuser 74 | !**/ios/**/default.perspectivev3 75 | 76 | **/failures/*.png -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_theme/app_theme.dart' show AppTheme; 2 | import 'package:flutter/material.dart'; 3 | import 'package:provider/provider.dart'; 4 | import 'package:screener/fringilla/repository/fringilla_repo.dart'; 5 | import 'package:screener/fringilla/view_models/fringilla.viewmodel.dart'; 6 | import 'package:screener/home/repository/home_repo.dart'; 7 | import 'package:screener/pellen/repository/pellen_repo.dart'; 8 | import 'package:screener/pellen/view_models/pellen.viewmodel.dart'; 9 | 10 | import 'home/view_models/home.viewmodel.dart'; 11 | import 'locator.dart'; 12 | import 'shared/routes/routes.dart'; 13 | import 'shared/services/navigation.service.dart'; 14 | 15 | Future main() async { 16 | WidgetsFlutterBinding.ensureInitialized(); 17 | 18 | // INIT SERVICE LOCATOR 19 | setupLocator(); 20 | 21 | runApp( 22 | MultiProvider( 23 | providers: [ 24 | ChangeNotifierProvider( 25 | create: (_) => HomeViewModel(repo: locator()), 26 | ), 27 | ChangeNotifierProvider.value( 28 | value: PellenViewModel(repo: locator()), 29 | ), 30 | ChangeNotifierProvider( 31 | create: (_) => FringillaViewModel(repo: locator()), 32 | ), 33 | ], 34 | child: MainApp(), 35 | ), 36 | ); 37 | } 38 | 39 | class MainApp extends StatefulWidget { 40 | @override 41 | _MainAppState createState() => _MainAppState(); 42 | } 43 | 44 | class _MainAppState extends State { 45 | final navigatorService = locator(); 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | return MaterialApp( 50 | debugShowCheckedModeBanner: false, 51 | navigatorKey: navigatorService.rootNavKey, 52 | title: 'Screener', 53 | onGenerateRoute: AppRoutes.generateRoute, 54 | theme: AppTheme.theme, 55 | ); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /integration_test/robots/thirdscreen_robot.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/material.dart'; 5 | import 'package:flutter_test/flutter_test.dart'; 6 | import 'package:screener/fringilla/utils/strings.dart'; 7 | 8 | class ThirdScreenRobot { 9 | const ThirdScreenRobot(this.tester); 10 | 11 | final WidgetTester tester; 12 | 13 | Future findTitle() async { 14 | await tester.pumpAndSettle(); 15 | expect(find.text(FringillaStrings.title), findsOneWidget); 16 | sleep(const Duration(seconds: 2)); 17 | } 18 | 19 | Future goBack() async { 20 | final closeIconFinder = find.byIcon(Icons.close); 21 | await tester.tap(closeIconFinder); 22 | await tester.pumpAndSettle(); 23 | sleep(const Duration(seconds: 1)); 24 | 25 | await tester.pageBack(); 26 | await tester.pumpAndSettle(); 27 | sleep(const Duration(seconds: 2)); 28 | } 29 | 30 | Future scrollThePage({bool scrollUp = false}) async { 31 | final listFinder = find.byKey(const Key('fringilla singleChildScrollView')); 32 | 33 | if (scrollUp) { 34 | await tester.fling(listFinder, const Offset(0, 500), 10000); 35 | await tester.pumpAndSettle(); 36 | 37 | expect(find.text(FringillaStrings.title), findsOneWidget); 38 | sleep(const Duration(seconds: 2)); 39 | } else { 40 | await tester.fling(listFinder, const Offset(0, -500), 10000); 41 | await tester.pumpAndSettle(); 42 | 43 | expect(find.text('Lorem Ipsum'), findsOneWidget); 44 | } 45 | } 46 | 47 | Future clickTile(int item) async { 48 | assert(item != null && item >= 0 && item <= 5); 49 | final key = 'fringilla_item_${item.toString()}'; 50 | 51 | final itemFinder = find.byKey(Key(key)); 52 | await tester.tap(itemFinder); 53 | await tester.pumpAndSettle(); 54 | sleep(const Duration(seconds: 2)); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /integration_test/app_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | import 'package:integration_test/integration_test.dart'; 3 | 4 | import 'package:screener/main.dart' as app; 5 | 6 | import 'robots/home_robot.dart'; 7 | import 'robots/secondscreen_robot.dart'; 8 | import 'robots/thirdscreen_robot.dart'; 9 | 10 | void main() { 11 | final binding = IntegrationTestWidgetsFlutterBinding.ensureInitialized() 12 | as IntegrationTestWidgetsFlutterBinding; 13 | 14 | HomeRobot homeRobot; 15 | SecondScreenRobot secondScreenRobot; 16 | ThirdScreenRobot thirdScreenRobot; 17 | 18 | group('e2e test', () { 19 | testWidgets('whole app', (WidgetTester tester) async { 20 | app.main(); 21 | 22 | homeRobot = HomeRobot(tester); 23 | secondScreenRobot = SecondScreenRobot(tester); 24 | thirdScreenRobot = ThirdScreenRobot(tester); 25 | 26 | // For recording perf 27 | // await tester.pumpAndSettle(); 28 | // final listFinder = find.byKey(const Key('singleChildScrollView')); 29 | // await binding.watchPerformance(() async { 30 | // await tester.fling(listFinder, const Offset(0, -500), 10000); 31 | // await tester.pumpAndSettle(); 32 | // }); 33 | await homeRobot.findTitle(); 34 | 35 | await homeRobot.scrollThePage(); 36 | 37 | await homeRobot.clickFirstButton(); 38 | await secondScreenRobot.findTitle(); 39 | await secondScreenRobot.scrollThePage(); 40 | await secondScreenRobot.scrollThePage(scrollUp: true); 41 | await secondScreenRobot.goBack(); 42 | 43 | await homeRobot.clickSecondButton(); 44 | await thirdScreenRobot.findTitle(); 45 | await thirdScreenRobot.scrollThePage(); 46 | await thirdScreenRobot.scrollThePage(scrollUp: true); 47 | await thirdScreenRobot.clickTile(2); 48 | await thirdScreenRobot.goBack(); 49 | 50 | await homeRobot.scrollThePage(scrollUp: true); 51 | }); 52 | }); 53 | } 54 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 29 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.screener" 42 | minSdkVersion 16 43 | targetSdkVersion 29 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | } 64 | -------------------------------------------------------------------------------- /integration_test/robots/home_robot.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/widgets.dart'; 4 | import 'package:flutter_test/flutter_test.dart'; 5 | 6 | import 'package:screener/home/utils/strings.dart'; 7 | 8 | class HomeRobot { 9 | const HomeRobot(this.tester); 10 | 11 | final WidgetTester tester; 12 | 13 | Future findTitle() async { 14 | await tester.pumpAndSettle(); 15 | expect(find.text(HomeStrings.title), findsOneWidget); 16 | sleep(const Duration(seconds: 2)); 17 | } 18 | 19 | Future scrollThePage({bool scrollUp = false}) async { 20 | final listFinder = find.byKey(const Key('singleChildScrollView')); 21 | 22 | if (scrollUp) { 23 | await tester.fling(listFinder, const Offset(0, 500), 10000); 24 | await tester.pumpAndSettle(); 25 | 26 | expect(find.text(HomeStrings.title), findsOneWidget); 27 | } else { 28 | await tester.fling(listFinder, const Offset(0, -500), 10000); 29 | await tester.pumpAndSettle(); 30 | 31 | expect(find.text(HomeStrings.bottom), findsOneWidget); 32 | } 33 | } 34 | 35 | Future clickFirstButton() async { 36 | final btnFinder = find.byKey(const Key(HomeStrings.bOp1)); 37 | 38 | await tester.ensureVisible(btnFinder); 39 | await tester.tap(btnFinder); 40 | 41 | await tester.pumpAndSettle(); 42 | } 43 | 44 | Future clickSecondButton() async { 45 | final btnFinder = find.byKey(const Key(HomeStrings.bOp2)); 46 | 47 | await tester.ensureVisible(btnFinder); 48 | await tester.tap(btnFinder); 49 | 50 | await tester.pumpAndSettle(); 51 | } 52 | } 53 | 54 | class FinderType extends Finder { 55 | FinderType(this.finder, this.key); 56 | 57 | final Finder finder; 58 | final Key key; 59 | 60 | @override 61 | Iterable apply(Iterable candidates) { 62 | return finder.apply(candidates); 63 | } 64 | 65 | @override 66 | String get description => finder.description; 67 | 68 | Finder get title => find.descendant(of: this, matching: find.byKey(key)); 69 | } 70 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: screener 2 | description: Sample Flutter Project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 0.0.1+1 19 | 20 | environment: 21 | sdk: ">=2.15.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | # CAROUSEL SLIDER 28 | carousel_slider: ^4.0.0 29 | 30 | # DI 31 | get_it: ^7.2.0 32 | 33 | # HTTP 34 | http: ^0.13.4 35 | 36 | # PROVIDER 37 | provider: ^6.0.2 38 | 39 | # WEBVIEW 40 | webview_flutter: ^3.0.1 41 | 42 | # TESTING 43 | mockito: ^5.1.0 44 | 45 | # INTERNAL PACKAGES 46 | shared_components: 47 | path: packages/shared_components 48 | 49 | app_theme: 50 | path: packages/app_theme 51 | 52 | dev_dependencies: 53 | flutter_test: 54 | sdk: flutter 55 | 56 | # LINTER 57 | lint: ^1.2.0 58 | 59 | build_runner: ^2.1.7 60 | 61 | integration_test: 62 | sdk: flutter 63 | 64 | flutter: 65 | uses-material-design: true 66 | 67 | assets: 68 | - assets/data/ 69 | - assets/images/ 70 | - assets/images/2.0x/ 71 | - assets/images/3.0x/ 72 | 73 | fonts: 74 | - family: Roboto 75 | fonts: 76 | - asset: assets/fonts/Roboto-Light.ttf 77 | weight: 300 78 | - asset: assets/fonts/Roboto-Regular.ttf 79 | weight: 400 80 | - asset: assets/fonts/Roboto-Medium.ttf 81 | weight: 500 82 | - asset: assets/fonts/Roboto-Bold.ttf 83 | weight: 700 84 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /packages/app_theme/lib/src/text_styles.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class TextStyles { 4 | TextStyles._(); 5 | 6 | static TextStyle get headline1 => _headline1; 7 | static TextStyle get headline2 => _headline2; 8 | static TextStyle get headline3 => _headline3; 9 | static TextStyle get headline4 => _headline4; 10 | static TextStyle get subtitle => _subtitle; 11 | static TextStyle get bodyRegular => _bodyRegular; 12 | static TextStyle get bodyBold => _bodyBold; 13 | static TextStyle get caption => _caption; 14 | static TextStyle get display => _display; 15 | 16 | static const TextStyle _headline1 = TextStyle( 17 | fontFamily: Fonts.roboto, 18 | fontWeight: FontWeight.w700, 19 | fontSize: 34, 20 | color: Colors.white, 21 | height: 36 / 34, 22 | ); 23 | 24 | static const TextStyle _headline2 = TextStyle( 25 | fontFamily: Fonts.roboto, 26 | fontWeight: FontWeight.w700, 27 | fontSize: 28, 28 | color: Colors.white, 29 | height: 30 / 28, 30 | ); 31 | 32 | static const TextStyle _headline3 = TextStyle( 33 | fontFamily: Fonts.roboto, 34 | fontWeight: FontWeight.w700, 35 | fontSize: 24, 36 | color: Colors.white, 37 | height: 26 / 24, 38 | ); 39 | 40 | static const TextStyle _headline4 = TextStyle( 41 | fontFamily: Fonts.roboto, 42 | fontWeight: FontWeight.w300, 43 | fontSize: 20, 44 | color: Colors.white, 45 | height: 23 / 20, 46 | ); 47 | 48 | static const TextStyle _subtitle = TextStyle( 49 | fontFamily: Fonts.roboto, 50 | fontWeight: FontWeight.w700, 51 | fontSize: 14, 52 | color: Colors.white, 53 | height: 14 / 14, 54 | ); 55 | 56 | static const TextStyle _bodyRegular = TextStyle( 57 | fontFamily: Fonts.roboto, 58 | fontWeight: FontWeight.w400, 59 | fontSize: 14, 60 | color: Colors.white, 61 | height: 18 / 14, 62 | ); 63 | 64 | static final TextStyle _bodyBold = _bodyRegular.copyWith( 65 | fontWeight: FontWeight.w700, 66 | color: Colors.white, 67 | ); 68 | 69 | static const TextStyle _caption = TextStyle( 70 | fontFamily: Fonts.roboto, 71 | fontWeight: FontWeight.w500, 72 | fontSize: 13, 73 | color: Colors.white, 74 | height: 14 / 13, 75 | ); 76 | 77 | static const TextStyle _display = TextStyle( 78 | fontFamily: Fonts.roboto, 79 | fontWeight: FontWeight.w300, 80 | fontSize: 56, 81 | color: Colors.white, 82 | height: 48 / 56, 83 | ); 84 | } 85 | 86 | class Fonts { 87 | Fonts._(); 88 | 89 | static const String roboto = 'Roboto'; 90 | } 91 | -------------------------------------------------------------------------------- /lib/home/components/carousel_card/carousel_card.component.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:shared_components/shared_components.dart'; 4 | 5 | import 'package:app_theme/app_theme.dart'; 6 | 7 | class CarouselCardComponent extends ImageCacherComponent { 8 | const CarouselCardComponent({ 9 | Key? key, 10 | required String imageUrl, 11 | double height = 300, 12 | double width = 300, 13 | this.text = 'Some text', 14 | this.optionTitle = 'Some title', 15 | this.optionSubtitle = 'Some sub', 16 | this.optionDesc = 'Some desc', 17 | }) : super(key: key, imageUrl: imageUrl, height: height, width: width); 18 | 19 | final String text; 20 | final String optionTitle; 21 | final String optionSubtitle; 22 | final String optionDesc; 23 | 24 | @override 25 | Widget build(BuildContext context) { 26 | return Container( 27 | width: double.maxFinite, 28 | decoration: BoxDecoration( 29 | border: Border.all(color: AppColors.cardBorder), 30 | color: AppColors.cardGrey, 31 | ), 32 | padding: const EdgeInsets.fromLTRB(22, 24, 0, 48), 33 | child: Column( 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | Text(text, style: TextStyles.display), 37 | const SpacerVertical(20), 38 | ImageCacherComponent( 39 | imageUrl: imageUrl, 40 | height: height, 41 | width: width, 42 | ), 43 | const SpacerVertical(48), 44 | _Internal( 45 | optionTitle: optionTitle, 46 | optionSubtitle: optionSubtitle, 47 | optionDesc: optionDesc, 48 | ), 49 | ], 50 | ), 51 | ); 52 | } 53 | } 54 | 55 | class _Internal extends StatelessWidget { 56 | const _Internal({ 57 | Key? key, 58 | this.optionTitle = 'Some title', 59 | this.optionSubtitle = 'Some sub', 60 | this.optionDesc = 'Some desc', 61 | }) : super(key: key); 62 | 63 | final String optionTitle; 64 | final String optionSubtitle; 65 | final String optionDesc; 66 | 67 | @override 68 | Widget build(BuildContext context) { 69 | return Column( 70 | crossAxisAlignment: CrossAxisAlignment.start, 71 | children: [ 72 | H3TextComponent(text: optionTitle), 73 | const SpacerVertical(12), 74 | Text(optionSubtitle, style: Theme.of(context).textTheme.bodyText1), 75 | const SpacerVertical(18), 76 | Text(optionDesc, style: Theme.of(context).textTheme.caption), 77 | ], 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /.flutter-plugins-dependencies: -------------------------------------------------------------------------------- 1 | {"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"integration_test","path":"/Users/aseemwangoo/flutter/packages/integration_test/","native_build":true,"dependencies":[]},{"name":"path_provider_ios","path":"/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_ios-2.0.9/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2+1/","native_build":true,"dependencies":[]},{"name":"webview_flutter_wkwebview","path":"/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_wkwebview-2.8.1/","native_build":true,"dependencies":[]}],"android":[{"name":"integration_test","path":"/Users/aseemwangoo/flutter/packages/integration_test/","native_build":true,"dependencies":[]},{"name":"path_provider_android","path":"/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_android-2.0.14/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2+1/","native_build":true,"dependencies":[]},{"name":"webview_flutter_android","path":"/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/webview_flutter_android-2.8.11/","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_macos-2.0.6/","native_build":true,"dependencies":[]},{"name":"sqflite","path":"/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-2.0.2+1/","native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_linux-2.1.7/","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"/Users/aseemwangoo/flutter/.pub-cache/hosted/pub.dartlang.org/path_provider_windows-2.1.0/","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"integration_test","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_ios","path_provider_linux","path_provider_macos","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_ios","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"sqflite","dependencies":[]},{"name":"webview_flutter","dependencies":["webview_flutter_android","webview_flutter_wkwebview"]},{"name":"webview_flutter_android","dependencies":[]},{"name":"webview_flutter_wkwebview","dependencies":[]}],"date_created":"2022-06-07 20:29:38.944917","version":"3.0.1"} -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/home/templates/carousel/carousel.template.dart: -------------------------------------------------------------------------------- 1 | import 'package:carousel_slider/carousel_slider.dart'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:shared_components/shared_components.dart'; 5 | 6 | import 'package:provider/provider.dart'; 7 | 8 | import 'package:screener/home/components/carousel_card/carousel_card.component.dart'; 9 | import 'package:screener/home/components/indicator/dot_indicator.component.dart'; 10 | import 'package:screener/home/model/carousel.model.dart'; 11 | 12 | import 'package:screener/home/utils/strings.dart'; 13 | 14 | import 'package:screener/home/view_models/home.viewmodel.dart'; 15 | 16 | class CarouselTemplate extends StatefulWidget { 17 | const CarouselTemplate({Key? key}) : super(key: key); 18 | 19 | @override 20 | _CarouselTemplateState createState() => _CarouselTemplateState(); 21 | } 22 | 23 | class _CarouselTemplateState extends State { 24 | int _current = 0; 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | final model = context.watch().homeModel; 29 | 30 | return ColumnSpacer( 31 | crossAxisAlignment: CrossAxisAlignment.start, 32 | spacerWidget: const SpacerVertical(56), 33 | children: [ 34 | Row( 35 | children: [ 36 | const H3TextComponent( 37 | text: HomeStrings.crslTitle, 38 | ), 39 | const Spacer(), 40 | ..._indicators(model), 41 | ], 42 | ), 43 | CarouselSlider( 44 | options: CarouselOptions( 45 | aspectRatio: 1, 46 | enableInfiniteScroll: false, 47 | height: 588, 48 | viewportFraction: 0.99, 49 | onPageChanged: (index, reason) { 50 | setState(() => _current = index); 51 | }, 52 | ), 53 | items: items(model), 54 | ), 55 | ], 56 | ); 57 | } 58 | 59 | List _indicators(CarouselModel model) { 60 | final list = []; 61 | 62 | for (var i = 0; i < model.items.length; i++) { 63 | list.add( 64 | DotIndicatorComponent(isSelected: _current == i), 65 | ); 66 | } 67 | 68 | return list; 69 | } 70 | 71 | List items(CarouselModel model) { 72 | final list = []; 73 | 74 | for (var i = 0; i < model.items.length; i++) { 75 | final item = model.items[i]; 76 | 77 | if (i == model.items.length - 1) { 78 | list.add( 79 | CarouselCardComponent( 80 | imageUrl: item.imageUrl!, 81 | text: item.header!, 82 | optionTitle: item.title!, 83 | optionSubtitle: item.subtitle!, 84 | optionDesc: item.desc!, 85 | ), 86 | ); 87 | } else { 88 | list.add( 89 | Padding( 90 | padding: const EdgeInsets.only(right: 12), 91 | child: CarouselCardComponent( 92 | imageUrl: item.imageUrl!, 93 | text: item.header!, 94 | optionTitle: item.title!, 95 | optionSubtitle: item.subtitle!, 96 | optionDesc: item.desc!, 97 | ), 98 | ), 99 | ); 100 | } 101 | } 102 | 103 | return list; 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 64 | 65 | 71 | 73 | 79 | 80 | 81 | 82 | 84 | 85 | 88 | 89 | 90 | -------------------------------------------------------------------------------- /lib/fringilla/view/fringilla.view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | import 'package:screener/fringilla/components/button/button.component.dart'; 4 | import 'package:screener/fringilla/components/card/card.component.dart'; 5 | import 'package:screener/fringilla/components/webview/webview.component.dart'; 6 | import 'package:screener/fringilla/utils/strings.dart'; 7 | import 'package:screener/fringilla/view_models/fringilla.viewmodel.dart'; 8 | import 'package:screener/shared/services/navigation.service.dart'; 9 | import 'package:shared_components/shared_components.dart'; 10 | 11 | import '../../locator.dart'; 12 | 13 | class FringillaView extends StatefulWidget { 14 | const FringillaView({Key? key}) : super(key: key); 15 | 16 | @override 17 | State createState() => _FringillaViewState(); 18 | } 19 | 20 | class _FringillaViewState extends State { 21 | late FringillaViewModel viewModel; 22 | 23 | @override 24 | void initState() { 25 | super.initState(); 26 | viewModel = Provider.of(context, listen: false); 27 | 28 | WidgetsBinding.instance?.addPostFrameCallback((_) { 29 | viewModel.fetchData(); 30 | }); 31 | } 32 | 33 | @override 34 | Widget build(BuildContext context) { 35 | return Consumer( 36 | builder: (_, model, child) { 37 | if (model.isLoading) { 38 | return child ?? const SizedBox(); 39 | } 40 | 41 | return CustomScaffold( 42 | child: SingleChildScrollView( 43 | key: const Key('fringilla singleChildScrollView'), 44 | padding: const EdgeInsets.only(top: 20), 45 | child: Column( 46 | crossAxisAlignment: CrossAxisAlignment.start, 47 | children: [ 48 | const H3TextComponent( 49 | text: FringillaStrings.title, 50 | ), 51 | const SpacerVertical(20), 52 | Text( 53 | FringillaStrings.subtitle, 54 | style: Theme.of(context).textTheme.bodyText1, 55 | ), 56 | const SpacerVertical(40), 57 | const _Items(), 58 | const SpacerVertical(20), 59 | ButtonComponent( 60 | onPressed: () {}, 61 | ), 62 | const SpacerVertical(20), 63 | ], 64 | ), 65 | ), 66 | ); 67 | }, 68 | child: LoadingComponent(), 69 | ); 70 | } 71 | } 72 | 73 | class _Items extends StatelessWidget { 74 | const _Items({Key? key}) : super(key: key); 75 | 76 | @override 77 | Widget build(BuildContext context) { 78 | final model = Provider.of(context).model; 79 | final navService = locator(); 80 | 81 | return ListView.builder( 82 | physics: const NeverScrollableScrollPhysics(), 83 | itemCount: model.items.length, 84 | itemBuilder: (_, int i) { 85 | return Padding( 86 | key: Key('fringilla_item_$i'), 87 | padding: const EdgeInsets.only(bottom: 16), 88 | child: CardComponent( 89 | onPressed: () { 90 | navService.nav.push(MaterialPageRoute( 91 | builder: (_) => WebViewComponent(url: model.items[i].urlLink!), 92 | )); 93 | }, 94 | text: model.items[i].description!, 95 | ), 96 | ); 97 | }, 98 | shrinkWrap: true, 99 | ); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # screener 2 | - This is a sample application. 3 | - Uses MVVM pattern 4 | - Tries to encourage the use of boundaries (by using the concept of packages) 5 | 6 | ### Getting Started 🎯🎯 7 | 8 | - Download the repo 9 | - Make sure you are on the Flutter Stable Channel (1.22.6) 10 | 11 | ```dart 12 | flutter channel stable 13 | flutter upgrade 14 | 15 | ``` 16 | 17 | - Install dependencies, when asked, after downloading the project. 18 | - Run the cmd 19 | 20 | ```dart 21 | flutter run 22 | 23 | ``` 24 | 25 | - You should see the app working at this point.. 26 | 27 | ### Architecture 🏗🏗 28 | 29 | - The app follows MVVM approach 30 | - Their is a shared folder, which comprises of all the common entities. 31 | - Common entites like assets, extensions, services etc 32 | 33 | - Take a folder, let's say home 34 | - It is broken down into components, models, utils (utilties if any), view and view_models 35 | 36 | - Let's discuss each of them 37 | 38 | ### Components 39 | - They contain the building blocks of UI. 40 | - A UI may comprise of a button, or card, or a list. 41 | - All these items are created under their respective folders 42 | - Let's say for a list component, 43 | 44 | ```dart 45 | home/components/list/xyz.component.dart 46 | 47 | ``` 48 | 49 | ### Model (from MVVM) 50 | - They are usually simple classes 51 | - For instance, let's take home 52 | - It would contain models folder, including all the models needed for home 53 | 54 | ```dart 55 | home/models/xyz.model.dart 56 | 57 | ``` 58 | 59 | ### View (from MVVM) 60 | - These are the screens visible to the user on their device. 61 | - For instance, home would have views folder 62 | 63 | ```dart 64 | home/view/xyz.view.dart 65 | 66 | ``` 67 | 68 | - We have 3 views 69 | 1. HomeView. Now home has 2 options (Egestas scleri) and (Consectur) 70 | 2. On click of Egestas scleri, you see the PellenView 71 | 3. On click of Consectur, you see the FringillaView 72 | 73 | 74 | ### Templates 75 | - They are some cases, when a view has a piece of UI, that is somewhat big. 76 | - We extract those bits of UI, into the templates 77 | 78 | - Let's say for the home view, we have a template as, 79 | 80 | ```dart 81 | home/templates/carousel/xyz.template.dart 82 | 83 | ``` 84 | 85 | ### ViewModel (from MVVM) 86 | - They help in transforming the data into models. 87 | - For instance, home would have view_models folder 88 | 89 | ```dart 90 | home/view_models/xyz.viewmodel.dart 91 | 92 | ``` 93 | 94 | ### Utils 95 | - Any additional helpers or strings are put inside the utils 96 | - For instance, home would have utils folder, containing all the strings needed 97 | 98 | ```dart 99 | home/utils/strings.dart 100 | 101 | ``` 102 | 103 | ### Shared 104 | - Their is a folder called shared, which includes all the common entities inside the app 105 | 106 | - For instance, all the styles, colors are placed under styles 107 | 108 | ```dart 109 | shared/styles/xyz.dart 110 | 111 | ``` 112 | 113 | - For instance, all the services are placed under the services folder 114 | 115 | ```dart 116 | shared/services/xyz.service.dart 117 | 118 | ``` 119 | 120 | ### Data 121 | - Sample data files are put inside the assets 122 | - When needed they are fetched within the app. 123 | 124 | ### Testing 🧐🧐 125 | - Uses golden tests `https://pub.dev/packages/golden_toolkit` 126 | - Integration tests 127 | 128 | ``` 129 | flutter drive \ 130 | --driver=test_driver/integration_test.dart \ 131 | --target=integration_test/app_test.dart 132 | ``` 133 | 134 | ``` 135 | flutter drive \ 136 | --driver=test_driver/integration_test.dart \ 137 | --target=integration_test/app_test.dart 138 | -d "9B4DC39F-5419-4B26-9330-0B72FE14E15E" 139 | ``` -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | dynamism 27 | 28 | 29 | 30 | 33 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /lib/pellen/view/pellen.view.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:provider/provider.dart'; 3 | 4 | import 'package:shared_components/shared_components.dart'; 5 | 6 | import 'package:screener/pellen/utils/strings.dart'; 7 | import 'package:screener/pellen/view_models/pellen.viewmodel.dart'; 8 | 9 | import '../components/row_with_number/numbered_row.component.dart'; 10 | 11 | class PellenView extends StatelessWidget { 12 | const PellenView({Key? key}) : super(key: key); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return CustomScaffold( 17 | child: SingleChildScrollView( 18 | key: const Key('pellen singleChildScrollView'), 19 | padding: const EdgeInsets.only(top: 20), 20 | child: Column( 21 | crossAxisAlignment: CrossAxisAlignment.start, 22 | children: [ 23 | const H3TextComponent( 24 | text: PellenStrings.title, 25 | ), 26 | const SpacerVertical(20), 27 | Text( 28 | PellenStrings.subtitle, 29 | style: Theme.of(context).textTheme.bodyText1, 30 | ), 31 | const SpacerVertical(28), 32 | const _SectionOne(), 33 | const SpacerVertical(64), 34 | const _SectionTwo(), 35 | const SpacerVertical(32), 36 | ], 37 | ), 38 | ), 39 | ); 40 | } 41 | } 42 | 43 | class _SectionOne extends StatelessWidget { 44 | const _SectionOne({Key? key}) : super(key: key); 45 | 46 | @override 47 | Widget build(BuildContext context) { 48 | final model = Provider.of(context); 49 | 50 | return ColumnSpacer( 51 | spacerWidget: const SpacerVertical(50), 52 | children: [ 53 | ImageComponent( 54 | assetName: model.topSection().first.url, 55 | ), 56 | ListView.builder( 57 | physics: const NeverScrollableScrollPhysics(), 58 | itemBuilder: (_, int i) { 59 | final items = model.topSection().first.text.length; 60 | 61 | if (i == items - 1) { 62 | return NumberedRowComponent( 63 | number: i + 1, 64 | text: model.topSection().first.text[i], 65 | ); 66 | } 67 | 68 | return Padding( 69 | padding: const EdgeInsets.only(bottom: 20), 70 | child: NumberedRowComponent( 71 | number: i + 1, 72 | text: model.topSection().first.text[i], 73 | ), 74 | ); 75 | }, 76 | itemCount: model.topSection().first.text.length, 77 | shrinkWrap: true, 78 | ), 79 | ], 80 | ); 81 | } 82 | } 83 | 84 | class _SectionTwo extends StatelessWidget { 85 | const _SectionTwo({Key? key}) : super(key: key); 86 | 87 | @override 88 | Widget build(BuildContext context) { 89 | final model = Provider.of(context); 90 | 91 | return Column( 92 | children: [ 93 | ImageComponent(assetName: model.bottomSection().first.url), 94 | const SpacerVertical(44), 95 | ListView.builder( 96 | physics: const NeverScrollableScrollPhysics(), 97 | itemBuilder: (_, int i) { 98 | final items = model.bottomSection().first.text.length; 99 | 100 | if (i == items - 1) { 101 | return NumberedRowComponent( 102 | number: i + 1, 103 | text: model.bottomSection().first.text[i], 104 | ); 105 | } 106 | 107 | return Padding( 108 | padding: const EdgeInsets.only(bottom: 20), 109 | child: NumberedRowComponent( 110 | number: i + 1, 111 | text: model.bottomSection().first.text[i], 112 | ), 113 | ); 114 | }, 115 | itemCount: model.bottomSection().first.text.length, 116 | shrinkWrap: true, 117 | ), 118 | ], 119 | ); 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /lib/home/view/home.view.dart: -------------------------------------------------------------------------------- 1 | import 'package:app_theme/app_theme.dart' show AppColors; 2 | import 'package:flutter/material.dart'; 3 | import 'package:provider/provider.dart'; 4 | import 'package:screener/home/components/list/list.component.dart'; 5 | import 'package:screener/home/templates/carousel/carousel.template.dart'; 6 | import 'package:screener/home/utils/strings.dart'; 7 | import 'package:screener/home/view_models/home.viewmodel.dart'; 8 | import 'package:screener/locator.dart'; 9 | import 'package:screener/shared/assets/image.assets.dart'; 10 | import 'package:screener/shared/routes/routes.dart'; 11 | import 'package:screener/shared/services/navigation.service.dart'; 12 | import 'package:shared_components/shared_components.dart'; 13 | 14 | class HomeView extends StatefulWidget { 15 | const HomeView({Key? key}) : super(key: key); 16 | 17 | @override 18 | State createState() => _HomeViewState(); 19 | } 20 | 21 | class _HomeViewState extends State { 22 | late HomeViewModel viewModel; 23 | 24 | @override 25 | void initState() { 26 | viewModel = Provider.of(context, listen: false); 27 | 28 | WidgetsBinding.instance?.addPostFrameCallback((_) { 29 | viewModel.fetchData(); 30 | }); 31 | super.initState(); 32 | } 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return Consumer( 37 | builder: (_, model, child) { 38 | if (model.isLoading) { 39 | return child ?? const SizedBox(); 40 | } 41 | 42 | return CustomScaffold( 43 | enableGutter: false, 44 | child: SingleChildScrollView( 45 | key: const Key('singleChildScrollView'), 46 | padding: const EdgeInsets.only(top: 20), 47 | child: Column( 48 | crossAxisAlignment: CrossAxisAlignment.start, 49 | children: const [ 50 | SpacerVertical(20), 51 | Padding( 52 | padding: EdgeInsets.symmetric(horizontal: 24), 53 | child: _Intro(), 54 | ), 55 | SpacerVertical(32), 56 | Padding( 57 | padding: EdgeInsets.only(left: 24), 58 | child: CarouselTemplate(), 59 | ), 60 | SpacerVertical(64), 61 | Padding( 62 | key: Key('desiredContainer'), 63 | padding: EdgeInsets.symmetric(horizontal: 24), 64 | child: _Bottom(), 65 | ), 66 | SpacerVertical(32), 67 | ], 68 | ), 69 | ), 70 | ); 71 | }, 72 | child: LoadingComponent(), 73 | ); 74 | } 75 | } 76 | 77 | class _Intro extends StatelessWidget { 78 | const _Intro({Key? key}) : super(key: key); 79 | 80 | @override 81 | Widget build(BuildContext context) { 82 | return Column( 83 | crossAxisAlignment: CrossAxisAlignment.start, 84 | children: [ 85 | const H3TextComponent( 86 | text: HomeStrings.title, 87 | ), 88 | const SpacerVertical(16), 89 | Text( 90 | HomeStrings.nam, 91 | style: Theme.of(context) 92 | .textTheme 93 | .caption! 94 | .copyWith(color: AppColors.textGrey), 95 | ), 96 | const SpacerVertical(8), 97 | Row( 98 | children: [ 99 | Text( 100 | HomeStrings.euismod, 101 | style: Theme.of(context).textTheme.bodyText2, 102 | ), 103 | const Spacer(), 104 | const Icon( 105 | Icons.edit_outlined, 106 | color: Colors.white, 107 | ), 108 | ], 109 | ), 110 | const SpacerVertical(24), 111 | ImageComponent( 112 | assetName: ImageAssets.img300.assetName, 113 | height: 300, 114 | ), 115 | ], 116 | ); 117 | } 118 | } 119 | 120 | class _Bottom extends StatelessWidget { 121 | const _Bottom({Key? key}) : super(key: key); 122 | 123 | @override 124 | Widget build(BuildContext context) { 125 | final navService = locator(); 126 | 127 | return ColumnSpacer( 128 | crossAxisAlignment: CrossAxisAlignment.start, 129 | spacerWidget: const SpacerVertical(16), 130 | children: [ 131 | Text( 132 | HomeStrings.bottom, 133 | style: Theme.of(context).textTheme.headline3, 134 | ), 135 | Text( 136 | HomeStrings.bottomDesc, 137 | style: Theme.of(context).textTheme.caption, 138 | ), 139 | ListComponent( 140 | key: const Key(HomeStrings.bOp1), 141 | onPressed: () { 142 | navService.nav.pushNamed(NamedRoute.pellen); 143 | }, 144 | text: HomeStrings.bOp1, 145 | ), 146 | ListComponent( 147 | key: const Key(HomeStrings.bOp2), 148 | onPressed: () { 149 | navService.nav.pushNamed(NamedRoute.fringilla); 150 | }, 151 | text: HomeStrings.bOp2, 152 | ), 153 | ], 154 | ); 155 | } 156 | } 157 | -------------------------------------------------------------------------------- /macos/Runner/Base.lproj/MainMenu.xib: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 264 | 265 | 266 | 267 | 268 | 269 | 270 | 271 | 272 | 273 | 274 | 275 | 276 | 277 | 278 | 279 | 280 | 281 | 282 | 283 | 284 | 285 | 286 | 287 | 288 | 289 | 290 | 291 | 292 | 293 | 294 | 295 | 296 | 297 | 298 | 299 | 300 | 301 | 302 | 303 | 304 | 305 | 306 | 307 | 308 | 309 | 310 | 311 | 312 | 313 | 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 323 | 324 | 325 | 326 | 327 | 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | --------------------------------------------------------------------------------