diff --git a/README.md b/README.md index d371152..46acc1d 100644 --- a/README.md +++ b/README.md @@ -1,120 +1,96 @@ -# The Bitcoin UI Kit for Flutter +

Bitcoin UI Kit Flutter Package

-This is the Flutter implementation of the [Bitcoin UI Kit](https://www.bitcoinuikit.com). +bitcoin_ui_kit package -## Getting started +[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT) -Add the package in your pubspec.yaml dependencies +Bitcoin UI Kit is a comprehensive Flutter package that provides a collection of beautifully designed UI components and themes for building Bitcoin-related applications. It offers a design foundation for prototypes, concept explorations, and open-source projects, allowing you to kickstart the design process and focus on creating unique Bitcoin products. -```dart -dependencies: - bitcoin_ui_kit: : ^1.0.3 -``` - -## Usage - -Import in the dart file where you want to use it - -```dart -import 'package:bitcoin_ui_kit/bitcoin_ui_kit.dart'; -``` - -## Colors - -```dart -// Light primary and accent colors -Bitcoin.orange -Bitcoin.red -Bitcoin.green -Bitcoin.blue -Bitcoin.purple - -// Light theme neutrals -Bitcoin.white -Bitcoin.neutral1 -Bitcoin.neutral2 -Bitcoin.neutral3 -Bitcoin.neutral4 -Bitcoin.neutral5 -Bitcoin.neutral6 -Bitcoin.neutral7 -Bitcoin.neutral8 -Bitcoin.black -``` +## Features +- **Design System**: Bitcoin UI Kit offers a carefully crafted design system that includes a set of predefined colors, typography styles, and components tailored for Bitcoin-themed applications. +- **Reusable Components**: The UI kit provides a collection of reusable and customizable components such as buttons, divider, switches, avatars, pin entry, and more. These components are designed to seamlessly integrate into your Flutter projects. +- **Dynamic Theming**: Bitcoin UI Kit supports dynamic theming, allowing you to effortlessly switch between light and dark themes based on the user's preference or app configuration. -![image](https://github.com/bdgwallet/bitcoinuikit-flutter/assets/3393669/dd843296-6336-4920-b9e6-93dae58f4697) +## Installation +To use Bitcoin UI Kit in your Flutter project, add the following dependency to your `pubspec.yaml` file: -```dart -// Dark primary and accent colors -Bitcoin.orangeDark -Bitcoin.redDark -Bitcoin.greenDark -Bitcoin.blueDark -Bitcoin.purpleDark - -// Dark theme neutrals -Bitcoin.neutral1Dark -Bitcoin.neutral2Dark -Bitcoin.neutral3Dark -Bitcoin.neutral4Dark -Bitcoin.neutral5Dark -Bitcoin.neutral6Dark -Bitcoin.neutral7Dark -Bitcoin.neutral8Dark +```yaml +dependencies: + bitcoin_ui_kit: ^1.0.3 ``` -![image](https://github.com/bdgwallet/bitcoinuikit-flutter/assets/3393669/65d5a45a-67cb-4972-bfde-b2f21f62a822) - -## Text styles - -There are five title styles and five body styles, each with a color parameter. +Then, run `flutter pub get` to fetch the package. +## Usage +Import the Bitcoin UI Kit package wherever you want to use its components: ```dart -// Title styles -BitcoinTextStyle.title1(Bitcoin.black) -BitcoinTextStyle.title2(Bitcoin.black) -BitcoinTextStyle.title3(Bitcoin.black) -BitcoinTextStyle.title4(Bitcoin.black) -BitcoinTextStyle.title5(Bitcoin.black) - -// Body styles -BitcoinTextStyle.body1(Bitcoin.black) -BitcoinTextStyle.body2(Bitcoin.black) -BitcoinTextStyle.body3(Bitcoin.black) -BitcoinTextStyle.body4(Bitcoin.black) -BitcoinTextStyle.body5(Bitcoin.black) +import 'package:bitcoin_ui_kit/bitcoin_ui_kit.dart'; ``` -## Buttons - -There are three styles of buttons in the UI Kit - -- BitcoinButtonFilled -- BitcoinButtonOutlined -- BitcoinButtonPlain - -They each have optional parameters like, textStyle, width, height, tintColor, textColor (for BitcoinButtonFilled), cornerRadius and the ability to set disabled and isLoading states. +You can then utilize the various UI components provided by the package, such as `BitcoinElevatedButton`, `BitcoinOutlinedButton`, `BitcoinSwitch`, and more. Refer to the code examples in the package for more details on using each component effectively. +## Example Usage ```dart -BitcoinButtonFilled( - title: "Filled", - onPressed: () { - debugPrint("Test button press"); +import 'package:bitcoin_ui_kit/bitcoin_ui_kit.dart'; +import 'package:flutter/material.dart'; + +void main() { + runApp(MainApp()); +} + +class MainApp extends StatelessWidget { + final _lightTheme = LightBitcoinThemeData(); + final _darkTheme = DarkBitcoinThemeData(); + + MainApp({super.key}); + + @override + Widget build(BuildContext context) { + return BitcoinTheme( + lightTheme: _lightTheme, + darkTheme: _darkTheme, + child: MaterialApp( + theme: _lightTheme.materialThemeData, + darkTheme: _darkTheme.materialThemeData, + // TODO: change to dark mode + themeMode: ThemeMode.light, + home: const BitcoinHomePage(), + ), + ); + } +} + +class BitcoinHomePage extends StatelessWidget { + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: Text('Bitcoin UI Kit Demo'), + ), + body: Center( + child: BitcoinElevatedButton( + label: 'Create a new wallet', + onPressed: () {}, + backgroundColor: BitcoinColors.orange, + fontSize: 21, + height: 60, + textPadding: const EdgeInsets.symmetric(vertical: 19, horizontal: 20, + ), + ), + ), + ); } -), +} ``` -## Icons +## Showcase +Visit the [Storybook](https://aniketambore.github.io/bitcoinuikit-flutter/) to see a showcase of the widgets. -Most of the icons from [Bitcoin Icons](https://github.com/BitcoinDesign/Bitcoin-Icons) are included. - -```dart -Image( - image: const AssetImage("icons/bitcoin_circle.png", - package: "bitcoin_ui_kit"), - color: Bitcoin.orange), -``` +## Contributing +Bitcoin UI Kit is an open-source project, and contributions are welcome! If you find a bug, have a feature request, or want to contribute improvements, please submit an issue or a pull request in the GitHub repository. -## Additional information +## License +This project is licensed under the MIT License. -Find out more at [Bitcoin UI Kit](https://www.bitcoinuikit.com) +## Credits +Bitcoin UI Kit Flutter Package is inspired by the design principles and aesthetics of the [Bitcoin UI Kit](https://www.bitcoinuikit.com/). \ No newline at end of file diff --git a/example/.gitignore b/example/.gitignore new file mode 100644 index 0000000..24476c5 --- /dev/null +++ b/example/.gitignore @@ -0,0 +1,44 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# 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/ + +# 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/example/.metadata b/example/.metadata new file mode 100644 index 0000000..083a42e --- /dev/null +++ b/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: b06b8b2710955028a6b562f5aa6fe62941d6febf + channel: stable + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + - platform: android + create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + - platform: ios + create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + - platform: linux + create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + - platform: macos + create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + - platform: web + create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + - platform: windows + create_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + base_revision: b06b8b2710955028a6b562f5aa6fe62941d6febf + + # 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/example/README.md b/example/README.md new file mode 100644 index 0000000..1b7a4e3 --- /dev/null +++ b/example/README.md @@ -0,0 +1,3 @@ +# example + +A new Flutter project. diff --git a/example/analysis_options.yaml b/example/analysis_options.yaml new file mode 100644 index 0000000..f9b3034 --- /dev/null +++ b/example/analysis_options.yaml @@ -0,0 +1 @@ +include: package:flutter_lints/flutter.yaml diff --git a/example/android/.gitignore b/example/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/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/example/android/app/build.gradle b/example/android/app/build.gradle new file mode 100644 index 0000000..b52183a --- /dev/null +++ b/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-gradle-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/example/android/app/src/debug/AndroidManifest.xml b/example/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..45d523a --- /dev/null +++ b/example/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/example/android/app/src/main/AndroidManifest.xml b/example/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..3f41384 --- /dev/null +++ b/example/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + diff --git a/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt b/example/android/app/src/main/kotlin/com/example/example/MainActivity.kt new file mode 100644 index 0000000..e793a00 --- /dev/null +++ b/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/example/android/app/src/main/res/drawable-v21/launch_background.xml b/example/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/example/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/example/android/app/src/main/res/drawable/launch_background.xml b/example/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/example/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/example/android/app/src/main/res/values-night/styles.xml b/example/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/example/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example/android/app/src/main/res/values/styles.xml b/example/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/example/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/example/android/app/src/profile/AndroidManifest.xml b/example/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..45d523a --- /dev/null +++ b/example/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,8 @@ + + + + diff --git a/example/android/build.gradle b/example/android/build.gradle new file mode 100644 index 0000000..58a8c74 --- /dev/null +++ b/example/android/build.gradle @@ -0,0 +1,31 @@ +buildscript { + ext.kotlin_version = '1.7.10' + repositories { + google() + mavenCentral() + } + + dependencies { + classpath 'com.android.tools.build:gradle:7.2.0' + 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/example/android/gradle.properties b/example/android/gradle.properties new file mode 100644 index 0000000..94adc3a --- /dev/null +++ b/example/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx1536M +android.useAndroidX=true +android.enableJetifier=true diff --git a/example/android/gradle/wrapper/gradle-wrapper.properties b/example/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..3c472b9 --- /dev/null +++ b/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.5-all.zip diff --git a/example/android/settings.gradle b/example/android/settings.gradle new file mode 100644 index 0000000..44e62bc --- /dev/null +++ b/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/example/ios/.gitignore b/example/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/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/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..9625e10 --- /dev/null +++ b/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/example/ios/Flutter/Debug.xcconfig b/example/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/example/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/example/ios/Flutter/Release.xcconfig b/example/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/example/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..fe3d67b --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,483 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + 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; + alwaysOutOfDate = 1; + 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; + alwaysOutOfDate = 1; + 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)"; + 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)"; + 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)"; + 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/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..c87d15a --- /dev/null +++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner.xcworkspace/contents.xcworkspacedata b/example/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/example/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/example/ios/Runner/AppDelegate.swift b/example/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/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/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/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/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/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/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..7353c41 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..6ed2d93 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cd7b00 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fe73094 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..321773c Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..502f463 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..e9f5fea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..84ac32a Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..8953cba Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..0467bf1 Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/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/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/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/example/ios/Runner/Base.lproj/LaunchScreen.storyboard b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/example/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner/Base.lproj/Main.storyboard b/example/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/example/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/ios/Runner/Info.plist b/example/ios/Runner/Info.plist new file mode 100644 index 0000000..7f55346 --- /dev/null +++ b/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/example/ios/Runner/Runner-Bridging-Header.h b/example/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/example/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/example/lib/component_storybook.dart b/example/lib/component_storybook.dart new file mode 100644 index 0000000..aaddc5b --- /dev/null +++ b/example/lib/component_storybook.dart @@ -0,0 +1,28 @@ +import 'package:bitcoin_ui_kit/bitcoin_ui_kit.dart'; +import 'package:example/stories.dart'; +import 'package:flutter/material.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 = BitcoinTheme.of(context); + return Storybook( + theme: lightThemeData, + darkTheme: darkThemeData, + themeMode: ThemeMode.light, + initialRoute: 'simple-bitcoin-elevated-button', + children: [ + ...getStories(theme), + ], + ); + } +} diff --git a/example/lib/main.dart b/example/lib/main.dart new file mode 100644 index 0000000..5ffd4b0 --- /dev/null +++ b/example/lib/main.dart @@ -0,0 +1,9 @@ +import 'package:example/story_app.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_web_plugins/url_strategy.dart'; + +void main() { + WidgetsFlutterBinding.ensureInitialized(); + usePathUrlStrategy(); + runApp(StoryApp()); +} diff --git a/example/lib/stories.dart b/example/lib/stories.dart new file mode 100644 index 0000000..fbf0ae4 --- /dev/null +++ b/example/lib/stories.dart @@ -0,0 +1,299 @@ +import 'package:bitcoin_icons/bitcoin_icons.dart'; +import 'package:bitcoin_ui_kit/bitcoin_ui_kit.dart'; +import 'package:flutter/material.dart'; +import 'package:storybook_flutter/storybook_flutter.dart'; + +List getStories(BitcoinThemeData theme) { + return [ + // Bitcoin Elevated Button + Story.simple( + name: 'Simple Bitcoin Elevated Button', + section: 'ElevatedButton', + padding: const EdgeInsets.all(64.0), + child: BitcoinElevatedButton( + label: 'Create a new wallet', + onPressed: () {}, + backgroundColor: BitcoinColors.orange, + fontSize: 21, + height: 60, + textPadding: const EdgeInsets.symmetric(vertical: 19, horizontal: 20), + ), + ), + Story.simple( + name: 'Simple Bitcoin Text Button', + section: 'ElevatedButton', + padding: const EdgeInsets.all(64.0), + child: BitcoinTextButton( + onPressed: () {}, + label: 'Restore existing wallet', + fontSize: 21, + color: BitcoinColors.orange, + ), + ), + Story( + name: 'Bitcoin Elevated Button', + section: 'ElevatedButton', + builder: (_, k) => BitcoinElevatedButton( + label: k.text( + label: 'label', + initial: 'Next', + ), + onPressed: k.boolean( + label: 'onTap', + initial: true, + ) + ? () {} + : null, + backgroundColor: k.options( + label: 'backgroundColor', + initial: null, + options: const [ + Option('Orange', BitcoinColors.orange), + Option('Black', BitcoinColors.black), + ], + ), + ), + ), + Story( + name: 'InProgress Expanded Elevated Button', + section: 'ElevatedButton', + builder: (_, k) => BitcoinElevatedButton.inProgress( + label: k.text( + label: 'label', + initial: 'Processing', + ), + ), + ), + + // Bitcoin Outlined Button + Story.simple( + name: 'Simple Bitcoin Outlined Button', + section: 'OutlinedButton', + padding: const EdgeInsets.all(64.0), + child: BitcoinOutlinedButton( + label: 'Do this later', + onPressed: () {}, + ), + ), + Story( + name: 'Bitcoin Outlined Button with Icon', + section: 'OutlinedButton', + padding: const EdgeInsets.all(64.0), + builder: (_, k) => BitcoinOutlinedButton( + label: 'Share', + // icon: const Icon(BitcoinIcons.share), + onPressed: () {}, + icon: k.options( + label: 'icons', + initial: const Icon(BitcoinIcons.share), + options: const [ + Option('Share', Icon(BitcoinIcons.share)), + Option('Copy', Icon(BitcoinIcons.copy)), + ], + ), + ), + ), + + // Bitcoin Switch + Story( + name: 'Bitcoin Switch', + section: 'Switch', + padding: const EdgeInsets.all(64.0), + builder: (_, k) => Row( + children: [ + const Flexible( + child: BitcoinText( + 'With bitcoin, you are your own bank.' + 'No one else has access to your private keys.', + color: BitcoinColors.neutral7, + textAlign: TextAlign.left, + fontSize: 18, + ), + ), + const SizedBox( + width: 10, + ), + // Switch + BitcoinSwitch( + value: k.boolean( + label: 'value', + initial: false, + ), + onChanged: (val) {}, + ), + ], + ), + ), + + // Bitcoin Circle Avatar + Story( + name: 'Circle Avatar with Icon', + section: 'CircleAvatar', + padding: const EdgeInsets.all(64.0), + builder: (_, k) => BitcoinCircleAvatar( + backgroundColor: k.options( + label: 'backgroundColor', + initial: BitcoinColors.green, + options: const [ + Option('Green', BitcoinColors.green), + Option('Purple', BitcoinColors.purple), + Option('Blue', BitcoinColors.blue), + ], + ), + child: Icon( + k.options( + label: 'icons', + initial: BitcoinIcons.wallet, + options: const [ + Option('Wallet', BitcoinIcons.wallet), + Option('Cloud', BitcoinIcons.cloud), + Option('Safe', BitcoinIcons.safe), + Option('Receive', BitcoinIcons.receive), + Option('Shield', BitcoinIcons.shield), + ], + ), + color: Colors.white, + ), + ), + ), + + // Bitcoin Text + Story( + name: 'Bitcoin Text Bold', + section: 'BitcoinText', + padding: const EdgeInsets.all(64.0), + builder: (_, k) => BitcoinText( + k.text( + label: 'label', + initial: 'Bitcoin wallet', + ), + fontWeight: FontWeight.w600, + fontSize: k.options(label: 'fontSize', initial: 36, options: [ + const Option('Title Head', 36), + const Option('Paragraph Head', 28), + ]), + ), + ), + Story( + name: 'Bitcoin Text Light', + section: 'BitcoinText', + padding: const EdgeInsets.all(64.0), + builder: (_, k) => const BitcoinText( + 'A simple bitcoin wallet for your enjoyment.', + fontSize: 24, + color: BitcoinColors.neutral7, + ), + ), + + // Bitcoin Text Span + Story.simple( + name: 'Bitcoin Text Span', + section: 'TextSpan', + padding: const EdgeInsets.all(64.0), + child: RichText( + text: TextSpan( + children: [ + BitcoinTextSpan( + 'Fees may apply. ', + fontSize: 18, + color: BitcoinColors.neutral7, + ), + BitcoinTextSpan( + 'Learn more', + fontSize: 18, + color: BitcoinColors.orange, + ), + ], + ), + ), + ), + + // Selections + Story.simple( + name: 'Backup Selection', + section: 'Selections', + padding: const EdgeInsets.all(64.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const BitcoinDivider(), + item('Apple iCloud'), + const BitcoinDivider(), + item('Google Drive'), + const BitcoinDivider(), + ], + ), + ), + + Story.simple( + name: 'Security Toggles', + section: 'Selections', + padding: const EdgeInsets.all(64.0), + child: Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const BitcoinDivider(), + item('PIN', isSwitch: true), + const BitcoinDivider(), + item('Face ID', isSwitch: true), + const BitcoinDivider(), + ], + ), + ), + + // BitcoinPinEntryDots and BitcoinKeypad + Story( + name: 'Pin Entry Dots', + section: 'Pin Choice', + padding: const EdgeInsets.all(64.0), + builder: (_, k) => BitcoinPinEntryDots( + pin: const [1, 2], + pinLength: k.sliderInt( + label: 'pinLength', + initial: 4, + min: 4, + max: 8, + ), + ), + ), + Story( + name: 'Bitcoin Keypad', + section: 'Pin Choice', + padding: const EdgeInsets.all(16.0), + builder: (_, k) => SizedBox( + width: 400, + child: BitcoinKeypad( + onDigitPressed: (val) {}, + onCancelPressed: () {}, + iconData: BitcoinIcons.arrow_left, + ), + ), + ), + ]; +} + +Widget item(String itemTitle, {bool isSwitch = false}) { + return Container( + height: 60, + padding: const EdgeInsets.symmetric(vertical: 15), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + BitcoinText( + itemTitle, + fontSize: 18, + textAlign: TextAlign.left, + ), + !isSwitch + ? const Icon( + BitcoinIcons.caret_right, + size: 30, + ) + : BitcoinSwitch( + value: false, + onChanged: (value) {}, + ), + ], + ), + ); +} diff --git a/example/lib/story_app.dart b/example/lib/story_app.dart new file mode 100644 index 0000000..abac7ed --- /dev/null +++ b/example/lib/story_app.dart @@ -0,0 +1,22 @@ +import 'package:bitcoin_ui_kit/bitcoin_ui_kit.dart'; +import 'package:example/component_storybook.dart'; +import 'package:flutter/material.dart'; + +class StoryApp extends StatelessWidget { + StoryApp({Key? key}) : super(key: key); + + final _lightTheme = LightBitcoinThemeData(); + final _darkTheme = DarkBitcoinThemeData(); + + @override + Widget build(BuildContext context) { + return BitcoinTheme( + lightTheme: _lightTheme, + darkTheme: _darkTheme, + child: ComponentStorybook( + lightThemeData: _lightTheme.materialThemeData, + darkThemeData: _darkTheme.materialThemeData, + ), + ); + } +} diff --git a/example/linux/.gitignore b/example/linux/.gitignore new file mode 100644 index 0000000..d3896c9 --- /dev/null +++ b/example/linux/.gitignore @@ -0,0 +1 @@ +flutter/ephemeral diff --git a/example/linux/CMakeLists.txt b/example/linux/CMakeLists.txt new file mode 100644 index 0000000..74c66dd --- /dev/null +++ b/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/example/linux/flutter/CMakeLists.txt b/example/linux/flutter/CMakeLists.txt new file mode 100644 index 0000000..d5bd016 --- /dev/null +++ b/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/example/linux/flutter/generated_plugin_registrant.cc b/example/linux/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000..e71a16d --- /dev/null +++ b/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/example/linux/flutter/generated_plugin_registrant.h b/example/linux/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000..e0f0a47 --- /dev/null +++ b/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/example/linux/flutter/generated_plugins.cmake b/example/linux/flutter/generated_plugins.cmake new file mode 100644 index 0000000..2e1de87 --- /dev/null +++ b/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/example/linux/main.cc b/example/linux/main.cc new file mode 100644 index 0000000..e7c5c54 --- /dev/null +++ b/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/example/linux/my_application.cc b/example/linux/my_application.cc new file mode 100644 index 0000000..0ba8f43 --- /dev/null +++ b/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/example/linux/my_application.h b/example/linux/my_application.h new file mode 100644 index 0000000..72271d5 --- /dev/null +++ b/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/example/macos/.gitignore b/example/macos/.gitignore new file mode 100644 index 0000000..746adbb --- /dev/null +++ b/example/macos/.gitignore @@ -0,0 +1,7 @@ +# Flutter-related +**/Flutter/ephemeral/ +**/Pods/ + +# Xcode-related +**/dgph +**/xcuserdata/ diff --git a/example/macos/Flutter/Flutter-Debug.xcconfig b/example/macos/Flutter/Flutter-Debug.xcconfig new file mode 100644 index 0000000..c2efd0b --- /dev/null +++ b/example/macos/Flutter/Flutter-Debug.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/example/macos/Flutter/Flutter-Release.xcconfig b/example/macos/Flutter/Flutter-Release.xcconfig new file mode 100644 index 0000000..c2efd0b --- /dev/null +++ b/example/macos/Flutter/Flutter-Release.xcconfig @@ -0,0 +1 @@ +#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/example/macos/Flutter/GeneratedPluginRegistrant.swift b/example/macos/Flutter/GeneratedPluginRegistrant.swift new file mode 100644 index 0000000..cccf817 --- /dev/null +++ b/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/example/macos/Runner.xcodeproj/project.pbxproj b/example/macos/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..d9333e4 --- /dev/null +++ b/example/macos/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,573 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + 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; + alwaysOutOfDate = 1; + 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.14; + 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.14; + 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.14; + 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/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..fb7259e --- /dev/null +++ b/example/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/macos/Runner.xcworkspace/contents.xcworkspacedata b/example/macos/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/example/macos/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/example/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/example/macos/Runner/AppDelegate.swift b/example/macos/Runner/AppDelegate.swift new file mode 100644 index 0000000..d53ef64 --- /dev/null +++ b/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/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..a2ec33f --- /dev/null +++ b/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/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png new file mode 100644 index 0000000..82b6f9d Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png new file mode 100644 index 0000000..13b35eb Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png new file mode 100644 index 0000000..0a3f5fa Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png new file mode 100644 index 0000000..bdb5722 Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png new file mode 100644 index 0000000..f083318 Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png new file mode 100644 index 0000000..326c0e7 Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png differ diff --git a/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png new file mode 100644 index 0000000..2f1632c Binary files /dev/null and b/example/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png differ diff --git a/example/macos/Runner/Base.lproj/MainMenu.xib b/example/macos/Runner/Base.lproj/MainMenu.xib new file mode 100644 index 0000000..80e867a --- /dev/null +++ b/example/macos/Runner/Base.lproj/MainMenu.xib @@ -0,0 +1,343 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/example/macos/Runner/Configs/AppInfo.xcconfig b/example/macos/Runner/Configs/AppInfo.xcconfig new file mode 100644 index 0000000..dda192b --- /dev/null +++ b/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 © 2023 com.example. All rights reserved. diff --git a/example/macos/Runner/Configs/Debug.xcconfig b/example/macos/Runner/Configs/Debug.xcconfig new file mode 100644 index 0000000..36b0fd9 --- /dev/null +++ b/example/macos/Runner/Configs/Debug.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Debug.xcconfig" +#include "Warnings.xcconfig" diff --git a/example/macos/Runner/Configs/Release.xcconfig b/example/macos/Runner/Configs/Release.xcconfig new file mode 100644 index 0000000..dff4f49 --- /dev/null +++ b/example/macos/Runner/Configs/Release.xcconfig @@ -0,0 +1,2 @@ +#include "../../Flutter/Flutter-Release.xcconfig" +#include "Warnings.xcconfig" diff --git a/example/macos/Runner/Configs/Warnings.xcconfig b/example/macos/Runner/Configs/Warnings.xcconfig new file mode 100644 index 0000000..42bcbf4 --- /dev/null +++ b/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/example/macos/Runner/DebugProfile.entitlements b/example/macos/Runner/DebugProfile.entitlements new file mode 100644 index 0000000..dddb8a3 --- /dev/null +++ b/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/example/macos/Runner/Info.plist b/example/macos/Runner/Info.plist new file mode 100644 index 0000000..4789daa --- /dev/null +++ b/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/example/macos/Runner/MainFlutterWindow.swift b/example/macos/Runner/MainFlutterWindow.swift new file mode 100644 index 0000000..2722837 --- /dev/null +++ b/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/example/macos/Runner/Release.entitlements b/example/macos/Runner/Release.entitlements new file mode 100644 index 0000000..852fa1a --- /dev/null +++ b/example/macos/Runner/Release.entitlements @@ -0,0 +1,8 @@ + + + + + com.apple.security.app-sandbox + + + diff --git a/example/pubspec.lock b/example/pubspec.lock new file mode 100644 index 0000000..141eec9 --- /dev/null +++ b/example/pubspec.lock @@ -0,0 +1,265 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + async: + dependency: transitive + description: + name: async + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" + source: hosted + version: "2.10.0" + bitcoin_icons: + dependency: "direct main" + description: + name: bitcoin_icons + sha256: "6ee9e69d78683035c089ebc91c3c9de95f7694d7bdcfa7edbbd51d832876f9b3" + url: "https://pub.dev" + source: hosted + version: "0.0.4" + bitcoin_ui_kit: + dependency: "direct main" + description: + path: ".." + relative: true + source: path + version: "1.0.3" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" + source: hosted + version: "1.2.1" + clock: + dependency: transitive + description: + name: clock + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" + source: hosted + version: "1.1.1" + collection: + dependency: transitive + description: + name: collection + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" + source: hosted + version: "1.17.0" + device_frame: + dependency: transitive + description: + name: device_frame + sha256: f3ead86bd0bf0d9c5a4600ffe4f9d496dde29a612eff1025545ff29c71b9935f + url: "https://pub.dev" + source: hosted + version: "0.6.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c + url: "https://pub.dev" + source: hosted + version: "2.0.1" + flutter_switch: + dependency: transitive + description: + name: flutter_switch + sha256: b91477f926bba135d2d203d7b24367492662d8d9c3aa6adb960b14c1087d3c41 + url: "https://pub.dev" + source: hosted + version: "0.3.2" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + freezed_annotation: + dependency: transitive + description: + name: freezed_annotation + sha256: "02d17a242f724828a7c820921dbe92c66fe685d6bef3d7450dc556fa79e033ce" + url: "https://pub.dev" + source: hosted + version: "0.15.0" + js: + dependency: transitive + description: + name: js + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" + source: hosted + version: "0.6.5" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 + url: "https://pub.dev" + source: hosted + version: "4.8.1" + lints: + dependency: transitive + description: + name: lints + sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + url: "https://pub.dev" + source: hosted + version: "2.0.1" + matcher: + dependency: transitive + description: + name: matcher + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" + source: hosted + version: "0.12.13" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" + source: hosted + version: "0.2.0" + meta: + dependency: transitive + description: + name: meta + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" + source: hosted + version: "1.8.0" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + path: + dependency: transitive + description: + name: path + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" + source: hosted + version: "1.8.2" + provider: + dependency: transitive + description: + name: provider + sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f + url: "https://pub.dev" + source: hosted + version: "6.0.5" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.99" + source_span: + dependency: transitive + description: + name: source_span + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" + source: hosted + version: "1.9.1" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" + source: hosted + version: "1.11.0" + storybook_flutter: + dependency: "direct main" + description: + name: storybook_flutter + sha256: "982c3784085fe57fd7d2c5d20dcd2dd4a042f0bf43f2ff4125c20cbc13484df8" + url: "https://pub.dev" + source: hosted + version: "0.8.0" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" + source: hosted + version: "1.2.1" + test_api: + dependency: transitive + description: + name: test_api + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" + source: hosted + version: "0.4.16" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" +sdks: + dart: ">=2.19.0 <=3.0.5" + flutter: ">=1.17.0" diff --git a/example/pubspec.yaml b/example/pubspec.yaml new file mode 100644 index 0000000..d3d2c44 --- /dev/null +++ b/example/pubspec.yaml @@ -0,0 +1,25 @@ +name: example +description: A new Flutter project. +publish_to: 'none' +version: 0.1.0 + +environment: + sdk: '>=2.19.0 <3.0.0' + +dependencies: + flutter: + sdk: flutter + flutter_web_plugins: + sdk: flutter + bitcoin_ui_kit: + path: ../ + storybook_flutter: ^0.8.0 + bitcoin_icons: ^0.0.4 + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^2.0.0 + +flutter: + uses-material-design: true diff --git a/example/web/favicon.png b/example/web/favicon.png new file mode 100644 index 0000000..8aaa46a Binary files /dev/null and b/example/web/favicon.png differ diff --git a/example/web/icons/Icon-192.png b/example/web/icons/Icon-192.png new file mode 100644 index 0000000..b749bfe Binary files /dev/null and b/example/web/icons/Icon-192.png differ diff --git a/example/web/icons/Icon-512.png b/example/web/icons/Icon-512.png new file mode 100644 index 0000000..88cfd48 Binary files /dev/null and b/example/web/icons/Icon-512.png differ diff --git a/example/web/icons/Icon-maskable-192.png b/example/web/icons/Icon-maskable-192.png new file mode 100644 index 0000000..eb9b4d7 Binary files /dev/null and b/example/web/icons/Icon-maskable-192.png differ diff --git a/example/web/icons/Icon-maskable-512.png b/example/web/icons/Icon-maskable-512.png new file mode 100644 index 0000000..d69c566 Binary files /dev/null and b/example/web/icons/Icon-maskable-512.png differ diff --git a/example/web/index.html b/example/web/index.html new file mode 100644 index 0000000..208b7af --- /dev/null +++ b/example/web/index.html @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + example + + + + + + + + + + + + \ No newline at end of file diff --git a/example/web/manifest.json b/example/web/manifest.json new file mode 100644 index 0000000..096edf8 --- /dev/null +++ b/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/example/windows/.gitignore b/example/windows/.gitignore new file mode 100644 index 0000000..d492d0d --- /dev/null +++ b/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/example/windows/CMakeLists.txt b/example/windows/CMakeLists.txt new file mode 100644 index 0000000..c027074 --- /dev/null +++ b/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/example/windows/flutter/CMakeLists.txt b/example/windows/flutter/CMakeLists.txt new file mode 100644 index 0000000..930d207 --- /dev/null +++ b/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/example/windows/flutter/generated_plugin_registrant.cc b/example/windows/flutter/generated_plugin_registrant.cc new file mode 100644 index 0000000..8b6d468 --- /dev/null +++ b/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/example/windows/flutter/generated_plugin_registrant.h b/example/windows/flutter/generated_plugin_registrant.h new file mode 100644 index 0000000..dc139d8 --- /dev/null +++ b/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/example/windows/flutter/generated_plugins.cmake b/example/windows/flutter/generated_plugins.cmake new file mode 100644 index 0000000..b93c4c3 --- /dev/null +++ b/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/example/windows/runner/CMakeLists.txt b/example/windows/runner/CMakeLists.txt new file mode 100644 index 0000000..394917c --- /dev/null +++ b/example/windows/runner/CMakeLists.txt @@ -0,0 +1,40 @@ +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_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") +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/example/windows/runner/Runner.rc b/example/windows/runner/Runner.rc new file mode 100644 index 0000000..aecaa2b --- /dev/null +++ b/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) 2023 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/example/windows/runner/flutter_window.cpp b/example/windows/runner/flutter_window.cpp new file mode 100644 index 0000000..b25e363 --- /dev/null +++ b/example/windows/runner/flutter_window.cpp @@ -0,0 +1,66 @@ +#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()); + + flutter_controller_->engine()->SetNextFrameCallback([&]() { + this->Show(); + }); + + 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/example/windows/runner/flutter_window.h b/example/windows/runner/flutter_window.h new file mode 100644 index 0000000..6da0652 --- /dev/null +++ b/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/example/windows/runner/main.cpp b/example/windows/runner/main.cpp new file mode 100644 index 0000000..a61bf80 --- /dev/null +++ b/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.Create(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/example/windows/runner/resource.h b/example/windows/runner/resource.h new file mode 100644 index 0000000..66a65d1 --- /dev/null +++ b/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/example/windows/runner/resources/app_icon.ico b/example/windows/runner/resources/app_icon.ico new file mode 100644 index 0000000..c04e20c Binary files /dev/null and b/example/windows/runner/resources/app_icon.ico differ diff --git a/example/windows/runner/runner.exe.manifest b/example/windows/runner/runner.exe.manifest new file mode 100644 index 0000000..a42ea76 --- /dev/null +++ b/example/windows/runner/runner.exe.manifest @@ -0,0 +1,20 @@ + + + + + PerMonitorV2 + + + + + + + + + + + + + + + diff --git a/example/windows/runner/utils.cpp b/example/windows/runner/utils.cpp new file mode 100644 index 0000000..f5bf9fa --- /dev/null +++ b/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/example/windows/runner/utils.h b/example/windows/runner/utils.h new file mode 100644 index 0000000..3879d54 --- /dev/null +++ b/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/example/windows/runner/win32_window.cpp b/example/windows/runner/win32_window.cpp new file mode 100644 index 0000000..041a385 --- /dev/null +++ b/example/windows/runner/win32_window.cpp @@ -0,0 +1,288 @@ +#include "win32_window.h" + +#include +#include + +#include "resource.h" + +namespace { + +/// Window attribute that enables dark mode window decorations. +/// +/// Redefined in case the developer's machine has a Windows SDK older than +/// version 10.0.22000.0. +/// See: https://docs.microsoft.com/windows/win32/api/dwmapi/ne-dwmapi-dwmwindowattribute +#ifndef DWMWA_USE_IMMERSIVE_DARK_MODE +#define DWMWA_USE_IMMERSIVE_DARK_MODE 20 +#endif + +constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; + +/// Registry key for app theme preference. +/// +/// A value of 0 indicates apps should use dark mode. A non-zero or missing +/// value indicates apps should use light mode. +constexpr const wchar_t kGetPreferredBrightnessRegKey[] = + L"Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize"; +constexpr const wchar_t kGetPreferredBrightnessRegValue[] = L"AppsUseLightTheme"; + +// 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::Create(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, + 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; + } + + UpdateTheme(window); + + return OnCreate(); +} + +bool Win32Window::Show() { + return ShowWindow(window_handle_, SW_SHOWNORMAL); +} + +// 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; + + case WM_DWMCOLORIZATIONCOLORCHANGED: + UpdateTheme(hwnd); + 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. +} + +void Win32Window::UpdateTheme(HWND const window) { + DWORD light_mode; + DWORD light_mode_size = sizeof(light_mode); + LSTATUS result = RegGetValue(HKEY_CURRENT_USER, kGetPreferredBrightnessRegKey, + kGetPreferredBrightnessRegValue, + RRF_RT_REG_DWORD, nullptr, &light_mode, + &light_mode_size); + + if (result == ERROR_SUCCESS) { + BOOL enable_dark_mode = light_mode == 0; + DwmSetWindowAttribute(window, DWMWA_USE_IMMERSIVE_DARK_MODE, + &enable_dark_mode, sizeof(enable_dark_mode)); + } +} diff --git a/example/windows/runner/win32_window.h b/example/windows/runner/win32_window.h new file mode 100644 index 0000000..c86632d --- /dev/null +++ b/example/windows/runner/win32_window.h @@ -0,0 +1,102 @@ +#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 a win32 window with |title| that is positioned and sized 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 this function will scale the inputted width and height as + // as appropriate for the default monitor. The window is invisible until + // |Show| is called. Returns true if the window was created successfully. + bool Create(const std::wstring& title, const Point& origin, const Size& size); + + // Show the current window. Returns true if the window was successfully shown. + bool Show(); + + // 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; + + // Update the window frame's theme to match the system theme. + static void UpdateTheme(HWND const window); + + 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/icons/2.0x/alert.png b/icons/2.0x/alert.png deleted file mode 100644 index f5b3ed8..0000000 Binary files a/icons/2.0x/alert.png and /dev/null differ diff --git a/icons/2.0x/alert_outline.png b/icons/2.0x/alert_outline.png deleted file mode 100644 index 4cc3c09..0000000 Binary files a/icons/2.0x/alert_outline.png and /dev/null differ diff --git a/icons/2.0x/arrow_down.png b/icons/2.0x/arrow_down.png deleted file mode 100644 index 2c815b1..0000000 Binary files a/icons/2.0x/arrow_down.png and /dev/null differ diff --git a/icons/2.0x/arrow_down_outline.png b/icons/2.0x/arrow_down_outline.png deleted file mode 100644 index 5de526f..0000000 Binary files a/icons/2.0x/arrow_down_outline.png and /dev/null differ diff --git a/icons/2.0x/arrow_left.png b/icons/2.0x/arrow_left.png deleted file mode 100644 index 45b014f..0000000 Binary files a/icons/2.0x/arrow_left.png and /dev/null differ diff --git a/icons/2.0x/arrow_left_outline.png b/icons/2.0x/arrow_left_outline.png deleted file mode 100644 index aee07c1..0000000 Binary files a/icons/2.0x/arrow_left_outline.png and /dev/null differ diff --git a/icons/2.0x/arrow_right.png b/icons/2.0x/arrow_right.png deleted file mode 100644 index fd1e466..0000000 Binary files a/icons/2.0x/arrow_right.png and /dev/null differ diff --git a/icons/2.0x/arrow_right_outline.png b/icons/2.0x/arrow_right_outline.png deleted file mode 100644 index 5a96b66..0000000 Binary files a/icons/2.0x/arrow_right_outline.png and /dev/null differ diff --git a/icons/2.0x/arrow_up.png b/icons/2.0x/arrow_up.png deleted file mode 100644 index d99c71f..0000000 Binary files a/icons/2.0x/arrow_up.png and /dev/null differ diff --git a/icons/2.0x/arrow_up_outline.png b/icons/2.0x/arrow_up_outline.png deleted file mode 100644 index c03afa1..0000000 Binary files a/icons/2.0x/arrow_up_outline.png and /dev/null differ diff --git a/icons/2.0x/bitcoin_circle.png b/icons/2.0x/bitcoin_circle.png deleted file mode 100644 index a878581..0000000 Binary files a/icons/2.0x/bitcoin_circle.png and /dev/null differ diff --git a/icons/2.0x/bitcoin_circle_outline.png b/icons/2.0x/bitcoin_circle_outline.png deleted file mode 100644 index 33b40db..0000000 Binary files a/icons/2.0x/bitcoin_circle_outline.png and /dev/null differ diff --git a/icons/2.0x/caret_down.png b/icons/2.0x/caret_down.png deleted file mode 100644 index 5ce8a98..0000000 Binary files a/icons/2.0x/caret_down.png and /dev/null differ diff --git a/icons/2.0x/caret_down_outline.png b/icons/2.0x/caret_down_outline.png deleted file mode 100644 index 190d054..0000000 Binary files a/icons/2.0x/caret_down_outline.png and /dev/null differ diff --git a/icons/2.0x/caret_left.png b/icons/2.0x/caret_left.png deleted file mode 100644 index bb7838b..0000000 Binary files a/icons/2.0x/caret_left.png and /dev/null differ diff --git a/icons/2.0x/caret_left_outline.png b/icons/2.0x/caret_left_outline.png deleted file mode 100644 index 7904d3b..0000000 Binary files a/icons/2.0x/caret_left_outline.png and /dev/null differ diff --git a/icons/2.0x/caret_right.png b/icons/2.0x/caret_right.png deleted file mode 100644 index 5ce8a98..0000000 Binary files a/icons/2.0x/caret_right.png and /dev/null differ diff --git a/icons/2.0x/caret_right_outline.png b/icons/2.0x/caret_right_outline.png deleted file mode 100644 index 9675b6b..0000000 Binary files a/icons/2.0x/caret_right_outline.png and /dev/null differ diff --git a/icons/2.0x/caret_up.png b/icons/2.0x/caret_up.png deleted file mode 100644 index 3bf2224..0000000 Binary files a/icons/2.0x/caret_up.png and /dev/null differ diff --git a/icons/2.0x/caret_up_outline.png b/icons/2.0x/caret_up_outline.png deleted file mode 100644 index 2894efa..0000000 Binary files a/icons/2.0x/caret_up_outline.png and /dev/null differ diff --git a/icons/2.0x/cart.png b/icons/2.0x/cart.png deleted file mode 100644 index f270e5f..0000000 Binary files a/icons/2.0x/cart.png and /dev/null differ diff --git a/icons/2.0x/cart_outline.png b/icons/2.0x/cart_outline.png deleted file mode 100644 index 2fd5bcb..0000000 Binary files a/icons/2.0x/cart_outline.png and /dev/null differ diff --git a/icons/2.0x/channel.png b/icons/2.0x/channel.png deleted file mode 100644 index 45cabcc..0000000 Binary files a/icons/2.0x/channel.png and /dev/null differ diff --git a/icons/2.0x/channel_outline.png b/icons/2.0x/channel_outline.png deleted file mode 100644 index 8acd7bf..0000000 Binary files a/icons/2.0x/channel_outline.png and /dev/null differ diff --git a/icons/2.0x/check.png b/icons/2.0x/check.png deleted file mode 100644 index d4bb494..0000000 Binary files a/icons/2.0x/check.png and /dev/null differ diff --git a/icons/2.0x/check_outline.png b/icons/2.0x/check_outline.png deleted file mode 100644 index 4c3ad91..0000000 Binary files a/icons/2.0x/check_outline.png and /dev/null differ diff --git a/icons/2.0x/clock.png b/icons/2.0x/clock.png deleted file mode 100644 index 491545e..0000000 Binary files a/icons/2.0x/clock.png and /dev/null differ diff --git a/icons/2.0x/clock_outline.png b/icons/2.0x/clock_outline.png deleted file mode 100644 index 1d65769..0000000 Binary files a/icons/2.0x/clock_outline.png and /dev/null differ diff --git a/icons/2.0x/cloud.png b/icons/2.0x/cloud.png deleted file mode 100644 index e5db3ca..0000000 Binary files a/icons/2.0x/cloud.png and /dev/null differ diff --git a/icons/2.0x/cloud_outline.png b/icons/2.0x/cloud_outline.png deleted file mode 100644 index 071d479..0000000 Binary files a/icons/2.0x/cloud_outline.png and /dev/null differ diff --git a/icons/2.0x/coins.png b/icons/2.0x/coins.png deleted file mode 100644 index 2333a99..0000000 Binary files a/icons/2.0x/coins.png and /dev/null differ diff --git a/icons/2.0x/coins_outline.png b/icons/2.0x/coins_outline.png deleted file mode 100644 index 621b69c..0000000 Binary files a/icons/2.0x/coins_outline.png and /dev/null differ diff --git a/icons/2.0x/confirmations_0.png b/icons/2.0x/confirmations_0.png deleted file mode 100644 index 34ba858..0000000 Binary files a/icons/2.0x/confirmations_0.png and /dev/null differ diff --git a/icons/2.0x/confirmations_0_outline.png b/icons/2.0x/confirmations_0_outline.png deleted file mode 100644 index 42c11f5..0000000 Binary files a/icons/2.0x/confirmations_0_outline.png and /dev/null differ diff --git a/icons/2.0x/confirmations_1.png b/icons/2.0x/confirmations_1.png deleted file mode 100644 index 825b9ad..0000000 Binary files a/icons/2.0x/confirmations_1.png and /dev/null differ diff --git a/icons/2.0x/confirmations_1_outline.png b/icons/2.0x/confirmations_1_outline.png deleted file mode 100644 index 3eb2662..0000000 Binary files a/icons/2.0x/confirmations_1_outline.png and /dev/null differ diff --git a/icons/2.0x/confirmations_2.png b/icons/2.0x/confirmations_2.png deleted file mode 100644 index 4836956..0000000 Binary files a/icons/2.0x/confirmations_2.png and /dev/null differ diff --git a/icons/2.0x/confirmations_3.png b/icons/2.0x/confirmations_3.png deleted file mode 100644 index 37a220a..0000000 Binary files a/icons/2.0x/confirmations_3.png and /dev/null differ diff --git a/icons/2.0x/confirmations_3_outline.png b/icons/2.0x/confirmations_3_outline.png deleted file mode 100644 index 85b3fdd..0000000 Binary files a/icons/2.0x/confirmations_3_outline.png and /dev/null differ diff --git a/icons/2.0x/confirmations_4.png b/icons/2.0x/confirmations_4.png deleted file mode 100644 index 47caa6e..0000000 Binary files a/icons/2.0x/confirmations_4.png and /dev/null differ diff --git a/icons/2.0x/confirmations_4_outline.png b/icons/2.0x/confirmations_4_outline.png deleted file mode 100644 index ab3d6fd..0000000 Binary files a/icons/2.0x/confirmations_4_outline.png and /dev/null differ diff --git a/icons/2.0x/confirmations_5.png b/icons/2.0x/confirmations_5.png deleted file mode 100644 index 9cf74df..0000000 Binary files a/icons/2.0x/confirmations_5.png and /dev/null differ diff --git a/icons/2.0x/confirmations_5_outline.png b/icons/2.0x/confirmations_5_outline.png deleted file mode 100644 index 5e0a25a..0000000 Binary files a/icons/2.0x/confirmations_5_outline.png and /dev/null differ diff --git a/icons/2.0x/confirmations_6.png b/icons/2.0x/confirmations_6.png deleted file mode 100644 index ea0a924..0000000 Binary files a/icons/2.0x/confirmations_6.png and /dev/null differ diff --git a/icons/2.0x/confirmations_6_outline.png b/icons/2.0x/confirmations_6_outline.png deleted file mode 100644 index 87b1041..0000000 Binary files a/icons/2.0x/confirmations_6_outline.png and /dev/null differ diff --git a/icons/2.0x/contacts.png b/icons/2.0x/contacts.png deleted file mode 100644 index eb82109..0000000 Binary files a/icons/2.0x/contacts.png and /dev/null differ diff --git a/icons/2.0x/contacts_outlined.png b/icons/2.0x/contacts_outlined.png deleted file mode 100644 index 6dd8218..0000000 Binary files a/icons/2.0x/contacts_outlined.png and /dev/null differ diff --git a/icons/2.0x/copy.png b/icons/2.0x/copy.png deleted file mode 100644 index 13ff592..0000000 Binary files a/icons/2.0x/copy.png and /dev/null differ diff --git a/icons/2.0x/copy_outline.png b/icons/2.0x/copy_outline.png deleted file mode 100644 index e7874e3..0000000 Binary files a/icons/2.0x/copy_outline.png and /dev/null differ diff --git a/icons/2.0x/devices.png b/icons/2.0x/devices.png deleted file mode 100644 index 888c4bd..0000000 Binary files a/icons/2.0x/devices.png and /dev/null differ diff --git a/icons/2.0x/devices_outline.png b/icons/2.0x/devices_outline.png deleted file mode 100644 index 388e9cb..0000000 Binary files a/icons/2.0x/devices_outline.png and /dev/null differ diff --git a/icons/2.0x/edit.png b/icons/2.0x/edit.png deleted file mode 100644 index 01db5a1..0000000 Binary files a/icons/2.0x/edit.png and /dev/null differ diff --git a/icons/2.0x/edit_outline.png b/icons/2.0x/edit_outline.png deleted file mode 100644 index ad26c52..0000000 Binary files a/icons/2.0x/edit_outline.png and /dev/null differ diff --git a/icons/2.0x/ellipsis.png b/icons/2.0x/ellipsis.png deleted file mode 100644 index 6b355cf..0000000 Binary files a/icons/2.0x/ellipsis.png and /dev/null differ diff --git a/icons/2.0x/ellipsis_outline.png b/icons/2.0x/ellipsis_outline.png deleted file mode 100644 index 6b355cf..0000000 Binary files a/icons/2.0x/ellipsis_outline.png and /dev/null differ diff --git a/icons/2.0x/fee.png b/icons/2.0x/fee.png deleted file mode 100644 index 8481e7d..0000000 Binary files a/icons/2.0x/fee.png and /dev/null differ diff --git a/icons/2.0x/fee_outline.png b/icons/2.0x/fee_outline.png deleted file mode 100644 index dd948a8..0000000 Binary files a/icons/2.0x/fee_outline.png and /dev/null differ diff --git a/icons/2.0x/file.png b/icons/2.0x/file.png deleted file mode 100644 index 6848f32..0000000 Binary files a/icons/2.0x/file.png and /dev/null differ diff --git a/icons/2.0x/file_outline.png b/icons/2.0x/file_outline.png deleted file mode 100644 index 1a300ea..0000000 Binary files a/icons/2.0x/file_outline.png and /dev/null differ diff --git a/icons/2.0x/flip_horizontal.png b/icons/2.0x/flip_horizontal.png deleted file mode 100644 index c1f180c..0000000 Binary files a/icons/2.0x/flip_horizontal.png and /dev/null differ diff --git a/icons/2.0x/flip_vertical.png b/icons/2.0x/flip_vertical.png deleted file mode 100644 index e328aef..0000000 Binary files a/icons/2.0x/flip_vertical.png and /dev/null differ diff --git a/icons/2.0x/gear.png b/icons/2.0x/gear.png deleted file mode 100644 index 8afa9da..0000000 Binary files a/icons/2.0x/gear.png and /dev/null differ diff --git a/icons/2.0x/gear_outline.png b/icons/2.0x/gear_outline.png deleted file mode 100644 index c6e4353..0000000 Binary files a/icons/2.0x/gear_outline.png and /dev/null differ diff --git a/icons/2.0x/hidden.png b/icons/2.0x/hidden.png deleted file mode 100644 index e6780fe..0000000 Binary files a/icons/2.0x/hidden.png and /dev/null differ diff --git a/icons/2.0x/hidden_outline.png b/icons/2.0x/hidden_outline.png deleted file mode 100644 index 7fa4ca9..0000000 Binary files a/icons/2.0x/hidden_outline.png and /dev/null differ diff --git a/icons/2.0x/home.png b/icons/2.0x/home.png deleted file mode 100644 index 877a0d9..0000000 Binary files a/icons/2.0x/home.png and /dev/null differ diff --git a/icons/2.0x/home_outline.png b/icons/2.0x/home_outline.png deleted file mode 100644 index d6b9a38..0000000 Binary files a/icons/2.0x/home_outline.png and /dev/null differ diff --git a/icons/2.0x/info.png b/icons/2.0x/info.png deleted file mode 100644 index 9fdc4f6..0000000 Binary files a/icons/2.0x/info.png and /dev/null differ diff --git a/icons/2.0x/info_outline.png b/icons/2.0x/info_outline.png deleted file mode 100644 index 9fdc4f6..0000000 Binary files a/icons/2.0x/info_outline.png and /dev/null differ diff --git a/icons/2.0x/key.png b/icons/2.0x/key.png deleted file mode 100644 index 597e682..0000000 Binary files a/icons/2.0x/key.png and /dev/null differ diff --git a/icons/2.0x/key_outline.png b/icons/2.0x/key_outline.png deleted file mode 100644 index c3941f9..0000000 Binary files a/icons/2.0x/key_outline.png and /dev/null differ diff --git a/icons/2.0x/lightning.png b/icons/2.0x/lightning.png deleted file mode 100644 index c85ac8a..0000000 Binary files a/icons/2.0x/lightning.png and /dev/null differ diff --git a/icons/2.0x/lightning_outline.png b/icons/2.0x/lightning_outline.png deleted file mode 100644 index f2bf6b0..0000000 Binary files a/icons/2.0x/lightning_outline.png and /dev/null differ diff --git a/icons/2.0x/link.png b/icons/2.0x/link.png deleted file mode 100644 index dd64d49..0000000 Binary files a/icons/2.0x/link.png and /dev/null differ diff --git a/icons/2.0x/lock.png b/icons/2.0x/lock.png deleted file mode 100644 index 8a5ae4f..0000000 Binary files a/icons/2.0x/lock.png and /dev/null differ diff --git a/icons/2.0x/lock_outline.png b/icons/2.0x/lock_outline.png deleted file mode 100644 index fedb0d9..0000000 Binary files a/icons/2.0x/lock_outline.png and /dev/null differ diff --git a/icons/2.0x/mining.png b/icons/2.0x/mining.png deleted file mode 100644 index 8d8575b..0000000 Binary files a/icons/2.0x/mining.png and /dev/null differ diff --git a/icons/2.0x/mining_outline.png b/icons/2.0x/mining_outline.png deleted file mode 100644 index d2debf8..0000000 Binary files a/icons/2.0x/mining_outline.png and /dev/null differ diff --git a/icons/2.0x/minus.png b/icons/2.0x/minus.png deleted file mode 100644 index 1e31c31..0000000 Binary files a/icons/2.0x/minus.png and /dev/null differ diff --git a/icons/2.0x/minus_outline.png b/icons/2.0x/minus_outline.png deleted file mode 100644 index 7d4d9fe..0000000 Binary files a/icons/2.0x/minus_outline.png and /dev/null differ diff --git a/icons/2.0x/mnemonic.png b/icons/2.0x/mnemonic.png deleted file mode 100644 index 04c4971..0000000 Binary files a/icons/2.0x/mnemonic.png and /dev/null differ diff --git a/icons/2.0x/mnemonic_outline.png b/icons/2.0x/mnemonic_outline.png deleted file mode 100644 index 22c52d6..0000000 Binary files a/icons/2.0x/mnemonic_outline.png and /dev/null differ diff --git a/icons/2.0x/plus.png b/icons/2.0x/plus.png deleted file mode 100644 index 48d39e3..0000000 Binary files a/icons/2.0x/plus.png and /dev/null differ diff --git a/icons/2.0x/plus_outline.png b/icons/2.0x/plus_outline.png deleted file mode 100644 index 1f393df..0000000 Binary files a/icons/2.0x/plus_outline.png and /dev/null differ diff --git a/icons/2.0x/qr_code.png b/icons/2.0x/qr_code.png deleted file mode 100644 index f2f47f8..0000000 Binary files a/icons/2.0x/qr_code.png and /dev/null differ diff --git a/icons/2.0x/qr_code_outline.png b/icons/2.0x/qr_code_outline.png deleted file mode 100644 index 1cf7a6e..0000000 Binary files a/icons/2.0x/qr_code_outline.png and /dev/null differ diff --git a/icons/2.0x/question.png b/icons/2.0x/question.png deleted file mode 100644 index 4812695..0000000 Binary files a/icons/2.0x/question.png and /dev/null differ diff --git a/icons/2.0x/question_outline.png b/icons/2.0x/question_outline.png deleted file mode 100644 index 4812695..0000000 Binary files a/icons/2.0x/question_outline.png and /dev/null differ diff --git a/icons/2.0x/receive.png b/icons/2.0x/receive.png deleted file mode 100644 index 9d5468e..0000000 Binary files a/icons/2.0x/receive.png and /dev/null differ diff --git a/icons/2.0x/receive_outline.png b/icons/2.0x/receive_outline.png deleted file mode 100644 index 0843c07..0000000 Binary files a/icons/2.0x/receive_outline.png and /dev/null differ diff --git a/icons/2.0x/safe.png b/icons/2.0x/safe.png deleted file mode 100644 index 444ffa4..0000000 Binary files a/icons/2.0x/safe.png and /dev/null differ diff --git a/icons/2.0x/safe_outline.png b/icons/2.0x/safe_outline.png deleted file mode 100644 index 8357cf4..0000000 Binary files a/icons/2.0x/safe_outline.png and /dev/null differ diff --git a/icons/2.0x/scan.png b/icons/2.0x/scan.png deleted file mode 100644 index 581f60a..0000000 Binary files a/icons/2.0x/scan.png and /dev/null differ diff --git a/icons/2.0x/scan_outline.png b/icons/2.0x/scan_outline.png deleted file mode 100644 index 4b727d2..0000000 Binary files a/icons/2.0x/scan_outline.png and /dev/null differ diff --git a/icons/2.0x/search.png b/icons/2.0x/search.png deleted file mode 100644 index 53b740a..0000000 Binary files a/icons/2.0x/search.png and /dev/null differ diff --git a/icons/2.0x/search_outline.png b/icons/2.0x/search_outline.png deleted file mode 100644 index cf7d695..0000000 Binary files a/icons/2.0x/search_outline.png and /dev/null differ diff --git a/icons/2.0x/send.png b/icons/2.0x/send.png deleted file mode 100644 index 2c170e2..0000000 Binary files a/icons/2.0x/send.png and /dev/null differ diff --git a/icons/2.0x/share.png b/icons/2.0x/share.png deleted file mode 100644 index 7563567..0000000 Binary files a/icons/2.0x/share.png and /dev/null differ diff --git a/icons/2.0x/share_outline.png b/icons/2.0x/share_outline.png deleted file mode 100644 index 8fbc3ea..0000000 Binary files a/icons/2.0x/share_outline.png and /dev/null differ diff --git a/icons/2.0x/shared_wallet.png b/icons/2.0x/shared_wallet.png deleted file mode 100644 index 50ba0c8..0000000 Binary files a/icons/2.0x/shared_wallet.png and /dev/null differ diff --git a/icons/2.0x/shared_wallet_outline.png b/icons/2.0x/shared_wallet_outline.png deleted file mode 100644 index 50ba0c8..0000000 Binary files a/icons/2.0x/shared_wallet_outline.png and /dev/null differ diff --git a/icons/2.0x/transactions.png b/icons/2.0x/transactions.png deleted file mode 100644 index 9d744c4..0000000 Binary files a/icons/2.0x/transactions.png and /dev/null differ diff --git a/icons/2.0x/transactions_outline.png b/icons/2.0x/transactions_outline.png deleted file mode 100644 index 2d8176f..0000000 Binary files a/icons/2.0x/transactions_outline.png and /dev/null differ diff --git a/icons/2.0x/two_keys.png b/icons/2.0x/two_keys.png deleted file mode 100644 index cadc399..0000000 Binary files a/icons/2.0x/two_keys.png and /dev/null differ diff --git a/icons/2.0x/two_keys_outline.png b/icons/2.0x/two_keys_outline.png deleted file mode 100644 index 91df10d..0000000 Binary files a/icons/2.0x/two_keys_outline.png and /dev/null differ diff --git a/icons/2.0x/visible.png b/icons/2.0x/visible.png deleted file mode 100644 index d7072a7..0000000 Binary files a/icons/2.0x/visible.png and /dev/null differ diff --git a/icons/2.0x/visible_outline.png b/icons/2.0x/visible_outline.png deleted file mode 100644 index 800a917..0000000 Binary files a/icons/2.0x/visible_outline.png and /dev/null differ diff --git a/icons/2.0x/wallet.png b/icons/2.0x/wallet.png deleted file mode 100644 index df6cbc3..0000000 Binary files a/icons/2.0x/wallet.png and /dev/null differ diff --git a/icons/2.0x/wallet_outline.png b/icons/2.0x/wallet_outline.png deleted file mode 100644 index 250a129..0000000 Binary files a/icons/2.0x/wallet_outline.png and /dev/null differ diff --git a/icons/2.0x/x.png b/icons/2.0x/x.png deleted file mode 100644 index bd55249..0000000 Binary files a/icons/2.0x/x.png and /dev/null differ diff --git a/icons/2.0x/x_outline.png b/icons/2.0x/x_outline.png deleted file mode 100644 index 3dbcf99..0000000 Binary files a/icons/2.0x/x_outline.png and /dev/null differ diff --git a/icons/3.0x/alert.png b/icons/3.0x/alert.png deleted file mode 100644 index 8173288..0000000 Binary files a/icons/3.0x/alert.png and /dev/null differ diff --git a/icons/3.0x/alert_outline.png b/icons/3.0x/alert_outline.png deleted file mode 100644 index 51051fe..0000000 Binary files a/icons/3.0x/alert_outline.png and /dev/null differ diff --git a/icons/3.0x/arrow_down.png b/icons/3.0x/arrow_down.png deleted file mode 100644 index f6549d1..0000000 Binary files a/icons/3.0x/arrow_down.png and /dev/null differ diff --git a/icons/3.0x/arrow_down_outline.png b/icons/3.0x/arrow_down_outline.png deleted file mode 100644 index 773fa1a..0000000 Binary files a/icons/3.0x/arrow_down_outline.png and /dev/null differ diff --git a/icons/3.0x/arrow_left.png b/icons/3.0x/arrow_left.png deleted file mode 100644 index 2f2e2db..0000000 Binary files a/icons/3.0x/arrow_left.png and /dev/null differ diff --git a/icons/3.0x/arrow_left_outline.png b/icons/3.0x/arrow_left_outline.png deleted file mode 100644 index c161830..0000000 Binary files a/icons/3.0x/arrow_left_outline.png and /dev/null differ diff --git a/icons/3.0x/arrow_right.png b/icons/3.0x/arrow_right.png deleted file mode 100644 index bd2079c..0000000 Binary files a/icons/3.0x/arrow_right.png and /dev/null differ diff --git a/icons/3.0x/arrow_right_outline.png b/icons/3.0x/arrow_right_outline.png deleted file mode 100644 index 345ede6..0000000 Binary files a/icons/3.0x/arrow_right_outline.png and /dev/null differ diff --git a/icons/3.0x/arrow_up.png b/icons/3.0x/arrow_up.png deleted file mode 100644 index 095f700..0000000 Binary files a/icons/3.0x/arrow_up.png and /dev/null differ diff --git a/icons/3.0x/arrow_up_outline.png b/icons/3.0x/arrow_up_outline.png deleted file mode 100644 index 833cebb..0000000 Binary files a/icons/3.0x/arrow_up_outline.png and /dev/null differ diff --git a/icons/3.0x/bitcoin_circle.png b/icons/3.0x/bitcoin_circle.png deleted file mode 100644 index d612c29..0000000 Binary files a/icons/3.0x/bitcoin_circle.png and /dev/null differ diff --git a/icons/3.0x/bitcoin_circle_outline.png b/icons/3.0x/bitcoin_circle_outline.png deleted file mode 100644 index ecd7eb5..0000000 Binary files a/icons/3.0x/bitcoin_circle_outline.png and /dev/null differ diff --git a/icons/3.0x/caret_down.png b/icons/3.0x/caret_down.png deleted file mode 100644 index dc47b80..0000000 Binary files a/icons/3.0x/caret_down.png and /dev/null differ diff --git a/icons/3.0x/caret_down_outline.png b/icons/3.0x/caret_down_outline.png deleted file mode 100644 index 20db46c..0000000 Binary files a/icons/3.0x/caret_down_outline.png and /dev/null differ diff --git a/icons/3.0x/caret_left.png b/icons/3.0x/caret_left.png deleted file mode 100644 index ed60f1d..0000000 Binary files a/icons/3.0x/caret_left.png and /dev/null differ diff --git a/icons/3.0x/caret_left_outline.png b/icons/3.0x/caret_left_outline.png deleted file mode 100644 index 659f678..0000000 Binary files a/icons/3.0x/caret_left_outline.png and /dev/null differ diff --git a/icons/3.0x/caret_right.png b/icons/3.0x/caret_right.png deleted file mode 100644 index dc47b80..0000000 Binary files a/icons/3.0x/caret_right.png and /dev/null differ diff --git a/icons/3.0x/caret_right_outline.png b/icons/3.0x/caret_right_outline.png deleted file mode 100644 index 09a3e5e..0000000 Binary files a/icons/3.0x/caret_right_outline.png and /dev/null differ diff --git a/icons/3.0x/caret_up.png b/icons/3.0x/caret_up.png deleted file mode 100644 index b9853a0..0000000 Binary files a/icons/3.0x/caret_up.png and /dev/null differ diff --git a/icons/3.0x/caret_up_outline.png b/icons/3.0x/caret_up_outline.png deleted file mode 100644 index df2cb93..0000000 Binary files a/icons/3.0x/caret_up_outline.png and /dev/null differ diff --git a/icons/3.0x/cart.png b/icons/3.0x/cart.png deleted file mode 100644 index 78966c9..0000000 Binary files a/icons/3.0x/cart.png and /dev/null differ diff --git a/icons/3.0x/cart_outline.png b/icons/3.0x/cart_outline.png deleted file mode 100644 index c5173e3..0000000 Binary files a/icons/3.0x/cart_outline.png and /dev/null differ diff --git a/icons/3.0x/channel.png b/icons/3.0x/channel.png deleted file mode 100644 index cf2dbaf..0000000 Binary files a/icons/3.0x/channel.png and /dev/null differ diff --git a/icons/3.0x/channel_outline.png b/icons/3.0x/channel_outline.png deleted file mode 100644 index 2b76f22..0000000 Binary files a/icons/3.0x/channel_outline.png and /dev/null differ diff --git a/icons/3.0x/check.png b/icons/3.0x/check.png deleted file mode 100644 index 96869cf..0000000 Binary files a/icons/3.0x/check.png and /dev/null differ diff --git a/icons/3.0x/check_outline.png b/icons/3.0x/check_outline.png deleted file mode 100644 index 665f51a..0000000 Binary files a/icons/3.0x/check_outline.png and /dev/null differ diff --git a/icons/3.0x/clock.png b/icons/3.0x/clock.png deleted file mode 100644 index bff2a3b..0000000 Binary files a/icons/3.0x/clock.png and /dev/null differ diff --git a/icons/3.0x/clock_outline.png b/icons/3.0x/clock_outline.png deleted file mode 100644 index 270ca93..0000000 Binary files a/icons/3.0x/clock_outline.png and /dev/null differ diff --git a/icons/3.0x/cloud.png b/icons/3.0x/cloud.png deleted file mode 100644 index 1fca0de..0000000 Binary files a/icons/3.0x/cloud.png and /dev/null differ diff --git a/icons/3.0x/cloud_outline.png b/icons/3.0x/cloud_outline.png deleted file mode 100644 index c89aff9..0000000 Binary files a/icons/3.0x/cloud_outline.png and /dev/null differ diff --git a/icons/3.0x/coins.png b/icons/3.0x/coins.png deleted file mode 100644 index 6ad30be..0000000 Binary files a/icons/3.0x/coins.png and /dev/null differ diff --git a/icons/3.0x/coins_outline.png b/icons/3.0x/coins_outline.png deleted file mode 100644 index 351d08a..0000000 Binary files a/icons/3.0x/coins_outline.png and /dev/null differ diff --git a/icons/3.0x/confirmations_0.png b/icons/3.0x/confirmations_0.png deleted file mode 100644 index f4f7882..0000000 Binary files a/icons/3.0x/confirmations_0.png and /dev/null differ diff --git a/icons/3.0x/confirmations_0_outline.png b/icons/3.0x/confirmations_0_outline.png deleted file mode 100644 index 20b4884..0000000 Binary files a/icons/3.0x/confirmations_0_outline.png and /dev/null differ diff --git a/icons/3.0x/confirmations_1.png b/icons/3.0x/confirmations_1.png deleted file mode 100644 index 341f74d..0000000 Binary files a/icons/3.0x/confirmations_1.png and /dev/null differ diff --git a/icons/3.0x/confirmations_1_outline.png b/icons/3.0x/confirmations_1_outline.png deleted file mode 100644 index 6a66cb3..0000000 Binary files a/icons/3.0x/confirmations_1_outline.png and /dev/null differ diff --git a/icons/3.0x/confirmations_2.png b/icons/3.0x/confirmations_2.png deleted file mode 100644 index dde890a..0000000 Binary files a/icons/3.0x/confirmations_2.png and /dev/null differ diff --git a/icons/3.0x/confirmations_3.png b/icons/3.0x/confirmations_3.png deleted file mode 100644 index a9e00ee..0000000 Binary files a/icons/3.0x/confirmations_3.png and /dev/null differ diff --git a/icons/3.0x/confirmations_3_outline.png b/icons/3.0x/confirmations_3_outline.png deleted file mode 100644 index 0a53543..0000000 Binary files a/icons/3.0x/confirmations_3_outline.png and /dev/null differ diff --git a/icons/3.0x/confirmations_4.png b/icons/3.0x/confirmations_4.png deleted file mode 100644 index a0de306..0000000 Binary files a/icons/3.0x/confirmations_4.png and /dev/null differ diff --git a/icons/3.0x/confirmations_4_outline.png b/icons/3.0x/confirmations_4_outline.png deleted file mode 100644 index 39ad2b0..0000000 Binary files a/icons/3.0x/confirmations_4_outline.png and /dev/null differ diff --git a/icons/3.0x/confirmations_5.png b/icons/3.0x/confirmations_5.png deleted file mode 100644 index c070e1f..0000000 Binary files a/icons/3.0x/confirmations_5.png and /dev/null differ diff --git a/icons/3.0x/confirmations_5_outline.png b/icons/3.0x/confirmations_5_outline.png deleted file mode 100644 index 81bc3ca..0000000 Binary files a/icons/3.0x/confirmations_5_outline.png and /dev/null differ diff --git a/icons/3.0x/confirmations_6.png b/icons/3.0x/confirmations_6.png deleted file mode 100644 index 3a9681f..0000000 Binary files a/icons/3.0x/confirmations_6.png and /dev/null differ diff --git a/icons/3.0x/confirmations_6_outline.png b/icons/3.0x/confirmations_6_outline.png deleted file mode 100644 index 4202857..0000000 Binary files a/icons/3.0x/confirmations_6_outline.png and /dev/null differ diff --git a/icons/3.0x/contacts.png b/icons/3.0x/contacts.png deleted file mode 100644 index 4d44643..0000000 Binary files a/icons/3.0x/contacts.png and /dev/null differ diff --git a/icons/3.0x/contacts_outlined.png b/icons/3.0x/contacts_outlined.png deleted file mode 100644 index bbb0648..0000000 Binary files a/icons/3.0x/contacts_outlined.png and /dev/null differ diff --git a/icons/3.0x/copy.png b/icons/3.0x/copy.png deleted file mode 100644 index 7f8cac4..0000000 Binary files a/icons/3.0x/copy.png and /dev/null differ diff --git a/icons/3.0x/copy_outline.png b/icons/3.0x/copy_outline.png deleted file mode 100644 index b5a437e..0000000 Binary files a/icons/3.0x/copy_outline.png and /dev/null differ diff --git a/icons/3.0x/devices.png b/icons/3.0x/devices.png deleted file mode 100644 index 1ea490c..0000000 Binary files a/icons/3.0x/devices.png and /dev/null differ diff --git a/icons/3.0x/devices_outline.png b/icons/3.0x/devices_outline.png deleted file mode 100644 index 05fc439..0000000 Binary files a/icons/3.0x/devices_outline.png and /dev/null differ diff --git a/icons/3.0x/edit.png b/icons/3.0x/edit.png deleted file mode 100644 index 8034028..0000000 Binary files a/icons/3.0x/edit.png and /dev/null differ diff --git a/icons/3.0x/edit_outline.png b/icons/3.0x/edit_outline.png deleted file mode 100644 index b16768b..0000000 Binary files a/icons/3.0x/edit_outline.png and /dev/null differ diff --git a/icons/3.0x/ellipsis.png b/icons/3.0x/ellipsis.png deleted file mode 100644 index 5f8d1ea..0000000 Binary files a/icons/3.0x/ellipsis.png and /dev/null differ diff --git a/icons/3.0x/ellipsis_outline.png b/icons/3.0x/ellipsis_outline.png deleted file mode 100644 index 5f8d1ea..0000000 Binary files a/icons/3.0x/ellipsis_outline.png and /dev/null differ diff --git a/icons/3.0x/fee.png b/icons/3.0x/fee.png deleted file mode 100644 index 206688e..0000000 Binary files a/icons/3.0x/fee.png and /dev/null differ diff --git a/icons/3.0x/fee_outline.png b/icons/3.0x/fee_outline.png deleted file mode 100644 index a60b9c8..0000000 Binary files a/icons/3.0x/fee_outline.png and /dev/null differ diff --git a/icons/3.0x/file.png b/icons/3.0x/file.png deleted file mode 100644 index beda29b..0000000 Binary files a/icons/3.0x/file.png and /dev/null differ diff --git a/icons/3.0x/file_outline.png b/icons/3.0x/file_outline.png deleted file mode 100644 index 1cc618e..0000000 Binary files a/icons/3.0x/file_outline.png and /dev/null differ diff --git a/icons/3.0x/flip_horizontal.png b/icons/3.0x/flip_horizontal.png deleted file mode 100644 index 66ad74a..0000000 Binary files a/icons/3.0x/flip_horizontal.png and /dev/null differ diff --git a/icons/3.0x/flip_vertical.png b/icons/3.0x/flip_vertical.png deleted file mode 100644 index 9aa0340..0000000 Binary files a/icons/3.0x/flip_vertical.png and /dev/null differ diff --git a/icons/3.0x/gear.png b/icons/3.0x/gear.png deleted file mode 100644 index f4018d5..0000000 Binary files a/icons/3.0x/gear.png and /dev/null differ diff --git a/icons/3.0x/gear_outline.png b/icons/3.0x/gear_outline.png deleted file mode 100644 index 107816f..0000000 Binary files a/icons/3.0x/gear_outline.png and /dev/null differ diff --git a/icons/3.0x/hidden.png b/icons/3.0x/hidden.png deleted file mode 100644 index 6603911..0000000 Binary files a/icons/3.0x/hidden.png and /dev/null differ diff --git a/icons/3.0x/hidden_outline.png b/icons/3.0x/hidden_outline.png deleted file mode 100644 index 35777c7..0000000 Binary files a/icons/3.0x/hidden_outline.png and /dev/null differ diff --git a/icons/3.0x/home.png b/icons/3.0x/home.png deleted file mode 100644 index 758f25c..0000000 Binary files a/icons/3.0x/home.png and /dev/null differ diff --git a/icons/3.0x/home_outline.png b/icons/3.0x/home_outline.png deleted file mode 100644 index 53f3c60..0000000 Binary files a/icons/3.0x/home_outline.png and /dev/null differ diff --git a/icons/3.0x/info.png b/icons/3.0x/info.png deleted file mode 100644 index b2b3cd8..0000000 Binary files a/icons/3.0x/info.png and /dev/null differ diff --git a/icons/3.0x/info_outline.png b/icons/3.0x/info_outline.png deleted file mode 100644 index b2b3cd8..0000000 Binary files a/icons/3.0x/info_outline.png and /dev/null differ diff --git a/icons/3.0x/key.png b/icons/3.0x/key.png deleted file mode 100644 index 4e72c13..0000000 Binary files a/icons/3.0x/key.png and /dev/null differ diff --git a/icons/3.0x/key_outline.png b/icons/3.0x/key_outline.png deleted file mode 100644 index d358037..0000000 Binary files a/icons/3.0x/key_outline.png and /dev/null differ diff --git a/icons/3.0x/lightning.png b/icons/3.0x/lightning.png deleted file mode 100644 index c3b003e..0000000 Binary files a/icons/3.0x/lightning.png and /dev/null differ diff --git a/icons/3.0x/lightning_outline.png b/icons/3.0x/lightning_outline.png deleted file mode 100644 index 9b0e02a..0000000 Binary files a/icons/3.0x/lightning_outline.png and /dev/null differ diff --git a/icons/3.0x/link.png b/icons/3.0x/link.png deleted file mode 100644 index 256673a..0000000 Binary files a/icons/3.0x/link.png and /dev/null differ diff --git a/icons/3.0x/lock.png b/icons/3.0x/lock.png deleted file mode 100644 index b8deba6..0000000 Binary files a/icons/3.0x/lock.png and /dev/null differ diff --git a/icons/3.0x/lock_outline.png b/icons/3.0x/lock_outline.png deleted file mode 100644 index 20249fc..0000000 Binary files a/icons/3.0x/lock_outline.png and /dev/null differ diff --git a/icons/3.0x/mining.png b/icons/3.0x/mining.png deleted file mode 100644 index 2664293..0000000 Binary files a/icons/3.0x/mining.png and /dev/null differ diff --git a/icons/3.0x/mining_outline.png b/icons/3.0x/mining_outline.png deleted file mode 100644 index ef2627a..0000000 Binary files a/icons/3.0x/mining_outline.png and /dev/null differ diff --git a/icons/3.0x/minus.png b/icons/3.0x/minus.png deleted file mode 100644 index d3ca501..0000000 Binary files a/icons/3.0x/minus.png and /dev/null differ diff --git a/icons/3.0x/minus_outline.png b/icons/3.0x/minus_outline.png deleted file mode 100644 index 7ab98b7..0000000 Binary files a/icons/3.0x/minus_outline.png and /dev/null differ diff --git a/icons/3.0x/mnemonic.png b/icons/3.0x/mnemonic.png deleted file mode 100644 index 0c350d0..0000000 Binary files a/icons/3.0x/mnemonic.png and /dev/null differ diff --git a/icons/3.0x/mnemonic_outline.png b/icons/3.0x/mnemonic_outline.png deleted file mode 100644 index d7053b5..0000000 Binary files a/icons/3.0x/mnemonic_outline.png and /dev/null differ diff --git a/icons/3.0x/plus.png b/icons/3.0x/plus.png deleted file mode 100644 index c13f443..0000000 Binary files a/icons/3.0x/plus.png and /dev/null differ diff --git a/icons/3.0x/plus_outline.png b/icons/3.0x/plus_outline.png deleted file mode 100644 index 63ba7d5..0000000 Binary files a/icons/3.0x/plus_outline.png and /dev/null differ diff --git a/icons/3.0x/qr_code.png b/icons/3.0x/qr_code.png deleted file mode 100644 index 0a4ec17..0000000 Binary files a/icons/3.0x/qr_code.png and /dev/null differ diff --git a/icons/3.0x/qr_code_outline.png b/icons/3.0x/qr_code_outline.png deleted file mode 100644 index e2fd6cb..0000000 Binary files a/icons/3.0x/qr_code_outline.png and /dev/null differ diff --git a/icons/3.0x/question.png b/icons/3.0x/question.png deleted file mode 100644 index b590c19..0000000 Binary files a/icons/3.0x/question.png and /dev/null differ diff --git a/icons/3.0x/question_outline.png b/icons/3.0x/question_outline.png deleted file mode 100644 index b590c19..0000000 Binary files a/icons/3.0x/question_outline.png and /dev/null differ diff --git a/icons/3.0x/receive.png b/icons/3.0x/receive.png deleted file mode 100644 index 9eba84b..0000000 Binary files a/icons/3.0x/receive.png and /dev/null differ diff --git a/icons/3.0x/receive_outline.png b/icons/3.0x/receive_outline.png deleted file mode 100644 index f0ed25a..0000000 Binary files a/icons/3.0x/receive_outline.png and /dev/null differ diff --git a/icons/3.0x/safe.png b/icons/3.0x/safe.png deleted file mode 100644 index 7a75be8..0000000 Binary files a/icons/3.0x/safe.png and /dev/null differ diff --git a/icons/3.0x/safe_outline.png b/icons/3.0x/safe_outline.png deleted file mode 100644 index 7a5dc20..0000000 Binary files a/icons/3.0x/safe_outline.png and /dev/null differ diff --git a/icons/3.0x/scan.png b/icons/3.0x/scan.png deleted file mode 100644 index 29af1e8..0000000 Binary files a/icons/3.0x/scan.png and /dev/null differ diff --git a/icons/3.0x/scan_outline.png b/icons/3.0x/scan_outline.png deleted file mode 100644 index f9f0588..0000000 Binary files a/icons/3.0x/scan_outline.png and /dev/null differ diff --git a/icons/3.0x/search.png b/icons/3.0x/search.png deleted file mode 100644 index 950fbea..0000000 Binary files a/icons/3.0x/search.png and /dev/null differ diff --git a/icons/3.0x/search_outline.png b/icons/3.0x/search_outline.png deleted file mode 100644 index 8504ca4..0000000 Binary files a/icons/3.0x/search_outline.png and /dev/null differ diff --git a/icons/3.0x/send.png b/icons/3.0x/send.png deleted file mode 100644 index c125624..0000000 Binary files a/icons/3.0x/send.png and /dev/null differ diff --git a/icons/3.0x/share.png b/icons/3.0x/share.png deleted file mode 100644 index 933e24b..0000000 Binary files a/icons/3.0x/share.png and /dev/null differ diff --git a/icons/3.0x/share_outline.png b/icons/3.0x/share_outline.png deleted file mode 100644 index f8b57a2..0000000 Binary files a/icons/3.0x/share_outline.png and /dev/null differ diff --git a/icons/3.0x/shared_wallet.png b/icons/3.0x/shared_wallet.png deleted file mode 100644 index cc18664..0000000 Binary files a/icons/3.0x/shared_wallet.png and /dev/null differ diff --git a/icons/3.0x/shared_wallet_outline.png b/icons/3.0x/shared_wallet_outline.png deleted file mode 100644 index cc18664..0000000 Binary files a/icons/3.0x/shared_wallet_outline.png and /dev/null differ diff --git a/icons/3.0x/transactions.png b/icons/3.0x/transactions.png deleted file mode 100644 index b4ae02a..0000000 Binary files a/icons/3.0x/transactions.png and /dev/null differ diff --git a/icons/3.0x/transactions_outline.png b/icons/3.0x/transactions_outline.png deleted file mode 100644 index 1547220..0000000 Binary files a/icons/3.0x/transactions_outline.png and /dev/null differ diff --git a/icons/3.0x/two_keys.png b/icons/3.0x/two_keys.png deleted file mode 100644 index 755d55b..0000000 Binary files a/icons/3.0x/two_keys.png and /dev/null differ diff --git a/icons/3.0x/two_keys_outline.png b/icons/3.0x/two_keys_outline.png deleted file mode 100644 index 8cfe9f8..0000000 Binary files a/icons/3.0x/two_keys_outline.png and /dev/null differ diff --git a/icons/3.0x/visible.png b/icons/3.0x/visible.png deleted file mode 100644 index 4f58f16..0000000 Binary files a/icons/3.0x/visible.png and /dev/null differ diff --git a/icons/3.0x/visible_outline.png b/icons/3.0x/visible_outline.png deleted file mode 100644 index bb3db59..0000000 Binary files a/icons/3.0x/visible_outline.png and /dev/null differ diff --git a/icons/3.0x/wallet.png b/icons/3.0x/wallet.png deleted file mode 100644 index 0d4f6fc..0000000 Binary files a/icons/3.0x/wallet.png and /dev/null differ diff --git a/icons/3.0x/wallet_outline.png b/icons/3.0x/wallet_outline.png deleted file mode 100644 index 96db51f..0000000 Binary files a/icons/3.0x/wallet_outline.png and /dev/null differ diff --git a/icons/3.0x/x.png b/icons/3.0x/x.png deleted file mode 100644 index a27c0c0..0000000 Binary files a/icons/3.0x/x.png and /dev/null differ diff --git a/icons/3.0x/x_outline.png b/icons/3.0x/x_outline.png deleted file mode 100644 index d78f61d..0000000 Binary files a/icons/3.0x/x_outline.png and /dev/null differ diff --git a/icons/alert.png b/icons/alert.png deleted file mode 100644 index 279fd9e..0000000 Binary files a/icons/alert.png and /dev/null differ diff --git a/icons/alert_outline.png b/icons/alert_outline.png deleted file mode 100644 index c1f4466..0000000 Binary files a/icons/alert_outline.png and /dev/null differ diff --git a/icons/arrow_down.png b/icons/arrow_down.png deleted file mode 100644 index 5996484..0000000 Binary files a/icons/arrow_down.png and /dev/null differ diff --git a/icons/arrow_down_outline.png b/icons/arrow_down_outline.png deleted file mode 100644 index f0ac744..0000000 Binary files a/icons/arrow_down_outline.png and /dev/null differ diff --git a/icons/arrow_left.png b/icons/arrow_left.png deleted file mode 100644 index 1c6e3e9..0000000 Binary files a/icons/arrow_left.png and /dev/null differ diff --git a/icons/arrow_left_outline.png b/icons/arrow_left_outline.png deleted file mode 100644 index f56a459..0000000 Binary files a/icons/arrow_left_outline.png and /dev/null differ diff --git a/icons/arrow_right.png b/icons/arrow_right.png deleted file mode 100644 index 2dec483..0000000 Binary files a/icons/arrow_right.png and /dev/null differ diff --git a/icons/arrow_right_outline.png b/icons/arrow_right_outline.png deleted file mode 100644 index 27519de..0000000 Binary files a/icons/arrow_right_outline.png and /dev/null differ diff --git a/icons/arrow_up.png b/icons/arrow_up.png deleted file mode 100644 index 36ceef9..0000000 Binary files a/icons/arrow_up.png and /dev/null differ diff --git a/icons/arrow_up_outline.png b/icons/arrow_up_outline.png deleted file mode 100644 index bc6f544..0000000 Binary files a/icons/arrow_up_outline.png and /dev/null differ diff --git a/icons/bitcoin_circle.png b/icons/bitcoin_circle.png deleted file mode 100644 index 41a0d5d..0000000 Binary files a/icons/bitcoin_circle.png and /dev/null differ diff --git a/icons/bitcoin_circle_outline.png b/icons/bitcoin_circle_outline.png deleted file mode 100644 index 4f1d6e4..0000000 Binary files a/icons/bitcoin_circle_outline.png and /dev/null differ diff --git a/icons/caret_down.png b/icons/caret_down.png deleted file mode 100644 index 11dd577..0000000 Binary files a/icons/caret_down.png and /dev/null differ diff --git a/icons/caret_down_outline.png b/icons/caret_down_outline.png deleted file mode 100644 index 457483c..0000000 Binary files a/icons/caret_down_outline.png and /dev/null differ diff --git a/icons/caret_left.png b/icons/caret_left.png deleted file mode 100644 index 616f8d2..0000000 Binary files a/icons/caret_left.png and /dev/null differ diff --git a/icons/caret_left_outline.png b/icons/caret_left_outline.png deleted file mode 100644 index 40d55d0..0000000 Binary files a/icons/caret_left_outline.png and /dev/null differ diff --git a/icons/caret_right.png b/icons/caret_right.png deleted file mode 100644 index 11dd577..0000000 Binary files a/icons/caret_right.png and /dev/null differ diff --git a/icons/caret_right_outline.png b/icons/caret_right_outline.png deleted file mode 100644 index a08c4e8..0000000 Binary files a/icons/caret_right_outline.png and /dev/null differ diff --git a/icons/caret_up.png b/icons/caret_up.png deleted file mode 100644 index ae6aec3..0000000 Binary files a/icons/caret_up.png and /dev/null differ diff --git a/icons/cart.png b/icons/cart.png deleted file mode 100644 index 83e0593..0000000 Binary files a/icons/cart.png and /dev/null differ diff --git a/icons/cart_outline.png b/icons/cart_outline.png deleted file mode 100644 index 93a722f..0000000 Binary files a/icons/cart_outline.png and /dev/null differ diff --git a/icons/channel.png b/icons/channel.png deleted file mode 100644 index ac2feca..0000000 Binary files a/icons/channel.png and /dev/null differ diff --git a/icons/channel_outline.png b/icons/channel_outline.png deleted file mode 100644 index 4361f77..0000000 Binary files a/icons/channel_outline.png and /dev/null differ diff --git a/icons/check.png b/icons/check.png deleted file mode 100644 index 82ef7cf..0000000 Binary files a/icons/check.png and /dev/null differ diff --git a/icons/check_outline.png b/icons/check_outline.png deleted file mode 100644 index e2053e7..0000000 Binary files a/icons/check_outline.png and /dev/null differ diff --git a/icons/clock.png b/icons/clock.png deleted file mode 100644 index 4753f48..0000000 Binary files a/icons/clock.png and /dev/null differ diff --git a/icons/clock_outline.png b/icons/clock_outline.png deleted file mode 100644 index 1267764..0000000 Binary files a/icons/clock_outline.png and /dev/null differ diff --git a/icons/cloud.png b/icons/cloud.png deleted file mode 100644 index 5a4bf70..0000000 Binary files a/icons/cloud.png and /dev/null differ diff --git a/icons/cloud_outline.png b/icons/cloud_outline.png deleted file mode 100644 index f35846f..0000000 Binary files a/icons/cloud_outline.png and /dev/null differ diff --git a/icons/coins.png b/icons/coins.png deleted file mode 100644 index 4709718..0000000 Binary files a/icons/coins.png and /dev/null differ diff --git a/icons/coins_outline.png b/icons/coins_outline.png deleted file mode 100644 index 7e6d4dd..0000000 Binary files a/icons/coins_outline.png and /dev/null differ diff --git a/icons/confirmations_0.png b/icons/confirmations_0.png deleted file mode 100644 index d9760f0..0000000 Binary files a/icons/confirmations_0.png and /dev/null differ diff --git a/icons/confirmations_0_outline.png b/icons/confirmations_0_outline.png deleted file mode 100644 index d1c51cd..0000000 Binary files a/icons/confirmations_0_outline.png and /dev/null differ diff --git a/icons/confirmations_1.png b/icons/confirmations_1.png deleted file mode 100644 index f9fba90..0000000 Binary files a/icons/confirmations_1.png and /dev/null differ diff --git a/icons/confirmations_1_outline.png b/icons/confirmations_1_outline.png deleted file mode 100644 index 7442225..0000000 Binary files a/icons/confirmations_1_outline.png and /dev/null differ diff --git a/icons/confirmations_2.png b/icons/confirmations_2.png deleted file mode 100644 index fc9d047..0000000 Binary files a/icons/confirmations_2.png and /dev/null differ diff --git a/icons/confirmations_3.png b/icons/confirmations_3.png deleted file mode 100644 index 0350f06..0000000 Binary files a/icons/confirmations_3.png and /dev/null differ diff --git a/icons/confirmations_3_outline.png b/icons/confirmations_3_outline.png deleted file mode 100644 index e6997fc..0000000 Binary files a/icons/confirmations_3_outline.png and /dev/null differ diff --git a/icons/confirmations_4.png b/icons/confirmations_4.png deleted file mode 100644 index 818b644..0000000 Binary files a/icons/confirmations_4.png and /dev/null differ diff --git a/icons/confirmations_4_outline.png b/icons/confirmations_4_outline.png deleted file mode 100644 index b74587c..0000000 Binary files a/icons/confirmations_4_outline.png and /dev/null differ diff --git a/icons/confirmations_5.png b/icons/confirmations_5.png deleted file mode 100644 index d0bddbc..0000000 Binary files a/icons/confirmations_5.png and /dev/null differ diff --git a/icons/confirmations_5_outline.png b/icons/confirmations_5_outline.png deleted file mode 100644 index 954498c..0000000 Binary files a/icons/confirmations_5_outline.png and /dev/null differ diff --git a/icons/confirmations_6.png b/icons/confirmations_6.png deleted file mode 100644 index 179a777..0000000 Binary files a/icons/confirmations_6.png and /dev/null differ diff --git a/icons/confirmations_6_outline.png b/icons/confirmations_6_outline.png deleted file mode 100644 index 6b380b6..0000000 Binary files a/icons/confirmations_6_outline.png and /dev/null differ diff --git a/icons/contacts.png b/icons/contacts.png deleted file mode 100644 index fb0e97f..0000000 Binary files a/icons/contacts.png and /dev/null differ diff --git a/icons/contacts_outlined.png b/icons/contacts_outlined.png deleted file mode 100644 index 1441962..0000000 Binary files a/icons/contacts_outlined.png and /dev/null differ diff --git a/icons/copy.png b/icons/copy.png deleted file mode 100644 index 524a4a7..0000000 Binary files a/icons/copy.png and /dev/null differ diff --git a/icons/copy_outline.png b/icons/copy_outline.png deleted file mode 100644 index 5fa4bf2..0000000 Binary files a/icons/copy_outline.png and /dev/null differ diff --git a/icons/devices.png b/icons/devices.png deleted file mode 100644 index 6561bac..0000000 Binary files a/icons/devices.png and /dev/null differ diff --git a/icons/devices_outline.png b/icons/devices_outline.png deleted file mode 100644 index 41e34ac..0000000 Binary files a/icons/devices_outline.png and /dev/null differ diff --git a/icons/edit.png b/icons/edit.png deleted file mode 100644 index 394979c..0000000 Binary files a/icons/edit.png and /dev/null differ diff --git a/icons/edit_outline.png b/icons/edit_outline.png deleted file mode 100644 index 6058b6d..0000000 Binary files a/icons/edit_outline.png and /dev/null differ diff --git a/icons/ellipsis.png b/icons/ellipsis.png deleted file mode 100644 index ff120b0..0000000 Binary files a/icons/ellipsis.png and /dev/null differ diff --git a/icons/ellipsis_outline.png b/icons/ellipsis_outline.png deleted file mode 100644 index ff120b0..0000000 Binary files a/icons/ellipsis_outline.png and /dev/null differ diff --git a/icons/fee.png b/icons/fee.png deleted file mode 100644 index 2ace886..0000000 Binary files a/icons/fee.png and /dev/null differ diff --git a/icons/fee_outline.png b/icons/fee_outline.png deleted file mode 100644 index a40be90..0000000 Binary files a/icons/fee_outline.png and /dev/null differ diff --git a/icons/file.png b/icons/file.png deleted file mode 100644 index 798fc40..0000000 Binary files a/icons/file.png and /dev/null differ diff --git a/icons/file_outline.png b/icons/file_outline.png deleted file mode 100644 index 6be9840..0000000 Binary files a/icons/file_outline.png and /dev/null differ diff --git a/icons/flip_horizontal.png b/icons/flip_horizontal.png deleted file mode 100644 index a668472..0000000 Binary files a/icons/flip_horizontal.png and /dev/null differ diff --git a/icons/flip_vertical.png b/icons/flip_vertical.png deleted file mode 100644 index 5ae1d42..0000000 Binary files a/icons/flip_vertical.png and /dev/null differ diff --git a/icons/gear.png b/icons/gear.png deleted file mode 100644 index 757c429..0000000 Binary files a/icons/gear.png and /dev/null differ diff --git a/icons/gear_outline.png b/icons/gear_outline.png deleted file mode 100644 index 18e0740..0000000 Binary files a/icons/gear_outline.png and /dev/null differ diff --git a/icons/hidden.png b/icons/hidden.png deleted file mode 100644 index 6c0d50d..0000000 Binary files a/icons/hidden.png and /dev/null differ diff --git a/icons/hidden_outline.png b/icons/hidden_outline.png deleted file mode 100644 index e3dbcce..0000000 Binary files a/icons/hidden_outline.png and /dev/null differ diff --git a/icons/home.png b/icons/home.png deleted file mode 100644 index 339371d..0000000 Binary files a/icons/home.png and /dev/null differ diff --git a/icons/home_outline.png b/icons/home_outline.png deleted file mode 100644 index 8c63273..0000000 Binary files a/icons/home_outline.png and /dev/null differ diff --git a/icons/info.png b/icons/info.png deleted file mode 100644 index 60d95fb..0000000 Binary files a/icons/info.png and /dev/null differ diff --git a/icons/info_outline.png b/icons/info_outline.png deleted file mode 100644 index 60d95fb..0000000 Binary files a/icons/info_outline.png and /dev/null differ diff --git a/icons/key.png b/icons/key.png deleted file mode 100644 index 99faf17..0000000 Binary files a/icons/key.png and /dev/null differ diff --git a/icons/key_outline.png b/icons/key_outline.png deleted file mode 100644 index 29cef22..0000000 Binary files a/icons/key_outline.png and /dev/null differ diff --git a/icons/lightning.png b/icons/lightning.png deleted file mode 100644 index 5094c67..0000000 Binary files a/icons/lightning.png and /dev/null differ diff --git a/icons/lightning_outline.png b/icons/lightning_outline.png deleted file mode 100644 index 21ba6a0..0000000 Binary files a/icons/lightning_outline.png and /dev/null differ diff --git a/icons/link.png b/icons/link.png deleted file mode 100644 index c4088a9..0000000 Binary files a/icons/link.png and /dev/null differ diff --git a/icons/lock.png b/icons/lock.png deleted file mode 100644 index ed18453..0000000 Binary files a/icons/lock.png and /dev/null differ diff --git a/icons/lock_outline.png b/icons/lock_outline.png deleted file mode 100644 index 48d390b..0000000 Binary files a/icons/lock_outline.png and /dev/null differ diff --git a/icons/mining.png b/icons/mining.png deleted file mode 100644 index 258841b..0000000 Binary files a/icons/mining.png and /dev/null differ diff --git a/icons/mining_outline.png b/icons/mining_outline.png deleted file mode 100644 index 82edd33..0000000 Binary files a/icons/mining_outline.png and /dev/null differ diff --git a/icons/minus.png b/icons/minus.png deleted file mode 100644 index 93a6051..0000000 Binary files a/icons/minus.png and /dev/null differ diff --git a/icons/minus_outline.png b/icons/minus_outline.png deleted file mode 100644 index 6d010a7..0000000 Binary files a/icons/minus_outline.png and /dev/null differ diff --git a/icons/mnemonic.png b/icons/mnemonic.png deleted file mode 100644 index c32803e..0000000 Binary files a/icons/mnemonic.png and /dev/null differ diff --git a/icons/mnemonic_outline.png b/icons/mnemonic_outline.png deleted file mode 100644 index f73c581..0000000 Binary files a/icons/mnemonic_outline.png and /dev/null differ diff --git a/icons/plus.png b/icons/plus.png deleted file mode 100644 index e4a2447..0000000 Binary files a/icons/plus.png and /dev/null differ diff --git a/icons/plus_outline.png b/icons/plus_outline.png deleted file mode 100644 index 8d6e071..0000000 Binary files a/icons/plus_outline.png and /dev/null differ diff --git a/icons/qr_code.png b/icons/qr_code.png deleted file mode 100644 index 5ff233a..0000000 Binary files a/icons/qr_code.png and /dev/null differ diff --git a/icons/qr_code_outline.png b/icons/qr_code_outline.png deleted file mode 100644 index 1c02410..0000000 Binary files a/icons/qr_code_outline.png and /dev/null differ diff --git a/icons/question.png b/icons/question.png deleted file mode 100644 index 5e19c10..0000000 Binary files a/icons/question.png and /dev/null differ diff --git a/icons/question_outline.png b/icons/question_outline.png deleted file mode 100644 index 5e19c10..0000000 Binary files a/icons/question_outline.png and /dev/null differ diff --git a/icons/receive.png b/icons/receive.png deleted file mode 100644 index 53ed959..0000000 Binary files a/icons/receive.png and /dev/null differ diff --git a/icons/receive_outline.png b/icons/receive_outline.png deleted file mode 100644 index 4a51454..0000000 Binary files a/icons/receive_outline.png and /dev/null differ diff --git a/icons/safe.png b/icons/safe.png deleted file mode 100644 index 2aa970f..0000000 Binary files a/icons/safe.png and /dev/null differ diff --git a/icons/safe_outline.png b/icons/safe_outline.png deleted file mode 100644 index a61591b..0000000 Binary files a/icons/safe_outline.png and /dev/null differ diff --git a/icons/scan.png b/icons/scan.png deleted file mode 100644 index 100d13e..0000000 Binary files a/icons/scan.png and /dev/null differ diff --git a/icons/scan_outline.png b/icons/scan_outline.png deleted file mode 100644 index 72cd0a8..0000000 Binary files a/icons/scan_outline.png and /dev/null differ diff --git a/icons/search.png b/icons/search.png deleted file mode 100644 index f8e8cc0..0000000 Binary files a/icons/search.png and /dev/null differ diff --git a/icons/search_outline.png b/icons/search_outline.png deleted file mode 100644 index 9f39804..0000000 Binary files a/icons/search_outline.png and /dev/null differ diff --git a/icons/send.png b/icons/send.png deleted file mode 100644 index ce6f562..0000000 Binary files a/icons/send.png and /dev/null differ diff --git a/icons/share.png b/icons/share.png deleted file mode 100644 index c4fd5a7..0000000 Binary files a/icons/share.png and /dev/null differ diff --git a/icons/share_outline.png b/icons/share_outline.png deleted file mode 100644 index c560331..0000000 Binary files a/icons/share_outline.png and /dev/null differ diff --git a/icons/shared_wallet.png b/icons/shared_wallet.png deleted file mode 100644 index 9abb21a..0000000 Binary files a/icons/shared_wallet.png and /dev/null differ diff --git a/icons/shared_wallet_outline.png b/icons/shared_wallet_outline.png deleted file mode 100644 index 9abb21a..0000000 Binary files a/icons/shared_wallet_outline.png and /dev/null differ diff --git a/icons/transactions.png b/icons/transactions.png deleted file mode 100644 index a890c36..0000000 Binary files a/icons/transactions.png and /dev/null differ diff --git a/icons/transactions_outline.png b/icons/transactions_outline.png deleted file mode 100644 index 13cae25..0000000 Binary files a/icons/transactions_outline.png and /dev/null differ diff --git a/icons/two_keys.png b/icons/two_keys.png deleted file mode 100644 index ddff769..0000000 Binary files a/icons/two_keys.png and /dev/null differ diff --git a/icons/two_keys_outline.png b/icons/two_keys_outline.png deleted file mode 100644 index be4bbda..0000000 Binary files a/icons/two_keys_outline.png and /dev/null differ diff --git a/icons/visible.png b/icons/visible.png deleted file mode 100644 index 82cfb1f..0000000 Binary files a/icons/visible.png and /dev/null differ diff --git a/icons/visible_outline.png b/icons/visible_outline.png deleted file mode 100644 index 13606a6..0000000 Binary files a/icons/visible_outline.png and /dev/null differ diff --git a/icons/wallet.png b/icons/wallet.png deleted file mode 100644 index f1f80b6..0000000 Binary files a/icons/wallet.png and /dev/null differ diff --git a/icons/wallet_outline.png b/icons/wallet_outline.png deleted file mode 100644 index b22bcd4..0000000 Binary files a/icons/wallet_outline.png and /dev/null differ diff --git a/icons/x.png b/icons/x.png deleted file mode 100644 index af8b6b9..0000000 Binary files a/icons/x.png and /dev/null differ diff --git a/icons/x_outline.png b/icons/x_outline.png deleted file mode 100644 index a71c6e8..0000000 Binary files a/icons/x_outline.png and /dev/null differ diff --git a/lib/bitcoin_ui_kit.dart b/lib/bitcoin_ui_kit.dart index aa6966d..4dad439 100644 --- a/lib/bitcoin_ui_kit.dart +++ b/lib/bitcoin_ui_kit.dart @@ -1,391 +1,17 @@ library bitcoin_ui_kit; -import 'dart:io' show Platform; -import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; - -// Colors - -extension Bitcoin on Color { - // Primary and accent colors - static Color get orange => const Color(0xFFF7931A); - static Color get red => const Color(0xFFEB5757); - static Color get green => const Color(0xFF27AE60); - static Color get blue => const Color(0xFF2D9CDB); - static Color get purple => const Color(0xFFBB6BD9); - - // Light theme neutrals - static Color get white => const Color(0xFFFFFFFF); - static Color get neutral1 => const Color(0xFFF8F8F8); - static Color get neutral2 => const Color(0xFFF4F4F4); - static Color get neutral3 => const Color(0xFFEDEDED); - static Color get neutral4 => const Color(0xFFDEDEDE); - static Color get neutral5 => const Color(0xFFBBBBBB); - static Color get neutral6 => const Color(0xFF999999); - static Color get neutral7 => const Color(0xFF777777); - static Color get neutral8 => const Color(0xFF404040); - static Color get black => const Color(0xFF000000); - - // Dark primary and accent colors - static Color get orangeDark => const Color(0xFFF89B2A); - static Color get redDark => const Color(0xFFEC6363); - static Color get greenDark => const Color(0xFF36B46B); - static Color get blueDark => const Color(0xFF3CA3DE); - static Color get purpleDark => const Color(0xFFC075DC); - - // Dark theme neutrals - static Color get neutral1Dark => const Color(0xFF1A1A1A); - static Color get neutral2Dark => const Color(0xFF2D2D2D); - static Color get neutral3Dark => const Color(0xFF444444); - static Color get neutral4Dark => const Color(0xFF5C5C5C); - static Color get neutral5Dark => const Color(0xFF787878); - static Color get neutral6Dark => const Color(0xFF949494); - static Color get neutral7Dark => const Color(0xFFB0B0B0); - static Color get neutral8Dark => const Color(0xFFCCCCCC); -} - -// Text styles - -extension BitcoinTextStyle on TextStyle { - static TextStyle title1(Color color) { - return TextStyle(fontSize: 36.0, fontWeight: FontWeight.w600, color: color); - } - - static TextStyle title2(Color color) { - return TextStyle(fontSize: 28.0, fontWeight: FontWeight.w600, color: color); - } - - static TextStyle title3(Color color) { - return TextStyle(fontSize: 24.0, fontWeight: FontWeight.w600, color: color); - } - - static TextStyle title4(Color color) { - return TextStyle(fontSize: 21.0, fontWeight: FontWeight.w600, color: color); - } - - static TextStyle title5(Color color) { - return TextStyle(fontSize: 18.0, fontWeight: FontWeight.w600, color: color); - } - - static TextStyle body1(Color color) { - return TextStyle(fontSize: 24.0, fontWeight: FontWeight.w400, color: color); - } - - static TextStyle body2(Color color) { - return TextStyle(fontSize: 21.0, fontWeight: FontWeight.w400, color: color); - } - - static TextStyle body3(Color color) { - return TextStyle(fontSize: 18.0, fontWeight: FontWeight.w400, color: color); - } - - static TextStyle body4(Color color) { - return TextStyle(fontSize: 15.0, fontWeight: FontWeight.w400, color: color); - } - - static TextStyle body5(Color color) { - return TextStyle(fontSize: 13.0, fontWeight: FontWeight.w400, color: color); - } -} - -// Buttons - -const defaultButtonWidth = 315.0; -const defaultButtonHeight = 48.0; -const defaultCornerRadius = 5.0; -const defaultPadding = EdgeInsets.symmetric(vertical: 8, horizontal: 30); -const defaultTintColor = Color(0xFFF89B2A); -const defaultTextColor = Color(0xFFFFFFFF); -const defaultDisabledTintColor = Color(0xFFF4F4F4); -const defaultDisabledTextColor = Color(0xFFBBBBBB); -const defaultDisabledOutlineColor = Color(0xFFDEDEDE); - -class BitcoinButtonFilled extends StatelessWidget { - final String title; - final TextStyle? textStyle; - final double width; - final double height; - final double cornerRadius; - final Color tintColor; - final Color textColor; - final Color disabledTintColor; - final Color disabledTextColor; - final bool disabled; - final bool isLoading; - final VoidCallback? onPressed; - - const BitcoinButtonFilled({ - Key? key, - required this.title, - this.textStyle, - this.width = defaultButtonWidth, - this.height = defaultButtonHeight, - this.cornerRadius = defaultCornerRadius, - this.tintColor = defaultTintColor, - this.textColor = defaultTextColor, - this.disabledTintColor = defaultDisabledTintColor, - this.disabledTextColor = defaultDisabledTextColor, - this.disabled = false, - this.isLoading = false, - required this.onPressed, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - if (Platform.isIOS) { - return SizedBox( - width: width, - height: height, - child: CupertinoButton( - color: disabled ? disabledTintColor : tintColor, - borderRadius: BorderRadius.all(Radius.circular(cornerRadius)), - padding: defaultPadding, - onPressed: disabled - ? null - : isLoading - ? (() => {}) - : onPressed, - child: isLoading - ? SizedBox( - height: height * 0.5, - width: height * 0.5, - child: Center( - child: CupertinoActivityIndicator(color: textColor)), - ) - : Text(title, - style: textStyle ?? - BitcoinTextStyle.title5( - disabled ? disabledTextColor : textColor)))); - } else { - return ElevatedButton( - style: ButtonStyle( - backgroundColor: MaterialStateProperty.all( - disabled ? disabledTintColor : tintColor), - padding: MaterialStateProperty.all(defaultPadding), - fixedSize: MaterialStatePropertyAll(Size(width, height)), - shape: MaterialStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular(cornerRadius), - ), - ), - enableFeedback: true, - ), - onPressed: disabled - ? null - : isLoading - ? (() => {}) - : onPressed, - child: isLoading - ? SizedBox( - height: height * 0.5, - width: height * 0.5, - child: Center( - child: CircularProgressIndicator( - color: textColor, strokeWidth: 2)), - ) - : Text( - title, - style: textStyle ?? - BitcoinTextStyle.title5( - disabled ? disabledTextColor : textColor), - )); - } - } -} - -class BitcoinButtonOutlined extends StatelessWidget { - final String title; - final TextStyle? textStyle; - final double width; - final double height; - final double cornerRadius; - final Color tintColor; - final Color disabledTintColor; - final bool disabled; - final bool isLoading; - final VoidCallback? onPressed; - - const BitcoinButtonOutlined({ - Key? key, - required this.title, - this.textStyle, - this.width = defaultButtonWidth, - this.height = defaultButtonHeight, - this.cornerRadius = defaultCornerRadius, - this.tintColor = defaultTintColor, - this.disabledTintColor = defaultDisabledTintColor, - this.disabled = false, - this.isLoading = false, - required this.onPressed, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - if (Platform.isIOS) { - return SizedBox( - width: width, - height: height, - child: OutlinedButton( - // Can't use CupertinoButton here as it has no ability to set outlines - style: ButtonStyle( - elevation: const MaterialStatePropertyAll(0), - backgroundColor: MaterialStateProperty.all(Colors.transparent), - padding: MaterialStateProperty.all(defaultPadding), - fixedSize: MaterialStatePropertyAll(Size(width, height)), - side: MaterialStatePropertyAll(BorderSide( - width: 2.0, - color: disabled ? disabledTintColor : tintColor)), - shape: MaterialStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular(cornerRadius), - ), - ), - enableFeedback: true, - ), - onPressed: disabled - ? null - : isLoading - ? (() => {}) - : onPressed, - child: isLoading - ? SizedBox( - height: height * 0.5, - width: height * 0.5, - child: Center( - child: CupertinoActivityIndicator( - color: disabled ? disabledTintColor : tintColor)), - ) - : Text(title, - style: textStyle ?? - BitcoinTextStyle.title5( - disabled ? disabledTintColor : tintColor)))); - } else { - return ElevatedButton( - style: ButtonStyle( - elevation: const MaterialStatePropertyAll(0), - backgroundColor: MaterialStateProperty.all(Colors.transparent), - padding: MaterialStateProperty.all(defaultPadding), - fixedSize: MaterialStatePropertyAll(Size(width, height)), - side: MaterialStatePropertyAll(BorderSide( - width: 2.0, color: disabled ? disabledTintColor : tintColor)), - shape: MaterialStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular(cornerRadius), - ), - ), - enableFeedback: true, - ), - onPressed: disabled - ? null - : isLoading - ? (() => {}) - : onPressed, - child: isLoading - ? SizedBox( - height: height * 0.5, - width: height * 0.5, - child: Center( - child: CircularProgressIndicator( - color: disabled ? disabledTintColor : tintColor, - strokeWidth: 2)), - ) - : Text( - title, - style: textStyle ?? - BitcoinTextStyle.title5( - disabled ? disabledTintColor : tintColor), - )); - } - } -} - -class BitcoinButtonPlain extends StatelessWidget { - final String title; - final TextStyle? textStyle; - final double width; - final double height; - final double cornerRadius; - final Color tintColor; - final Color disabledTintColor; - final bool disabled; - final bool isLoading; - final VoidCallback? onPressed; - - const BitcoinButtonPlain({ - Key? key, - required this.title, - this.textStyle, - this.width = defaultButtonWidth, - this.height = defaultButtonHeight, - this.cornerRadius = defaultCornerRadius, - this.tintColor = defaultTintColor, - this.disabledTintColor = defaultDisabledTintColor, - this.disabled = false, - this.isLoading = false, - required this.onPressed, - }) : super(key: key); - - @override - Widget build(BuildContext context) { - if (Platform.isIOS) { - return SizedBox( - width: width, - height: height, - child: CupertinoButton( - color: Colors.transparent, - borderRadius: BorderRadius.all(Radius.circular(cornerRadius)), - padding: defaultPadding, - onPressed: disabled - ? null - : isLoading - ? (() => {}) - : onPressed, - child: isLoading - ? SizedBox( - height: height * 0.5, - width: height * 0.5, - child: Center( - child: CupertinoActivityIndicator( - color: disabled ? disabledTintColor : tintColor)), - ) - : Text(title, - style: textStyle ?? - BitcoinTextStyle.title5( - disabled ? disabledTintColor : tintColor)))); - } else { - return ElevatedButton( - style: ButtonStyle( - elevation: const MaterialStatePropertyAll(0), - backgroundColor: MaterialStateProperty.all(Colors.transparent), - padding: MaterialStateProperty.all(defaultPadding), - fixedSize: MaterialStatePropertyAll(Size(width, height)), - shape: MaterialStateProperty.all( - RoundedRectangleBorder( - borderRadius: BorderRadius.circular(cornerRadius), - ), - ), - enableFeedback: true, - ), - onPressed: disabled - ? null - : isLoading - ? (() => {}) - : onPressed, - child: isLoading - ? SizedBox( - height: height * 0.5, - width: height * 0.5, - child: Center( - child: CircularProgressIndicator( - color: disabled ? disabledTintColor : tintColor, - strokeWidth: 2)), - ) - : Text( - title, - style: textStyle ?? - BitcoinTextStyle.title5( - disabled ? disabledTintColor : tintColor), - )); - } - } -} +export 'src/theme/bitcoin_theme.dart'; +export 'src/theme/bitcoin_theme_data.dart'; +export 'src/theme/colors.dart'; + +export 'src/bitcoin_circle_avatar.dart'; +export 'src/bitcoin_divider.dart'; +export 'src/bitcoin_elevated_button.dart'; +export 'src/bitcoin_icon_button.dart'; +export 'src/bitcoin_keypad.dart'; +export 'src/bitcoin_outlined_button.dart'; +export 'src/bitcoin_pin_entry.dart'; +export 'src/bitcoin_switch.dart'; +export 'src/bitcoin_text_button.dart'; +export 'src/bitcoin_text_span.dart'; +export 'src/bitcoin_text.dart'; diff --git a/lib/src/bitcoin_circle_avatar.dart b/lib/src/bitcoin_circle_avatar.dart new file mode 100644 index 0000000..9640c19 --- /dev/null +++ b/lib/src/bitcoin_circle_avatar.dart @@ -0,0 +1,52 @@ +import 'package:flutter/material.dart'; + +/// A circular avatar widget with Bitcoin-themed styling. +/// +/// This widget displays a circular avatar with customizable radius and background color. +/// It can optionally contain a child widget inside the avatar, such as an image or an icon. +/// +/// Example usage: +/// ```dart +/// BitcoinCircleAvatar( +/// child: Icon(BitcoinIcons.wallet), +/// backgroundColor: BitcoinColors.green, +/// ) +/// ``` +class BitcoinCircleAvatar extends StatelessWidget { + /// The child widget to be displayed within the circle. + /// + /// Common examples include an [Image] or an [Icon]. + final Widget? child; + + /// The radius of the circle. + /// + /// By default, the radius is set to 30.0. + final double radius; + + /// The background color of the circle. + /// + /// By default, no background color is applied. + final Color? backgroundColor; + + /// Creates a Bitcoin-themed circular avatar. + /// + /// The [radius] determines the size of the circle, and the [backgroundColor] + /// sets the background color of the circle. The [child] widget, if provided, + /// will be displayed inside the circle. + const BitcoinCircleAvatar({ + Key? key, + this.child, + this.radius = 30, + this.backgroundColor, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + // Widget implementation + return CircleAvatar( + radius: radius, + backgroundColor: backgroundColor, + child: child, + ); + } +} diff --git a/lib/src/bitcoin_divider.dart b/lib/src/bitcoin_divider.dart new file mode 100644 index 0000000..a5f9648 --- /dev/null +++ b/lib/src/bitcoin_divider.dart @@ -0,0 +1,45 @@ +import 'package:bitcoin_ui_kit/bitcoin_ui_kit.dart'; +import 'package:flutter/material.dart'; + +/// A horizontal line divider with Bitcoin-themed styling. +/// +/// This widget displays a horizontal line divider with customizable height and color. +/// It can be used to visually separate content within a user interface. +/// +/// Example usage: +/// ```dart +/// BitcoinDivider( +/// height: 2, +/// color: Colors.orange, +/// ) +/// ``` +class BitcoinDivider extends StatelessWidget { + /// The height of the divider. + /// + /// By default, the height is set to 1.0. + final double height; + + /// The color of the divider. + /// + /// By default, the color is set to `Color(0xFFDEDEDE)`. + final Color color; + + /// Creates a Bitcoin-themed horizontal line divider. + /// + /// The [height] determines the thickness of the divider, and the [color] + /// sets the color of the line. The default color is a light gray shade. + const BitcoinDivider({ + Key? key, + this.height = 1, + this.color = BitcoinColors.neutral4, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + // Widget implementation + return Container( + height: height, + color: color, + ); + } +} diff --git a/lib/src/bitcoin_elevated_button.dart b/lib/src/bitcoin_elevated_button.dart new file mode 100644 index 0000000..e908da4 --- /dev/null +++ b/lib/src/bitcoin_elevated_button.dart @@ -0,0 +1,141 @@ +import 'package:flutter/material.dart'; +import 'bitcoin_text.dart'; + +/// A Bitcoin-themed elevated button widget. +/// +/// This widget displays a button with Bitcoin-themed design. It supports customization +/// of the button's label, background color, width, height, font size, and more. +/// It can also display an optional icon alongside the label. +/// +/// Example usage: +/// ```dart +/// BitcoinElevatedButton( +/// label: 'Send Bitcoin', +/// onPressed: () { +/// // Perform action on button tap +/// }, +/// backgroundColor: Colors.orange, +/// icon: Icon(Icons.send), +/// fontSize: 18, +/// ) +/// ``` +class BitcoinElevatedButton extends StatelessWidget { + static const double _elevatedButtonHeight = 46; + + /// The label to be displayed on the button. + final String label; + + /// Callback function to be invoked when the button is pressed. + final VoidCallback? onPressed; + + /// The width of the button. + /// + /// By default, the width is set to [double.infinity]. + final double? width; + + /// The height of the button. + /// + /// By default, the height is set to [_elevatedButtonHeight]. + final double? height; + + /// The background color of the button. + final Color? backgroundColor; + + /// An optional icon widget to be displayed alongside the label. + final Widget? icon; + + /// The font size of the button label. + /// + /// By default, the font size is set to 18. + final double? fontSize; + + /// The line height of the button label. + /// + /// By default, the line height is set to 1.05. + final double? lineHeight; + + /// The padding around the button label. + final EdgeInsetsGeometry? textPadding; + + /// Creates a Bitcoin-themed elevated button. + /// + /// The [label] is the text to be displayed on the button. The [onPressed] callback + /// function will be invoked when the button is pressed. The [width] and [height] + /// properties determine the size of the button. The [backgroundColor] sets the + /// background color of the button. The [icon], if provided, will be displayed + /// alongside the label. The [fontSize] and [lineHeight] control the text styling. + /// The [textPadding] sets the padding around the button label. + const BitcoinElevatedButton({ + Key? key, + required this.label, + this.onPressed, + this.width = double.infinity, + this.height = _elevatedButtonHeight, + this.backgroundColor, + this.icon, + this.fontSize = 18, + this.lineHeight = 1.05, + this.textPadding, + }) : super(key: key); + + /// Creates a Bitcoin-themed elevated button with an in-progress state. + /// + /// This factory constructor is useful when you want to display a loading or + /// in-progress state for the button. The [label] is the text to be displayed on + /// the button. The [height] and [fontSize] properties control the size of the button + /// and the text, respectively. + factory BitcoinElevatedButton.inProgress({ + required String label, + double? height, + double? fontSize, + Key? key, + }) { + return BitcoinElevatedButton( + label: label, + icon: Transform.scale( + scale: 0.5, + child: const CircularProgressIndicator(), + ), + key: key, + height: height ?? _elevatedButtonHeight, + fontSize: fontSize ?? 18, + ); + } + + @override + Widget build(BuildContext context) { + final icon = this.icon; + return SizedBox( + width: width, + height: height, + child: icon != null + ? ElevatedButton.icon( + onPressed: onPressed, + label: BitcoinText( + label, + fontWeight: FontWeight.w500, + fontSize: fontSize, + height: lineHeight, + ), + icon: icon, + ) + : ElevatedButton( + onPressed: onPressed, + style: ElevatedButton.styleFrom( + backgroundColor: backgroundColor, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5.0), + ), + padding: textPadding ?? + const EdgeInsets.symmetric(vertical: 14, horizontal: 20), + ), + child: BitcoinText( + label, + fontWeight: FontWeight.w500, + fontSize: fontSize, + height: lineHeight, + ), + ), + ); + } +} diff --git a/lib/src/bitcoin_icon_button.dart b/lib/src/bitcoin_icon_button.dart new file mode 100644 index 0000000..264343f --- /dev/null +++ b/lib/src/bitcoin_icon_button.dart @@ -0,0 +1,76 @@ +import 'package:flutter/material.dart'; +import 'theme/colors.dart'; + +/// A Bitcoin-themed icon button widget. +/// +/// This widget displays an icon button with Bitcoin-themed styling. It supports customization +/// of the icon, width, height, border color, and an `onPressed` callback. +/// +/// Example usage: +/// ```dart +/// BitcoinIconButton( +/// icon: Icons.send, +/// onPressed: () { +/// // Perform action on button tap +/// }, +/// width: 46, +/// height: 46, +/// borderColor: Colors.orange, +/// ) +/// ``` +class BitcoinIconButton extends StatelessWidget { + /// The icon to be displayed on the button. + final IconData icon; + + /// Callback function to be invoked when the button is pressed. + final VoidCallback onPressed; + + /// The width of the button. + /// + /// By default, the width is set to 46.0. + final double width; + + /// The height of the button. + /// + /// By default, the height is set to 46.0. + final double height; + + /// The border color of the button. + /// + /// By default, the border color is set to [BitcoinColors.defaultDisabledTextColor]. + final Color borderColor; + + /// Creates a Bitcoin-themed icon button. + /// + /// The [icon] is the icon to be displayed on the button. The [onPressed] callback + /// function will be invoked when the button is pressed. The [width] and [height] + /// properties determine the size of the button. The [borderColor] sets the color + /// of the button's border. + const BitcoinIconButton({ + required this.icon, + required this.onPressed, + this.width = 46, + this.height = 46, + this.borderColor = BitcoinColors.defaultDisabledTextColor, + Key? key, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Container( + width: width, + height: height, + decoration: BoxDecoration( + border: Border.all( + color: borderColor, + width: 1, + ), + borderRadius: BorderRadius.circular(5), + ), + child: InkWell( + onTap: onPressed, + child: Icon(icon), + ), + ); + } +} diff --git a/lib/src/bitcoin_keypad.dart b/lib/src/bitcoin_keypad.dart new file mode 100644 index 0000000..335555b --- /dev/null +++ b/lib/src/bitcoin_keypad.dart @@ -0,0 +1,177 @@ +import 'package:flutter/material.dart'; +import 'bitcoin_text.dart'; + +/// A Bitcoin-themed keypad widget. +/// +/// This widget provides a keypad layout commonly used for numeric input. +/// It supports digit input callbacks, cancellation callback, and customization +/// of the font size, cancel button icon, and icon size. +/// +/// Example usage: +/// ```dart +/// BitcoinKeypad( +/// onDigitPressed: (digit) { +/// // Handle digit input +/// }, +/// onCancelPressed: () { +/// // Handle cancellation +/// }, +/// fontSize: 24, +/// iconData: Icons.arrow_back_sharp, +/// iconSize: 30, +/// ) +/// ``` +class BitcoinKeypad extends StatelessWidget { + /// Callback function to be invoked when a digit button is pressed. + final Function(int) onDigitPressed; + + /// Callback function to be invoked when the cancel button is pressed. + final Function() onCancelPressed; + + /// The font size of the digit buttons. + /// + /// By default, the font size is set to 24. + final double fontSize; + + /// The icon to be displayed on the cancel button. + /// + /// By default, the icon is set to Icons.arrow_back_sharp. + final IconData iconData; + + /// The size of the cancel button icon. + /// + /// By default, the icon size is set to 30. + final double iconSize; + + /// Creates a Bitcoin-themed keypad. + /// + /// The [onDigitPressed] callback function will be invoked when a digit button + /// is pressed, passing the pressed digit as an argument. The [onCancelPressed] + /// callback function will be invoked when the cancel button is pressed. The + /// [fontSize] property determines the font size of the digit buttons. The [iconData] + /// property sets the icon to be displayed on the cancel button. The [iconSize] + /// property determines the size of the cancel button icon. + const BitcoinKeypad({ + Key? key, + required this.onDigitPressed, + required this.onCancelPressed, + this.fontSize = 24, + this.iconData = Icons.arrow_back_sharp, + this.iconSize = 30, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + // Widget implementation + return LayoutBuilder( + builder: (context, constraints) { + final buttonSize = constraints.maxWidth / 4; + + return Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + // Rows of digit buttons + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + for (int i = 1; i <= 3; i++) + _KeypadButton( + digit: i, + onPressed: () => onDigitPressed(i), + buttonFontSize: fontSize, + buttonSize: buttonSize, + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + for (int i = 4; i <= 6; i++) + _KeypadButton( + digit: i, + onPressed: () => onDigitPressed(i), + buttonFontSize: fontSize, + buttonSize: buttonSize, + ), + ], + ), + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + for (int i = 7; i <= 9; i++) + _KeypadButton( + digit: i, + onPressed: () => onDigitPressed(i), + buttonFontSize: fontSize, + buttonSize: buttonSize, + ), + ], + ), + // Row with zero digit button and cancel button + Row( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: [ + const Flexible( + flex: 1, + fit: FlexFit.tight, + child: SizedBox(), + ), + _KeypadButton( + digit: 0, + onPressed: () => onDigitPressed(0), + buttonFontSize: fontSize, + buttonSize: buttonSize, + ), + Flexible( + flex: 1, + fit: FlexFit.tight, + child: IconButton( + icon: Icon(iconData, size: iconSize), + onPressed: () => onCancelPressed(), + ), + ), + ], + ), + ], + ); + }, + ); + } +} + +class _KeypadButton extends StatelessWidget { + final int digit; + final Function() onPressed; + final double buttonFontSize; + final double buttonSize; + + const _KeypadButton({ + Key? key, + required this.digit, + required this.onPressed, + required this.buttonFontSize, + required this.buttonSize, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return SizedBox( + height: buttonSize, + child: TextButton( + style: ButtonStyle( + padding: MaterialStateProperty.all( + const EdgeInsets.all(0), + ), + ), + onPressed: onPressed, + child: FittedBox( + child: BitcoinText( + digit.toString(), + fontSize: buttonFontSize, + height: 27 / buttonFontSize, + ), + ), + ), + ); + } +} diff --git a/lib/src/bitcoin_outlined_button.dart b/lib/src/bitcoin_outlined_button.dart new file mode 100644 index 0000000..276d9cf --- /dev/null +++ b/lib/src/bitcoin_outlined_button.dart @@ -0,0 +1,147 @@ +import 'package:bitcoin_ui_kit/bitcoin_ui_kit.dart'; +import 'package:flutter/material.dart'; + +/// A Bitcoin-themed outlined button widget. +/// +/// This widget provides a button with an outlined appearance, commonly used for +/// triggering actions. It supports customizations such as the button label, +/// callback function, button dimensions, background color, icon, font size, and +/// line height. +/// +/// Example usage: +/// ```dart +/// BitcoinOutlinedButton( +/// label: 'Submit', +/// onPressed: () { +/// // Handle button press +/// }, +/// ) +/// ``` +class BitcoinOutlinedButton extends StatelessWidget { + static const double _elevatedButtonHeight = 46; + + /// The label text of the button. + final String label; + + /// Callback function to be invoked when the button is pressed. + final VoidCallback? onPressed; + + /// The width of the button. + /// + /// By default, the width is set to [double.infinity]. + final double? width; + + /// The height of the button. + /// + /// By default, the height is set to the value of [_elevatedButtonHeight]. + final double? height; + + /// The background color of the button. + /// + /// By default, the background color is set to null, resulting in a transparent background. + final Color? backgroundColor; + + /// The icon to be displayed on the button. + /// + /// By default, the icon is set to null. + final Widget? icon; + + /// The font size of the button label. + /// + /// By default, the font size is set to 18. + final double? fontSize; + + /// The line height of the button label. + /// + /// By default, the line height is set to 1.05. + final double? lineHeight; + + /// The padding of the button label. + /// + /// By default, the padding is set to [EdgeInsets.symmetric(vertical: 14, horizontal: 20)]. + final EdgeInsetsGeometry? textPadding; + + const BitcoinOutlinedButton({ + Key? key, + required this.label, + this.onPressed, + this.width = double.infinity, + this.height = _elevatedButtonHeight, + this.backgroundColor, + this.icon, + this.fontSize = 18, + this.lineHeight = 1.05, + this.textPadding, + }) : super(key: key); + + /// Creates a Bitcoin-themed outlined button in a loading state. + /// + /// The [label] parameter specifies the label text of the button. The [height] + /// and [fontSize] parameters determine the height and font size of the button, + /// respectively. The [key] parameter is optional. + BitcoinOutlinedButton.inProgress({ + required String label, + double? height, + double? fontSize, + Key? key, + }) : this( + label: label, + icon: Transform.scale( + scale: 0.5, + child: const CircularProgressIndicator(), + ), + key: key, + ); + + @override + Widget build(BuildContext context) { + final icon = this.icon; + // Widget implementation + return SizedBox( + width: width, + height: height, + child: icon != null + ? OutlinedButton.icon( + onPressed: onPressed, + label: BitcoinText( + label, + fontWeight: FontWeight.w500, + fontSize: fontSize, + height: lineHeight, + ), + icon: icon, + style: ElevatedButton.styleFrom( + side: const BorderSide( + color: BitcoinColors.defaultDisabledTextColor, + width: 1.0, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5.0), + ), + ), + ) + : OutlinedButton( + onPressed: onPressed, + style: ElevatedButton.styleFrom( + side: const BorderSide( + color: BitcoinColors.defaultDisabledTextColor, + width: 1.0, + ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(5.0), + ), + padding: textPadding ?? + const EdgeInsets.symmetric(vertical: 14, horizontal: 20), + ), + child: Center( + child: BitcoinText( + label, + fontWeight: FontWeight.w500, + fontSize: fontSize, + height: lineHeight, + ), + ), + ), + ); + } +} diff --git a/lib/src/bitcoin_pin_entry.dart b/lib/src/bitcoin_pin_entry.dart new file mode 100644 index 0000000..12f16f8 --- /dev/null +++ b/lib/src/bitcoin_pin_entry.dart @@ -0,0 +1,84 @@ +import 'package:bitcoin_ui_kit/src/theme/bitcoin_theme.dart'; +import 'package:flutter/material.dart'; + +/// A widget that represents a pin entry indicator with dots. +/// +/// This widget is commonly used in pin entry screens or forms to display the +/// status of the entered pin. It shows filled dots for the entered pin digits +/// and empty dots for the remaining digits. +/// +/// The `pin` list represents the entered pin digits. The length of the `pin` +/// list should match the `pinLength` property. The `dotRadius` property sets +/// the radius of the dots. The `spaceBetweenDots` property determines the +/// horizontal space between the dots. The `pinLength` property specifies the +/// total number of digits in the pin. +/// +/// Example usage: +/// ```dart +/// BitcoinPinEntryDots( +/// pin: [1, 2], +/// pinLength: 4, +/// ) +/// ``` +class BitcoinPinEntryDots extends StatelessWidget { + /// The entered pin digits. + final List pin; + + /// The radius of the dots. + /// + /// By default, the dot radius is set to 9.5. + final double dotRadius; + + /// The horizontal space between the dots. + /// + /// By default, the space between dots is set to 8. + final double spaceBetweenDots; + + /// The total number of digits in the pin. + /// + /// By default, the pin length is set to 4. + /// + /// Note: The pin length must be between 4 and 8. + final int pinLength; + + const BitcoinPinEntryDots({ + Key? key, + required this.pin, + this.dotRadius = 9.5, + this.spaceBetweenDots = 8, + this.pinLength = 4, + }) : assert(pinLength >= 4 && pinLength <= 8), + super(key: key); + + @override + Widget build(BuildContext context) { + final theme = BitcoinTheme.of(context); + + // Widget implementation + return Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + for (int i = 0; i < pin.length; i++) + Padding( + padding: EdgeInsets.symmetric(horizontal: spaceBetweenDots), + child: CircleAvatar( + backgroundColor: theme.oppositeColor, + radius: dotRadius, + ), + ), + for (int i = pin.length; i < pinLength; i++) + Padding( + padding: EdgeInsets.symmetric(horizontal: spaceBetweenDots), + child: CircleAvatar( + backgroundColor: Colors.grey, + radius: dotRadius + 1.5, + child: CircleAvatar( + backgroundColor: theme.currentColor, + radius: dotRadius, + ), + ), + ), + ], + ); + } +} diff --git a/lib/src/bitcoin_switch.dart b/lib/src/bitcoin_switch.dart new file mode 100644 index 0000000..d34f9c4 --- /dev/null +++ b/lib/src/bitcoin_switch.dart @@ -0,0 +1,119 @@ +import 'package:bitcoin_ui_kit/bitcoin_ui_kit.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_switch/flutter_switch.dart'; + +/// A customizable switch widget with a Bitcoin-themed design. +/// +/// The `BitcoinSwitch` widget is a wrapper around the `FlutterSwitch` widget +/// that provides a Bitcoin-themed appearance. It allows the user to toggle +/// between two states, typically representing an on/off or enabled/disabled +/// state. +/// +/// The `value` property determines the current state of the switch. The +/// `onChanged` callback is called when the user toggles the switch, and it +/// provides the new state as a parameter. +/// +/// Additional customization options are available through the optional +/// properties: +/// - `height` and `width` control the dimensions of the switch. +/// - `toggleSize` determines the size of the toggle button. +/// - `borderRadius` sets the border radius of the switch. +/// - `activeColor` and `inactiveColor` specify the colors for the switch when +/// it is in the active and inactive states, respectively. +/// - `activeToggleColor` and `inactiveToggleColor` define the colors for the +/// toggle button when the switch is in the active and inactive states, +/// respectively. +/// +/// Example usage: +/// ```dart +/// BitcoinSwitch( +/// value: _isSwitchOn, +/// onChanged: (value) { +/// setState(() { +/// _isSwitchOn = value; +/// }); +/// }, +/// ) +/// ``` +class BitcoinSwitch extends StatelessWidget { + /// The current state of the switch. + final bool value; + + /// A callback function that is called when the switch is toggled. + /// + /// The new state of the switch is passed as a parameter to the callback. + final Function(bool) onChanged; + + /// The height of the switch. + /// + /// By default, the height is set to 28. + final double height; + + /// The width of the switch. + /// + /// By default, the width is set to 45. + final double width; + + /// The size of the toggle button. + /// + /// By default, the toggle size is set to 20. + final double toggleSize; + + /// The border radius of the switch. + /// + /// By default, the border radius is set to 14. + final double borderRadius; + + /// The color of the switch when it is in the active state. + /// + /// By default, the active color is set to `BitcoinColors.defaultDisabledOutlineColor`. + final Color activeColor; + + /// The color of the toggle button when the switch is in the active state. + /// + /// By default, the active toggle color is set to `Colors.white`. + final Color activeToggleColor; + + /// The color of the switch when it is in the inactive state. + /// + /// By default, the inactive color is set to `BitcoinColors.defaultDisabledOutlineColor`. + final Color inactiveColor; + + /// The color of the toggle button when the switch is in the inactive state. + /// + /// By default, the inactive toggle color is set to `Colors.white`. + final Color inactiveToggleColor; + + const BitcoinSwitch({ + Key? key, + required this.value, + required this.onChanged, + this.height = 28, + this.width = 45, + this.toggleSize = 20, + this.borderRadius = 14, + this.activeColor = BitcoinColors.defaultDisabledOutlineColor, + this.activeToggleColor = Colors.white, + this.inactiveColor = BitcoinColors.defaultDisabledOutlineColor, + this.inactiveToggleColor = Colors.white, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return Padding( + padding: EdgeInsets.zero, + child: FlutterSwitch( + value: value, + height: height, + width: width, + toggleSize: toggleSize, + borderRadius: borderRadius, + activeColor: activeColor, + activeToggleColor: activeToggleColor, + inactiveColor: inactiveColor, + inactiveToggleColor: inactiveToggleColor, + onToggle: (value) => onChanged(value), + ), + ); + } +} diff --git a/lib/src/bitcoin_text.dart b/lib/src/bitcoin_text.dart new file mode 100644 index 0000000..0cad1e8 --- /dev/null +++ b/lib/src/bitcoin_text.dart @@ -0,0 +1,87 @@ +import 'dart:ui'; +import 'package:flutter/material.dart'; + +/// A specialized text widget with Bitcoin-themed text styling. +/// +/// The `BitcoinText` widget is a convenient way to display text with pre-defined +/// Bitcoin-themed text styles. It extends the functionality of the `Text` widget +/// by providing default Bitcoin font settings and allows you to customize properties +/// such as font weight, line height, font size, color, font features, text alignment, +/// and text overflow behavior. +/// +/// The `BitcoinText` constructor takes a required `data` parameter, which represents +/// the text to be displayed. Optional properties can be specified to customize the +/// text styling: +/// - `fontWeight` specifies the weight of the text. +/// - `height` adjusts the line height of the text. +/// - `fontSize` adjusts the size of the text. +/// - `color` sets the color of the text. +/// - `fontFeatures` provides advanced typographic features. +/// - `textAlign` controls the alignment of the text. +/// - `overflow` controls how text should be handled if it overflows its container. +/// +/// Example usage: +/// ```dart +/// BitcoinText( +/// 'Hello, Bitcoin!', +/// fontSize: 18, +/// fontWeight: FontWeight.bold, +/// color: Colors.black, +/// textAlign: TextAlign.center, +/// ) +/// ``` +class BitcoinText extends StatelessWidget { + /// Creates a Bitcoin-themed text widget with the specified properties. + const BitcoinText( + this.data, { + Key? key, + this.fontWeight = FontWeight.w400, + this.height = 1.4, + this.fontSize, + this.color, + this.fontFeatures, + this.textAlign = TextAlign.center, + this.overflow, + }) : super(key: key); + + /// The text to be displayed. + final String data; + + /// The weight of the text. + final FontWeight? fontWeight; + + /// The line height of the text. + final double? height; + + /// The size of the text. + final double? fontSize; + + /// The color of the text. + final Color? color; + + /// Advanced typographic features of the text. + final List? fontFeatures; + + /// The alignment of the text. + final TextAlign? textAlign; + + /// How text should be handled if it overflows its container. + final TextOverflow? overflow; + + @override + Widget build(BuildContext context) { + return Text( + data, + style: TextStyle( + fontFamily: 'Inter', + fontWeight: fontWeight, + height: height, + fontSize: fontSize, + color: color, + fontFeatures: fontFeatures, + ), + textAlign: textAlign, + overflow: overflow, + ); + } +} diff --git a/lib/src/bitcoin_text_button.dart b/lib/src/bitcoin_text_button.dart new file mode 100644 index 0000000..54a3ca3 --- /dev/null +++ b/lib/src/bitcoin_text_button.dart @@ -0,0 +1,64 @@ +import 'package:bitcoin_ui_kit/bitcoin_ui_kit.dart'; +import 'package:flutter/material.dart'; + +/// A text button with a Bitcoin-themed design. +/// +/// The `BitcoinTextButton` widget is a wrapper around the `InkWell` widget that +/// provides a Bitcoin-themed appearance for a text button. It displays a +/// `BitcoinText` widget as the button's label and triggers a callback function +/// when pressed. +/// +/// The `label` property specifies the text to be displayed on the button. The +/// `onPressed` callback is called when the button is pressed. +/// +/// Additional customization options are available through the optional +/// properties: +/// - `fontSize` allows you to adjust the font size of the button label. +/// - `color` allows you to specify a custom text color for the button label. +/// +/// Example usage: +/// ```dart +/// BitcoinTextButton( +/// label: 'Press Me', +/// onPressed: () { +/// // Handle button press +/// }, +/// ) +/// ``` +class BitcoinTextButton extends StatelessWidget { + /// The text to be displayed on the button. + final String label; + + /// A callback function that is called when the button is pressed. + final VoidCallback onPressed; + + /// The font size of the button label. + /// + /// By default, the font size is determined by the `BitcoinText` widget. + final double? fontSize; + + /// The color of the button label. + /// + /// By default, the color is determined by the `BitcoinText` widget. + final Color? color; + + const BitcoinTextButton({ + Key? key, + required this.label, + required this.onPressed, + this.fontSize, + this.color, + }) : super(key: key); + + @override + Widget build(BuildContext context) { + return InkWell( + onTap: onPressed, + child: BitcoinText( + label, + fontSize: fontSize, + color: color, + ), + ); + } +} diff --git a/lib/src/bitcoin_text_span.dart b/lib/src/bitcoin_text_span.dart new file mode 100644 index 0000000..75c5546 --- /dev/null +++ b/lib/src/bitcoin_text_span.dart @@ -0,0 +1,57 @@ +import 'package:flutter/material.dart'; + +/// A specialized `TextSpan` widget with Bitcoin-themed text styling. +/// +/// The `BitcoinTextSpan` widget extends the functionality of the `TextSpan` widget +/// by providing pre-defined Bitcoin-themed text styles. It allows you to easily create +/// styled text spans with properties such as font size, font weight, color, text overflow, +/// and line height. +/// +/// The `BitcoinTextSpan` constructor takes a `text` parameter, which represents the +/// text content of the span. Optional properties can be specified to customize the +/// text styling: +/// - `fontSize` adjusts the size of the text. +/// - `fontWeight` specifies the weight of the text. +/// - `color` sets the color of the text. +/// - `overflow` controls how text should be handled if it overflows its container. +/// - `height` adjusts the line height of the text. +/// +/// Example usage: +/// ```dart +/// RichText( +/// text = TextSpan( +/// children: [ +/// BitcoinTextSpan( +/// 'Fees may apply. ', +/// fontSize: 18, +/// color: BitcoinColors.neutral7, +/// ), +/// BitcoinTextSpan( +/// 'Learn more', +/// fontSize: 18, +/// color: BitcoinColors.orange, +/// ), +/// ], +/// ), +/// ), +/// ``` +class BitcoinTextSpan extends TextSpan { + /// Creates a Bitcoin-themed text span with the specified properties. + BitcoinTextSpan( + String text, { + double? fontSize, + FontWeight? fontWeight = FontWeight.w400, + Color? color, + TextOverflow? overflow, + double? height = 1.4, + }) : super( + text: text, + style: TextStyle( + fontSize: fontSize, + fontWeight: fontWeight, + color: color, + overflow: overflow, + height: height, + ), + ); +} diff --git a/lib/src/theme/bitcoin_theme.dart b/lib/src/theme/bitcoin_theme.dart new file mode 100644 index 0000000..7c5cc37 --- /dev/null +++ b/lib/src/theme/bitcoin_theme.dart @@ -0,0 +1,95 @@ +import 'package:flutter/material.dart'; +import 'bitcoin_theme_data.dart'; + +/// An inherited widget that provides Bitcoin-themed themes for descendant widgets. +/// +/// The `BitcoinTheme` widget is an inherited widget that allows descendant widgets +/// to access the Bitcoin-themed light and dark themes defined in `BitcoinThemeData`. +/// It provides a convenient way to dynamically switch between light and dark themes +/// based on the current brightness setting of the app's theme. +/// +/// To use the `BitcoinTheme`, wrap your app's widget tree with it and specify the +/// `lightTheme` and `darkTheme` properties. The `child` parameter represents the +/// root of the widget tree. +/// +/// Example usage: +/// +/// ```dart +/// void main() { +/// runApp(MainApp()); +/// } +/// +/// class MainApp extends StatelessWidget { +/// final _lightTheme = LightBitcoinThemeData(); +/// final _darkTheme = DarkBitcoinThemeData(); +/// +/// MainApp({Key? key}); +/// +/// @override +/// Widget build(BuildContext context) { +/// return BitcoinTheme( +/// lightTheme: _lightTheme, +/// darkTheme: _darkTheme, +/// child: MaterialApp( +/// theme: _lightTheme.materialThemeData, +/// darkTheme: _darkTheme.materialThemeData, +/// themeMode: ThemeMode.light, // TODO: change to dark mode +/// home: const CoverScreen(), +/// ), +/// ); +/// } +/// } +/// ``` +class BitcoinTheme extends InheritedWidget { + /// Creates a widget that provides Bitcoin-themed themes to its descendants. + /// + /// The `child` parameter represents the root of the widget tree. + /// The `lightTheme` and `darkTheme` parameters define the Bitcoin-themed light + /// and dark themes, respectively. + const BitcoinTheme({ + required Widget child, + required this.lightTheme, + required this.darkTheme, + Key? key, + }) : super(key: key, child: child); + + /// The light theme data for the Bitcoin theme. + final BitcoinThemeData lightTheme; + + /// The dark theme data for the Bitcoin theme. + final BitcoinThemeData darkTheme; + + @override + bool updateShouldNotify(BitcoinTheme oldWidget) => + oldWidget.lightTheme != lightTheme || oldWidget.darkTheme != darkTheme; + + /// Retrieves the current Bitcoin theme data based on the app's brightness. + /// + /// The `of` method is a static utility that allows descendant widgets to access + /// the current Bitcoin theme data. It retrieves the current brightness setting + /// from the app's theme and returns the corresponding Bitcoin theme data + /// (either light or dark). + /// + /// If a `BitcoinTheme` widget is not found in the widget tree, an assertion error + /// will be thrown to indicate that a `BitcoinTheme` widget must be added higher + /// up in the widget tree. + /// + /// Usage example: + /// + /// ```dart + /// final theme = BitcoinTheme.of(context); + /// final currentThemeColor = theme.currentColor; + /// ``` + static BitcoinThemeData of(BuildContext context) { + final BitcoinTheme? inheritedTheme = + context.dependOnInheritedWidgetOfExactType(); + + assert(inheritedTheme != null, 'No BitcoinTheme found in context'); + + final currentBrightness = Theme.of(context).brightness; + + return currentBrightness == Brightness.dark + ? inheritedTheme!.darkTheme + : inheritedTheme!.lightTheme; + } +} diff --git a/lib/src/theme/bitcoin_theme_data.dart b/lib/src/theme/bitcoin_theme_data.dart new file mode 100644 index 0000000..fff34c1 --- /dev/null +++ b/lib/src/theme/bitcoin_theme_data.dart @@ -0,0 +1,60 @@ +import 'package:flutter/material.dart'; +import 'colors.dart'; + +abstract class BitcoinThemeData { + ThemeData get materialThemeData; + + Color get currentColor; + + Color get oppositeColor; +} + +class LightBitcoinThemeData extends BitcoinThemeData { + @override + ThemeData get materialThemeData => ThemeData( + brightness: Brightness.light, + primarySwatch: BitcoinColors.black.toMaterialColor(), + scaffoldBackgroundColor: currentColor, + ); + + @override + Color get currentColor => BitcoinColors.white; + + @override + Color get oppositeColor => BitcoinColors.black; +} + +class DarkBitcoinThemeData extends BitcoinThemeData { + @override + ThemeData get materialThemeData => ThemeData( + brightness: Brightness.dark, + primarySwatch: BitcoinColors.white.toMaterialColor(), + scaffoldBackgroundColor: currentColor, + ); + + @override + Color get currentColor => BitcoinColors.black; + + @override + Color get oppositeColor => BitcoinColors.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/lib/src/theme/colors.dart b/lib/src/theme/colors.dart new file mode 100644 index 0000000..b4c4493 --- /dev/null +++ b/lib/src/theme/colors.dart @@ -0,0 +1,65 @@ +import 'package:flutter/material.dart'; + +/// Provides predefined colors for the Bitcoin UI Kit. +/// +/// The `BitcoinColors` class contains a set of predefined colors used in the Bitcoin UI Kit. +/// These colors include primary and accent colors for both light and dark themes, +/// as well as neutral colors for each theme. +/// +/// Example usage: +/// ```dart +/// Container( +/// color: BitcoinColors.orange, // Use the predefined orange color +/// child: Text( +/// 'Bitcoin', +/// style: TextStyle( +/// color: BitcoinColors.white, // Use the predefined white color +/// fontSize: 18, +/// ), +/// ), +/// ), +/// ``` +abstract class BitcoinColors { + // Primary and accent colors + static const Color orange = Color(0xFFF7931A); + static const Color red = Color(0xFFEB5757); + static const Color green = Color(0xFF27AE60); + static const Color blue = Color(0xFF2D9CDB); + static const Color purple = Color(0xFFBB6BD9); + + // Light theme neutrals + static const Color white = Color(0xFFFFFFFF); + static const Color neutral1 = Color(0xFFF8F8F8); + static const Color neutral2 = Color(0xFFF4F4F4); + static const Color neutral3 = Color(0xFFEDEDED); + static const Color neutral4 = Color(0xFFDEDEDE); + static const Color neutral5 = Color(0xFFBBBBBB); + static const Color neutral6 = Color(0xFF999999); + static const Color neutral7 = Color(0xFF777777); + static const Color neutral8 = Color(0xFF404040); + static const Color black = Color(0xFF000000); + + // Dark primary and accent colors + static const Color orangeDark = Color(0xFFF89B2A); + static const Color redDark = Color(0xFFEC6363); + static const Color greenDark = Color(0xFF36B46B); + static const Color blueDark = Color(0xFF3CA3DE); + static const Color purpleDark = Color(0xFFC075DC); + + // Dark theme neutrals + static const Color neutral1Dark = Color(0xFF1A1A1A); + static const Color neutral2Dark = Color(0xFF2D2D2D); + static const Color neutral3Dark = Color(0xFF444444); + static const Color neutral4Dark = Color(0xFF5C5C5C); + static const Color neutral5Dark = Color(0xFF787878); + static const Color neutral6Dark = Color(0xFF949494); + static const Color neutral7Dark = Color(0xFFB0B0B0); + static const Color neutral8Dark = Color(0xFFCCCCCC); + + // Default colors + static const Color defaultTintColor = Color(0xFFF89B2A); + static const Color defaultTextColor = Color(0xFFFFFFFF); + static const Color defaultDisabledTintColor = Color(0xFFF4F4F4); + static const Color defaultDisabledTextColor = Color(0xFFBBBBBB); + static const Color defaultDisabledOutlineColor = Color(0xFFDEDEDE); +} diff --git a/pubspec.yaml b/pubspec.yaml index d37c033..509a065 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,12 +4,13 @@ version: 1.0.3 homepage: https://github.com/bdgwallet/bitcoinuikit-flutter environment: - sdk: ">=2.18.5 <=3.0.5" + sdk: ">=2.18.5 <4.0.0" flutter: ">=1.17.0" dependencies: flutter: sdk: flutter + flutter_switch: ^0.3.2 dev_dependencies: flutter_test: @@ -17,5 +18,3 @@ dev_dependencies: flutter_lints: ^2.0.0 flutter: - assets: - - icons/