diff --git a/README.md b/README.md deleted file mode 100644 index c84ea1e..0000000 --- a/README.md +++ /dev/null @@ -1,16 +0,0 @@ -# golek_flutter_new - -A new GolekTruk Flutter project. - -## Getting Started - -This project is a starting point for a Flutter application. - -A few resources to get you started if this is your first Flutter project: - -- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) -- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) - -For help getting started with Flutter development, view the -[online documentation](https://docs.flutter.dev/), which offers tutorials, -samples, guidance on mobile development, and a full API reference. diff --git a/l10n.yaml b/l10n.yaml new file mode 100644 index 0000000..657c287 --- /dev/null +++ b/l10n.yaml @@ -0,0 +1,5 @@ +arb-dir: lib/l10n +template-arb-file: messages_en.arb +#output-localization-file: app_localizations.dart +synthetic-package: false +nullable-getter: false \ No newline at end of file diff --git a/lib/l10n/app_localizations.dart b/lib/l10n/app_localizations.dart new file mode 100644 index 0000000..e47fb9f --- /dev/null +++ b/lib/l10n/app_localizations.dart @@ -0,0 +1,139 @@ +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:intl/intl.dart' as intl; + +import 'app_localizations_en.dart'; +import 'app_localizations_pt.dart'; + +/// Callers can lookup localized strings with an instance of AppLocalizations +/// returned by `AppLocalizations.of(context)`. +/// +/// Applications need to include `AppLocalizations.delegate()` in their app's +/// `localizationDelegates` list, and the locales they support in the app's +/// `supportedLocales` list. For example: +/// +/// ```dart +/// import 'l10n/app_localizations.dart'; +/// +/// return MaterialApp( +/// localizationsDelegates: AppLocalizations.localizationsDelegates, +/// supportedLocales: AppLocalizations.supportedLocales, +/// home: MyApplicationHome(), +/// ); +/// ``` +/// +/// ## Update pubspec.yaml +/// +/// Please make sure to update your pubspec.yaml to include the following +/// packages: +/// +/// ```yaml +/// dependencies: +/// # Internationalization support. +/// flutter_localizations: +/// sdk: flutter +/// intl: any # Use the pinned version from flutter_localizations +/// +/// # Rest of dependencies +/// ``` +/// +/// ## iOS Applications +/// +/// iOS applications define key application metadata, including supported +/// locales, in an Info.plist file that is built into the application bundle. +/// To configure the locales supported by your app, you’ll need to edit this +/// file. +/// +/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file. +/// Then, in the Project Navigator, open the Info.plist file under the Runner +/// project’s Runner folder. +/// +/// Next, select the Information Property List item, select Add Item from the +/// Editor menu, then select Localizations from the pop-up menu. +/// +/// Select and expand the newly-created Localizations item then, for each +/// locale your application supports, add a new item and select the locale +/// you wish to add from the pop-up menu in the Value field. This list should +/// be consistent with the languages listed in the AppLocalizations.supportedLocales +/// property. +abstract class AppLocalizations { + AppLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString()); + + final String localeName; + + static AppLocalizations of(BuildContext context) { + return Localizations.of(context, AppLocalizations)!; + } + + static const LocalizationsDelegate delegate = _AppLocalizationsDelegate(); + + /// A list of this localizations delegate along with the default localizations + /// delegates. + /// + /// Returns a list of localizations delegates containing this delegate along with + /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, + /// and GlobalWidgetsLocalizations.delegate. + /// + /// Additional delegates can be added by appending to this list in + /// MaterialApp. This list does not have to be used at all if a custom list + /// of delegates is preferred or required. + static const List> localizationsDelegates = >[ + delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ]; + + /// A list of this localizations delegate's supported locales. + static const List supportedLocales = [ + Locale('en'), + Locale('pt') + ]; + + /// No description provided for @quotesBottomNavigationBarItemLabel. + /// + /// In en, this message translates to: + /// **'Quotes'** + String get quotesBottomNavigationBarItemLabel; + + /// No description provided for @profileBottomNavigationBarItemLabel. + /// + /// In en, this message translates to: + /// **'Profile'** + String get profileBottomNavigationBarItemLabel; +} + +class _AppLocalizationsDelegate extends LocalizationsDelegate { + const _AppLocalizationsDelegate(); + + @override + Future load(Locale locale) { + return SynchronousFuture(lookupAppLocalizations(locale)); + } + + @override + bool isSupported(Locale locale) => ['en', 'pt'].contains(locale.languageCode); + + @override + bool shouldReload(_AppLocalizationsDelegate old) => false; +} + +AppLocalizations lookupAppLocalizations(Locale locale) { + + + // Lookup logic when only language code is specified. + switch (locale.languageCode) { + case 'en': return AppLocalizationsEn(); + case 'pt': return AppLocalizationsPt(); + } + + throw FlutterError( + 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' + 'an issue with the localizations generation tool. Please file an issue ' + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' + 'that was used.' + ); +} diff --git a/lib/l10n/app_localizations_en.dart b/lib/l10n/app_localizations_en.dart new file mode 100644 index 0000000..33a3ea9 --- /dev/null +++ b/lib/l10n/app_localizations_en.dart @@ -0,0 +1,12 @@ +import 'app_localizations.dart'; + +/// The translations for English (`en`). +class AppLocalizationsEn extends AppLocalizations { + AppLocalizationsEn([String locale = 'en']) : super(locale); + + @override + String get quotesBottomNavigationBarItemLabel => 'Quotes'; + + @override + String get profileBottomNavigationBarItemLabel => 'Profile'; +} diff --git a/lib/l10n/app_localizations_pt.dart b/lib/l10n/app_localizations_pt.dart new file mode 100644 index 0000000..858f588 --- /dev/null +++ b/lib/l10n/app_localizations_pt.dart @@ -0,0 +1,12 @@ +import 'app_localizations.dart'; + +/// The translations for Portuguese (`pt`). +class AppLocalizationsPt extends AppLocalizations { + AppLocalizationsPt([String locale = 'pt']) : super(locale); + + @override + String get quotesBottomNavigationBarItemLabel => 'Frases'; + + @override + String get profileBottomNavigationBarItemLabel => 'Perfil'; +} diff --git a/lib/l10n/messages_en.arb b/lib/l10n/messages_en.arb new file mode 100644 index 0000000..093b3e7 --- /dev/null +++ b/lib/l10n/messages_en.arb @@ -0,0 +1,4 @@ +{ + "quotesBottomNavigationBarItemLabel": "Quotes", + "profileBottomNavigationBarItemLabel": "Profile" +} \ No newline at end of file diff --git a/lib/l10n/messages_pt.arb b/lib/l10n/messages_pt.arb new file mode 100644 index 0000000..910c91a --- /dev/null +++ b/lib/l10n/messages_pt.arb @@ -0,0 +1,4 @@ +{ + "quotesBottomNavigationBarItemLabel": "Frases", + "profileBottomNavigationBarItemLabel": "Perfil" +} \ No newline at end of file diff --git a/makefile b/makefile index dd578f0..8ec612b 100644 --- a/makefile +++ b/makefile @@ -2,6 +2,16 @@ PACKAGES := $(wildcard packages/*) FEATURES := $(wildcard packages/features/*) BUILD-RUNNER := packages/fav_qs_api packages/key_value_storage +intl: + flutter gen-l10n + for feature in $(FEATURES); do \ + cd $${feature} ; \ + echo "Generate localization on $${feature}" ; \ + flutter gen-l10n ; \ + cd ../../../ ; \ + done + + print: for feature in $(FEATURES); do \ echo $${feature} ; \ diff --git a/packages/component_library/.gitignore b/packages/component_library/.gitignore deleted file mode 100644 index 3c8a157..0000000 --- a/packages/component_library/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Files and directories created by pub. -.dart_tool/ -.packages - -# Conventional directory for build output. -build/ diff --git a/packages/component_library/CHANGELOG.md b/packages/component_library/CHANGELOG.md deleted file mode 100644 index effe43c..0000000 --- a/packages/component_library/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.0 - -- Initial version. diff --git a/packages/component_library/README.md b/packages/component_library/README.md deleted file mode 100644 index 3816eca..0000000 --- a/packages/component_library/README.md +++ /dev/null @@ -1,2 +0,0 @@ -A sample command-line application with an entrypoint in `bin/`, library code -in `lib/`, and example unit test in `test/`. diff --git a/packages/component_library/analysis_options.yaml b/packages/component_library/analysis_options.yaml index dee8927..a3be6b8 100644 --- a/packages/component_library/analysis_options.yaml +++ b/packages/component_library/analysis_options.yaml @@ -1,30 +1 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. - -include: package:lints/recommended.yaml - -# Uncomment the following section to specify additional rules. - -# linter: -# rules: -# - camel_case_types - -# analyzer: -# exclude: -# - path/to/excluded/files/** - -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options +include: package:flutter_lints/flutter.yaml \ No newline at end of file diff --git a/packages/component_library/assets/Fondamento-Regular.ttf b/packages/component_library/assets/Fondamento-Regular.ttf new file mode 100644 index 0000000..d0489b2 Binary files /dev/null and b/packages/component_library/assets/Fondamento-Regular.ttf differ diff --git a/packages/component_library/assets/closing-quote.svg b/packages/component_library/assets/closing-quote.svg new file mode 100644 index 0000000..dabb238 --- /dev/null +++ b/packages/component_library/assets/closing-quote.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/component_library/assets/opening-quote.svg b/packages/component_library/assets/opening-quote.svg new file mode 100644 index 0000000..c32e06d --- /dev/null +++ b/packages/component_library/assets/opening-quote.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/packages/component_library/bin/component_library.dart b/packages/component_library/bin/component_library.dart deleted file mode 100644 index 4b6e8b7..0000000 --- a/packages/component_library/bin/component_library.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'package:component_library/component_library.dart' as component_library; - -void main(List arguments) { - print('Hello world: ${component_library.calculate()}!'); -} diff --git a/packages/component_library/example/.gitignore b/packages/component_library/example/.gitignore new file mode 100644 index 0000000..0fa6b67 --- /dev/null +++ b/packages/component_library/example/.gitignore @@ -0,0 +1,46 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.packages +.pub-cache/ +.pub/ +/build/ + +# Web related +lib/generated_plugin_registrant.dart + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/packages/component_library/example/.metadata b/packages/component_library/example/.metadata new file mode 100644 index 0000000..e27f5cc --- /dev/null +++ b/packages/component_library/example/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled. + +version: + revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + channel: stable + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + - platform: android + create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + - platform: ios + create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + - platform: linux + create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + - platform: macos + create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + - platform: web + create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + - platform: windows + create_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + base_revision: e3c29ec00c9c825c891d75054c63fcc46454dca1 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/packages/component_library/example/README.md b/packages/component_library/example/README.md new file mode 100644 index 0000000..a135626 --- /dev/null +++ b/packages/component_library/example/README.md @@ -0,0 +1,16 @@ +# example + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) + +For help getting started with Flutter, view our +[online documentation](https://flutter.dev/docs), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/packages/component_library/example/analysis_options.yaml b/packages/component_library/example/analysis_options.yaml new file mode 100644 index 0000000..a3be6b8 --- /dev/null +++ b/packages/component_library/example/analysis_options.yaml @@ -0,0 +1 @@ +include: package:flutter_lints/flutter.yaml \ No newline at end of file diff --git a/packages/component_library/example/android/.gitignore b/packages/component_library/example/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/packages/component_library/example/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/packages/component_library/example/android/app/build.gradle b/packages/component_library/example/android/app/build.gradle new file mode 100644 index 0000000..0833ecf --- /dev/null +++ b/packages/component_library/example/android/app/build.gradle @@ -0,0 +1,71 @@ +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterRoot = localProperties.getProperty('flutter.sdk') +if (flutterRoot == null) { + throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +apply plugin: 'com.android.application' +apply plugin: 'kotlin-android' +apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" + +android { + compileSdkVersion flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.example" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies { + implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" +} diff --git a/packages/component_library/example/android/app/src/debug/AndroidManifest.xml b/packages/component_library/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..45d523a --- /dev/null +++ b/packages/component_library/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/packages/component_library/example/android/app/src/main/AndroidManifest.xml b/packages/component_library/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..3f41384 --- /dev/null +++ b/packages/component_library/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/packages/component_library/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/packages/component_library/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt new file mode 100644 index 0000000..e793a00 --- /dev/null +++ b/packages/component_library/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt @@ -0,0 +1,6 @@ +package com.example.example + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() { +} diff --git a/packages/component_library/example/android/app/src/main/res/drawable-v21/launch_background.xml b/packages/component_library/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/packages/component_library/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/component_library/example/android/app/src/main/res/drawable/launch_background.xml b/packages/component_library/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/packages/component_library/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/packages/component_library/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/packages/component_library/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/packages/component_library/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/packages/component_library/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/packages/component_library/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/packages/component_library/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/packages/component_library/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/packages/component_library/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/packages/component_library/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/packages/component_library/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/packages/component_library/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/packages/component_library/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/packages/component_library/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/packages/component_library/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/packages/component_library/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/packages/component_library/example/android/app/src/main/res/values-night/styles.xml b/packages/component_library/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/packages/component_library/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/component_library/example/android/app/src/main/res/values/styles.xml b/packages/component_library/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/packages/component_library/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/packages/component_library/example/android/app/src/profile/AndroidManifest.xml b/packages/component_library/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..45d523a --- /dev/null +++ b/packages/component_library/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/packages/component_library/example/android/build.gradle b/packages/component_library/example/android/build.gradle new file mode 100644 index 0000000..83ae220 --- /dev/null +++ b/packages/component_library/example/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.6.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.1.2' + classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" + } +} + +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +task clean(type: Delete) { + delete rootProject.buildDir +} diff --git a/packages/component_library/example/android/gradle.properties b/packages/component_library/example/android/gradle.properties new file mode 100644 index 0000000..94adc3a --- /dev/null +++ b/packages/component_library/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/packages/component_library/example/android/gradle/wrapper/gradle-wrapper.properties b/packages/component_library/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..cb24abd --- /dev/null +++ b/packages/component_library/example/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip diff --git a/packages/component_library/example/android/settings.gradle b/packages/component_library/example/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/packages/component_library/example/android/settings.gradle @@ -0,0 +1,11 @@ +include ':app' + +def localPropertiesFile = new File(rootProject.projectDir, "local.properties") +def properties = new Properties() + +assert localPropertiesFile.exists() +localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + +def flutterSdkPath = properties.getProperty("flutter.sdk") +assert flutterSdkPath != null, "flutter.sdk not set in local.properties" +apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" diff --git a/packages/component_library/example/assets/animations/loader.json b/packages/component_library/example/assets/animations/loader.json new file mode 100644 index 0000000..7d4c61b --- /dev/null +++ b/packages/component_library/example/assets/animations/loader.json @@ -0,0 +1 @@ +{"v":"5.5.2","fr":29.9700012207031,"ip":0,"op":197.000008023974,"w":500,"h":500,"nm":"Comp 1","ddd":0,"assets":[{"id":"image_0","w":138,"h":138,"u":"","p":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIoAAACKCAYAAAB1h9JkAAAQPUlEQVR4Xu2da2wcVxXH/2ccO0lpHi0tRapKHQGiAiV2igq0ATKuVKRAaOw+7SQoST8164o6H/hSEHFopfKF1lFrN1+qJGpcG1IUpy8UQM0YqFQh1DgJICoh6iBUqUgIhzbxru2dg+7srtdeez1z7zzu3fWMFCny3rnP35x7zrnn3kuoscfufLSZiG5ll1pBWA+QXW4CN4OouaJJE2CMzf6NMAbmCSJ2mOiy8/JA+bca64sk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A7GPXJHgUi8NujV93Wlth3YLRjurLJXXLT6m1CYGbdEqNGBh6Bv0YY6fMwJORdG+65/T8r8C9dsfpLAP7Z53dGzftMgQj8PhO4BpqXUg5n4vKUJ370zd5xb5xI8Rd+zkbgDz8P/R6BlPjuhntXfovvGQf/Zdf/7bRUMv4ygMl+dyBq3x8KROD3h64106rEw+vvve1qwHC+OcYPd+nXvztPZmPrhIB3mTdrhnLBH0gE/uDzqFo9lMDG1MjI53730+8M6T58xAl/8U3fmxoX2QcA8alqdTR6rzMKROB3Rrdaf0oC39twz8rbJo6zZASOJStWL4KU/1UIsbjWiVMr44vAXyucdD8OKdEvIH+RQ/bux+799vZiLZqG31ly810dcmzkmhiwUALnCYEz3XctasEPCjywaB0SMY/8vYt0cPO+E3D3K+f60fWoTfcUSAPYAonNMobHNvz9yvVmTf5/9Wj/xWbQWLIAAAAASUVORK5CYII=","e":1}],"layers":[{"ddd":0,"ind":1,"ty":2,"nm":"search .png","cl":"png","refId":"image_0","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":1,"k":[{"i":{"x":[0.16],"y":[1]},"o":{"x":[0.78],"y":[0]},"t":0,"s":[0]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.84],"y":[0]},"t":14,"s":[55]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":41,"s":[112]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":48,"s":[112]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":69,"s":[27]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":76,"s":[27]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":100,"s":[27]},{"i":{"x":[0.833],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":109,"s":[27]},{"i":{"x":[0.22],"y":[1]},"o":{"x":[0.167],"y":[0]},"t":132,"s":[10]},{"i":{"x":[0.22],"y":[1]},"o":{"x":[0.78],"y":[0]},"t":152,"s":[0]},{"t":197.000008023974,"s":[0]}],"ix":10},"p":{"a":1,"k":[{"i":{"x":0.16,"y":1},"o":{"x":0.78,"y":0},"t":0,"s":[253.286,308.787,0],"to":[12.667,-4.167,0],"ti":[-12.667,4.167,0]},{"i":{"x":0.22,"y":1},"o":{"x":0.84,"y":0},"t":14,"s":[272.286,224.787,0],"to":[12.667,-4.167,0],"ti":[0,0,0]},{"i":{"x":0.22,"y":0.22},"o":{"x":0.78,"y":0.78},"t":41,"s":[315.286,304.787,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.22,"y":1},"o":{"x":0.78,"y":0},"t":48,"s":[315.286,304.787,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.22,"y":0.22},"o":{"x":0.78,"y":0.78},"t":69,"s":[194.286,245.787,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.22,"y":1},"o":{"x":0.78,"y":0},"t":76,"s":[194.286,245.787,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.22,"y":0.22},"o":{"x":0.78,"y":0.78},"t":100,"s":[195.286,290.787,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.22,"y":1},"o":{"x":0.78,"y":0},"t":109,"s":[195.286,290.787,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.22,"y":1},"o":{"x":0.78,"y":0},"t":132,"s":[241.286,188.787,0],"to":[0,0,0],"ti":[-12.667,4.167,0]},{"i":{"x":0.22,"y":1},"o":{"x":0.78,"y":0},"t":152,"s":[196.286,249.787,0],"to":[12.667,-4.167,0],"ti":[0,0,0]},{"i":{"x":0.22,"y":1},"o":{"x":0.78,"y":0},"t":174,"s":[226.286,308.787,0],"to":[0,0,0],"ti":[-12.667,4.167,0]},{"t":197.000008023974,"s":[253.3,308.8,0]}],"ix":2},"a":{"a":0,"k":[125.155,125.157,0],"ix":1},"s":{"a":0,"k":[100.938,100.938,100],"ix":6}},"ao":0,"ip":0,"op":600.000024438501,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"Shape Layer 2","parent":1,"sr":1,"ks":{"o":{"a":0,"k":23,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[118.927,43.139,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[99.071,99.071,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[94,94],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.121569001441,0.162906003466,1],"ix":3},"o":{"a":0,"k":0,"ix":4},"w":{"a":0,"k":6,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-64,10],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600.000024438501,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"Shape Layer 1","parent":1,"td":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[118.927,43.139,0],"ix":2},"a":{"a":0,"k":[0,0,0],"ix":1},"s":{"a":0,"k":[99.071,99.071,100],"ix":6}},"ao":0,"shapes":[{"ty":"gr","it":[{"d":1,"ty":"el","s":{"a":0,"k":[94,94],"ix":2},"p":{"a":0,"k":[0,0],"ix":3},"nm":"Ellipse Path 1","mn":"ADBE Vector Shape - Ellipse","hd":false},{"ty":"st","c":{"a":0,"k":[1,0.121569001441,0.162906003466,1],"ix":3},"o":{"a":0,"k":0,"ix":4},"w":{"a":0,"k":6,"ix":5},"lc":1,"lj":1,"ml":4,"bm":0,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke","hd":false},{"ty":"fl","c":{"a":0,"k":[1,1,1,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[-64,10],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transformar"}],"nm":"Ellipse 1","np":3,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":600.000024438501,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":2,"nm":"open-book.png","cl":"png","tt":1,"refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[127.5,92.5,0],"ix":1},"s":{"a":0,"k":[127,127,100],"ix":6}},"ao":0,"ip":0,"op":600.000024438501,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":2,"nm":"open-book.png","cl":"png","refId":"image_1","sr":1,"ks":{"o":{"a":0,"k":36,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[250,250,0],"ix":2},"a":{"a":0,"k":[127.5,92.5,0],"ix":1},"s":{"a":0,"k":[100,100,100],"ix":6}},"ao":0,"ip":0,"op":600.000024438501,"st":0,"bm":0}],"markers":[]} \ No newline at end of file diff --git a/packages/component_library/example/assets/animations/on_off_switch.riv b/packages/component_library/example/assets/animations/on_off_switch.riv new file mode 100644 index 0000000..8ae8b83 Binary files /dev/null and b/packages/component_library/example/assets/animations/on_off_switch.riv differ diff --git a/packages/component_library/example/ios/.gitignore b/packages/component_library/example/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/packages/component_library/example/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/packages/component_library/example/ios/Flutter/AppFrameworkInfo.plist b/packages/component_library/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..9625e10 --- /dev/null +++ b/packages/component_library/example/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 11.0 + + diff --git a/packages/component_library/example/ios/Flutter/Debug.xcconfig b/packages/component_library/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/packages/component_library/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/component_library/example/ios/Flutter/Release.xcconfig b/packages/component_library/example/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/packages/component_library/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/packages/component_library/example/ios/Runner.xcodeproj/project.pbxproj b/packages/component_library/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..fdd2c9d --- /dev/null +++ b/packages/component_library/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,484 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 50; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 424UUNETGR; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 424UUNETGR; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = 424UUNETGR; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.example; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/packages/component_library/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/packages/component_library/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/packages/component_library/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/component_library/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/component_library/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/packages/component_library/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/component_library/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/component_library/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/packages/component_library/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/component_library/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/component_library/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..c87d15a --- /dev/null +++ b/packages/component_library/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/component_library/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/packages/component_library/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/packages/component_library/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/component_library/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/component_library/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/packages/component_library/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/component_library/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/packages/component_library/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/packages/component_library/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/packages/component_library/example/ios/Runner/AppDelegate.swift b/packages/component_library/example/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/packages/component_library/example/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..28c6bf0 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..f091b6b Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cde121 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..d0ef06e Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..dcdc230 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..2ccbfd9 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..c8f9ed8 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..a6d6b86 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..75b2d16 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..c4df70d Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..6a84f41 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..d0e1f58 Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/packages/component_library/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +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. \ No newline at end of file diff --git a/packages/component_library/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/packages/component_library/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/packages/component_library/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/component_library/example/ios/Runner/Base.lproj/Main.storyboard b/packages/component_library/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/packages/component_library/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/component_library/example/ios/Runner/Info.plist b/packages/component_library/example/ios/Runner/Info.plist new file mode 100644 index 0000000..7f55346 --- /dev/null +++ b/packages/component_library/example/ios/Runner/Info.plist @@ -0,0 +1,51 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Example + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + example + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UIViewControllerBasedStatusBarAppearance + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/packages/component_library/example/ios/Runner/Runner-Bridging-Header.h b/packages/component_library/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/packages/component_library/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/packages/component_library/example/lib/component_storybook.dart b/packages/component_library/example/lib/component_storybook.dart new file mode 100644 index 0000000..13eaf55 --- /dev/null +++ b/packages/component_library/example/lib/component_storybook.dart @@ -0,0 +1,34 @@ +import 'package:component_library/component_library.dart'; +import 'package:component_library_storybook/stories.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:storybook_flutter/storybook_flutter.dart'; + +class ComponentStorybook extends StatelessWidget { + final ThemeData lightThemeData, darkThemeData; + + const ComponentStorybook({ + Key? key, + required this.lightThemeData, + required this.darkThemeData, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + final theme = WonderTheme.of(context); + return Storybook( + theme: lightThemeData, + darkTheme: darkThemeData, + localizationDelegates: const [ + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ComponentLibraryLocalizations.delegate, + ], + children: [ + ...getStories(theme), + ], + initialRoute: 'rounded-choice-chip', + ); + } +} diff --git a/packages/component_library/example/lib/main.dart b/packages/component_library/example/lib/main.dart new file mode 100644 index 0000000..151c4cf --- /dev/null +++ b/packages/component_library/example/lib/main.dart @@ -0,0 +1,6 @@ +import 'package:component_library_storybook/story_app.dart'; +import 'package:flutter/material.dart'; + +void main() { + runApp(StoryApp()); +} \ No newline at end of file diff --git a/packages/component_library/example/lib/stories.dart b/packages/component_library/example/lib/stories.dart new file mode 100644 index 0000000..84b8d90 --- /dev/null +++ b/packages/component_library/example/lib/stories.dart @@ -0,0 +1,414 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; +import 'package:storybook_flutter/storybook_flutter.dart'; + +List getStories(WonderThemeData theme) { + return [ + Story.simple( + name: 'Simple Expanded Elevated Button', + section: 'Buttons', + child: ExpandedElevatedButton( + label: 'Press me', + onTap: () {}, + ), + ), + Story( + name: 'Expanded Elevated Button', + section: 'Buttons', + builder: (_, k) => ExpandedElevatedButton( + label: k.text( + label: 'label', + initial: 'Press me', + ), + onTap: k.boolean( + label: 'onTap', + initial: true, + ) + ? () {} + : null, + icon: Icon( + k.options( + label: 'icon', + initial: Icons.home, + options: const [ + Option( + 'Login', + Icons.login, + ), + Option( + 'Refresh', + Icons.refresh, + ), + Option( + 'Logout', + Icons.logout, + ), + ], + ), + ), + ), + ), + Story( + name: 'InProgress Expanded Elevated Button', + section: 'Buttons', + builder: (_, k) => ExpandedElevatedButton.inProgress( + label: k.text( + label: 'label', + initial: 'Processing', + ), + ), + ), + Story( + name: 'InProgress Text Button', + section: 'Buttons', + builder: (_, k) => InProgressTextButton( + label: k.text( + label: 'label', + initial: 'Processing', + ), + ), + ), + Story( + name: 'Favorite Button', + section: 'Buttons', + builder: (_, k) => FavoriteIconButton( + onTap: () {}, + isFavorite: k.boolean( + label: 'isFavorite', + initial: false, + ), + ), + ), + Story.simple( + name: 'Share Icon Button', + section: 'Buttons', + child: ShareIconButton(onTap: () {}), + ), + Story( + name: 'Count Indicator Icon Button', + section: 'Count Indicator Buttons', + builder: (_, k) => CountIndicatorIconButton( + count: k.sliderInt( + label: 'count', + ), + iconData: k.options( + label: 'iconData', + initial: Icons.arrow_upward, + options: const [ + Option( + 'Upward', + Icons.arrow_upward, + ), + Option( + 'Downward', + Icons.arrow_downward, + ), + ], + ), + tooltip: k.text( + label: 'tooltip', + initial: 'Count indicator', + ), + ), + ), + Story( + name: 'Upvote Icon Button', + section: 'Count Indicator Buttons', + builder: (_, k) => UpvoteIconButton( + count: k.sliderInt( + label: 'count', + max: 10, + min: 0, + initial: 0, + divisions: 9, + ), + onTap: () {}, + isUpvoted: k.boolean( + label: 'isUpvoted', + initial: false, + ), + ), + ), + Story( + name: 'Exception Indicator', + section: 'Indicators', + builder: (_, k) => ExceptionIndicator( + title: k.text( + label: 'title', + initial: 'Exception title', + ), + message: k.text( + label: 'message', + initial: 'Exception message', + ), + onTryAgain: k.boolean( + label: 'onTryAgain', + initial: false, + ) + ? () {} + : null, + ), + ), + Story( + name: 'QuoteCard', + section: 'Quote', + builder: (_, k) => QuoteCard( + isFavorite: k.boolean( + label: 'Is Favorite', + initial: false, + ), + statement: k.text( + label: 'Statement', + initial: + 'Wherever you go, no matter what the weather, always bring your own sunshine.', + ), + author: k.text( + label: 'Author', + initial: 'Author name', + ), + ), + ), + Story( + name: 'Quotes in List', + section: 'Quote', + wrapperBuilder: (context, story, child) => Padding( + padding: const EdgeInsets.all(8.0), + child: ListView.separated( + itemCount: 15, + itemBuilder: (_, __) => child, + separatorBuilder: (_, __) => const Divider( + height: 16.0, + ), + ), + ), + builder: (_, k) => QuoteCard( + isFavorite: k.boolean( + label: 'Is Favorite', + initial: false, + ), + statement: k.text( + label: 'Statement', + initial: 'The finest steel has to go through the hottest fire.', + ), + author: k.text( + label: 'Author', + initial: 'Author name', + ), + ), + ), + Story( + name: 'Quotes in Grid', + section: 'Quote', + wrapperBuilder: (context, story, child) => Padding( + padding: const EdgeInsets.all(8.0), + child: GridView.count( + crossAxisCount: 2, + crossAxisSpacing: theme.gridSpacing, + mainAxisSpacing: theme.gridSpacing, + children: [for (int i = 0; i < 15; i++) child], + ), + ), + builder: (_, k) => QuoteCard( + isFavorite: k.boolean( + label: 'Is Favorite', + initial: false, + ), + statement: k.text( + label: 'Statement', + initial: 'A quote statement', + ), + author: k.text( + label: 'Author', + initial: 'Author name', + ), + ), + ), + Story.simple( + name: 'Centered Circular Progress Indicator', + child: const CenteredCircularProgressIndicator(), + ), + Story( + name: 'Rounded Choice Chip', + padding: const EdgeInsets.all( + Spacing.medium, + ), + builder: (_, k) => RoundedChoiceChip( + label: k.text( + label: 'label', + initial: 'I am a Chip!', + ), + isSelected: k.boolean( + label: 'isSelected', + initial: false, + ), + avatar: k.boolean( + label: 'avatar', + initial: false, + ) + ? Icon( + Icons.favorite, + color: theme.roundedChoiceChipSelectedAvatarColor, + ) + : null, + onSelected: k.boolean( + label: 'onSelected', + initial: true, + ) + ? (_) {} + : null, + backgroundColor: k.options( + label: 'backgroundColor', + initial: null, + options: const [ + Option( + 'Light blue', + Colors.lightBlue, + ), + Option( + 'Red accent', + Colors.redAccent, + ), + ], + ), + selectedBackgroundColor: k.options( + label: 'selectedBackgroundColor', + initial: null, + options: const [ + Option( + 'Green', + Colors.green, + ), + Option( + 'Amber accent', + Colors.amberAccent, + ), + ], + ), + labelColor: k.options( + label: 'labelColor', + initial: null, + options: const [ + Option( + 'Teal', + Colors.teal, + ), + Option( + 'Orange accent', + Colors.orangeAccent, + ), + ], + ), + selectedLabelColor: k.options( + label: 'selectedLabelColor', + initial: null, + options: const [ + Option( + 'Deep purple accent', + Colors.deepPurpleAccent, + ), + Option( + 'Amber accent', + Colors.amberAccent, + ), + ], + ), + ), + ), + Story( + name: 'Chevron List Tile', + padding: const EdgeInsets.all( + Spacing.medium, + ), + builder: (_, k) => ChevronListTile( + label: k.text( + label: 'label', + initial: 'Update Profile', + ), + ), + ), + Story.simple( + name: 'Search Bar', + child: const SearchBar(), + ), + Story.simple( + name: 'Row App Bar', + child: const RowAppBar( + children: [ + FavoriteIconButton( + isFavorite: true, + ), + UpvoteIconButton( + count: 10, + isUpvoted: true, + ), + DownvoteIconButton( + count: 5, + isDownvoted: false, + ), + ], + ), + ), + Story( + name: 'Shrinkable Text', + builder: (_, k) => SafeArea( + child: ShrinkableText( + k.text( + label: 'text', + initial: + 'I am shrinkable text. I can resize myself automatically within a space.', + ), + style: k.options( + label: 'style', + initial: theme.quoteTextStyle.copyWith( + fontSize: FontSize.xxLarge, + ), + options: [ + Option( + 'XX large', + theme.quoteTextStyle.copyWith( + fontSize: FontSize.xxLarge, + ), + ), + Option( + 'Small', + theme.quoteTextStyle.copyWith( + fontSize: FontSize.small, + ), + ), + ], + ), + textAlign: k.options( + label: 'textAlign', + initial: null, + options: const [ + Option( + 'Start', + TextAlign.start, + ), + Option( + 'End', + TextAlign.end, + ), + Option( + 'Center', + TextAlign.center, + ), + Option( + 'Justify', + TextAlign.justify, + ), + Option( + 'Left', + TextAlign.left, + ), + Option( + 'Right', + TextAlign.right, + ), + ], + ), + ), + ), + ), + ]; +} diff --git a/packages/component_library/example/lib/story_app.dart b/packages/component_library/example/lib/story_app.dart new file mode 100644 index 0000000..1c1b2ad --- /dev/null +++ b/packages/component_library/example/lib/story_app.dart @@ -0,0 +1,22 @@ +import 'package:component_library/component_library.dart'; +import 'package:component_library_storybook/component_storybook.dart'; +import 'package:flutter/material.dart'; + +class StoryApp extends StatelessWidget { + StoryApp({Key? key}) : super(key: key); + + final _lightTheme = LightWonderThemeData(); + final _darkTheme = DarkWonderThemeData(); + + @override + Widget build(BuildContext context) { + return WonderTheme( + lightTheme: _lightTheme, + darkTheme: _darkTheme, + child: ComponentStorybook( + lightThemeData: _lightTheme.materialThemeData, + darkThemeData: _darkTheme.materialThemeData, + ), + ); + } +} \ No newline at end of file diff --git a/packages/component_library/example/linux/.gitignore b/packages/component_library/example/linux/.gitignore new file mode 100644 index 0000000..d3896c9 --- /dev/null +++ b/packages/component_library/example/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/packages/component_library/example/linux/CMakeLists.txt b/packages/component_library/example/linux/CMakeLists.txt new file mode 100644 index 0000000..74c66dd --- /dev/null +++ b/packages/component_library/example/linux/CMakeLists.txt @@ -0,0 +1,138 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.10) +project(runner LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "example") +# The unique GTK application identifier for this application. See: +# https://wiki.gnome.org/HowDoI/ChooseApplicationID +set(APPLICATION_ID "com.example.example") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Load bundled libraries from the lib/ directory relative to the binary. +set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") + +# Root filesystem for cross-building. +if(FLUTTER_TARGET_PLATFORM_SYSROOT) + set(CMAKE_SYSROOT ${FLUTTER_TARGET_PLATFORM_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH ${CMAKE_SYSROOT}) + set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) + set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) + set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY) +endif() + +# Define build configuration options. +if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") +endif() + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_14) + target_compile_options(${TARGET} PRIVATE -Wall -Werror) + target_compile_options(${TARGET} PRIVATE "$<$>:-O3>") + target_compile_definitions(${TARGET} PRIVATE "$<$>:NDEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) + +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Define the application target. To change its name, change BINARY_NAME above, +# not the value here, or `flutter run` will no longer work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) + +# Only the install-generated bundle's copy of the executable will launch +# correctly, since the resources must in the right relative locations. To avoid +# people trying to run the unbundled copy, put it in a subdirectory instead of +# the default top-level location. +set_target_properties(${BINARY_NAME} + PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/intermediates_do_not_run" +) + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# By default, "installing" just makes a relocatable bundle in the build +# directory. +set(BUILD_BUNDLE_DIR "${PROJECT_BINARY_DIR}/bundle") +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +# Start with a clean build bundle directory every time. +install(CODE " + file(REMOVE_RECURSE \"${BUILD_BUNDLE_DIR}/\") + " COMPONENT Runtime) + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +foreach(bundled_library ${PLUGIN_BUNDLED_LIBRARIES}) + install(FILES "${bundled_library}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endforeach(bundled_library) + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +if(NOT CMAKE_BUILD_TYPE MATCHES "Debug") + install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() diff --git a/packages/component_library/example/linux/flutter/CMakeLists.txt b/packages/component_library/example/linux/flutter/CMakeLists.txt new file mode 100644 index 0000000..d5bd016 --- /dev/null +++ b/packages/component_library/example/linux/flutter/CMakeLists.txt @@ -0,0 +1,88 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.10) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. + +# Serves the same purpose as list(TRANSFORM ... PREPEND ...), +# which isn't available in 3.10. +function(list_prepend LIST_NAME PREFIX) + set(NEW_LIST "") + foreach(element ${${LIST_NAME}}) + list(APPEND NEW_LIST "${PREFIX}${element}") + endforeach(element) + set(${LIST_NAME} "${NEW_LIST}" PARENT_SCOPE) +endfunction() + +# === Flutter Library === +# System-level dependencies. +find_package(PkgConfig REQUIRED) +pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) +pkg_check_modules(GLIB REQUIRED IMPORTED_TARGET glib-2.0) +pkg_check_modules(GIO REQUIRED IMPORTED_TARGET gio-2.0) + +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/libflutter_linux_gtk.so") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/lib/libapp.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "fl_basic_message_channel.h" + "fl_binary_codec.h" + "fl_binary_messenger.h" + "fl_dart_project.h" + "fl_engine.h" + "fl_json_message_codec.h" + "fl_json_method_codec.h" + "fl_message_codec.h" + "fl_method_call.h" + "fl_method_channel.h" + "fl_method_codec.h" + "fl_method_response.h" + "fl_plugin_registrar.h" + "fl_plugin_registry.h" + "fl_standard_message_codec.h" + "fl_standard_method_codec.h" + "fl_string_codec.h" + "fl_value.h" + "fl_view.h" + "flutter_linux.h" +) +list_prepend(FLUTTER_LIBRARY_HEADERS "${EPHEMERAL_DIR}/flutter_linux/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}") +target_link_libraries(flutter INTERFACE + PkgConfig::GTK + PkgConfig::GLIB + PkgConfig::GIO +) +add_dependencies(flutter flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CMAKE_CURRENT_BINARY_DIR}/_phony_ + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.sh" + ${FLUTTER_TARGET_PLATFORM} ${CMAKE_BUILD_TYPE} + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} +) diff --git a/packages/component_library/example/linux/flutter/generated_plugin_registrant.cc b/packages/component_library/example/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000..e71a16d --- /dev/null +++ b/packages/component_library/example/linux/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void fl_register_plugins(FlPluginRegistry* registry) { +} diff --git a/packages/component_library/example/linux/flutter/generated_plugin_registrant.h b/packages/component_library/example/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000..e0f0a47 --- /dev/null +++ b/packages/component_library/example/linux/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void fl_register_plugins(FlPluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/packages/component_library/example/linux/flutter/generated_plugins.cmake b/packages/component_library/example/linux/flutter/generated_plugins.cmake new file mode 100644 index 0000000..2e1de87 --- /dev/null +++ b/packages/component_library/example/linux/flutter/generated_plugins.cmake @@ -0,0 +1,23 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/packages/component_library/example/linux/main.cc b/packages/component_library/example/linux/main.cc new file mode 100644 index 0000000..e7c5c54 --- /dev/null +++ b/packages/component_library/example/linux/main.cc @@ -0,0 +1,6 @@ +#include "my_application.h" + +int main(int argc, char** argv) { + g_autoptr(MyApplication) app = my_application_new(); + return g_application_run(G_APPLICATION(app), argc, argv); +} diff --git a/packages/component_library/example/linux/my_application.cc b/packages/component_library/example/linux/my_application.cc new file mode 100644 index 0000000..0ba8f43 --- /dev/null +++ b/packages/component_library/example/linux/my_application.cc @@ -0,0 +1,104 @@ +#include "my_application.h" + +#include +#ifdef GDK_WINDOWING_X11 +#include +#endif + +#include "flutter/generated_plugin_registrant.h" + +struct _MyApplication { + GtkApplication parent_instance; + char** dart_entrypoint_arguments; +}; + +G_DEFINE_TYPE(MyApplication, my_application, GTK_TYPE_APPLICATION) + +// Implements GApplication::activate. +static void my_application_activate(GApplication* application) { + MyApplication* self = MY_APPLICATION(application); + GtkWindow* window = + GTK_WINDOW(gtk_application_window_new(GTK_APPLICATION(application))); + + // Use a header bar when running in GNOME as this is the common style used + // by applications and is the setup most users will be using (e.g. Ubuntu + // desktop). + // If running on X and not using GNOME then just use a traditional title bar + // in case the window manager does more exotic layout, e.g. tiling. + // If running on Wayland assume the header bar will work (may need changing + // if future cases occur). + gboolean use_header_bar = TRUE; +#ifdef GDK_WINDOWING_X11 + GdkScreen* screen = gtk_window_get_screen(window); + if (GDK_IS_X11_SCREEN(screen)) { + const gchar* wm_name = gdk_x11_screen_get_window_manager_name(screen); + if (g_strcmp0(wm_name, "GNOME Shell") != 0) { + use_header_bar = FALSE; + } + } +#endif + if (use_header_bar) { + GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); + gtk_widget_show(GTK_WIDGET(header_bar)); + gtk_header_bar_set_title(header_bar, "example"); + gtk_header_bar_set_show_close_button(header_bar, TRUE); + gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); + } else { + gtk_window_set_title(window, "example"); + } + + gtk_window_set_default_size(window, 1280, 720); + gtk_widget_show(GTK_WIDGET(window)); + + g_autoptr(FlDartProject) project = fl_dart_project_new(); + fl_dart_project_set_dart_entrypoint_arguments(project, self->dart_entrypoint_arguments); + + FlView* view = fl_view_new(project); + gtk_widget_show(GTK_WIDGET(view)); + gtk_container_add(GTK_CONTAINER(window), GTK_WIDGET(view)); + + fl_register_plugins(FL_PLUGIN_REGISTRY(view)); + + gtk_widget_grab_focus(GTK_WIDGET(view)); +} + +// Implements GApplication::local_command_line. +static gboolean my_application_local_command_line(GApplication* application, gchar*** arguments, int* exit_status) { + MyApplication* self = MY_APPLICATION(application); + // Strip out the first argument as it is the binary name. + self->dart_entrypoint_arguments = g_strdupv(*arguments + 1); + + g_autoptr(GError) error = nullptr; + if (!g_application_register(application, nullptr, &error)) { + g_warning("Failed to register: %s", error->message); + *exit_status = 1; + return TRUE; + } + + g_application_activate(application); + *exit_status = 0; + + return TRUE; +} + +// Implements GObject::dispose. +static void my_application_dispose(GObject* object) { + MyApplication* self = MY_APPLICATION(object); + g_clear_pointer(&self->dart_entrypoint_arguments, g_strfreev); + G_OBJECT_CLASS(my_application_parent_class)->dispose(object); +} + +static void my_application_class_init(MyApplicationClass* klass) { + G_APPLICATION_CLASS(klass)->activate = my_application_activate; + G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_OBJECT_CLASS(klass)->dispose = my_application_dispose; +} + +static void my_application_init(MyApplication* self) {} + +MyApplication* my_application_new() { + return MY_APPLICATION(g_object_new(my_application_get_type(), + "application-id", APPLICATION_ID, + "flags", G_APPLICATION_NON_UNIQUE, + nullptr)); +} diff --git a/packages/component_library/example/linux/my_application.h b/packages/component_library/example/linux/my_application.h new file mode 100644 index 0000000..72271d5 --- /dev/null +++ b/packages/component_library/example/linux/my_application.h @@ -0,0 +1,18 @@ +#ifndef FLUTTER_MY_APPLICATION_H_ +#define FLUTTER_MY_APPLICATION_H_ + +#include + +G_DECLARE_FINAL_TYPE(MyApplication, my_application, MY, APPLICATION, + GtkApplication) + +/** + * my_application_new: + * + * Creates a new Flutter-based application. + * + * Returns: a new #MyApplication. + */ +MyApplication* my_application_new(); + +#endif // FLUTTER_MY_APPLICATION_H_ diff --git a/packages/component_library/example/macos/.gitignore b/packages/component_library/example/macos/.gitignore new file mode 100644 index 0000000..746adbb --- /dev/null +++ b/packages/component_library/example/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/packages/component_library/example/macos/Flutter/Flutter-Debug.xcconfig b/packages/component_library/example/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000..c2efd0b --- /dev/null +++ b/packages/component_library/example/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/component_library/example/macos/Flutter/Flutter-Release.xcconfig b/packages/component_library/example/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000..c2efd0b --- /dev/null +++ b/packages/component_library/example/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/packages/component_library/example/macos/Flutter/GeneratedPluginRegistrant.swift b/packages/component_library/example/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000..cccf817 --- /dev/null +++ b/packages/component_library/example/macos/Flutter/GeneratedPluginRegistrant.swift @@ -0,0 +1,10 @@ +// +// Generated file. Do not edit. +// + +import FlutterMacOS +import Foundation + + +func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { +} diff --git a/packages/component_library/example/macos/Runner.xcodeproj/project.pbxproj b/packages/component_library/example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..c84862c --- /dev/null +++ b/packages/component_library/example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,572 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 51; + objects = { + +/* Begin PBXAggregateTarget section */ + 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { + isa = PBXAggregateTarget; + buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; + buildPhases = ( + 33CC111E2044C6BF0003C045 /* ShellScript */, + ); + dependencies = ( + ); + name = "Flutter Assemble"; + productName = FLX; + }; +/* End PBXAggregateTarget section */ + +/* Begin PBXBuildFile section */ + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 33CC10E52044A3C60003C045 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 33CC111A2044C6BA0003C045; + remoteInfo = FLX; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 33CC110E2044A8840003C045 /* Bundle Framework */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Bundle Framework"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; + 33CC10ED2044A3C60003C045 /* example.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "example.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; + 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; + 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; + 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; + 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; + 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 33CC10EA2044A3C60003C045 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 33BA886A226E78AF003329D5 /* Configs */ = { + isa = PBXGroup; + children = ( + 33E5194F232828860026EE4D /* AppInfo.xcconfig */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, + ); + path = Configs; + sourceTree = ""; + }; + 33CC10E42044A3C60003C045 = { + isa = PBXGroup; + children = ( + 33FAB671232836740065AC1E /* Runner */, + 33CEB47122A05771004F2AC0 /* Flutter */, + 33CC10EE2044A3C60003C045 /* Products */, + D73912EC22F37F3D000D13A0 /* Frameworks */, + ); + sourceTree = ""; + }; + 33CC10EE2044A3C60003C045 /* Products */ = { + isa = PBXGroup; + children = ( + 33CC10ED2044A3C60003C045 /* example.app */, + ); + name = Products; + sourceTree = ""; + }; + 33CC11242044D66E0003C045 /* Resources */ = { + isa = PBXGroup; + children = ( + 33CC10F22044A3C60003C045 /* Assets.xcassets */, + 33CC10F42044A3C60003C045 /* MainMenu.xib */, + 33CC10F72044A3C60003C045 /* Info.plist */, + ); + name = Resources; + path = ..; + sourceTree = ""; + }; + 33CEB47122A05771004F2AC0 /* Flutter */ = { + isa = PBXGroup; + children = ( + 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, + 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, + 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, + 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, + ); + path = Flutter; + sourceTree = ""; + }; + 33FAB671232836740065AC1E /* Runner */ = { + isa = PBXGroup; + children = ( + 33CC10F02044A3C60003C045 /* AppDelegate.swift */, + 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, + 33E51913231747F40026EE4D /* DebugProfile.entitlements */, + 33E51914231749380026EE4D /* Release.entitlements */, + 33CC11242044D66E0003C045 /* Resources */, + 33BA886A226E78AF003329D5 /* Configs */, + ); + path = Runner; + sourceTree = ""; + }; + D73912EC22F37F3D000D13A0 /* Frameworks */ = { + isa = PBXGroup; + children = ( + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 33CC10EC2044A3C60003C045 /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 33CC10E92044A3C60003C045 /* Sources */, + 33CC10EA2044A3C60003C045 /* Frameworks */, + 33CC10EB2044A3C60003C045 /* Resources */, + 33CC110E2044A8840003C045 /* Bundle Framework */, + 3399D490228B24CF009A79C7 /* ShellScript */, + ); + buildRules = ( + ); + dependencies = ( + 33CC11202044C79F0003C045 /* PBXTargetDependency */, + ); + name = Runner; + productName = Runner; + productReference = 33CC10ED2044A3C60003C045 /* example.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 33CC10E52044A3C60003C045 /* Project object */ = { + isa = PBXProject; + attributes = { + LastSwiftUpdateCheck = 0920; + LastUpgradeCheck = 1300; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 33CC10EC2044A3C60003C045 = { + CreatedOnToolsVersion = 9.2; + LastSwiftMigration = 1100; + ProvisioningStyle = Automatic; + SystemCapabilities = { + com.apple.Sandbox = { + enabled = 1; + }; + }; + }; + 33CC111A2044C6BA0003C045 = { + CreatedOnToolsVersion = 9.2; + ProvisioningStyle = Manual; + }; + }; + }; + buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 33CC10E42044A3C60003C045; + productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 33CC10EC2044A3C60003C045 /* Runner */, + 33CC111A2044C6BA0003C045 /* Flutter Assemble */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 33CC10EB2044A3C60003C045 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, + 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3399D490228B24CF009A79C7 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + ); + outputFileListPaths = ( + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; + }; + 33CC111E2044C6BF0003C045 /* ShellScript */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + Flutter/ephemeral/FlutterInputs.xcfilelist, + ); + inputPaths = ( + Flutter/ephemeral/tripwire, + ); + outputFileListPaths = ( + Flutter/ephemeral/FlutterOutputs.xcfilelist, + ); + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 33CC10E92044A3C60003C045 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, + 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, + 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; + targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { + isa = PBXVariantGroup; + children = ( + 33CC10F52044A3C60003C045 /* Base */, + ); + name = MainMenu.xib; + path = Runner; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 338D0CE9231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Profile; + }; + 338D0CEA231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Profile; + }; + 338D0CEB231458BD00FA5F75 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Profile; + }; + 33CC10F92044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = macosx; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 33CC10FA2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CODE_SIGN_IDENTITY = "-"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.11; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = macosx; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + }; + name = Release; + }; + 33CC10FC2044A3C60003C045 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + }; + name = Debug; + }; + 33CC10FD2044A3C60003C045 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; + CODE_SIGN_STYLE = Automatic; + COMBINE_HIDPI_IMAGES = YES; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/../Frameworks", + ); + PROVISIONING_PROFILE_SPECIFIER = ""; + SWIFT_VERSION = 5.0; + }; + name = Release; + }; + 33CC111C2044C6BA0003C045 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Manual; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 33CC111D2044C6BA0003C045 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CODE_SIGN_STYLE = Automatic; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10F92044A3C60003C045 /* Debug */, + 33CC10FA2044A3C60003C045 /* Release */, + 338D0CE9231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC10FC2044A3C60003C045 /* Debug */, + 33CC10FD2044A3C60003C045 /* Release */, + 338D0CEA231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 33CC111C2044C6BA0003C045 /* Debug */, + 33CC111D2044C6BA0003C045 /* Release */, + 338D0CEB231458BD00FA5F75 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 33CC10E52044A3C60003C045 /* Project object */; +} diff --git a/packages/component_library/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/component_library/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/packages/component_library/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/component_library/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/packages/component_library/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..fb7259e --- /dev/null +++ b/packages/component_library/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/component_library/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/packages/component_library/example/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/packages/component_library/example/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/packages/component_library/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/packages/component_library/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/packages/component_library/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/packages/component_library/example/macos/Runner/AppDelegate.swift b/packages/component_library/example/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000..d53ef64 --- /dev/null +++ b/packages/component_library/example/macos/Runner/AppDelegate.swift @@ -0,0 +1,9 @@ +import Cocoa +import FlutterMacOS + +@NSApplicationMain +class AppDelegate: FlutterAppDelegate { + override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { + return true + } +} diff --git a/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a2ec33f --- /dev/null +++ b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_16.png", + "scale" : "1x" + }, + { + "size" : "16x16", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "2x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_32.png", + "scale" : "1x" + }, + { + "size" : "32x32", + "idiom" : "mac", + "filename" : "app_icon_64.png", + "scale" : "2x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_128.png", + "scale" : "1x" + }, + { + "size" : "128x128", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "2x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_256.png", + "scale" : "1x" + }, + { + "size" : "256x256", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "2x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_512.png", + "scale" : "1x" + }, + { + "size" : "512x512", + "idiom" : "mac", + "filename" : "app_icon_1024.png", + "scale" : "2x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000..82b6f9d Binary files /dev/null and b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000..13b35eb Binary files /dev/null and b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000..0a3f5fa Binary files /dev/null and b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000..bdb5722 Binary files /dev/null and b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000..f083318 Binary files /dev/null and b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000..326c0e7 Binary files /dev/null and b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000..2f1632c Binary files /dev/null and b/packages/component_library/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/packages/component_library/example/macos/Runner/Base.lproj/MainMenu.xib b/packages/component_library/example/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..80e867a --- /dev/null +++ b/packages/component_library/example/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages/component_library/example/macos/Runner/Configs/AppInfo.xcconfig b/packages/component_library/example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000..8b42559 --- /dev/null +++ b/packages/component_library/example/macos/Runner/Configs/AppInfo.xcconfig @@ -0,0 +1,14 @@ +// Application-level settings for the Runner target. +// +// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the +// future. If not, the values below would default to using the project name when this becomes a +// 'flutter create' template. + +// The application's name. By default this is also the title of the Flutter window. +PRODUCT_NAME = example + +// The application's bundle identifier +PRODUCT_BUNDLE_IDENTIFIER = com.example.example + +// The copyright displayed in application information +PRODUCT_COPYRIGHT = Copyright © 2022 com.example. All rights reserved. diff --git a/packages/component_library/example/macos/Runner/Configs/Debug.xcconfig b/packages/component_library/example/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000..36b0fd9 --- /dev/null +++ b/packages/component_library/example/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/packages/component_library/example/macos/Runner/Configs/Release.xcconfig b/packages/component_library/example/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000..dff4f49 --- /dev/null +++ b/packages/component_library/example/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/packages/component_library/example/macos/Runner/Configs/Warnings.xcconfig b/packages/component_library/example/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000..42bcbf4 --- /dev/null +++ b/packages/component_library/example/macos/Runner/Configs/Warnings.xcconfig @@ -0,0 +1,13 @@ +WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings +GCC_WARN_UNDECLARED_SELECTOR = YES +CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES +CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE +CLANG_WARN__DUPLICATE_METHOD_MATCH = YES +CLANG_WARN_PRAGMA_PACK = YES +CLANG_WARN_STRICT_PROTOTYPES = YES +CLANG_WARN_COMMA = YES +GCC_WARN_STRICT_SELECTOR_MATCH = YES +CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES +CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES +GCC_WARN_SHADOW = YES +CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/packages/component_library/example/macos/Runner/DebugProfile.entitlements b/packages/component_library/example/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000..dddb8a3 --- /dev/null +++ b/packages/component_library/example/macos/Runner/DebugProfile.entitlements @@ -0,0 +1,12 @@ + + + + + com.apple.security.app-sandbox + + com.apple.security.cs.allow-jit + + com.apple.security.network.server + + + diff --git a/packages/component_library/example/macos/Runner/Info.plist b/packages/component_library/example/macos/Runner/Info.plist new file mode 100644 index 0000000..4789daa --- /dev/null +++ b/packages/component_library/example/macos/Runner/Info.plist @@ -0,0 +1,32 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIconFile + + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSMinimumSystemVersion + $(MACOSX_DEPLOYMENT_TARGET) + NSHumanReadableCopyright + $(PRODUCT_COPYRIGHT) + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/packages/component_library/example/macos/Runner/MainFlutterWindow.swift b/packages/component_library/example/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000..2722837 --- /dev/null +++ b/packages/component_library/example/macos/Runner/MainFlutterWindow.swift @@ -0,0 +1,15 @@ +import Cocoa +import FlutterMacOS + +class MainFlutterWindow: NSWindow { + override func awakeFromNib() { + let flutterViewController = FlutterViewController.init() + let windowFrame = self.frame + self.contentViewController = flutterViewController + self.setFrame(windowFrame, display: true) + + RegisterGeneratedPlugins(registry: flutterViewController) + + super.awakeFromNib() + } +} diff --git a/packages/component_library/example/macos/Runner/Release.entitlements b/packages/component_library/example/macos/Runner/Release.entitlements new file mode 100644 index 0000000..852fa1a --- /dev/null +++ b/packages/component_library/example/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/packages/component_library/example/pubspec.yaml b/packages/component_library/example/pubspec.yaml new file mode 100644 index 0000000..b295e25 --- /dev/null +++ b/packages/component_library/example/pubspec.yaml @@ -0,0 +1,23 @@ +name: component_library_storybook +version: 1.0.0+1 +publish_to: none + +environment: + sdk: ">=2.14.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + component_library: + path: ../ + storybook_flutter: ^0.8.0 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^1.0.4 + +flutter: + uses-material-design: true + assets: + - assets/animations/ \ No newline at end of file diff --git a/packages/component_library/example/test/widget_test.dart b/packages/component_library/example/test/widget_test.dart new file mode 100644 index 0000000..0db063e --- /dev/null +++ b/packages/component_library/example/test/widget_test.dart @@ -0,0 +1,12 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async {}); +} diff --git a/packages/component_library/example/web/favicon.png b/packages/component_library/example/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/packages/component_library/example/web/favicon.png differ diff --git a/packages/component_library/example/web/icons/Icon-192.png b/packages/component_library/example/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/packages/component_library/example/web/icons/Icon-192.png differ diff --git a/packages/component_library/example/web/icons/Icon-512.png b/packages/component_library/example/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/packages/component_library/example/web/icons/Icon-512.png differ diff --git a/packages/component_library/example/web/icons/Icon-maskable-192.png b/packages/component_library/example/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/packages/component_library/example/web/icons/Icon-maskable-192.png differ diff --git a/packages/component_library/example/web/icons/Icon-maskable-512.png b/packages/component_library/example/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/packages/component_library/example/web/icons/Icon-maskable-512.png differ diff --git a/packages/component_library/example/web/index.html b/packages/component_library/example/web/index.html new file mode 100644 index 0000000..41b3bc3 --- /dev/null +++ b/packages/component_library/example/web/index.html @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + example + + + + + + + + + + diff --git a/packages/component_library/example/web/manifest.json b/packages/component_library/example/web/manifest.json new file mode 100644 index 0000000..096edf8 --- /dev/null +++ b/packages/component_library/example/web/manifest.json @@ -0,0 +1,35 @@ +{ + "name": "example", + "short_name": "example", + "start_url": ".", + "display": "standalone", + "background_color": "#0175C2", + "theme_color": "#0175C2", + "description": "A new Flutter project.", + "orientation": "portrait-primary", + "prefer_related_applications": false, + "icons": [ + { + "src": "icons/Icon-192.png", + "sizes": "192x192", + "type": "image/png" + }, + { + "src": "icons/Icon-512.png", + "sizes": "512x512", + "type": "image/png" + }, + { + "src": "icons/Icon-maskable-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" + }, + { + "src": "icons/Icon-maskable-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" + } + ] +} diff --git a/packages/component_library/example/windows/.gitignore b/packages/component_library/example/windows/.gitignore new file mode 100644 index 0000000..d492d0d --- /dev/null +++ b/packages/component_library/example/windows/.gitignore @@ -0,0 +1,17 @@ +flutter/ephemeral/ + +# Visual Studio user-specific files. +*.suo +*.user +*.userosscache +*.sln.docstates + +# Visual Studio build-related files. +x64/ +x86/ + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ diff --git a/packages/component_library/example/windows/CMakeLists.txt b/packages/component_library/example/windows/CMakeLists.txt new file mode 100644 index 0000000..c027074 --- /dev/null +++ b/packages/component_library/example/windows/CMakeLists.txt @@ -0,0 +1,101 @@ +# Project-level configuration. +cmake_minimum_required(VERSION 3.14) +project(example LANGUAGES CXX) + +# The name of the executable created for the application. Change this to change +# the on-disk name of your application. +set(BINARY_NAME "example") + +# Explicitly opt in to modern CMake behaviors to avoid warnings with recent +# versions of CMake. +cmake_policy(SET CMP0063 NEW) + +# Define build configuration option. +get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(IS_MULTICONFIG) + set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" + CACHE STRING "" FORCE) +else() + if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) + set(CMAKE_BUILD_TYPE "Debug" CACHE + STRING "Flutter build mode" FORCE) + set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS + "Debug" "Profile" "Release") + endif() +endif() +# Define settings for the Profile build mode. +set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") +set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") +set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") +set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") + +# Use Unicode for all projects. +add_definitions(-DUNICODE -D_UNICODE) + +# Compilation settings that should be applied to most targets. +# +# Be cautious about adding new options here, as plugins use this function by +# default. In most cases, you should add new options to specific targets instead +# of modifying this function. +function(APPLY_STANDARD_SETTINGS TARGET) + target_compile_features(${TARGET} PUBLIC cxx_std_17) + target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") + target_compile_options(${TARGET} PRIVATE /EHsc) + target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") + target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") +endfunction() + +# Flutter library and tool build rules. +set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") +add_subdirectory(${FLUTTER_MANAGED_DIR}) + +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") + +# Generated plugin build rules, which manage building the plugins and adding +# them to the application. +include(flutter/generated_plugins.cmake) + + +# === Installation === +# Support files are copied into place next to the executable, so that it can +# run in place. This is done instead of making a separate bundle (as on Linux) +# so that building and running from within Visual Studio will work. +set(BUILD_BUNDLE_DIR "$") +# Make the "install" step default, as it's required to run. +set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) +if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) +endif() + +set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") +set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") + +install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + COMPONENT Runtime) + +install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) + +if(PLUGIN_BUNDLED_LIBRARIES) + install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" + DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" + COMPONENT Runtime) +endif() + +# Fully re-copy the assets directory on each build to avoid having stale files +# from a previous install. +set(FLUTTER_ASSET_DIR_NAME "flutter_assets") +install(CODE " + file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") + " COMPONENT Runtime) +install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" + DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) + +# Install the AOT library on non-Debug builds only. +install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" + CONFIGURATIONS Profile;Release + COMPONENT Runtime) diff --git a/packages/component_library/example/windows/flutter/CMakeLists.txt b/packages/component_library/example/windows/flutter/CMakeLists.txt new file mode 100644 index 0000000..930d207 --- /dev/null +++ b/packages/component_library/example/windows/flutter/CMakeLists.txt @@ -0,0 +1,104 @@ +# This file controls Flutter-level build steps. It should not be edited. +cmake_minimum_required(VERSION 3.14) + +set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") + +# Configuration provided via flutter tool. +include(${EPHEMERAL_DIR}/generated_config.cmake) + +# TODO: Move the rest of this into files in ephemeral. See +# https://github.com/flutter/flutter/issues/57146. +set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") + +# === Flutter Library === +set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") + +# Published to parent scope for install step. +set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) +set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) +set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) +set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) + +list(APPEND FLUTTER_LIBRARY_HEADERS + "flutter_export.h" + "flutter_windows.h" + "flutter_messenger.h" + "flutter_plugin_registrar.h" + "flutter_texture_registrar.h" +) +list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") +add_library(flutter INTERFACE) +target_include_directories(flutter INTERFACE + "${EPHEMERAL_DIR}" +) +target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") +add_dependencies(flutter flutter_assemble) + +# === Wrapper === +list(APPEND CPP_WRAPPER_SOURCES_CORE + "core_implementations.cc" + "standard_codec.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_PLUGIN + "plugin_registrar.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") +list(APPEND CPP_WRAPPER_SOURCES_APP + "flutter_engine.cc" + "flutter_view_controller.cc" +) +list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") + +# Wrapper sources needed for a plugin. +add_library(flutter_wrapper_plugin STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} +) +apply_standard_settings(flutter_wrapper_plugin) +set_target_properties(flutter_wrapper_plugin PROPERTIES + POSITION_INDEPENDENT_CODE ON) +set_target_properties(flutter_wrapper_plugin PROPERTIES + CXX_VISIBILITY_PRESET hidden) +target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) +target_include_directories(flutter_wrapper_plugin PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_plugin flutter_assemble) + +# Wrapper sources needed for the runner. +add_library(flutter_wrapper_app STATIC + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_APP} +) +apply_standard_settings(flutter_wrapper_app) +target_link_libraries(flutter_wrapper_app PUBLIC flutter) +target_include_directories(flutter_wrapper_app PUBLIC + "${WRAPPER_ROOT}/include" +) +add_dependencies(flutter_wrapper_app flutter_assemble) + +# === Flutter tool backend === +# _phony_ is a non-existent file to force this command to run every time, +# since currently there's no way to get a full input/output list from the +# flutter tool. +set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") +set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) +add_custom_command( + OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} + ${PHONY_OUTPUT} + COMMAND ${CMAKE_COMMAND} -E env + ${FLUTTER_TOOL_ENVIRONMENT} + "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" + windows-x64 $ + VERBATIM +) +add_custom_target(flutter_assemble DEPENDS + "${FLUTTER_LIBRARY}" + ${FLUTTER_LIBRARY_HEADERS} + ${CPP_WRAPPER_SOURCES_CORE} + ${CPP_WRAPPER_SOURCES_PLUGIN} + ${CPP_WRAPPER_SOURCES_APP} +) diff --git a/packages/component_library/example/windows/flutter/generated_plugin_registrant.cc b/packages/component_library/example/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000..8b6d468 --- /dev/null +++ b/packages/component_library/example/windows/flutter/generated_plugin_registrant.cc @@ -0,0 +1,11 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#include "generated_plugin_registrant.h" + + +void RegisterPlugins(flutter::PluginRegistry* registry) { +} diff --git a/packages/component_library/example/windows/flutter/generated_plugin_registrant.h b/packages/component_library/example/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000..dc139d8 --- /dev/null +++ b/packages/component_library/example/windows/flutter/generated_plugin_registrant.h @@ -0,0 +1,15 @@ +// +// Generated file. Do not edit. +// + +// clang-format off + +#ifndef GENERATED_PLUGIN_REGISTRANT_ +#define GENERATED_PLUGIN_REGISTRANT_ + +#include + +// Registers Flutter plugins. +void RegisterPlugins(flutter::PluginRegistry* registry); + +#endif // GENERATED_PLUGIN_REGISTRANT_ diff --git a/packages/component_library/example/windows/flutter/generated_plugins.cmake b/packages/component_library/example/windows/flutter/generated_plugins.cmake new file mode 100644 index 0000000..b93c4c3 --- /dev/null +++ b/packages/component_library/example/windows/flutter/generated_plugins.cmake @@ -0,0 +1,23 @@ +# +# Generated file, do not edit. +# + +list(APPEND FLUTTER_PLUGIN_LIST +) + +list(APPEND FLUTTER_FFI_PLUGIN_LIST +) + +set(PLUGIN_BUNDLED_LIBRARIES) + +foreach(plugin ${FLUTTER_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) + target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) + list(APPEND PLUGIN_BUNDLED_LIBRARIES $) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) +endforeach(plugin) + +foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) + add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) + list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) +endforeach(ffi_plugin) diff --git a/packages/component_library/example/windows/runner/CMakeLists.txt b/packages/component_library/example/windows/runner/CMakeLists.txt new file mode 100644 index 0000000..17411a8 --- /dev/null +++ b/packages/component_library/example/windows/runner/CMakeLists.txt @@ -0,0 +1,39 @@ +cmake_minimum_required(VERSION 3.14) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} WIN32 + "flutter_window.cpp" + "main.cpp" + "utils.cpp" + "win32_window.cpp" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" + "Runner.rc" + "runner.exe.manifest" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the build version. +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") +target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") + +# Disable Windows macros that collide with C++ standard library functions. +target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") + +# Add dependency libraries and include directories. Add any application-specific +# dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") + +# Run the Flutter tool portions of the build. This must not be removed. +add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/packages/component_library/example/windows/runner/Runner.rc b/packages/component_library/example/windows/runner/Runner.rc new file mode 100644 index 0000000..0f5c085 --- /dev/null +++ b/packages/component_library/example/windows/runner/Runner.rc @@ -0,0 +1,121 @@ +// Microsoft Visual C++ generated resource script. +// +#pragma code_page(65001) +#include "resource.h" + +#define APSTUDIO_READONLY_SYMBOLS +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 2 resource. +// +#include "winres.h" + +///////////////////////////////////////////////////////////////////////////// +#undef APSTUDIO_READONLY_SYMBOLS + +///////////////////////////////////////////////////////////////////////////// +// English (United States) resources + +#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +#ifdef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// TEXTINCLUDE +// + +1 TEXTINCLUDE +BEGIN + "resource.h\0" +END + +2 TEXTINCLUDE +BEGIN + "#include ""winres.h""\r\n" + "\0" +END + +3 TEXTINCLUDE +BEGIN + "\r\n" + "\0" +END + +#endif // APSTUDIO_INVOKED + + +///////////////////////////////////////////////////////////////////////////// +// +// Icon +// + +// Icon with lowest ID value placed first to ensure application icon +// remains consistent on all systems. +IDI_APP_ICON ICON "resources\\app_icon.ico" + + +///////////////////////////////////////////////////////////////////////////// +// +// Version +// + +#if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) +#define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD +#else +#define VERSION_AS_NUMBER 1,0,0,0 +#endif + +#if defined(FLUTTER_VERSION) +#define VERSION_AS_STRING FLUTTER_VERSION +#else +#define VERSION_AS_STRING "1.0.0" +#endif + +VS_VERSION_INFO VERSIONINFO + FILEVERSION VERSION_AS_NUMBER + PRODUCTVERSION VERSION_AS_NUMBER + FILEFLAGSMASK VS_FFI_FILEFLAGSMASK +#ifdef _DEBUG + FILEFLAGS VS_FF_DEBUG +#else + FILEFLAGS 0x0L +#endif + FILEOS VOS__WINDOWS32 + FILETYPE VFT_APP + FILESUBTYPE 0x0L +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904e4" + BEGIN + VALUE "CompanyName", "com.example" "\0" + VALUE "FileDescription", "example" "\0" + VALUE "FileVersion", VERSION_AS_STRING "\0" + VALUE "InternalName", "example" "\0" + VALUE "LegalCopyright", "Copyright (C) 2022 com.example. All rights reserved." "\0" + VALUE "OriginalFilename", "example.exe" "\0" + VALUE "ProductName", "example" "\0" + VALUE "ProductVersion", VERSION_AS_STRING "\0" + END + END + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x409, 1252 + END +END + +#endif // English (United States) resources +///////////////////////////////////////////////////////////////////////////// + + + +#ifndef APSTUDIO_INVOKED +///////////////////////////////////////////////////////////////////////////// +// +// Generated from the TEXTINCLUDE 3 resource. +// + + +///////////////////////////////////////////////////////////////////////////// +#endif // not APSTUDIO_INVOKED diff --git a/packages/component_library/example/windows/runner/flutter_window.cpp b/packages/component_library/example/windows/runner/flutter_window.cpp new file mode 100644 index 0000000..b43b909 --- /dev/null +++ b/packages/component_library/example/windows/runner/flutter_window.cpp @@ -0,0 +1,61 @@ +#include "flutter_window.h" + +#include + +#include "flutter/generated_plugin_registrant.h" + +FlutterWindow::FlutterWindow(const flutter::DartProject& project) + : project_(project) {} + +FlutterWindow::~FlutterWindow() {} + +bool FlutterWindow::OnCreate() { + if (!Win32Window::OnCreate()) { + return false; + } + + RECT frame = GetClientArea(); + + // The size here must match the window dimensions to avoid unnecessary surface + // creation / destruction in the startup path. + flutter_controller_ = std::make_unique( + frame.right - frame.left, frame.bottom - frame.top, project_); + // Ensure that basic setup of the controller was successful. + if (!flutter_controller_->engine() || !flutter_controller_->view()) { + return false; + } + RegisterPlugins(flutter_controller_->engine()); + SetChildContent(flutter_controller_->view()->GetNativeWindow()); + return true; +} + +void FlutterWindow::OnDestroy() { + if (flutter_controller_) { + flutter_controller_ = nullptr; + } + + Win32Window::OnDestroy(); +} + +LRESULT +FlutterWindow::MessageHandler(HWND hwnd, UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + // Give Flutter, including plugins, an opportunity to handle window messages. + if (flutter_controller_) { + std::optional result = + flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, + lparam); + if (result) { + return *result; + } + } + + switch (message) { + case WM_FONTCHANGE: + flutter_controller_->engine()->ReloadSystemFonts(); + break; + } + + return Win32Window::MessageHandler(hwnd, message, wparam, lparam); +} diff --git a/packages/component_library/example/windows/runner/flutter_window.h b/packages/component_library/example/windows/runner/flutter_window.h new file mode 100644 index 0000000..6da0652 --- /dev/null +++ b/packages/component_library/example/windows/runner/flutter_window.h @@ -0,0 +1,33 @@ +#ifndef RUNNER_FLUTTER_WINDOW_H_ +#define RUNNER_FLUTTER_WINDOW_H_ + +#include +#include + +#include + +#include "win32_window.h" + +// A window that does nothing but host a Flutter view. +class FlutterWindow : public Win32Window { + public: + // Creates a new FlutterWindow hosting a Flutter view running |project|. + explicit FlutterWindow(const flutter::DartProject& project); + virtual ~FlutterWindow(); + + protected: + // Win32Window: + bool OnCreate() override; + void OnDestroy() override; + LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, + LPARAM const lparam) noexcept override; + + private: + // The project to run. + flutter::DartProject project_; + + // The Flutter instance hosted by this window. + std::unique_ptr flutter_controller_; +}; + +#endif // RUNNER_FLUTTER_WINDOW_H_ diff --git a/packages/component_library/example/windows/runner/main.cpp b/packages/component_library/example/windows/runner/main.cpp new file mode 100644 index 0000000..bcb57b0 --- /dev/null +++ b/packages/component_library/example/windows/runner/main.cpp @@ -0,0 +1,43 @@ +#include +#include +#include + +#include "flutter_window.h" +#include "utils.h" + +int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, + _In_ wchar_t *command_line, _In_ int show_command) { + // Attach to console when present (e.g., 'flutter run') or create a + // new console when running with a debugger. + if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { + CreateAndAttachConsole(); + } + + // Initialize COM, so that it is available for use in the library and/or + // plugins. + ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); + + flutter::DartProject project(L"data"); + + std::vector command_line_arguments = + GetCommandLineArguments(); + + project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); + + FlutterWindow window(project); + Win32Window::Point origin(10, 10); + Win32Window::Size size(1280, 720); + if (!window.CreateAndShow(L"example", origin, size)) { + return EXIT_FAILURE; + } + window.SetQuitOnClose(true); + + ::MSG msg; + while (::GetMessage(&msg, nullptr, 0, 0)) { + ::TranslateMessage(&msg); + ::DispatchMessage(&msg); + } + + ::CoUninitialize(); + return EXIT_SUCCESS; +} diff --git a/packages/component_library/example/windows/runner/resource.h b/packages/component_library/example/windows/runner/resource.h new file mode 100644 index 0000000..66a65d1 --- /dev/null +++ b/packages/component_library/example/windows/runner/resource.h @@ -0,0 +1,16 @@ +//{{NO_DEPENDENCIES}} +// Microsoft Visual C++ generated include file. +// Used by Runner.rc +// +#define IDI_APP_ICON 101 + +// Next default values for new objects +// +#ifdef APSTUDIO_INVOKED +#ifndef APSTUDIO_READONLY_SYMBOLS +#define _APS_NEXT_RESOURCE_VALUE 102 +#define _APS_NEXT_COMMAND_VALUE 40001 +#define _APS_NEXT_CONTROL_VALUE 1001 +#define _APS_NEXT_SYMED_VALUE 101 +#endif +#endif diff --git a/packages/component_library/example/windows/runner/resources/app_icon.ico b/packages/component_library/example/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000..c04e20c Binary files /dev/null and b/packages/component_library/example/windows/runner/resources/app_icon.ico differ diff --git a/packages/component_library/example/windows/runner/runner.exe.manifest b/packages/component_library/example/windows/runner/runner.exe.manifest new file mode 100644 index 0000000..a42ea76 --- /dev/null +++ b/packages/component_library/example/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ + + + + + PerMonitorV2 + + + + + + + + + + + + + + + diff --git a/packages/component_library/example/windows/runner/utils.cpp b/packages/component_library/example/windows/runner/utils.cpp new file mode 100644 index 0000000..f5bf9fa --- /dev/null +++ b/packages/component_library/example/windows/runner/utils.cpp @@ -0,0 +1,64 @@ +#include "utils.h" + +#include +#include +#include +#include + +#include + +void CreateAndAttachConsole() { + if (::AllocConsole()) { + FILE *unused; + if (freopen_s(&unused, "CONOUT$", "w", stdout)) { + _dup2(_fileno(stdout), 1); + } + if (freopen_s(&unused, "CONOUT$", "w", stderr)) { + _dup2(_fileno(stdout), 2); + } + std::ios::sync_with_stdio(); + FlutterDesktopResyncOutputStreams(); + } +} + +std::vector GetCommandLineArguments() { + // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. + int argc; + wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); + if (argv == nullptr) { + return std::vector(); + } + + std::vector command_line_arguments; + + // Skip the first argument as it's the binary name. + for (int i = 1; i < argc; i++) { + command_line_arguments.push_back(Utf8FromUtf16(argv[i])); + } + + ::LocalFree(argv); + + return command_line_arguments; +} + +std::string Utf8FromUtf16(const wchar_t* utf16_string) { + if (utf16_string == nullptr) { + return std::string(); + } + int target_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, nullptr, 0, nullptr, nullptr); + std::string utf8_string; + if (target_length == 0 || target_length > utf8_string.max_size()) { + return utf8_string; + } + utf8_string.resize(target_length); + int converted_length = ::WideCharToMultiByte( + CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, + -1, utf8_string.data(), + target_length, nullptr, nullptr); + if (converted_length == 0) { + return std::string(); + } + return utf8_string; +} diff --git a/packages/component_library/example/windows/runner/utils.h b/packages/component_library/example/windows/runner/utils.h new file mode 100644 index 0000000..3879d54 --- /dev/null +++ b/packages/component_library/example/windows/runner/utils.h @@ -0,0 +1,19 @@ +#ifndef RUNNER_UTILS_H_ +#define RUNNER_UTILS_H_ + +#include +#include + +// Creates a console for the process, and redirects stdout and stderr to +// it for both the runner and the Flutter library. +void CreateAndAttachConsole(); + +// Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string +// encoded in UTF-8. Returns an empty std::string on failure. +std::string Utf8FromUtf16(const wchar_t* utf16_string); + +// Gets the command line arguments passed in as a std::vector, +// encoded in UTF-8. Returns an empty std::vector on failure. +std::vector GetCommandLineArguments(); + +#endif // RUNNER_UTILS_H_ diff --git a/packages/component_library/example/windows/runner/win32_window.cpp b/packages/component_library/example/windows/runner/win32_window.cpp new file mode 100644 index 0000000..c10f08d --- /dev/null +++ b/packages/component_library/example/windows/runner/win32_window.cpp @@ -0,0 +1,245 @@ +#include "win32_window.h" + +#include + +#include "resource.h" + +namespace { + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +// The number of Win32Window objects that currently exist. +static int g_active_window_count = 0; + +using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); + +// Scale helper to convert logical scaler values to physical using passed in +// scale factor +int Scale(int source, double scale_factor) { + return static_cast(source * scale_factor); +} + +// Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. +// This API is only needed for PerMonitor V1 awareness mode. +void EnableFullDpiSupportIfAvailable(HWND hwnd) { + HMODULE user32_module = LoadLibraryA("User32.dll"); + if (!user32_module) { + return; + } + auto enable_non_client_dpi_scaling = + reinterpret_cast( + GetProcAddress(user32_module, "EnableNonClientDpiScaling")); + if (enable_non_client_dpi_scaling != nullptr) { + enable_non_client_dpi_scaling(hwnd); + FreeLibrary(user32_module); + } +} + +} // namespace + +// Manages the Win32Window's window class registration. +class WindowClassRegistrar { + public: + ~WindowClassRegistrar() = default; + + // Returns the singleton registar instance. + static WindowClassRegistrar* GetInstance() { + if (!instance_) { + instance_ = new WindowClassRegistrar(); + } + return instance_; + } + + // Returns the name of the window class, registering the class if it hasn't + // previously been registered. + const wchar_t* GetWindowClass(); + + // Unregisters the window class. Should only be called if there are no + // instances of the window. + void UnregisterWindowClass(); + + private: + WindowClassRegistrar() = default; + + static WindowClassRegistrar* instance_; + + bool class_registered_ = false; +}; + +WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; + +const wchar_t* WindowClassRegistrar::GetWindowClass() { + if (!class_registered_) { + WNDCLASS window_class{}; + window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); + window_class.lpszClassName = kWindowClassName; + window_class.style = CS_HREDRAW | CS_VREDRAW; + window_class.cbClsExtra = 0; + window_class.cbWndExtra = 0; + window_class.hInstance = GetModuleHandle(nullptr); + window_class.hIcon = + LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); + window_class.hbrBackground = 0; + window_class.lpszMenuName = nullptr; + window_class.lpfnWndProc = Win32Window::WndProc; + RegisterClass(&window_class); + class_registered_ = true; + } + return kWindowClassName; +} + +void WindowClassRegistrar::UnregisterWindowClass() { + UnregisterClass(kWindowClassName, nullptr); + class_registered_ = false; +} + +Win32Window::Win32Window() { + ++g_active_window_count; +} + +Win32Window::~Win32Window() { + --g_active_window_count; + Destroy(); +} + +bool Win32Window::CreateAndShow(const std::wstring& title, + const Point& origin, + const Size& size) { + Destroy(); + + const wchar_t* window_class = + WindowClassRegistrar::GetInstance()->GetWindowClass(); + + const POINT target_point = {static_cast(origin.x), + static_cast(origin.y)}; + HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); + UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); + double scale_factor = dpi / 96.0; + + HWND window = CreateWindow( + window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, + Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), + Scale(size.width, scale_factor), Scale(size.height, scale_factor), + nullptr, nullptr, GetModuleHandle(nullptr), this); + + if (!window) { + return false; + } + + return OnCreate(); +} + +// static +LRESULT CALLBACK Win32Window::WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + if (message == WM_NCCREATE) { + auto window_struct = reinterpret_cast(lparam); + SetWindowLongPtr(window, GWLP_USERDATA, + reinterpret_cast(window_struct->lpCreateParams)); + + auto that = static_cast(window_struct->lpCreateParams); + EnableFullDpiSupportIfAvailable(window); + that->window_handle_ = window; + } else if (Win32Window* that = GetThisFromHandle(window)) { + return that->MessageHandler(window, message, wparam, lparam); + } + + return DefWindowProc(window, message, wparam, lparam); +} + +LRESULT +Win32Window::MessageHandler(HWND hwnd, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept { + switch (message) { + case WM_DESTROY: + window_handle_ = nullptr; + Destroy(); + if (quit_on_close_) { + PostQuitMessage(0); + } + return 0; + + case WM_DPICHANGED: { + auto newRectSize = reinterpret_cast(lparam); + LONG newWidth = newRectSize->right - newRectSize->left; + LONG newHeight = newRectSize->bottom - newRectSize->top; + + SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, + newHeight, SWP_NOZORDER | SWP_NOACTIVATE); + + return 0; + } + case WM_SIZE: { + RECT rect = GetClientArea(); + if (child_content_ != nullptr) { + // Size and position the child window. + MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, + rect.bottom - rect.top, TRUE); + } + return 0; + } + + case WM_ACTIVATE: + if (child_content_ != nullptr) { + SetFocus(child_content_); + } + return 0; + } + + return DefWindowProc(window_handle_, message, wparam, lparam); +} + +void Win32Window::Destroy() { + OnDestroy(); + + if (window_handle_) { + DestroyWindow(window_handle_); + window_handle_ = nullptr; + } + if (g_active_window_count == 0) { + WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); + } +} + +Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { + return reinterpret_cast( + GetWindowLongPtr(window, GWLP_USERDATA)); +} + +void Win32Window::SetChildContent(HWND content) { + child_content_ = content; + SetParent(content, window_handle_); + RECT frame = GetClientArea(); + + MoveWindow(content, frame.left, frame.top, frame.right - frame.left, + frame.bottom - frame.top, true); + + SetFocus(child_content_); +} + +RECT Win32Window::GetClientArea() { + RECT frame; + GetClientRect(window_handle_, &frame); + return frame; +} + +HWND Win32Window::GetHandle() { + return window_handle_; +} + +void Win32Window::SetQuitOnClose(bool quit_on_close) { + quit_on_close_ = quit_on_close; +} + +bool Win32Window::OnCreate() { + // No-op; provided for subclasses. + return true; +} + +void Win32Window::OnDestroy() { + // No-op; provided for subclasses. +} diff --git a/packages/component_library/example/windows/runner/win32_window.h b/packages/component_library/example/windows/runner/win32_window.h new file mode 100644 index 0000000..17ba431 --- /dev/null +++ b/packages/component_library/example/windows/runner/win32_window.h @@ -0,0 +1,98 @@ +#ifndef RUNNER_WIN32_WINDOW_H_ +#define RUNNER_WIN32_WINDOW_H_ + +#include + +#include +#include +#include + +// A class abstraction for a high DPI-aware Win32 Window. Intended to be +// inherited from by classes that wish to specialize with custom +// rendering and input handling +class Win32Window { + public: + struct Point { + unsigned int x; + unsigned int y; + Point(unsigned int x, unsigned int y) : x(x), y(y) {} + }; + + struct Size { + unsigned int width; + unsigned int height; + Size(unsigned int width, unsigned int height) + : width(width), height(height) {} + }; + + Win32Window(); + virtual ~Win32Window(); + + // Creates and shows a win32 window with |title| and position and size using + // |origin| and |size|. New windows are created on the default monitor. Window + // sizes are specified to the OS in physical pixels, hence to ensure a + // consistent size to will treat the width height passed in to this function + // as logical pixels and scale to appropriate for the default monitor. Returns + // true if the window was created successfully. + bool CreateAndShow(const std::wstring& title, + const Point& origin, + const Size& size); + + // Release OS resources associated with window. + void Destroy(); + + // Inserts |content| into the window tree. + void SetChildContent(HWND content); + + // Returns the backing Window handle to enable clients to set icon and other + // window properties. Returns nullptr if the window has been destroyed. + HWND GetHandle(); + + // If true, closing this window will quit the application. + void SetQuitOnClose(bool quit_on_close); + + // Return a RECT representing the bounds of the current client area. + RECT GetClientArea(); + + protected: + // Processes and route salient window messages for mouse handling, + // size change and DPI. Delegates handling of these to member overloads that + // inheriting classes can handle. + virtual LRESULT MessageHandler(HWND window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Called when CreateAndShow is called, allowing subclass window-related + // setup. Subclasses should return false if setup fails. + virtual bool OnCreate(); + + // Called when Destroy is called. + virtual void OnDestroy(); + + private: + friend class WindowClassRegistrar; + + // OS callback called by message pump. Handles the WM_NCCREATE message which + // is passed when the non-client area is being created and enables automatic + // non-client DPI scaling so that the non-client area automatically + // responsponds to changes in DPI. All other messages are handled by + // MessageHandler. + static LRESULT CALLBACK WndProc(HWND const window, + UINT const message, + WPARAM const wparam, + LPARAM const lparam) noexcept; + + // Retrieves a class instance pointer for |window| + static Win32Window* GetThisFromHandle(HWND const window) noexcept; + + bool quit_on_close_ = false; + + // window handle for top level window. + HWND window_handle_ = nullptr; + + // window handle for hosted content. + HWND child_content_ = nullptr; +}; + +#endif // RUNNER_WIN32_WINDOW_H_ diff --git a/packages/component_library/l10n.yaml b/packages/component_library/l10n.yaml new file mode 100644 index 0000000..81dd443 --- /dev/null +++ b/packages/component_library/l10n.yaml @@ -0,0 +1,6 @@ +arb-dir: lib/src/l10n +template-arb-file: messages_en.arb +output-localization-file: component_library_localizations.dart +output-class: ComponentLibraryLocalizations +synthetic-package: false +nullable-getter: false \ No newline at end of file diff --git a/packages/component_library/lib/component_library.dart b/packages/component_library/lib/component_library.dart index f64ad72..90c09be 100644 --- a/packages/component_library/lib/component_library.dart +++ b/packages/component_library/lib/component_library.dart @@ -1,3 +1,24 @@ -int calculate() { - return 6 * 7; -} +export 'src/chevron_list_tile.dart'; +export 'src/count_indicator_icon_button.dart'; +export 'src/downvote_icon_button.dart'; +export 'src/exception_indicator.dart'; +export 'src/expanded_elevated_button.dart'; +export 'src/in_progress_text_button.dart'; +export 'src/favorite_icon_button.dart'; +export 'src/l10n/component_library_localizations.dart'; +export 'src/quote_card.dart'; +export 'src/centered_circular_progress_indicator.dart'; +export 'src/rounded_choice_chip.dart'; +export 'src/generic_error_snack_bar.dart'; +export 'src/authentication_required_error_snack_bar.dart'; +export 'src/row_app_bar.dart'; +export 'src/search_bar.dart'; +export 'src/share_icon_button.dart'; +export 'src/shrinkable_text.dart'; +export 'src/styled_status_bar.dart'; +export 'src/svg_asset.dart'; +export 'src/theme/font_size.dart'; +export 'src/theme/spacing.dart'; +export 'src/theme/wonder_theme.dart'; +export 'src/theme/wonder_theme_data.dart'; +export 'src/upvote_icon_button.dart'; diff --git a/packages/component_library/lib/src/authentication_required_error_snack_bar.dart b/packages/component_library/lib/src/authentication_required_error_snack_bar.dart new file mode 100644 index 0000000..df9f08c --- /dev/null +++ b/packages/component_library/lib/src/authentication_required_error_snack_bar.dart @@ -0,0 +1,23 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class AuthenticationRequiredErrorSnackBar extends SnackBar { + const AuthenticationRequiredErrorSnackBar({Key? key}) + : super( + key: key, + content: const _AuthenticationRequiredErrorSnackBarMessage(), + ); +} + +class _AuthenticationRequiredErrorSnackBarMessage extends StatelessWidget { + const _AuthenticationRequiredErrorSnackBarMessage({Key? key}) + : super(key: key); + + @override + Widget build(BuildContext context) { + final l10n = ComponentLibraryLocalizations.of(context); + return Text( + l10n.authenticationRequiredErrorSnackbarMessage, + ); + } +} diff --git a/packages/component_library/lib/src/centered_circular_progress_indicator.dart b/packages/component_library/lib/src/centered_circular_progress_indicator.dart new file mode 100644 index 0000000..d152abe --- /dev/null +++ b/packages/component_library/lib/src/centered_circular_progress_indicator.dart @@ -0,0 +1,12 @@ +import 'package:flutter/material.dart'; + +class CenteredCircularProgressIndicator extends StatelessWidget { + const CenteredCircularProgressIndicator({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + return const Center( + child: CircularProgressIndicator(), + ); + } +} diff --git a/packages/component_library/lib/src/chevron_list_tile.dart b/packages/component_library/lib/src/chevron_list_tile.dart new file mode 100644 index 0000000..45a66a6 --- /dev/null +++ b/packages/component_library/lib/src/chevron_list_tile.dart @@ -0,0 +1,29 @@ +import 'package:component_library/src/theme/font_size.dart'; +import 'package:flutter/material.dart'; + +class ChevronListTile extends StatelessWidget { + const ChevronListTile({ + required this.label, + this.onTap, + Key? key, + }) : super(key: key); + + final String label; + final VoidCallback? onTap; + + @override + Widget build(BuildContext context) { + return ListTile( + title: Text( + label, + style: const TextStyle( + fontSize: FontSize.mediumLarge, + ), + ), + trailing: const Icon( + Icons.chevron_right_outlined, + ), + onTap: onTap, + ); + } +} diff --git a/packages/component_library/lib/src/count_indicator_icon_button.dart b/packages/component_library/lib/src/count_indicator_icon_button.dart new file mode 100644 index 0000000..66558e2 --- /dev/null +++ b/packages/component_library/lib/src/count_indicator_icon_button.dart @@ -0,0 +1,43 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class CountIndicatorIconButton extends StatelessWidget { + const CountIndicatorIconButton({ + required this.count, + required this.iconData, + this.iconColor, + this.tooltip, + this.onTap, + Key? key, + }) : super(key: key); + + final int count; + final IconData iconData; + final Color? iconColor; + final String? tooltip; + final VoidCallback? onTap; + + @override + Widget build(BuildContext context) { + return IconButton( + onPressed: onTap, + tooltip: tooltip, + padding: const EdgeInsets.all(0), + icon: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Icon( + iconData, + color: iconColor, + ), + Text( + count.toString(), + style: const TextStyle( + fontSize: FontSize.small, + ), + ), + ], + ), + ); + } +} diff --git a/packages/component_library/lib/src/downvote_icon_button.dart b/packages/component_library/lib/src/downvote_icon_button.dart new file mode 100644 index 0000000..ccb721b --- /dev/null +++ b/packages/component_library/lib/src/downvote_icon_button.dart @@ -0,0 +1,29 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class DownvoteIconButton extends StatelessWidget { + const DownvoteIconButton({ + required this.count, + required this.isDownvoted, + this.onTap, + Key? key, + }) : super(key: key); + + final int count; + final VoidCallback? onTap; + final bool isDownvoted; + + @override + Widget build(BuildContext context) { + final l10n = ComponentLibraryLocalizations.of(context); + final theme = WonderTheme.of(context); + return CountIndicatorIconButton( + onTap: onTap, + tooltip: l10n.downvoteIconButtonTooltip, + iconData: Icons.arrow_downward_sharp, + iconColor: + isDownvoted ? theme.votedButtonColor : theme.unvotedButtonColor, + count: count, + ); + } +} diff --git a/packages/component_library/lib/src/exception_indicator.dart b/packages/component_library/lib/src/exception_indicator.dart new file mode 100644 index 0000000..9a2259e --- /dev/null +++ b/packages/component_library/lib/src/exception_indicator.dart @@ -0,0 +1,67 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class ExceptionIndicator extends StatelessWidget { + const ExceptionIndicator({ + this.title, + this.message, + this.onTryAgain, + Key? key, + }) : super(key: key); + + final String? title; + final String? message; + final VoidCallback? onTryAgain; + + @override + Widget build(BuildContext context) { + final l10n = ComponentLibraryLocalizations.of(context); + return Center( + child: Padding( + padding: const EdgeInsets.symmetric( + vertical: 32, + horizontal: 16, + ), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Icon( + Icons.error, + size: 48, + ), + const SizedBox( + height: Spacing.xxLarge, + ), + Text( + title ?? l10n.exceptionIndicatorGenericTitle, + textAlign: TextAlign.center, + style: const TextStyle( + fontSize: FontSize.mediumLarge, + fontWeight: FontWeight.bold, + ), + ), + const SizedBox( + height: 16, + ), + Text( + title ?? l10n.exceptionIndicatorGenericMessage, + textAlign: TextAlign.center, + ), + if (onTryAgain != null) + const SizedBox( + height: Spacing.xxxLarge, + ), + if (onTryAgain != null) + ExpandedElevatedButton( + onTap: onTryAgain, + icon: const Icon( + Icons.refresh, + ), + label: l10n.exceptionIndicatorTryAgainButton, + ), + ], + ), + ), + ); + } +} diff --git a/packages/component_library/lib/src/expanded_elevated_button.dart b/packages/component_library/lib/src/expanded_elevated_button.dart new file mode 100644 index 0000000..e2cf33f --- /dev/null +++ b/packages/component_library/lib/src/expanded_elevated_button.dart @@ -0,0 +1,51 @@ +import 'package:flutter/material.dart'; + +class ExpandedElevatedButton extends StatelessWidget { + static const double _elevatedButtonHeight = 48; + + const ExpandedElevatedButton({ + required this.label, + this.onTap, + this.icon, + Key? key, + }) : super(key: key); + + ExpandedElevatedButton.inProgress({ + required String label, + Key? key, + }) : this( + label: label, + icon: Transform.scale( + scale: 0.5, + child: const CircularProgressIndicator(), + ), + key: key, + ); + + final VoidCallback? onTap; + final String label; + final Widget? icon; + + @override + Widget build(BuildContext context) { + final icon = this.icon; + return SizedBox( + height: _elevatedButtonHeight, + width: double.infinity, + child: icon != null + ? ElevatedButton.icon( + onPressed: onTap, + label: Text( + label, + ), + icon: icon, + ) + : ElevatedButton( + onPressed: onTap, + child: Text( + label, + ), + ), + ); + } +} diff --git a/packages/component_library/lib/src/favorite_icon_button.dart b/packages/component_library/lib/src/favorite_icon_button.dart new file mode 100644 index 0000000..44092c1 --- /dev/null +++ b/packages/component_library/lib/src/favorite_icon_button.dart @@ -0,0 +1,25 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class FavoriteIconButton extends StatelessWidget { + const FavoriteIconButton({ + required this.isFavorite, + this.onTap, + Key? key, + }) : super(key: key); + + final bool isFavorite; + final VoidCallback? onTap; + + @override + Widget build(BuildContext context) { + final l10n = ComponentLibraryLocalizations.of(context); + return IconButton( + onPressed: onTap, + tooltip: l10n.favoriteIconButtonTooltip, + icon: Icon( + isFavorite ? Icons.favorite : Icons.favorite_border_outlined, + ), + ); + } +} diff --git a/packages/component_library/lib/src/generic_error_snack_bar.dart b/packages/component_library/lib/src/generic_error_snack_bar.dart new file mode 100644 index 0000000..fdd12f2 --- /dev/null +++ b/packages/component_library/lib/src/generic_error_snack_bar.dart @@ -0,0 +1,22 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class GenericErrorSnackBar extends SnackBar { + const GenericErrorSnackBar({Key? key}) + : super( + key: key, + content: const _GenericErrorSnackBarMessage(), + ); +} + +class _GenericErrorSnackBarMessage extends StatelessWidget { + const _GenericErrorSnackBarMessage({Key? key}) : super(key: key); + + @override + Widget build(BuildContext context) { + final l10n = ComponentLibraryLocalizations.of(context); + return Text( + l10n.genericErrorSnackbarMessage, + ); + } +} diff --git a/packages/component_library/lib/src/in_progress_text_button.dart b/packages/component_library/lib/src/in_progress_text_button.dart new file mode 100644 index 0000000..b8143ca --- /dev/null +++ b/packages/component_library/lib/src/in_progress_text_button.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; + +class InProgressTextButton extends StatelessWidget { + const InProgressTextButton({ + required this.label, + Key? key, + }) : super(key: key); + + final String label; + + @override + Widget build(BuildContext context) { + return TextButton.icon( + icon: Transform.scale( + scale: 0.5, + child: const CircularProgressIndicator(), + ), + label: Text( + label, + ), + onPressed: null, + ); + } +} diff --git a/packages/component_library/lib/src/l10n/component_library_localizations.dart b/packages/component_library/lib/src/l10n/component_library_localizations.dart new file mode 100644 index 0000000..9c334bc --- /dev/null +++ b/packages/component_library/lib/src/l10n/component_library_localizations.dart @@ -0,0 +1,200 @@ +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:intl/intl.dart' as intl; + +import 'component_library_localizations_en.dart'; +import 'component_library_localizations_pt.dart'; + +/// Callers can lookup localized strings with an instance of ComponentLibraryLocalizations returned +/// by `ComponentLibraryLocalizations.of(context)`. +/// +/// Applications need to include `ComponentLibraryLocalizations.delegate()` in their app's +/// localizationDelegates list, and the locales they support in the app's +/// supportedLocales list. For example: +/// +/// ``` +/// import 'l10n/component_library_localizations.dart'; +/// +/// return MaterialApp( +/// localizationsDelegates: ComponentLibraryLocalizations.localizationsDelegates, +/// supportedLocales: ComponentLibraryLocalizations.supportedLocales, +/// home: MyApplicationHome(), +/// ); +/// ``` +/// +/// ## Update pubspec.yaml +/// +/// Please make sure to update your pubspec.yaml to include the following +/// packages: +/// +/// ``` +/// dependencies: +/// # Internationalization support. +/// flutter_localizations: +/// sdk: flutter +/// intl: any # Use the pinned version from flutter_localizations +/// +/// # rest of dependencies +/// ``` +/// +/// ## iOS Applications +/// +/// iOS applications define key application metadata, including supported +/// locales, in an Info.plist file that is built into the application bundle. +/// To configure the locales supported by your app, you’ll need to edit this +/// file. +/// +/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file. +/// Then, in the Project Navigator, open the Info.plist file under the Runner +/// project’s Runner folder. +/// +/// Next, select the Information Property List item, select Add Item from the +/// Editor menu, then select Localizations from the pop-up menu. +/// +/// Select and expand the newly-created Localizations item then, for each +/// locale your application supports, add a new item and select the locale +/// you wish to add from the pop-up menu in the Value field. This list should +/// be consistent with the languages listed in the ComponentLibraryLocalizations.supportedLocales +/// property. +abstract class ComponentLibraryLocalizations { + ComponentLibraryLocalizations(String locale) + : localeName = intl.Intl.canonicalizedLocale(locale.toString()); + + final String localeName; + + static ComponentLibraryLocalizations of(BuildContext context) { + return Localizations.of( + context, ComponentLibraryLocalizations)!; + } + + static const LocalizationsDelegate delegate = + _ComponentLibraryLocalizationsDelegate(); + + /// A list of this localizations delegate along with the default localizations + /// delegates. + /// + /// Returns a list of localizations delegates containing this delegate along with + /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, + /// and GlobalWidgetsLocalizations.delegate. + /// + /// Additional delegates can be added by appending to this list in + /// MaterialApp. This list does not have to be used at all if a custom list + /// of delegates is preferred or required. + static const List> localizationsDelegates = + >[ + delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ]; + + /// A list of this localizations delegate's supported locales. + static const List supportedLocales = [ + Locale('en'), + Locale('pt') + ]; + + /// No description provided for @downvoteIconButtonTooltip. + /// + /// In en, this message translates to: + /// **'Downvote'** + String get downvoteIconButtonTooltip; + + /// No description provided for @upvoteIconButtonTooltip. + /// + /// In en, this message translates to: + /// **'Upvote'** + String get upvoteIconButtonTooltip; + + /// No description provided for @searchBarHintText. + /// + /// In en, this message translates to: + /// **'journey'** + String get searchBarHintText; + + /// No description provided for @searchBarLabelText. + /// + /// In en, this message translates to: + /// **'Search'** + String get searchBarLabelText; + + /// No description provided for @shareIconButtonTooltip. + /// + /// In en, this message translates to: + /// **'Share'** + String get shareIconButtonTooltip; + + /// No description provided for @favoriteIconButtonTooltip. + /// + /// In en, this message translates to: + /// **'Favorite'** + String get favoriteIconButtonTooltip; + + /// No description provided for @exceptionIndicatorGenericTitle. + /// + /// In en, this message translates to: + /// **'Something went wrong'** + String get exceptionIndicatorGenericTitle; + + /// No description provided for @exceptionIndicatorTryAgainButton. + /// + /// In en, this message translates to: + /// **'Try Again'** + String get exceptionIndicatorTryAgainButton; + + /// No description provided for @exceptionIndicatorGenericMessage. + /// + /// In en, this message translates to: + /// **'There has been an error.\nPlease, check your internet connection and try again later.'** + String get exceptionIndicatorGenericMessage; + + /// No description provided for @genericErrorSnackbarMessage. + /// + /// In en, this message translates to: + /// **'There has been an error. Please, check your internet connection.'** + String get genericErrorSnackbarMessage; + + /// No description provided for @authenticationRequiredErrorSnackbarMessage. + /// + /// In en, this message translates to: + /// **'You need to sign in before performing this action.'** + String get authenticationRequiredErrorSnackbarMessage; +} + +class _ComponentLibraryLocalizationsDelegate + extends LocalizationsDelegate { + const _ComponentLibraryLocalizationsDelegate(); + + @override + Future load(Locale locale) { + return SynchronousFuture( + lookupComponentLibraryLocalizations(locale)); + } + + @override + bool isSupported(Locale locale) => + ['en', 'pt'].contains(locale.languageCode); + + @override + bool shouldReload(_ComponentLibraryLocalizationsDelegate old) => false; +} + +ComponentLibraryLocalizations lookupComponentLibraryLocalizations( + Locale locale) { + // Lookup logic when only language code is specified. + switch (locale.languageCode) { + case 'en': + return ComponentLibraryLocalizationsEn(); + case 'pt': + return ComponentLibraryLocalizationsPt(); + } + + throw FlutterError( + 'ComponentLibraryLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' + 'an issue with the localizations generation tool. Please file an issue ' + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' + 'that was used.'); +} diff --git a/packages/component_library/lib/src/l10n/component_library_localizations_en.dart b/packages/component_library/lib/src/l10n/component_library_localizations_en.dart new file mode 100644 index 0000000..bb2968c --- /dev/null +++ b/packages/component_library/lib/src/l10n/component_library_localizations_en.dart @@ -0,0 +1,42 @@ +import 'component_library_localizations.dart'; + +/// The translations for English (`en`). +class ComponentLibraryLocalizationsEn extends ComponentLibraryLocalizations { + ComponentLibraryLocalizationsEn([String locale = 'en']) : super(locale); + + @override + String get downvoteIconButtonTooltip => 'Downvote'; + + @override + String get upvoteIconButtonTooltip => 'Upvote'; + + @override + String get searchBarHintText => 'journey'; + + @override + String get searchBarLabelText => 'Search'; + + @override + String get shareIconButtonTooltip => 'Share'; + + @override + String get favoriteIconButtonTooltip => 'Favorite'; + + @override + String get exceptionIndicatorGenericTitle => 'Something went wrong'; + + @override + String get exceptionIndicatorTryAgainButton => 'Try Again'; + + @override + String get exceptionIndicatorGenericMessage => + 'There has been an error.\nPlease, check your internet connection and try again later.'; + + @override + String get genericErrorSnackbarMessage => + 'There has been an error. Please, check your internet connection.'; + + @override + String get authenticationRequiredErrorSnackbarMessage => + 'You need to sign in before performing this action.'; +} diff --git a/packages/component_library/lib/src/l10n/component_library_localizations_pt.dart b/packages/component_library/lib/src/l10n/component_library_localizations_pt.dart new file mode 100644 index 0000000..ef10323 --- /dev/null +++ b/packages/component_library/lib/src/l10n/component_library_localizations_pt.dart @@ -0,0 +1,42 @@ +import 'component_library_localizations.dart'; + +/// The translations for Portuguese (`pt`). +class ComponentLibraryLocalizationsPt extends ComponentLibraryLocalizations { + ComponentLibraryLocalizationsPt([String locale = 'pt']) : super(locale); + + @override + String get downvoteIconButtonTooltip => 'Negativo'; + + @override + String get upvoteIconButtonTooltip => 'Positivo'; + + @override + String get searchBarHintText => 'jornada'; + + @override + String get searchBarLabelText => 'Pesquisar'; + + @override + String get shareIconButtonTooltip => 'Compartilhar'; + + @override + String get favoriteIconButtonTooltip => 'Favoritar'; + + @override + String get exceptionIndicatorGenericTitle => 'Algo deu errado'; + + @override + String get exceptionIndicatorTryAgainButton => 'Tentar Novamente'; + + @override + String get exceptionIndicatorGenericMessage => + 'Ocorreu um erro.\nPor favor, confira sua conexão com a internet e tente novamente mais tarde.'; + + @override + String get genericErrorSnackbarMessage => + 'Ocorreu um erro. Por favor, confira sua conexão com a internet.'; + + @override + String get authenticationRequiredErrorSnackbarMessage => + 'Você precisa estar logado para executar essa ação.'; +} diff --git a/packages/component_library/lib/src/l10n/messages_en.arb b/packages/component_library/lib/src/l10n/messages_en.arb new file mode 100644 index 0000000..e2b441e --- /dev/null +++ b/packages/component_library/lib/src/l10n/messages_en.arb @@ -0,0 +1,13 @@ +{ + "downvoteIconButtonTooltip": "Downvote", + "upvoteIconButtonTooltip": "Upvote", + "searchBarHintText": "journey", + "searchBarLabelText": "Search", + "shareIconButtonTooltip": "Share", + "favoriteIconButtonTooltip": "Favorite", + "exceptionIndicatorGenericTitle": "Something went wrong", + "exceptionIndicatorTryAgainButton": "Try Again", + "exceptionIndicatorGenericMessage": "There has been an error.\nPlease, check your internet connection and try again later.", + "genericErrorSnackbarMessage": "There has been an error. Please, check your internet connection.", + "authenticationRequiredErrorSnackbarMessage": "You need to sign in before performing this action." +} \ No newline at end of file diff --git a/packages/component_library/lib/src/l10n/messages_pt.arb b/packages/component_library/lib/src/l10n/messages_pt.arb new file mode 100644 index 0000000..c359d2b --- /dev/null +++ b/packages/component_library/lib/src/l10n/messages_pt.arb @@ -0,0 +1,13 @@ +{ + "downvoteIconButtonTooltip": "Negativo", + "upvoteIconButtonTooltip": "Positivo", + "searchBarHintText": "jornada", + "searchBarLabelText": "Pesquisar", + "shareIconButtonTooltip": "Compartilhar", + "favoriteIconButtonTooltip": "Favoritar", + "exceptionIndicatorGenericTitle": "Algo deu errado", + "exceptionIndicatorTryAgainButton": "Tentar Novamente", + "exceptionIndicatorGenericMessage": "Ocorreu um erro.\nPor favor, confira sua conexão com a internet e tente novamente mais tarde.", + "genericErrorSnackbarMessage": "Ocorreu um erro. Por favor, confira sua conexão com a internet.", + "authenticationRequiredErrorSnackbarMessage": "Você precisa estar logado para executar essa ação." +} \ No newline at end of file diff --git a/packages/component_library/lib/src/quote_card.dart b/packages/component_library/lib/src/quote_card.dart new file mode 100644 index 0000000..5428cb3 --- /dev/null +++ b/packages/component_library/lib/src/quote_card.dart @@ -0,0 +1,91 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class QuoteCard extends StatelessWidget { + const QuoteCard({ + required this.statement, + required this.isFavorite, + this.author, + this.top, + this.bottom, + this.onTap, + this.onFavorite, + Key? key, + }) : super(key: key); + + final String statement; + final String? author; + final bool isFavorite; + final Widget? top; + final Widget? bottom; + final VoidCallback? onTap; + final VoidCallback? onFavorite; + + @override + Widget build(BuildContext context) { + final top = this.top; + final bottom = this.bottom; + final theme = WonderTheme.of(context); + final author = this.author; + return Card( + margin: const EdgeInsets.all(0), + child: InkWell( + onTap: onTap, + child: Column( + crossAxisAlignment: CrossAxisAlignment.end, + children: [ + Row( + children: [ + if (top != null) + Padding( + padding: const EdgeInsets.only( + left: Spacing.medium, + ), + child: top, + ), + const Spacer(), + IconButton( + onPressed: onFavorite, + icon: Icon( + isFavorite + ? Icons.favorite + : Icons.favorite_border_outlined, + ), + ) + ], + ), + Padding( + padding: const EdgeInsets.symmetric( + horizontal: Spacing.xLarge, + ), + child: Text( + statement, + style: theme.quoteTextStyle.copyWith( + fontSize: FontSize.large, + ), + ), + ), + if (bottom != null) + Padding( + padding: const EdgeInsets.only( + right: Spacing.medium, + ), + child: bottom, + ), + const SizedBox( + height: Spacing.mediumLarge, + ), + if (author != null) + Padding( + padding: const EdgeInsets.only( + bottom: Spacing.medium, + right: Spacing.medium, + ), + child: Text(author), + ), + ], + ), + ), + ); + } +} diff --git a/packages/component_library/lib/src/rounded_choice_chip.dart b/packages/component_library/lib/src/rounded_choice_chip.dart new file mode 100644 index 0000000..46806b5 --- /dev/null +++ b/packages/component_library/lib/src/rounded_choice_chip.dart @@ -0,0 +1,51 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class RoundedChoiceChip extends StatelessWidget { + const RoundedChoiceChip({ + required this.label, + required this.isSelected, + this.avatar, + this.labelColor, + this.selectedLabelColor, + this.backgroundColor, + this.selectedBackgroundColor, + this.onSelected, + Key? key, + }) : super(key: key); + + final String label; + final Widget? avatar; + final ValueChanged? onSelected; + final Color? labelColor; + final Color? selectedLabelColor; + final Color? backgroundColor; + final Color? selectedBackgroundColor; + final bool isSelected; + + @override + Widget build(BuildContext context) { + final theme = WonderTheme.of(context); + return ChoiceChip( + shape: const StadiumBorder( + side: BorderSide(), + ), + avatar: avatar, + label: Text( + label, + style: TextStyle( + color: isSelected + ? (selectedLabelColor ?? + theme.roundedChoiceChipSelectedLabelColor) + : (labelColor ?? theme.roundedChoiceChipLabelColor), + ), + ), + onSelected: onSelected, + selected: isSelected, + backgroundColor: + (backgroundColor ?? theme.roundedChoiceChipBackgroundColor), + selectedColor: (selectedBackgroundColor ?? + theme.roundedChoiceChipSelectedBackgroundColor), + ); + } +} diff --git a/packages/component_library/lib/src/row_app_bar.dart b/packages/component_library/lib/src/row_app_bar.dart new file mode 100644 index 0000000..dc83aed --- /dev/null +++ b/packages/component_library/lib/src/row_app_bar.dart @@ -0,0 +1,35 @@ +import 'package:component_library/component_library.dart'; +import 'package:component_library/src/theme/spacing.dart'; +import 'package:flutter/material.dart'; + +class RowAppBar extends StatelessWidget implements PreferredSizeWidget { + const RowAppBar({ + Key? key, + this.children = const [], + }) : super(key: key); + + final List children; + + @override + Widget build(BuildContext context) { + return SafeArea( + child: Padding( + padding: const EdgeInsets.only( + top: Spacing.small, + left: Spacing.small, + right: Spacing.small, + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + const BackButton(), + ...children, + ], + ), + ), + ); + } + + @override + Size get preferredSize => const Size.fromHeight(kToolbarHeight); +} diff --git a/packages/component_library/lib/src/search_bar.dart b/packages/component_library/lib/src/search_bar.dart new file mode 100644 index 0000000..dc10a28 --- /dev/null +++ b/packages/component_library/lib/src/search_bar.dart @@ -0,0 +1,29 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class SearchBar extends StatelessWidget { + const SearchBar({ + this.controller, + this.onChanged, + Key? key, + }) : super(key: key); + + final TextEditingController? controller; + final ValueChanged? onChanged; + + @override + Widget build(BuildContext context) { + final l10n = ComponentLibraryLocalizations.of(context); + return TextField( + controller: controller, + decoration: InputDecoration( + suffixIcon: const Icon( + Icons.search, + ), + hintText: l10n.searchBarHintText, + labelText: l10n.searchBarLabelText, + ), + onChanged: onChanged, + ); + } +} diff --git a/packages/component_library/lib/src/share_icon_button.dart b/packages/component_library/lib/src/share_icon_button.dart new file mode 100644 index 0000000..7f80490 --- /dev/null +++ b/packages/component_library/lib/src/share_icon_button.dart @@ -0,0 +1,23 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class ShareIconButton extends StatelessWidget { + const ShareIconButton({ + Key? key, + this.onTap, + }) : super(key: key); + + final VoidCallback? onTap; + + @override + Widget build(BuildContext context) { + final l10n = ComponentLibraryLocalizations.of(context); + return IconButton( + onPressed: onTap, + tooltip: l10n.shareIconButtonTooltip, + icon: const Icon( + Icons.share, + ), + ); + } +} diff --git a/packages/component_library/lib/src/shrinkable_text.dart b/packages/component_library/lib/src/shrinkable_text.dart new file mode 100644 index 0000000..3c31788 --- /dev/null +++ b/packages/component_library/lib/src/shrinkable_text.dart @@ -0,0 +1,24 @@ +import 'package:auto_size_text/auto_size_text.dart'; +import 'package:flutter/material.dart'; + +class ShrinkableText extends StatelessWidget { + const ShrinkableText( + this.data, { + this.style, + this.textAlign = TextAlign.center, + Key? key, + }) : super(key: key); + + final String data; + final TextStyle? style; + final TextAlign? textAlign; + + @override + Widget build(BuildContext context) { + return AutoSizeText( + data, + style: style, + textAlign: textAlign, + ); + } +} diff --git a/packages/component_library/lib/src/styled_status_bar.dart b/packages/component_library/lib/src/styled_status_bar.dart new file mode 100644 index 0000000..ff361ac --- /dev/null +++ b/packages/component_library/lib/src/styled_status_bar.dart @@ -0,0 +1,41 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/services.dart'; + +// Useful for changing the status bar color when the screen doesn't have an +// AppBar. For screens with AppBars, please use the [] property. +class StyledStatusBar extends StatelessWidget { + const StyledStatusBar._({ + required this.child, + required this.style, + Key? key, + }) : super(key: key); + + const StyledStatusBar.light({ + required Widget child, + Key? key, + }) : this._( + child: child, + style: SystemUiOverlayStyle.light, + key: key, + ); + + const StyledStatusBar.dark({ + required Widget child, + Key? key, + }) : this._( + child: child, + style: SystemUiOverlayStyle.dark, + key: key, + ); + + final Widget child; + final SystemUiOverlayStyle style; + + @override + Widget build(BuildContext context) { + return AnnotatedRegion( + value: style, + child: child, + ); + } +} diff --git a/packages/component_library/lib/src/svg_asset.dart b/packages/component_library/lib/src/svg_asset.dart new file mode 100644 index 0000000..d707332 --- /dev/null +++ b/packages/component_library/lib/src/svg_asset.dart @@ -0,0 +1,78 @@ +import 'package:component_library/src/theme/wonder_theme.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +class _SvgAsset extends StatelessWidget { + const _SvgAsset( + this.assetPath, { + this.width, + this.height, + this.color, + Key? key, + }) : super(key: key); + + final String assetPath; + final double? width; + final double? height; + final Color? color; + + @override + Widget build(BuildContext context) { + return SvgPicture.asset( + 'assets/$assetPath', + width: width, + height: height, + color: color, + package: 'component_library', + ); + } +} + +class OpeningQuoteSvgAsset extends StatelessWidget { + const OpeningQuoteSvgAsset({ + this.width, + this.height, + this.color, + Key? key, + }) : super(key: key); + + final double? width; + final double? height; + final Color? color; + + @override + Widget build(BuildContext context) { + final theme = WonderTheme.of(context); + return _SvgAsset( + 'opening-quote.svg', + width: width, + height: height, + color: theme.quoteSvgColor, + ); + } +} + +class ClosingQuoteSvgAsset extends StatelessWidget { + const ClosingQuoteSvgAsset({ + this.width, + this.height, + this.color, + Key? key, + }) : super(key: key); + + final double? width; + final double? height; + final Color? color; + + @override + Widget build(BuildContext context) { + final theme = WonderTheme.of(context); + return _SvgAsset( + 'closing-quote.svg', + width: width, + height: height, + color: theme.quoteSvgColor, + ); + } +} diff --git a/packages/component_library/lib/src/theme/font_size.dart b/packages/component_library/lib/src/theme/font_size.dart new file mode 100644 index 0000000..0bd0d1d --- /dev/null +++ b/packages/component_library/lib/src/theme/font_size.dart @@ -0,0 +1,8 @@ +abstract class FontSize { + static const double small = 11; + static const double medium = 14; + static const double mediumLarge = 18; + static const double large = 22; + static const double xLarge = 64; + static const double xxLarge = 192; +} diff --git a/packages/component_library/lib/src/theme/spacing.dart b/packages/component_library/lib/src/theme/spacing.dart new file mode 100644 index 0000000..9fa8770 --- /dev/null +++ b/packages/component_library/lib/src/theme/spacing.dart @@ -0,0 +1,10 @@ +abstract class Spacing { + static const double xSmall = 4; + static const double small = 8; + static const double medium = 12; + static const double mediumLarge = 16; + static const double large = 20; + static const double xLarge = 24; + static const double xxLarge = 48; + static const double xxxLarge = 64; +} diff --git a/packages/component_library/lib/src/theme/wonder_theme.dart b/packages/component_library/lib/src/theme/wonder_theme.dart new file mode 100644 index 0000000..79d43d5 --- /dev/null +++ b/packages/component_library/lib/src/theme/wonder_theme.dart @@ -0,0 +1,33 @@ +import 'package:component_library/src/theme/wonder_theme_data.dart'; +import 'package:flutter/material.dart'; + +class WonderTheme extends InheritedWidget { + const WonderTheme({ + required Widget child, + required this.lightTheme, + required this.darkTheme, + Key? key, + }) : super( + key: key, + child: child, + ); + + final WonderThemeData lightTheme; + final WonderThemeData darkTheme; + + @override + bool updateShouldNotify( + WonderTheme oldWidget, + ) => + oldWidget.lightTheme != lightTheme || oldWidget.darkTheme != darkTheme; + + static WonderThemeData of(BuildContext context) { + final WonderTheme? inheritedTheme = + context.dependOnInheritedWidgetOfExactType(); + assert(inheritedTheme != null, 'No WonderTheme found in context'); + final currentBrightness = Theme.of(context).brightness; + return currentBrightness == Brightness.dark + ? inheritedTheme!.darkTheme + : inheritedTheme!.lightTheme; + } +} diff --git a/packages/component_library/lib/src/theme/wonder_theme_data.dart b/packages/component_library/lib/src/theme/wonder_theme_data.dart new file mode 100644 index 0000000..fab49c3 --- /dev/null +++ b/packages/component_library/lib/src/theme/wonder_theme_data.dart @@ -0,0 +1,133 @@ +import 'package:component_library/component_library.dart'; +import 'package:component_library/src/theme/spacing.dart'; +import 'package:flutter/material.dart'; + +const _dividerThemeData = DividerThemeData( + space: 0, +); + +// If the number of properties get too big, we can start grouping them in +// classes like Flutter does with TextTheme, ButtonTheme, etc, inside ThemeData. +abstract class WonderThemeData { + ThemeData get materialThemeData; + + double screenMargin = Spacing.mediumLarge; + + double gridSpacing = Spacing.mediumLarge; + + Color get roundedChoiceChipBackgroundColor; + + Color get roundedChoiceChipSelectedBackgroundColor; + + Color get roundedChoiceChipLabelColor; + + Color get roundedChoiceChipSelectedLabelColor; + + Color get roundedChoiceChipAvatarColor; + + Color get roundedChoiceChipSelectedAvatarColor; + + Color get quoteSvgColor; + + Color get unvotedButtonColor; + + Color get votedButtonColor; + + TextStyle quoteTextStyle = const TextStyle( + fontFamily: 'Fondamento', + package: 'component_library', + ); +} + +class LightWonderThemeData extends WonderThemeData { + @override + ThemeData get materialThemeData => ThemeData( + brightness: Brightness.light, + primarySwatch: Colors.black.toMaterialColor(), + dividerTheme: _dividerThemeData, + ); + + @override + Color get roundedChoiceChipBackgroundColor => Colors.white; + + @override + Color get roundedChoiceChipLabelColor => Colors.black; + + @override + Color get roundedChoiceChipSelectedBackgroundColor => Colors.black; + + @override + Color get roundedChoiceChipSelectedLabelColor => Colors.white; + + @override + Color get quoteSvgColor => Colors.black; + + @override + Color get roundedChoiceChipAvatarColor => Colors.black; + + @override + Color get roundedChoiceChipSelectedAvatarColor => Colors.white; + + @override + Color get unvotedButtonColor => Colors.black54; + + @override + Color get votedButtonColor => Colors.black; +} + +class DarkWonderThemeData extends WonderThemeData { + @override + ThemeData get materialThemeData => ThemeData( + brightness: Brightness.dark, + toggleableActiveColor: Colors.white, + primarySwatch: Colors.white.toMaterialColor(), + dividerTheme: _dividerThemeData, + ); + + @override + Color get roundedChoiceChipBackgroundColor => Colors.black; + + @override + Color get roundedChoiceChipLabelColor => Colors.white; + + @override + Color get roundedChoiceChipSelectedBackgroundColor => Colors.white; + + @override + Color get roundedChoiceChipSelectedLabelColor => Colors.black; + + @override + Color get quoteSvgColor => Colors.white; + + @override + Color get roundedChoiceChipAvatarColor => Colors.white; + + @override + Color get roundedChoiceChipSelectedAvatarColor => Colors.black; + + @override + Color get unvotedButtonColor => Colors.white54; + + @override + Color get votedButtonColor => Colors.white; +} + +extension on Color { + Map _toSwatch() => { + 50: withOpacity(0.1), + 100: withOpacity(0.2), + 200: withOpacity(0.3), + 300: withOpacity(0.4), + 400: withOpacity(0.5), + 500: withOpacity(0.6), + 600: withOpacity(0.7), + 700: withOpacity(0.8), + 800: withOpacity(0.9), + 900: this, + }; + + MaterialColor toMaterialColor() => MaterialColor( + value, + _toSwatch(), + ); +} diff --git a/packages/component_library/lib/src/upvote_icon_button.dart b/packages/component_library/lib/src/upvote_icon_button.dart new file mode 100644 index 0000000..06a28ad --- /dev/null +++ b/packages/component_library/lib/src/upvote_icon_button.dart @@ -0,0 +1,28 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +class UpvoteIconButton extends StatelessWidget { + const UpvoteIconButton({ + required this.count, + required this.isUpvoted, + this.onTap, + Key? key, + }) : super(key: key); + + final int count; + final bool isUpvoted; + final VoidCallback? onTap; + + @override + Widget build(BuildContext context) { + final l10n = ComponentLibraryLocalizations.of(context); + final theme = WonderTheme.of(context); + return CountIndicatorIconButton( + onTap: onTap, + tooltip: l10n.upvoteIconButtonTooltip, + iconData: Icons.arrow_upward_sharp, + iconColor: isUpvoted ? theme.votedButtonColor : theme.unvotedButtonColor, + count: count, + ); + } +} diff --git a/packages/component_library/pubspec.lock b/packages/component_library/pubspec.lock index c362f1c..9ce5094 100644 --- a/packages/component_library/pubspec.lock +++ b/packages/component_library/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "50.0.0" + version: "47.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "5.2.0" + version: "4.7.0" args: dependency: transitive description: @@ -28,21 +28,42 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.10.0" + version: "2.9.0" + auto_size_text: + dependency: "direct main" + description: + name: auto_size_text + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.17.0" + version: "1.16.0" convert: dependency: transitive description: @@ -64,6 +85,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.0.2" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" file: dependency: transitive description: @@ -71,13 +99,42 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "6.1.4" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + flutter_localizations: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" frontend_server_client: dependency: transitive description: name: frontend_server_client url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "2.1.3" glob: dependency: transitive description: @@ -99,6 +156,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.2" + intl: + dependency: "direct main" + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.0" io: dependency: transitive description: @@ -114,12 +178,12 @@ packages: source: hosted version: "0.6.5" lints: - dependency: "direct dev" + dependency: transitive description: name: lints url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "1.0.1" logging: dependency: transitive description: @@ -133,7 +197,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.13" + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" meta: dependency: transitive description: @@ -148,6 +219,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.3" + mocktail: + dependency: "direct dev" + description: + name: mocktail + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" node_preamble: dependency: transitive description: @@ -169,6 +247,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.2" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.0" pool: dependency: transitive description: @@ -211,6 +310,11 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" source_map_stack_trace: dependency: transitive description: @@ -231,28 +335,28 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.9.1" + version: "1.9.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.11.0" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.1.1" term_glyph: dependency: transitive description: @@ -266,21 +370,21 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.22.0" + version: "1.21.4" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.16" + version: "0.4.12" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.20" + version: "0.4.16" typed_data: dependency: transitive description: @@ -288,6 +392,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.1" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" vm_service: dependency: transitive description: @@ -316,6 +427,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.0" yaml: dependency: transitive description: @@ -324,4 +442,5 @@ packages: source: hosted version: "3.1.1" sdks: - dart: ">=2.18.2 <3.0.0" + dart: ">=2.18.0 <3.0.0" + flutter: ">=2.11.0-0.1.pre" diff --git a/packages/component_library/pubspec.yaml b/packages/component_library/pubspec.yaml index 9be30f2..fae4797 100644 --- a/packages/component_library/pubspec.yaml +++ b/packages/component_library/pubspec.yaml @@ -1,14 +1,30 @@ name: component_library -description: A sample command-line application. -version: 1.0.0 -# homepage: https://www.example.com +publish_to: none environment: - sdk: '>=2.18.2 <3.0.0' + sdk: ">=2.14.0 <3.0.0" -# dependencies: -# path: ^1.8.0 +dependencies: + flutter: + sdk: flutter + flutter_localizations: + sdk: flutter + intl: ^0.17.0 + flutter_svg: ^1.1.6 + auto_size_text: ^3.0.0-nullsafety.0 dev_dependencies: - lints: ^2.0.0 - test: ^1.16.0 + flutter_test: + sdk: flutter + mocktail: 0.1.4 + test: ^1.16.8 + flutter_lints: ^1.0.4 + +flutter: + generate: true + assets: + - assets/ + fonts: + - family: Fondamento + fonts: + - asset: assets/Fondamento-Regular.ttf \ No newline at end of file diff --git a/packages/component_library/test/component_library_test.dart b/packages/component_library/test/component_library_test.dart deleted file mode 100644 index 7adebef..0000000 --- a/packages/component_library/test/component_library_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'package:component_library/component_library.dart'; -import 'package:test/test.dart'; - -void main() { - test('calculate', () { - expect(calculate(), 42); - }); -} diff --git a/packages/component_library/test/favorite_icon_button_widget_test.dart b/packages/component_library/test/favorite_icon_button_widget_test.dart new file mode 100644 index 0000000..0a14700 --- /dev/null +++ b/packages/component_library/test/favorite_icon_button_widget_test.dart @@ -0,0 +1,29 @@ +import 'package:component_library/component_library.dart'; +import 'package:flutter/material.dart'; + +import 'package:flutter_test/flutter_test.dart'; + +void main() { + group('FavoriteIconButton tests: ', () { + testWidgets('onTap() callback is executed when tapping on button', + (tester) async { + bool value = false; + + await tester.pumpWidget(MaterialApp( + locale: const Locale('en'), + localizationsDelegates: const [ComponentLibraryLocalizations.delegate], + home: Scaffold( + body: FavoriteIconButton( + isFavorite: false, + onTap: () { + value = !value; + }), + ), + )); + + await tester.tap(find.byType(FavoriteIconButton)); + + expect(value, true); + }); + }); +} diff --git a/packages/features/subscription_menu/analysis_options.yaml b/packages/features/subscription_menu/analysis_options.yaml new file mode 100644 index 0000000..a3be6b8 --- /dev/null +++ b/packages/features/subscription_menu/analysis_options.yaml @@ -0,0 +1 @@ +include: package:flutter_lints/flutter.yaml \ No newline at end of file diff --git a/packages/features/subscription_menu/l10n.yaml b/packages/features/subscription_menu/l10n.yaml new file mode 100644 index 0000000..6848506 --- /dev/null +++ b/packages/features/subscription_menu/l10n.yaml @@ -0,0 +1,6 @@ +arb-dir: lib/src/l10n +template-arb-file: messages_en.arb +output-localization-file: subscription_menu_localizations.dart +output-class: SubscriptionMenuLocalizations +synthetic-package: false +nullable-getter: false \ No newline at end of file diff --git a/packages/features/subscription_menu/lib/src/l10n/messages_en.arb b/packages/features/subscription_menu/lib/src/l10n/messages_en.arb new file mode 100644 index 0000000..957d07a --- /dev/null +++ b/packages/features/subscription_menu/lib/src/l10n/messages_en.arb @@ -0,0 +1,10 @@ +{ + "dialogTitle": "Forgot My Password", + "emailTextFieldLabel": "Email", + "emailTextFieldEmptyErrorMessage": "Your email can't be empty.", + "emailTextFieldInvalidErrorMessage": "This email is not valid.", + "emailRequestSuccessMessage": "If this email is registered in our systems, a link will be sent to you with instructions on how to reset your password.", + "confirmButtonLabel": "Confirm", + "cancelButtonLabel": "Cancel", + "errorMessage": "There has been an error. Please, check your internet connection." +} \ No newline at end of file diff --git a/packages/features/subscription_menu/lib/src/l10n/messages_pt.arb b/packages/features/subscription_menu/lib/src/l10n/messages_pt.arb new file mode 100644 index 0000000..c7ea339 --- /dev/null +++ b/packages/features/subscription_menu/lib/src/l10n/messages_pt.arb @@ -0,0 +1,10 @@ +{ + "dialogTitle": "Esqueci Minha Senha", + "emailTextFieldLabel": "Email", + "emailTextFieldEmptyErrorMessage": "Seu email não pode ser vazio.", + "emailTextFieldInvalidErrorMessage": "Este email não é válido.", + "emailRequestSuccessMessage": "Se este email estiver registrado em nossos servidores, um link será enviado para você com instruções sobre como resetar sua senha.", + "confirmButtonLabel": "Confirmar", + "cancelButtonLabel": "Cancelar", + "errorMessage": "Ocorreu um erro. Por favor, confira sua conexão com a internet." +} \ No newline at end of file diff --git a/packages/features/subscription_menu/lib/src/l10n/subscription_menu_localizations.dart b/packages/features/subscription_menu/lib/src/l10n/subscription_menu_localizations.dart new file mode 100644 index 0000000..15949c7 --- /dev/null +++ b/packages/features/subscription_menu/lib/src/l10n/subscription_menu_localizations.dart @@ -0,0 +1,175 @@ +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:intl/intl.dart' as intl; + +import 'subscription_menu_localizations_en.dart'; +import 'subscription_menu_localizations_pt.dart'; + +/// Callers can lookup localized strings with an instance of SubscriptionMenuLocalizations +/// returned by `SubscriptionMenuLocalizations.of(context)`. +/// +/// Applications need to include `SubscriptionMenuLocalizations.delegate()` in their app's +/// `localizationDelegates` list, and the locales they support in the app's +/// `supportedLocales` list. For example: +/// +/// ```dart +/// import 'l10n/subscription_menu_localizations.dart'; +/// +/// return MaterialApp( +/// localizationsDelegates: SubscriptionMenuLocalizations.localizationsDelegates, +/// supportedLocales: SubscriptionMenuLocalizations.supportedLocales, +/// home: MyApplicationHome(), +/// ); +/// ``` +/// +/// ## Update pubspec.yaml +/// +/// Please make sure to update your pubspec.yaml to include the following +/// packages: +/// +/// ```yaml +/// dependencies: +/// # Internationalization support. +/// flutter_localizations: +/// sdk: flutter +/// intl: any # Use the pinned version from flutter_localizations +/// +/// # Rest of dependencies +/// ``` +/// +/// ## iOS Applications +/// +/// iOS applications define key application metadata, including supported +/// locales, in an Info.plist file that is built into the application bundle. +/// To configure the locales supported by your app, you’ll need to edit this +/// file. +/// +/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file. +/// Then, in the Project Navigator, open the Info.plist file under the Runner +/// project’s Runner folder. +/// +/// Next, select the Information Property List item, select Add Item from the +/// Editor menu, then select Localizations from the pop-up menu. +/// +/// Select and expand the newly-created Localizations item then, for each +/// locale your application supports, add a new item and select the locale +/// you wish to add from the pop-up menu in the Value field. This list should +/// be consistent with the languages listed in the SubscriptionMenuLocalizations.supportedLocales +/// property. +abstract class SubscriptionMenuLocalizations { + SubscriptionMenuLocalizations(String locale) : localeName = intl.Intl.canonicalizedLocale(locale.toString()); + + final String localeName; + + static SubscriptionMenuLocalizations of(BuildContext context) { + return Localizations.of(context, SubscriptionMenuLocalizations)!; + } + + static const LocalizationsDelegate delegate = _SubscriptionMenuLocalizationsDelegate(); + + /// A list of this localizations delegate along with the default localizations + /// delegates. + /// + /// Returns a list of localizations delegates containing this delegate along with + /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, + /// and GlobalWidgetsLocalizations.delegate. + /// + /// Additional delegates can be added by appending to this list in + /// MaterialApp. This list does not have to be used at all if a custom list + /// of delegates is preferred or required. + static const List> localizationsDelegates = >[ + delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ]; + + /// A list of this localizations delegate's supported locales. + static const List supportedLocales = [ + Locale('en'), + Locale('pt') + ]; + + /// No description provided for @dialogTitle. + /// + /// In en, this message translates to: + /// **'Forgot My Password'** + String get dialogTitle; + + /// No description provided for @emailTextFieldLabel. + /// + /// In en, this message translates to: + /// **'Email'** + String get emailTextFieldLabel; + + /// No description provided for @emailTextFieldEmptyErrorMessage. + /// + /// In en, this message translates to: + /// **'Your email can\'t be empty.'** + String get emailTextFieldEmptyErrorMessage; + + /// No description provided for @emailTextFieldInvalidErrorMessage. + /// + /// In en, this message translates to: + /// **'This email is not valid.'** + String get emailTextFieldInvalidErrorMessage; + + /// No description provided for @emailRequestSuccessMessage. + /// + /// In en, this message translates to: + /// **'If this email is registered in our systems, a link will be sent to you with instructions on how to reset your password.'** + String get emailRequestSuccessMessage; + + /// No description provided for @confirmButtonLabel. + /// + /// In en, this message translates to: + /// **'Confirm'** + String get confirmButtonLabel; + + /// No description provided for @cancelButtonLabel. + /// + /// In en, this message translates to: + /// **'Cancel'** + String get cancelButtonLabel; + + /// No description provided for @errorMessage. + /// + /// In en, this message translates to: + /// **'There has been an error. Please, check your internet connection.'** + String get errorMessage; +} + +class _SubscriptionMenuLocalizationsDelegate extends LocalizationsDelegate { + const _SubscriptionMenuLocalizationsDelegate(); + + @override + Future load(Locale locale) { + return SynchronousFuture(lookupSubscriptionMenuLocalizations(locale)); + } + + @override + bool isSupported(Locale locale) => ['en', 'pt'].contains(locale.languageCode); + + @override + bool shouldReload(_SubscriptionMenuLocalizationsDelegate old) => false; +} + +SubscriptionMenuLocalizations lookupSubscriptionMenuLocalizations(Locale locale) { + + + // Lookup logic when only language code is specified. + switch (locale.languageCode) { + case 'en': return SubscriptionMenuLocalizationsEn(); + case 'pt': return SubscriptionMenuLocalizationsPt(); + } + + throw FlutterError( + 'SubscriptionMenuLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' + 'an issue with the localizations generation tool. Please file an issue ' + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' + 'that was used.' + ); +} diff --git a/packages/features/subscription_menu/lib/src/l10n/subscription_menu_localizations_en.dart b/packages/features/subscription_menu/lib/src/l10n/subscription_menu_localizations_en.dart new file mode 100644 index 0000000..3569724 --- /dev/null +++ b/packages/features/subscription_menu/lib/src/l10n/subscription_menu_localizations_en.dart @@ -0,0 +1,30 @@ +import 'subscription_menu_localizations.dart'; + +/// The translations for English (`en`). +class SubscriptionMenuLocalizationsEn extends SubscriptionMenuLocalizations { + SubscriptionMenuLocalizationsEn([String locale = 'en']) : super(locale); + + @override + String get dialogTitle => 'Forgot My Password'; + + @override + String get emailTextFieldLabel => 'Email'; + + @override + String get emailTextFieldEmptyErrorMessage => 'Your email can\'t be empty.'; + + @override + String get emailTextFieldInvalidErrorMessage => 'This email is not valid.'; + + @override + String get emailRequestSuccessMessage => 'If this email is registered in our systems, a link will be sent to you with instructions on how to reset your password.'; + + @override + String get confirmButtonLabel => 'Confirm'; + + @override + String get cancelButtonLabel => 'Cancel'; + + @override + String get errorMessage => 'There has been an error. Please, check your internet connection.'; +} diff --git a/packages/features/subscription_menu/lib/src/l10n/subscription_menu_localizations_pt.dart b/packages/features/subscription_menu/lib/src/l10n/subscription_menu_localizations_pt.dart new file mode 100644 index 0000000..c7a4fa8 --- /dev/null +++ b/packages/features/subscription_menu/lib/src/l10n/subscription_menu_localizations_pt.dart @@ -0,0 +1,30 @@ +import 'subscription_menu_localizations.dart'; + +/// The translations for Portuguese (`pt`). +class SubscriptionMenuLocalizationsPt extends SubscriptionMenuLocalizations { + SubscriptionMenuLocalizationsPt([String locale = 'pt']) : super(locale); + + @override + String get dialogTitle => 'Esqueci Minha Senha'; + + @override + String get emailTextFieldLabel => 'Email'; + + @override + String get emailTextFieldEmptyErrorMessage => 'Seu email não pode ser vazio.'; + + @override + String get emailTextFieldInvalidErrorMessage => 'Este email não é válido.'; + + @override + String get emailRequestSuccessMessage => 'Se este email estiver registrado em nossos servidores, um link será enviado para você com instruções sobre como resetar sua senha.'; + + @override + String get confirmButtonLabel => 'Confirmar'; + + @override + String get cancelButtonLabel => 'Cancelar'; + + @override + String get errorMessage => 'Ocorreu um erro. Por favor, confira sua conexão com a internet.'; +} diff --git a/packages/features/subscription_menu/lib/subscription_menu.dart b/packages/features/subscription_menu/lib/subscription_menu.dart new file mode 100644 index 0000000..e69de29 diff --git a/packages/features/user_subscription/pubspec.lock b/packages/features/subscription_menu/pubspec.lock similarity index 64% rename from packages/features/user_subscription/pubspec.lock rename to packages/features/subscription_menu/pubspec.lock index c362f1c..d776035 100644 --- a/packages/features/user_subscription/pubspec.lock +++ b/packages/features/subscription_menu/pubspec.lock @@ -7,14 +7,14 @@ packages: name: _fe_analyzer_shared url: "https://pub.dartlang.org" source: hosted - version: "50.0.0" + version: "47.0.0" analyzer: dependency: transitive description: name: analyzer url: "https://pub.dartlang.org" source: hosted - version: "5.2.0" + version: "4.7.0" args: dependency: transitive description: @@ -28,21 +28,56 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.10.0" + version: "2.9.0" + auto_size_text: + dependency: transitive + description: + name: auto_size_text + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + bloc: + dependency: transitive + description: + name: bloc + url: "https://pub.dartlang.org" + source: hosted + version: "8.1.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.17.0" + version: "1.16.0" + component_library: + dependency: "direct main" + description: + path: "../../component_library" + relative: true + source: path + version: "0.0.0" convert: dependency: transitive description: @@ -64,6 +99,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "3.0.2" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" file: dependency: transitive description: @@ -71,13 +113,56 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "6.1.4" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + url: "https://pub.dartlang.org" + source: hosted + version: "8.1.1" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.4" + flutter_localizations: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + form_fields: + dependency: "direct main" + description: + path: "../../form_fields" + relative: true + source: path + version: "1.0.0" frontend_server_client: dependency: transitive description: name: frontend_server_client url: "https://pub.dartlang.org" source: hosted - version: "3.2.0" + version: "2.1.3" glob: dependency: transitive description: @@ -99,6 +184,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "4.0.2" + intl: + dependency: transitive + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.0" io: dependency: transitive description: @@ -114,12 +206,12 @@ packages: source: hosted version: "0.6.5" lints: - dependency: "direct dev" + dependency: transitive description: name: lints url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "1.0.1" logging: dependency: transitive description: @@ -133,7 +225,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.13" + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" meta: dependency: transitive description: @@ -148,6 +247,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.3" + mocktail: + dependency: "direct dev" + description: + name: mocktail + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.4" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" node_preamble: dependency: transitive description: @@ -169,6 +282,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.2" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.0" pool: dependency: transitive description: @@ -176,6 +310,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.5.1" + provider: + dependency: transitive + description: + name: provider + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.4" pub_semver: dependency: transitive description: @@ -211,6 +352,11 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" source_map_stack_trace: dependency: transitive description: @@ -231,28 +377,28 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.9.1" + version: "1.9.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.11.0" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.1.1" term_glyph: dependency: transitive description: @@ -266,21 +412,21 @@ packages: name: test url: "https://pub.dartlang.org" source: hosted - version: "1.22.0" + version: "1.21.4" test_api: dependency: transitive description: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.4.16" + version: "0.4.12" test_core: dependency: transitive description: name: test_core url: "https://pub.dartlang.org" source: hosted - version: "0.4.20" + version: "0.4.16" typed_data: dependency: transitive description: @@ -288,6 +434,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.1" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" vm_service: dependency: transitive description: @@ -316,6 +469,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.0" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.0" yaml: dependency: transitive description: @@ -325,3 +485,4 @@ packages: version: "3.1.1" sdks: dart: ">=2.18.2 <3.0.0" + flutter: ">=2.11.0-0.1.pre" diff --git a/packages/features/subscription_menu/pubspec.yaml b/packages/features/subscription_menu/pubspec.yaml new file mode 100644 index 0000000..9bb89d2 --- /dev/null +++ b/packages/features/subscription_menu/pubspec.yaml @@ -0,0 +1,24 @@ +name: subscription_menu +publish_to: none + +environment: + sdk: ">=2.14.0 <3.0.0" + +dependencies: + component_library: + path: ../../component_library + flutter_bloc: ^8.0.1 + flutter: + sdk: flutter + form_fields: + path: ../../form_fields + +dev_dependencies: + flutter_test: + sdk: flutter + mocktail: 0.1.4 + test: ^1.16.8 + flutter_lints: ^1.0.4 + +flutter: + uses-material-design: true \ No newline at end of file diff --git a/packages/features/subscription_menu/test/widget_test.dart b/packages/features/subscription_menu/test/widget_test.dart new file mode 100644 index 0000000..7cedf99 --- /dev/null +++ b/packages/features/subscription_menu/test/widget_test.dart @@ -0,0 +1,14 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility that Flutter provides. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter_test/flutter_test.dart'; + +void main() { + testWidgets('Forgot my password', (WidgetTester tester) async { + // Build our app and trigger a frame. + }); +} diff --git a/packages/features/user_subscription/.gitignore b/packages/features/user_subscription/.gitignore deleted file mode 100644 index 3c8a157..0000000 --- a/packages/features/user_subscription/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Files and directories created by pub. -.dart_tool/ -.packages - -# Conventional directory for build output. -build/ diff --git a/packages/features/user_subscription/CHANGELOG.md b/packages/features/user_subscription/CHANGELOG.md deleted file mode 100644 index effe43c..0000000 --- a/packages/features/user_subscription/CHANGELOG.md +++ /dev/null @@ -1,3 +0,0 @@ -## 1.0.0 - -- Initial version. diff --git a/packages/features/user_subscription/README.md b/packages/features/user_subscription/README.md deleted file mode 100644 index e89803b..0000000 --- a/packages/features/user_subscription/README.md +++ /dev/null @@ -1 +0,0 @@ -Di dalam feature ini nanti bisa ditambahkan bloc dan ui sebagai presentation layer dalam project flutter \ No newline at end of file diff --git a/packages/features/user_subscription/analysis_options.yaml b/packages/features/user_subscription/analysis_options.yaml deleted file mode 100644 index dee8927..0000000 --- a/packages/features/user_subscription/analysis_options.yaml +++ /dev/null @@ -1,30 +0,0 @@ -# This file configures the static analysis results for your project (errors, -# warnings, and lints). -# -# This enables the 'recommended' set of lints from `package:lints`. -# This set helps identify many issues that may lead to problems when running -# or consuming Dart code, and enforces writing Dart using a single, idiomatic -# style and format. -# -# If you want a smaller set of lints you can change this to specify -# 'package:lints/core.yaml'. These are just the most critical lints -# (the recommended set includes the core lints). -# The core lints are also what is used by pub.dev for scoring packages. - -include: package:lints/recommended.yaml - -# Uncomment the following section to specify additional rules. - -# linter: -# rules: -# - camel_case_types - -# analyzer: -# exclude: -# - path/to/excluded/files/** - -# For more information about the core and recommended set of lints, see -# https://dart.dev/go/core-lints - -# For additional information about configuring this file, see -# https://dart.dev/guides/language/analysis-options diff --git a/packages/features/user_subscription/bin/user_subscription.dart b/packages/features/user_subscription/bin/user_subscription.dart deleted file mode 100644 index c20fac9..0000000 --- a/packages/features/user_subscription/bin/user_subscription.dart +++ /dev/null @@ -1,5 +0,0 @@ -import 'package:user_subscription/user_subscription.dart' as user_subscription; - -void main(List arguments) { - print('Hello world: ${user_subscription.calculate()}!'); -} diff --git a/packages/features/user_subscription/lib/user_subscription.dart b/packages/features/user_subscription/lib/user_subscription.dart deleted file mode 100644 index f64ad72..0000000 --- a/packages/features/user_subscription/lib/user_subscription.dart +++ /dev/null @@ -1,3 +0,0 @@ -int calculate() { - return 6 * 7; -} diff --git a/packages/features/user_subscription/pubspec.yaml b/packages/features/user_subscription/pubspec.yaml deleted file mode 100644 index a861bad..0000000 --- a/packages/features/user_subscription/pubspec.yaml +++ /dev/null @@ -1,14 +0,0 @@ -name: user_subscription -description: A sample command-line application. -version: 1.0.0 -# homepage: https://www.example.com - -environment: - sdk: '>=2.18.2 <3.0.0' - -# dependencies: -# path: ^1.8.0 - -dev_dependencies: - lints: ^2.0.0 - test: ^1.16.0 diff --git a/packages/features/user_subscription/test/user_subscription_test.dart b/packages/features/user_subscription/test/user_subscription_test.dart deleted file mode 100644 index ee03558..0000000 --- a/packages/features/user_subscription/test/user_subscription_test.dart +++ /dev/null @@ -1,8 +0,0 @@ -import 'package:user_subscription/user_subscription.dart'; -import 'package:test/test.dart'; - -void main() { - test('calculate', () { - expect(calculate(), 42); - }); -} diff --git a/packages/monitoring/analysis_options.yaml b/packages/monitoring/analysis_options.yaml new file mode 100644 index 0000000..19a22f2 --- /dev/null +++ b/packages/monitoring/analysis_options.yaml @@ -0,0 +1,5 @@ +include: package:lints/recommended.yaml + +linter: + rules: + - prefer_const_constructors \ No newline at end of file diff --git a/packages/monitoring/lib/src/analytics_service.dart b/packages/monitoring/lib/src/analytics_service.dart new file mode 100644 index 0000000..d6db466 --- /dev/null +++ b/packages/monitoring/lib/src/analytics_service.dart @@ -0,0 +1,27 @@ +import 'package:firebase_analytics/firebase_analytics.dart'; +import 'package:flutter/foundation.dart'; + +/// Wrapper around [FirebaseAnalytics]. +class AnalyticsService { + AnalyticsService({ + @visibleForTesting FirebaseAnalytics? analytics, + }) : _analytics = analytics ?? FirebaseAnalytics.instance; + + final FirebaseAnalytics _analytics; + + Future setCurrentScreen(String screenName) { + return _analytics.setCurrentScreen( + screenName: screenName, + ); + } + + Future logEvent({ + required String name, + Map? parameters, + }) { + return _analytics.logEvent( + name: name, + parameters: parameters, + ); + } +} diff --git a/packages/monitoring/lib/src/error_reporting_service.dart b/packages/monitoring/lib/src/error_reporting_service.dart new file mode 100644 index 0000000..e841435 --- /dev/null +++ b/packages/monitoring/lib/src/error_reporting_service.dart @@ -0,0 +1,27 @@ +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; +import 'package:flutter/foundation.dart'; + +/// Wrapper around [FirebaseCrashlytics]. +class ErrorReportingService { + ErrorReportingService({ + @visibleForTesting FirebaseCrashlytics? crashlytics, + }) : _crashlytics = crashlytics ?? FirebaseCrashlytics.instance; + + final FirebaseCrashlytics _crashlytics; + + Future recordFlutterError(FlutterErrorDetails flutterErrorDetails) { + return _crashlytics.recordFlutterError(flutterErrorDetails); + } + + Future recordError( + dynamic exception, + StackTrace? stack, { + bool fatal = false, + }) { + return _crashlytics.recordError( + exception, + stack, + fatal: fatal, + ); + } +} diff --git a/packages/monitoring/lib/src/explicit_crash.dart b/packages/monitoring/lib/src/explicit_crash.dart new file mode 100644 index 0000000..8686471 --- /dev/null +++ b/packages/monitoring/lib/src/explicit_crash.dart @@ -0,0 +1,16 @@ +import 'package:firebase_crashlytics/firebase_crashlytics.dart'; +import 'package:flutter/foundation.dart'; + +class ExplicitCrash { + ExplicitCrash({ + @visibleForTesting FirebaseCrashlytics? crashlytics, + }) : _crashlytics = crashlytics ?? FirebaseCrashlytics.instance; + + // 1 + final FirebaseCrashlytics _crashlytics; + + // 2 + crashTheApp() { + _crashlytics.crash(); + } +} diff --git a/packages/monitoring/lib/src/remote_value_service.dart b/packages/monitoring/lib/src/remote_value_service.dart new file mode 100644 index 0000000..3adf95c --- /dev/null +++ b/packages/monitoring/lib/src/remote_value_service.dart @@ -0,0 +1,24 @@ +import 'package:firebase_remote_config/firebase_remote_config.dart'; +import 'package:flutter/foundation.dart'; + +/// Wrapper around [FirebaseRemoteConfig]. +class RemoteValueService { + static const _gridQuotesViewEnabledKey = 'grid_quotes_view_enabled'; + + RemoteValueService({ + @visibleForTesting FirebaseRemoteConfig? remoteConfig, + }) : _remoteConfig = remoteConfig ?? FirebaseRemoteConfig.instance; + + final FirebaseRemoteConfig _remoteConfig; + + Future load() async { + await _remoteConfig.setDefaults({ + _gridQuotesViewEnabledKey: true, + }); + await _remoteConfig.fetchAndActivate(); + } + + bool get isGridQuotesViewEnabled => _remoteConfig.getBool( + _gridQuotesViewEnabledKey, + ); +} diff --git a/packages/monitoring/pubspec.lock b/packages/monitoring/pubspec.lock new file mode 100644 index 0000000..89a7395 --- /dev/null +++ b/packages/monitoring/pubspec.lock @@ -0,0 +1,488 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "47.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.9" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "4.7.0" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.1" + async: + dependency: transitive + description: + name: async + url: "https://pub.dartlang.org" + source: hosted + version: "2.9.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + characters: + dependency: transitive + description: + name: characters + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + clock: + dependency: transitive + description: + name: clock + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + cloud_firestore_platform_interface: + dependency: transitive + description: + name: cloud_firestore_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "5.9.0" + cloud_firestore_web: + dependency: transitive + description: + name: cloud_firestore_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + collection: + dependency: transitive + description: + name: collection + url: "https://pub.dartlang.org" + source: hosted + version: "1.16.0" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" + coverage: + dependency: transitive + description: + name: coverage + url: "https://pub.dartlang.org" + source: hosted + version: "1.6.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" + fake_async: + dependency: transitive + description: + name: fake_async + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.4" + firebase_analytics: + dependency: "direct main" + description: + name: firebase_analytics + url: "https://pub.dartlang.org" + source: hosted + version: "10.0.6" + firebase_analytics_platform_interface: + dependency: transitive + description: + name: firebase_analytics_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.14" + firebase_analytics_web: + dependency: transitive + description: + name: firebase_analytics_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.1+5" + firebase_core: + dependency: "direct main" + description: + name: firebase_core + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.2" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + firebase_crashlytics: + dependency: "direct main" + description: + name: firebase_crashlytics + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + firebase_crashlytics_platform_interface: + dependency: transitive + description: + name: firebase_crashlytics_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.7" + firebase_remote_config: + dependency: "direct main" + description: + name: firebase_remote_config + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + firebase_remote_config_platform_interface: + dependency: transitive + description: + name: firebase_remote_config_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.26" + firebase_remote_config_web: + dependency: transitive + description: + name: firebase_remote_config_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.15" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_test: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.2" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.4" + lints: + dependency: "direct dev" + description: + name: lints + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" + matcher: + dependency: transitive + description: + name: matcher + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.12" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + url: "https://pub.dartlang.org" + source: hosted + version: "0.1.5" + meta: + dependency: transitive + description: + name: meta + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.0" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + node_preamble: + dependency: transitive + description: + name: node_preamble + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + path: + dependency: transitive + description: + name: path + url: "https://pub.dartlang.org" + source: hosted + version: "1.8.2" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + shelf_packages_handler: + dependency: transitive + description: + name: shelf_packages_handler + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.1" + shelf_static: + dependency: transitive + description: + name: shelf_static + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_map_stack_trace: + dependency: transitive + description: + name: source_map_stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + source_maps: + dependency: transitive + description: + name: source_maps + url: "https://pub.dartlang.org" + source: hosted + version: "0.10.11" + source_span: + dependency: transitive + description: + name: source_span + url: "https://pub.dartlang.org" + source: hosted + version: "1.9.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + url: "https://pub.dartlang.org" + source: hosted + version: "1.10.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + string_scanner: + dependency: transitive + description: + name: string_scanner + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + test: + dependency: "direct dev" + description: + name: test + url: "https://pub.dartlang.org" + source: hosted + version: "1.21.4" + test_api: + dependency: transitive + description: + name: test_api + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.12" + test_core: + dependency: transitive + description: + name: test_core + url: "https://pub.dartlang.org" + source: hosted + version: "0.4.16" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" + vector_math: + dependency: transitive + description: + name: vector_math + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" + vm_service: + dependency: transitive + description: + name: vm_service + url: "https://pub.dartlang.org" + source: hosted + version: "9.4.0" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + webkit_inspection_protocol: + dependency: transitive + description: + name: webkit_inspection_protocol + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.0" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" +sdks: + dart: ">=2.18.0 <3.0.0" + flutter: ">=1.20.0" diff --git a/packages/monitoring/pubspec.yaml b/packages/monitoring/pubspec.yaml new file mode 100644 index 0000000..f2b7916 --- /dev/null +++ b/packages/monitoring/pubspec.yaml @@ -0,0 +1,17 @@ +name: monitoring +publish_to: none + +environment: + sdk: ">=2.13.0 <3.0.0" + +dependencies: + flutter: + sdk: flutter + firebase_core: ^2.3.0 + firebase_crashlytics: ^3.0.6 + firebase_analytics: ^10.0.6 + firebase_remote_config: ^3.0.6 + +dev_dependencies: + lints: ^1.0.1 + test: ^1.16.8 \ No newline at end of file diff --git a/packages/subscription_repository/README.md b/packages/subscription_repository/README.md index 3816eca..1ac6251 100644 --- a/packages/subscription_repository/README.md +++ b/packages/subscription_repository/README.md @@ -1,2 +1,8 @@ -A sample command-line application with an entrypoint in `bin/`, library code -in `lib/`, and example unit test in `test/`. +# GolekTruk Flutter 2023 + +A new GolekTruk Flutter project. + +## Getting Started +Struktur folder yang sedang dalam development, + +- Monitoring : digunakan sebagai abstraksi firebase analytics diff --git a/packages/subscription_repository/pubspec.lock b/packages/subscription_repository/pubspec.lock index c362f1c..90829db 100644 --- a/packages/subscription_repository/pubspec.lock +++ b/packages/subscription_repository/pubspec.lock @@ -28,21 +28,21 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.10.0" + version: "2.9.0" boolean_selector: dependency: transitive description: name: boolean_selector url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" collection: dependency: transitive description: name: collection url: "https://pub.dartlang.org" source: hosted - version: "1.17.0" + version: "1.16.0" convert: dependency: transitive description: @@ -112,7 +112,7 @@ packages: name: js url: "https://pub.dartlang.org" source: hosted - version: "0.6.5" + version: "0.6.4" lints: dependency: "direct dev" description: @@ -133,7 +133,7 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.13" + version: "0.12.12" meta: dependency: transitive description: @@ -231,28 +231,28 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.9.1" + version: "1.9.0" stack_trace: dependency: transitive description: name: stack_trace url: "https://pub.dartlang.org" source: hosted - version: "1.11.0" + version: "1.10.0" stream_channel: dependency: transitive description: name: stream_channel url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.1.0" string_scanner: dependency: transitive description: name: string_scanner url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.1.1" term_glyph: dependency: transitive description: diff --git a/pubspec.lock b/pubspec.lock index e9b9197..c91af55 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,34 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + url: "https://pub.dartlang.org" + source: hosted + version: "50.0.0" + _flutterfire_internals: + dependency: transitive + description: + name: _flutterfire_internals + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.9" + analyzer: + dependency: transitive + description: + name: analyzer + url: "https://pub.dartlang.org" + source: hosted + version: "5.2.0" + args: + dependency: transitive + description: + name: args + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.1" async: dependency: transitive description: @@ -8,6 +36,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.9.0" + auto_route: + dependency: "direct main" + description: + name: auto_route + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.4" + auto_route_generator: + dependency: "direct dev" + description: + name: auto_route_generator + url: "https://pub.dartlang.org" + source: hosted + version: "5.0.3" + auto_size_text: + dependency: transitive + description: + name: auto_size_text + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.0" + bloc: + dependency: transitive + description: + name: bloc + url: "https://pub.dartlang.org" + source: hosted + version: "8.1.0" boolean_selector: dependency: transitive description: @@ -15,6 +71,62 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + build: + dependency: transitive + description: + name: build + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.1" + build_config: + dependency: transitive + description: + name: build_config + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.1" + build_daemon: + dependency: transitive + description: + name: build_daemon + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + build_resolvers: + dependency: transitive + description: + name: build_resolvers + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" + build_runner: + dependency: "direct dev" + description: + name: build_runner + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.2" + build_runner_core: + dependency: transitive + description: + name: build_runner_core + url: "https://pub.dartlang.org" + source: hosted + version: "7.2.7" + built_collection: + dependency: transitive + description: + name: built_collection + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + url: "https://pub.dartlang.org" + source: hosted + version: "8.4.2" characters: dependency: transitive description: @@ -22,6 +134,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.2.1" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" clock: dependency: transitive description: @@ -29,6 +148,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.1" + cloud_firestore_platform_interface: + dependency: transitive + description: + name: cloud_firestore_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "5.9.0" + cloud_firestore_web: + dependency: transitive + description: + name: cloud_firestore_web + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.0" + code_builder: + dependency: transitive + description: + name: code_builder + url: "https://pub.dartlang.org" + source: hosted + version: "4.3.0" collection: dependency: transitive description: @@ -36,6 +176,27 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.16.0" + component_library: + dependency: "direct main" + description: + path: "packages/component_library" + relative: true + source: path + version: "0.0.0" + convert: + dependency: transitive + description: + name: convert + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" + crypto: + dependency: transitive + description: + name: crypto + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.2" cupertino_icons: dependency: "direct main" description: @@ -43,6 +204,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.0.5" + dart_style: + dependency: transitive + description: + name: dart_style + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.4" + domain_models: + dependency: "direct main" + description: + path: "packages/domain_models" + relative: true + source: path + version: "1.0.0" fake_async: dependency: transitive description: @@ -50,11 +225,109 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.3.1" + file: + dependency: transitive + description: + name: file + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.4" + firebase_analytics: + dependency: transitive + description: + name: firebase_analytics + url: "https://pub.dartlang.org" + source: hosted + version: "10.0.6" + firebase_analytics_platform_interface: + dependency: transitive + description: + name: firebase_analytics_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.14" + firebase_analytics_web: + dependency: transitive + description: + name: firebase_analytics_web + url: "https://pub.dartlang.org" + source: hosted + version: "0.5.1+5" + firebase_core: + dependency: transitive + description: + name: firebase_core + url: "https://pub.dartlang.org" + source: hosted + version: "2.3.0" + firebase_core_platform_interface: + dependency: transitive + description: + name: firebase_core_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "4.5.2" + firebase_core_web: + dependency: transitive + description: + name: firebase_core_web + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.1" + firebase_crashlytics: + dependency: transitive + description: + name: firebase_crashlytics + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + firebase_crashlytics_platform_interface: + dependency: transitive + description: + name: firebase_crashlytics_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "3.3.7" + firebase_remote_config: + dependency: transitive + description: + name: firebase_remote_config + url: "https://pub.dartlang.org" + source: hosted + version: "3.0.6" + firebase_remote_config_platform_interface: + dependency: transitive + description: + name: firebase_remote_config_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.26" + firebase_remote_config_web: + dependency: transitive + description: + name: firebase_remote_config_web + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.15" + fixnum: + dependency: transitive + description: + name: fixnum + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" flutter: dependency: "direct main" description: flutter source: sdk version: "0.0.0" + flutter_bloc: + dependency: transitive + description: + name: flutter_bloc + url: "https://pub.dartlang.org" + source: hosted + version: "8.1.1" flutter_lints: dependency: "direct dev" description: @@ -62,11 +335,98 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" + flutter_localizations: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_svg: + dependency: transitive + description: + name: flutter_svg + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.6" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + form_fields: + dependency: transitive + description: + path: "packages/form_fields" + relative: true + source: path + version: "1.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.0" + glob: + dependency: transitive + description: + name: glob + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.1" + graphs: + dependency: transitive + description: + name: graphs + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + url: "https://pub.dartlang.org" + source: hosted + version: "3.2.1" + http_parser: + dependency: transitive + description: + name: http_parser + url: "https://pub.dartlang.org" + source: hosted + version: "4.0.2" + intl: + dependency: "direct main" + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.17.0" + io: + dependency: transitive + description: + name: io + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + js: + dependency: transitive + description: + name: js + url: "https://pub.dartlang.org" + source: hosted + version: "0.6.4" + json_annotation: + dependency: transitive + description: + name: json_annotation + url: "https://pub.dartlang.org" + source: hosted + version: "4.7.0" lints: dependency: transitive description: @@ -74,6 +434,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.0.1" + logging: + dependency: transitive + description: + name: logging + url: "https://pub.dartlang.org" + source: hosted + version: "1.1.0" matcher: dependency: transitive description: @@ -95,6 +462,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" + mime: + dependency: transitive + description: + name: mime + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" + monitoring: + dependency: "direct main" + description: + path: "packages/monitoring" + relative: true + source: path + version: "0.0.0" + nested: + dependency: transitive + description: + name: nested + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + package_config: + dependency: transitive + description: + name: package_config + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" path: dependency: transitive description: @@ -102,11 +497,88 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.2" + path_drawing: + dependency: transitive + description: + name: path_drawing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.1" + petitparser: + dependency: transitive + description: + name: petitparser + url: "https://pub.dartlang.org" + source: hosted + version: "5.1.0" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + pool: + dependency: transitive + description: + name: pool + url: "https://pub.dartlang.org" + source: hosted + version: "1.5.1" + provider: + dependency: transitive + description: + name: provider + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.4" + pub_semver: + dependency: transitive + description: + name: pub_semver + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.3" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.1" + shelf: + dependency: transitive + description: + name: shelf + url: "https://pub.dartlang.org" + source: hosted + version: "1.4.0" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.3" sky_engine: dependency: transitive description: flutter source: sdk version: "0.0.99" + source_gen: + dependency: transitive + description: + name: source_gen + url: "https://pub.dartlang.org" + source: hosted + version: "1.2.6" source_span: dependency: transitive description: @@ -128,6 +600,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.0" + stream_transform: + dependency: transitive + description: + name: stream_transform + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.0" string_scanner: dependency: transitive description: @@ -135,6 +614,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.1.1" + subscription_menu: + dependency: "direct main" + description: + path: "packages/features/subscription_menu" + relative: true + source: path + version: "0.0.0" term_glyph: dependency: transitive description: @@ -149,6 +635,20 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "0.4.12" + timing: + dependency: transitive + description: + name: timing + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.0" + typed_data: + dependency: transitive + description: + name: typed_data + url: "https://pub.dartlang.org" + source: hosted + version: "1.3.1" vector_math: dependency: transitive description: @@ -156,5 +656,34 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "2.1.2" + watcher: + dependency: transitive + description: + name: watcher + url: "https://pub.dartlang.org" + source: hosted + version: "1.0.2" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + url: "https://pub.dartlang.org" + source: hosted + version: "2.2.0" + xml: + dependency: transitive + description: + name: xml + url: "https://pub.dartlang.org" + source: hosted + version: "6.1.0" + yaml: + dependency: transitive + description: + name: yaml + url: "https://pub.dartlang.org" + source: hosted + version: "3.1.1" sdks: dart: ">=2.18.2 <3.0.0" + flutter: ">=3.0.0" diff --git a/pubspec.yaml b/pubspec.yaml index c43a39a..1ee6cca 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,91 +1,35 @@ name: golek_flutter_new description: A new GolekTruk Flutter project. -# The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. -publish_to: 'none' # Remove this line if you wish to publish to pub.dev +publish_to: 'none' -# The following defines the version and build number for your application. -# A version number is three numbers separated by dots, like 1.2.43 -# followed by an optional build number separated by a +. -# Both the version and the builder number may be overridden in flutter -# build by specifying --build-name and --build-number, respectively. -# In Android, build-name is used as versionName while build-number used as versionCode. -# Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. -# Read more about iOS versioning at -# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -# In Windows, build-name is used as the major, minor, and patch parts -# of the product and file versions while build-number is used as the build suffix. version: 1.0.0+1 environment: sdk: '>=2.18.2 <3.0.0' -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter - - - # The following adds the Cupertino Icons font to your application. - # Use with the CupertinoIcons class for iOS style icons. + flutter_localizations: + sdk: flutter + intl: ^0.17.0 cupertino_icons: ^1.0.2 + auto_route: ^5.0.4 + monitoring: + path: packages/monitoring + domain_models: + path: packages/domain_models + component_library: + path: packages/component_library + subscription_menu: + path: packages/features/subscription_menu dev_dependencies: flutter_test: sdk: flutter - - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. flutter_lints: ^2.0.0 - -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec - -# The following section is specific to Flutter packages. + auto_route_generator: ^5.0.3 + build_runner: ^2.3.2 flutter: - - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true - - # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg - - # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware - - # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages - - # To add custom fonts to your application, add a fonts section here, - # in this "flutter" section. Each entry in this list should have a - # "family" key with the font family name, and a "fonts" key with a - # list giving the asset and other descriptors for the font. For - # example: - # fonts: - # - family: Schyler - # fonts: - # - asset: fonts/Schyler-Regular.ttf - # - asset: fonts/Schyler-Italic.ttf - # style: italic - # - family: Trajan Pro - # fonts: - # - asset: fonts/TrajanPro.ttf - # - asset: fonts/TrajanPro_Bold.ttf - # weight: 700 - # - # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages