├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── example ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── in │ │ │ │ │ └── unicodelabs │ │ │ │ │ └── example │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable │ │ │ │ └── launch_background.xml │ │ │ │ ├── mipmap-hdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ └── ic_launcher.png │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── assets │ └── qr_placeholder.png ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h ├── lib │ └── main.dart ├── pubspec.yaml ├── test │ └── widget_test.dart └── web │ ├── favicon.png │ ├── icons │ ├── Icon-192.png │ └── Icon-512.png │ ├── index.html │ └── manifest.json ├── lib └── ticketview.dart ├── pubspec.yaml ├── raw ├── 1.jpg └── 2.jpg └── test └── ticketview_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .classpath 21 | .project 22 | .settings/ 23 | .vscode/ 24 | 25 | # Flutter repo-specific 26 | /bin/cache/ 27 | /bin/mingit/ 28 | /dev/benchmarks/mega_gallery/ 29 | /dev/bots/.recipe_deps 30 | /dev/bots/android_tools/ 31 | /dev/docs/doc/ 32 | /dev/docs/flutter.docs.zip 33 | /dev/docs/lib/ 34 | /dev/docs/pubspec.yaml 35 | /dev/integration_tests/**/xcuserdata 36 | /dev/integration_tests/**/Pods 37 | /packages/flutter/coverage/ 38 | version 39 | 40 | # packages file containing multi-root paths 41 | .packages.generated 42 | 43 | # Flutter/Dart/Pub related 44 | **/doc/api/ 45 | .dart_tool/ 46 | .flutter-plugins 47 | .flutter-plugins-dependencies 48 | .packages 49 | .pub-cache/ 50 | .pub/ 51 | build/ 52 | flutter_*.png 53 | linked_*.ds 54 | unlinked.ds 55 | unlinked_spec.ds 56 | 57 | # Android related 58 | **/android/**/gradle-wrapper.jar 59 | **/android/.gradle 60 | **/android/captures/ 61 | **/android/gradlew 62 | **/android/gradlew.bat 63 | **/android/local.properties 64 | **/android/**/GeneratedPluginRegistrant.java 65 | **/android/key.properties 66 | *.jks 67 | 68 | # iOS/XCode related 69 | **/ios/**/*.mode1v3 70 | **/ios/**/*.mode2v3 71 | **/ios/**/*.moved-aside 72 | **/ios/**/*.pbxuser 73 | **/ios/**/*.perspectivev3 74 | **/ios/**/*sync/ 75 | **/ios/**/.sconsign.dblite 76 | **/ios/**/.tags* 77 | **/ios/**/.vagrant/ 78 | **/ios/**/DerivedData/ 79 | **/ios/**/Icon? 80 | **/ios/**/Pods/ 81 | **/ios/**/.symlinks/ 82 | **/ios/**/profile 83 | **/ios/**/xcuserdata 84 | **/ios/.generated/ 85 | **/ios/Flutter/App.framework 86 | **/ios/Flutter/Flutter.framework 87 | **/ios/Flutter/Flutter.podspec 88 | **/ios/Flutter/Generated.xcconfig 89 | **/ios/Flutter/app.flx 90 | **/ios/Flutter/app.zip 91 | **/ios/Flutter/flutter_assets/ 92 | **/ios/Flutter/flutter_export_environment.sh 93 | **/ios/ServiceDefinitions.json 94 | **/ios/Runner/GeneratedPluginRegistrant.* 95 | 96 | # macOS 97 | **/macos/Flutter/GeneratedPluginRegistrant.swift 98 | **/macos/Flutter/Flutter-Debug.xcconfig 99 | **/macos/Flutter/Flutter-Release.xcconfig 100 | **/macos/Flutter/Flutter-Profile.xcconfig 101 | 102 | # Coverage 103 | coverage/ 104 | 105 | # Symbols 106 | app.*.symbols 107 | 108 | # Exceptions to above rules. 109 | !**/ios/**/default.mode1v3 110 | !**/ios/**/default.mode2v3 111 | !**/ios/**/default.pbxuser 112 | !**/ios/**/default.perspectivev3 113 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 114 | !/dev/ci/**/Gemfile.lock -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 0da1ab09224f6c6d69fcff1195a3662fe7ad7534 8 | channel: unknown 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [1.0.0] - 30/05/2020. 2 | 3 | * Initial release, you can create Ticket view with UI customization. 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | BSD 3-Clause License 3 | 4 | Copyright (c) 2020, the TicketView authors. 5 | All rights reserved. 6 | 7 | Redistribution and use in source and binary forms, with or without 8 | modification, are permitted provided that the following conditions are met: 9 | 10 | 1. Redistributions of source code must retain the above copyright notice, this 11 | list of conditions and the following disclaimer. 12 | 13 | 2. Redistributions in binary form must reproduce the above copyright notice, 14 | this list of conditions and the following disclaimer in the documentation 15 | and/or other materials provided with the distribution. 16 | 17 | 3. Neither the name of the copyright holder nor the names of its 18 | contributors may be used to endorse or promote products derived from 19 | this software without specific prior written permission. 20 | 21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 22 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 23 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 24 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 25 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 26 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 27 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 28 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 29 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | # TicketViewFlutter 3 | TicketViewFlutter is a simple and customizable Ticket/Receipt View for Flutter. 4 | The source code is **100% Dart**. 5 | 6 | [![pub package](https://img.shields.io/pub/v/ticketview.svg?style=flat-square)](https://pub.dartlang.org/packages/ticketviewflutter) ![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg?style=flat-square) 7 | 8 | 9 | # Motivation 10 | 11 | I need some clean Ticket/Receipt View view for my Flutter application. 12 | 13 | # Getting started 14 | 15 | ## Installing 16 | Add this to your package's pubspec.yaml file: 17 | 18 | This library is posted in pub.dev 19 | 20 | #### pubspec.yaml 21 | ```dart 22 | dependencies: 23 | ticketview: ^1.0.0 24 | ``` 25 | 26 | # Usage 27 | 28 | After Importing this library, you can directly use this view in your Widget tree 29 | 30 | ```dart 31 | import 'package:ticketview/ticketview.dart'; 32 | ``` 33 | 34 | Default Ticket View 35 | ```dart 36 | TicketView( 37 | child: Container(), 38 | ) 39 | ``` 40 | 41 | Customized Receipt View 42 | 43 | ```Dart 44 | TicketView( 45 | backgroundPadding: EdgeInsets.symmetric(vertical: 0, horizontal: 20), 46 | backgroundColor: Color(0xFF8F1299), 47 | contentPadding: EdgeInsets.symmetric(vertical: 24, horizontal: 0), 48 | drawArc: false, 49 | triangleAxis: Axis.vertical, 50 | borderRadius: 6, 51 | drawDivider: true, 52 | trianglePos: .5, 53 | child: Container(), 54 | ) 55 | ``` 56 | 57 | 58 | # Customization 59 | Depending on your view you may want to tweak the UI. For now you can these custom attributes 60 | 61 | | Property | Type | Description | 62 | |----------|------|-------------| 63 | | `backgroundColor` | Color | Background card color for TicketView | 64 | | `contentBackgroundColor` | Color | Content card color for TicketView | 65 | 66 | 67 | 68 | # Screenshots 69 | | Default View | Receipt View | 70 | |----------|------| 71 | | ![alt text](https://github.com/sorbh/ticketviewflutter/blob/master/raw/1.jpg) | ![alt text](https://github.com/sorbh/ticketviewflutter/blob/master/raw/2.jpg) | 72 | 73 | 74 | 75 | 76 | 77 | # Author 78 | * **Saurabh K Sharma - [GIT](https://github.com/Sorbh)** 79 | 80 | I am very new to open source community. All suggestion and improvement are most welcomed. 81 | 82 | 83 | ## Contributing 84 | 85 | 1. Fork it () 86 | 2. Create your feature branch (`git checkout -b feature/fooBar`) 87 | 3. Commit your changes (`git commit -am 'Add some fooBar'`) 88 | 4. Push to the branch (`git push origin feature/fooBar`) 89 | 5. Create a new Pull Request 90 | 91 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .flutter-plugins-dependencies 28 | .packages 29 | .pub-cache/ 30 | .pub/ 31 | /build/ 32 | 33 | # Web related 34 | lib/generated_plugin_registrant.dart 35 | 36 | # Symbolication related 37 | app.*.symbols 38 | 39 | # Obfuscation related 40 | app.*.map.json 41 | 42 | # Exceptions to above rules. 43 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 44 | -------------------------------------------------------------------------------- /example/.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 0da1ab09224f6c6d69fcff1195a3662fe7ad7534 8 | channel: unknown 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | Example Application for Flutter Ticket View. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.dev/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "in.unicodelabs.example" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | } 55 | } 56 | 57 | flutter { 58 | source '../..' 59 | } 60 | 61 | dependencies { 62 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 63 | } 64 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/in/unicodelabs/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package `in`.unicodelabs.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip 7 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /example/assets/qr_placeholder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/assets/qr_placeholder.png -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /example/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 97C146F11CF9000F007C117D /* Supporting Files */, 94 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 95 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 96 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 97 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 98 | ); 99 | path = Runner; 100 | sourceTree = ""; 101 | }; 102 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 103 | isa = PBXGroup; 104 | children = ( 105 | ); 106 | name = "Supporting Files"; 107 | sourceTree = ""; 108 | }; 109 | /* End PBXGroup section */ 110 | 111 | /* Begin PBXNativeTarget section */ 112 | 97C146ED1CF9000F007C117D /* Runner */ = { 113 | isa = PBXNativeTarget; 114 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 115 | buildPhases = ( 116 | 9740EEB61CF901F6004384FC /* Run Script */, 117 | 97C146EA1CF9000F007C117D /* Sources */, 118 | 97C146EB1CF9000F007C117D /* Frameworks */, 119 | 97C146EC1CF9000F007C117D /* Resources */, 120 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 121 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 122 | ); 123 | buildRules = ( 124 | ); 125 | dependencies = ( 126 | ); 127 | name = Runner; 128 | productName = Runner; 129 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 130 | productType = "com.apple.product-type.application"; 131 | }; 132 | /* End PBXNativeTarget section */ 133 | 134 | /* Begin PBXProject section */ 135 | 97C146E61CF9000F007C117D /* Project object */ = { 136 | isa = PBXProject; 137 | attributes = { 138 | LastUpgradeCheck = 1020; 139 | ORGANIZATIONNAME = ""; 140 | TargetAttributes = { 141 | 97C146ED1CF9000F007C117D = { 142 | CreatedOnToolsVersion = 7.3.1; 143 | LastSwiftMigration = 1100; 144 | }; 145 | }; 146 | }; 147 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 148 | compatibilityVersion = "Xcode 9.3"; 149 | developmentRegion = en; 150 | hasScannedForEncodings = 0; 151 | knownRegions = ( 152 | en, 153 | Base, 154 | ); 155 | mainGroup = 97C146E51CF9000F007C117D; 156 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 157 | projectDirPath = ""; 158 | projectRoot = ""; 159 | targets = ( 160 | 97C146ED1CF9000F007C117D /* Runner */, 161 | ); 162 | }; 163 | /* End PBXProject section */ 164 | 165 | /* Begin PBXResourcesBuildPhase section */ 166 | 97C146EC1CF9000F007C117D /* Resources */ = { 167 | isa = PBXResourcesBuildPhase; 168 | buildActionMask = 2147483647; 169 | files = ( 170 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 171 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 172 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 173 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 174 | ); 175 | runOnlyForDeploymentPostprocessing = 0; 176 | }; 177 | /* End PBXResourcesBuildPhase section */ 178 | 179 | /* Begin PBXShellScriptBuildPhase section */ 180 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 181 | isa = PBXShellScriptBuildPhase; 182 | buildActionMask = 2147483647; 183 | files = ( 184 | ); 185 | inputPaths = ( 186 | ); 187 | name = "Thin Binary"; 188 | outputPaths = ( 189 | ); 190 | runOnlyForDeploymentPostprocessing = 0; 191 | shellPath = /bin/sh; 192 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 193 | }; 194 | 9740EEB61CF901F6004384FC /* Run Script */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Run Script"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 207 | }; 208 | /* End PBXShellScriptBuildPhase section */ 209 | 210 | /* Begin PBXSourcesBuildPhase section */ 211 | 97C146EA1CF9000F007C117D /* Sources */ = { 212 | isa = PBXSourcesBuildPhase; 213 | buildActionMask = 2147483647; 214 | files = ( 215 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 216 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | }; 220 | /* End PBXSourcesBuildPhase section */ 221 | 222 | /* Begin PBXVariantGroup section */ 223 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C146FB1CF9000F007C117D /* Base */, 227 | ); 228 | name = Main.storyboard; 229 | sourceTree = ""; 230 | }; 231 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 232 | isa = PBXVariantGroup; 233 | children = ( 234 | 97C147001CF9000F007C117D /* Base */, 235 | ); 236 | name = LaunchScreen.storyboard; 237 | sourceTree = ""; 238 | }; 239 | /* End PBXVariantGroup section */ 240 | 241 | /* Begin XCBuildConfiguration section */ 242 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 243 | isa = XCBuildConfiguration; 244 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 245 | buildSettings = { 246 | ALWAYS_SEARCH_USER_PATHS = NO; 247 | CLANG_ANALYZER_NONNULL = YES; 248 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 249 | CLANG_CXX_LIBRARY = "libc++"; 250 | CLANG_ENABLE_MODULES = YES; 251 | CLANG_ENABLE_OBJC_ARC = YES; 252 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 253 | CLANG_WARN_BOOL_CONVERSION = YES; 254 | CLANG_WARN_COMMA = YES; 255 | CLANG_WARN_CONSTANT_CONVERSION = YES; 256 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 257 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 258 | CLANG_WARN_EMPTY_BODY = YES; 259 | CLANG_WARN_ENUM_CONVERSION = YES; 260 | CLANG_WARN_INFINITE_RECURSION = YES; 261 | CLANG_WARN_INT_CONVERSION = YES; 262 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 263 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 264 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 265 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 266 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 267 | CLANG_WARN_STRICT_PROTOTYPES = YES; 268 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 269 | CLANG_WARN_UNREACHABLE_CODE = YES; 270 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 271 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 272 | COPY_PHASE_STRIP = NO; 273 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 274 | ENABLE_NS_ASSERTIONS = NO; 275 | ENABLE_STRICT_OBJC_MSGSEND = YES; 276 | GCC_C_LANGUAGE_STANDARD = gnu99; 277 | GCC_NO_COMMON_BLOCKS = YES; 278 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 279 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 280 | GCC_WARN_UNDECLARED_SELECTOR = YES; 281 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 282 | GCC_WARN_UNUSED_FUNCTION = YES; 283 | GCC_WARN_UNUSED_VARIABLE = YES; 284 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 285 | MTL_ENABLE_DEBUG_INFO = NO; 286 | SDKROOT = iphoneos; 287 | SUPPORTED_PLATFORMS = iphoneos; 288 | TARGETED_DEVICE_FAMILY = "1,2"; 289 | VALIDATE_PRODUCT = YES; 290 | }; 291 | name = Profile; 292 | }; 293 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 294 | isa = XCBuildConfiguration; 295 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 296 | buildSettings = { 297 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 298 | CLANG_ENABLE_MODULES = YES; 299 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 300 | ENABLE_BITCODE = NO; 301 | FRAMEWORK_SEARCH_PATHS = ( 302 | "$(inherited)", 303 | "$(PROJECT_DIR)/Flutter", 304 | ); 305 | INFOPLIST_FILE = Runner/Info.plist; 306 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 307 | LIBRARY_SEARCH_PATHS = ( 308 | "$(inherited)", 309 | "$(PROJECT_DIR)/Flutter", 310 | ); 311 | PRODUCT_BUNDLE_IDENTIFIER = in.unicodelabs.example; 312 | PRODUCT_NAME = "$(TARGET_NAME)"; 313 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 314 | SWIFT_VERSION = 5.0; 315 | VERSIONING_SYSTEM = "apple-generic"; 316 | }; 317 | name = Profile; 318 | }; 319 | 97C147031CF9000F007C117D /* Debug */ = { 320 | isa = XCBuildConfiguration; 321 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 322 | buildSettings = { 323 | ALWAYS_SEARCH_USER_PATHS = NO; 324 | CLANG_ANALYZER_NONNULL = YES; 325 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 326 | CLANG_CXX_LIBRARY = "libc++"; 327 | CLANG_ENABLE_MODULES = YES; 328 | CLANG_ENABLE_OBJC_ARC = YES; 329 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 330 | CLANG_WARN_BOOL_CONVERSION = YES; 331 | CLANG_WARN_COMMA = YES; 332 | CLANG_WARN_CONSTANT_CONVERSION = YES; 333 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 334 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 335 | CLANG_WARN_EMPTY_BODY = YES; 336 | CLANG_WARN_ENUM_CONVERSION = YES; 337 | CLANG_WARN_INFINITE_RECURSION = YES; 338 | CLANG_WARN_INT_CONVERSION = YES; 339 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 340 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 341 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 342 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 343 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 344 | CLANG_WARN_STRICT_PROTOTYPES = YES; 345 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 346 | CLANG_WARN_UNREACHABLE_CODE = YES; 347 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 348 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 349 | COPY_PHASE_STRIP = NO; 350 | DEBUG_INFORMATION_FORMAT = dwarf; 351 | ENABLE_STRICT_OBJC_MSGSEND = YES; 352 | ENABLE_TESTABILITY = YES; 353 | GCC_C_LANGUAGE_STANDARD = gnu99; 354 | GCC_DYNAMIC_NO_PIC = NO; 355 | GCC_NO_COMMON_BLOCKS = YES; 356 | GCC_OPTIMIZATION_LEVEL = 0; 357 | GCC_PREPROCESSOR_DEFINITIONS = ( 358 | "DEBUG=1", 359 | "$(inherited)", 360 | ); 361 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 362 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 363 | GCC_WARN_UNDECLARED_SELECTOR = YES; 364 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 365 | GCC_WARN_UNUSED_FUNCTION = YES; 366 | GCC_WARN_UNUSED_VARIABLE = YES; 367 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 368 | MTL_ENABLE_DEBUG_INFO = YES; 369 | ONLY_ACTIVE_ARCH = YES; 370 | SDKROOT = iphoneos; 371 | TARGETED_DEVICE_FAMILY = "1,2"; 372 | }; 373 | name = Debug; 374 | }; 375 | 97C147041CF9000F007C117D /* Release */ = { 376 | isa = XCBuildConfiguration; 377 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 378 | buildSettings = { 379 | ALWAYS_SEARCH_USER_PATHS = NO; 380 | CLANG_ANALYZER_NONNULL = YES; 381 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 382 | CLANG_CXX_LIBRARY = "libc++"; 383 | CLANG_ENABLE_MODULES = YES; 384 | CLANG_ENABLE_OBJC_ARC = YES; 385 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 386 | CLANG_WARN_BOOL_CONVERSION = YES; 387 | CLANG_WARN_COMMA = YES; 388 | CLANG_WARN_CONSTANT_CONVERSION = YES; 389 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 397 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 398 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 399 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 400 | CLANG_WARN_STRICT_PROTOTYPES = YES; 401 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 402 | CLANG_WARN_UNREACHABLE_CODE = YES; 403 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 405 | COPY_PHASE_STRIP = NO; 406 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 407 | ENABLE_NS_ASSERTIONS = NO; 408 | ENABLE_STRICT_OBJC_MSGSEND = YES; 409 | GCC_C_LANGUAGE_STANDARD = gnu99; 410 | GCC_NO_COMMON_BLOCKS = YES; 411 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 412 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 413 | GCC_WARN_UNDECLARED_SELECTOR = YES; 414 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 415 | GCC_WARN_UNUSED_FUNCTION = YES; 416 | GCC_WARN_UNUSED_VARIABLE = YES; 417 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 418 | MTL_ENABLE_DEBUG_INFO = NO; 419 | SDKROOT = iphoneos; 420 | SUPPORTED_PLATFORMS = iphoneos; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 422 | TARGETED_DEVICE_FAMILY = "1,2"; 423 | VALIDATE_PRODUCT = YES; 424 | }; 425 | name = Release; 426 | }; 427 | 97C147061CF9000F007C117D /* Debug */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | FRAMEWORK_SEARCH_PATHS = ( 436 | "$(inherited)", 437 | "$(PROJECT_DIR)/Flutter", 438 | ); 439 | INFOPLIST_FILE = Runner/Info.plist; 440 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 441 | LIBRARY_SEARCH_PATHS = ( 442 | "$(inherited)", 443 | "$(PROJECT_DIR)/Flutter", 444 | ); 445 | PRODUCT_BUNDLE_IDENTIFIER = in.unicodelabs.example; 446 | PRODUCT_NAME = "$(TARGET_NAME)"; 447 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 448 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 449 | SWIFT_VERSION = 5.0; 450 | VERSIONING_SYSTEM = "apple-generic"; 451 | }; 452 | name = Debug; 453 | }; 454 | 97C147071CF9000F007C117D /* Release */ = { 455 | isa = XCBuildConfiguration; 456 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 457 | buildSettings = { 458 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 459 | CLANG_ENABLE_MODULES = YES; 460 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 461 | ENABLE_BITCODE = NO; 462 | FRAMEWORK_SEARCH_PATHS = ( 463 | "$(inherited)", 464 | "$(PROJECT_DIR)/Flutter", 465 | ); 466 | INFOPLIST_FILE = Runner/Info.plist; 467 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 468 | LIBRARY_SEARCH_PATHS = ( 469 | "$(inherited)", 470 | "$(PROJECT_DIR)/Flutter", 471 | ); 472 | PRODUCT_BUNDLE_IDENTIFIER = in.unicodelabs.example; 473 | PRODUCT_NAME = "$(TARGET_NAME)"; 474 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 475 | SWIFT_VERSION = 5.0; 476 | VERSIONING_SYSTEM = "apple-generic"; 477 | }; 478 | name = Release; 479 | }; 480 | /* End XCBuildConfiguration section */ 481 | 482 | /* Begin XCConfigurationList section */ 483 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 484 | isa = XCConfigurationList; 485 | buildConfigurations = ( 486 | 97C147031CF9000F007C117D /* Debug */, 487 | 97C147041CF9000F007C117D /* Release */, 488 | 249021D3217E4FDB00AE95B9 /* Profile */, 489 | ); 490 | defaultConfigurationIsVisible = 0; 491 | defaultConfigurationName = Release; 492 | }; 493 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 494 | isa = XCConfigurationList; 495 | buildConfigurations = ( 496 | 97C147061CF9000F007C117D /* Debug */, 497 | 97C147071CF9000F007C117D /* Release */, 498 | 249021D4217E4FDB00AE95B9 /* Profile */, 499 | ); 500 | defaultConfigurationIsVisible = 0; 501 | defaultConfigurationName = Release; 502 | }; 503 | /* End XCConfigurationList section */ 504 | }; 505 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 506 | } 507 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | example 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | $(FLUTTER_BUILD_NAME) 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(FLUTTER_BUILD_NUMBER) 23 | LSRequiresIPhoneOS 24 | 25 | UILaunchStoryboardName 26 | LaunchScreen 27 | UIMainStoryboardFile 28 | Main 29 | UISupportedInterfaceOrientations 30 | 31 | UIInterfaceOrientationPortrait 32 | UIInterfaceOrientationLandscapeLeft 33 | UIInterfaceOrientationLandscapeRight 34 | 35 | UISupportedInterfaceOrientations~ipad 36 | 37 | UIInterfaceOrientationPortrait 38 | UIInterfaceOrientationPortraitUpsideDown 39 | UIInterfaceOrientationLandscapeLeft 40 | UIInterfaceOrientationLandscapeRight 41 | 42 | UIViewControllerBasedStatusBarAppearance 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:google_fonts/google_fonts.dart'; 3 | import 'package:ticketview/ticketview.dart'; 4 | 5 | void main() { 6 | runApp(MyApp()); 7 | } 8 | 9 | class MyApp extends StatelessWidget { 10 | // This widget is the root of your application. 11 | @override 12 | Widget build(BuildContext context) { 13 | return MaterialApp( 14 | title: 'Flutter Demo', 15 | theme: ThemeData( 16 | primarySwatch: Colors.blue, 17 | visualDensity: VisualDensity.adaptivePlatformDensity, 18 | ), 19 | home: MyHomePage(title: 'Flutter TicketView Demo'), 20 | ); 21 | } 22 | } 23 | 24 | class MyHomePage extends StatefulWidget { 25 | MyHomePage({Key key, this.title}) : super(key: key); 26 | final String title; 27 | 28 | @override 29 | _MyHomePageState createState() => _MyHomePageState(); 30 | } 31 | 32 | bool _showTicketView = true; 33 | 34 | class _MyHomePageState extends State { 35 | @override 36 | Widget build(BuildContext context) { 37 | return Scaffold( 38 | backgroundColor: Color(0xffe3e3e3), 39 | appBar: AppBar( 40 | title: Text(widget.title), 41 | ), 42 | body: Center( 43 | child: Column( 44 | mainAxisAlignment: MainAxisAlignment.center, 45 | children: [ 46 | Row( 47 | mainAxisSize: MainAxisSize.min, 48 | children: [ 49 | RaisedButton( 50 | onPressed: () { 51 | setState(() { 52 | _showTicketView = true; 53 | }); 54 | }, 55 | child: Text('Ticket View'), 56 | ), 57 | SizedBox( 58 | width: 20, 59 | ), 60 | RaisedButton( 61 | onPressed: () { 62 | setState(() { 63 | _showTicketView = false; 64 | }); 65 | }, 66 | child: Text('Receipt View'), 67 | ) 68 | ], 69 | ), 70 | Expanded( 71 | child: Container( 72 | margin: EdgeInsets.all(10), 73 | child: _showTicketView 74 | ? _getTicketInfoView() 75 | : _getTicketReceiptView(), 76 | ), 77 | ) 78 | ], 79 | ), 80 | ), 81 | ); 82 | } 83 | 84 | Widget _getTicketInfoView() { 85 | return Center( 86 | child: Container( 87 | height: 160, 88 | margin: EdgeInsets.all(10), 89 | child: TicketView( 90 | child: Container(), 91 | ), 92 | ), 93 | ); 94 | } 95 | 96 | Container ticketInfoWidget() { 97 | return Container( 98 | child: Column( 99 | mainAxisSize: MainAxisSize.max, 100 | mainAxisAlignment: MainAxisAlignment.spaceAround, 101 | children: [ 102 | Text( 103 | 'PROMO TICKET', 104 | style: GoogleFonts.poppins(color: Colors.black, fontSize: 16), 105 | ), 106 | Text( 107 | '\$10.00', 108 | style: GoogleFonts.poppins( 109 | color: Colors.red, fontSize: 20, fontWeight: FontWeight.w700), 110 | ), 111 | Text( 112 | '120 Tickets Available', 113 | style: GoogleFonts.poppins(color: Colors.black, fontSize: 12), 114 | ) 115 | ], 116 | ), 117 | ); 118 | } 119 | 120 | int _ticketCount = 0; 121 | Container counterWidget() { 122 | return Container( 123 | child: Row( 124 | mainAxisSize: MainAxisSize.min, 125 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 126 | children: [ 127 | IconButton( 128 | icon: Icon( 129 | Icons.chevron_left, 130 | color: Colors.grey, 131 | size: 30, 132 | ), 133 | onPressed: () { 134 | if (_ticketCount > 0) { 135 | setState(() { 136 | _ticketCount--; 137 | }); 138 | } 139 | }), 140 | Expanded( 141 | child: Text( 142 | "$_ticketCount", 143 | // ticket.selectedTickets.value.toString(), 144 | maxLines: 1, 145 | softWrap: true, 146 | textAlign: TextAlign.center, 147 | style: GoogleFonts.poppins(color: Colors.black, fontSize: 30), 148 | ), 149 | ), 150 | IconButton( 151 | icon: Icon( 152 | Icons.chevron_right, 153 | color: Colors.grey, 154 | size: 30, 155 | ), 156 | onPressed: () { 157 | setState(() { 158 | _ticketCount++; 159 | }); 160 | }, 161 | ), 162 | ], 163 | ), 164 | ); 165 | } 166 | 167 | Widget _getTicketReceiptView() { 168 | return TicketView( 169 | backgroundPadding: EdgeInsets.symmetric(vertical: 0, horizontal: 20), 170 | backgroundColor: Color(0xFF8F1299), 171 | contentPadding: EdgeInsets.symmetric(vertical: 24, horizontal: 0), 172 | drawArc: false, 173 | triangleAxis: Axis.vertical, 174 | borderRadius: 6, 175 | drawDivider: true, 176 | trianglePos: .5, 177 | child: Container( 178 | child: Column( 179 | children: [ 180 | Expanded( 181 | flex: 5, 182 | child: Container( 183 | padding: EdgeInsets.all(24), 184 | child: Column( 185 | crossAxisAlignment: CrossAxisAlignment.start, 186 | children: [ 187 | Row( 188 | children: [ 189 | Text( 190 | 'DRAKE', 191 | style: GoogleFonts.poppins( 192 | color: Colors.black, 193 | fontSize: 18, 194 | fontWeight: FontWeight.w700), 195 | ), 196 | Expanded(child: Container()), 197 | RichText( 198 | text: TextSpan( 199 | children: [ 200 | TextSpan( 201 | text: 'Price: ', 202 | style: GoogleFonts.poppins( 203 | color: Colors.black, 204 | fontSize: 14, 205 | fontWeight: FontWeight.w400), 206 | ), 207 | TextSpan( 208 | text: '\$15.00', 209 | style: GoogleFonts.poppins( 210 | color: Colors.black, 211 | fontSize: 14, 212 | fontWeight: FontWeight.w600), 213 | ), 214 | ], 215 | ), 216 | ), 217 | ], 218 | ), 219 | SizedBox(height: 14), 220 | Text( 221 | 'VR Tickets, General Admission', 222 | style: GoogleFonts.poppins( 223 | color: Colors.black, 224 | fontSize: 14, 225 | fontWeight: FontWeight.w300), 226 | ), 227 | SizedBox(height: 14), 228 | Text( 229 | 'Madison Square Garden, NY', 230 | style: GoogleFonts.poppins( 231 | color: Colors.black, 232 | fontSize: 14, 233 | fontWeight: FontWeight.w300), 234 | ), 235 | SizedBox(height: 14), 236 | Text( 237 | 'November 30,2020, 7:00PM', 238 | style: GoogleFonts.poppins( 239 | color: Colors.black, 240 | fontSize: 14, 241 | fontWeight: FontWeight.w500), 242 | ), 243 | SizedBox(height: 14), 244 | RichText( 245 | text: TextSpan( 246 | children: [ 247 | TextSpan( 248 | text: 'Price: ', 249 | style: GoogleFonts.poppins( 250 | color: Colors.black, 251 | fontSize: 14, 252 | fontWeight: FontWeight.w400), 253 | ), 254 | TextSpan( 255 | text: '\$15.00', 256 | style: GoogleFonts.poppins( 257 | color: Colors.black, 258 | fontSize: 14, 259 | fontWeight: FontWeight.w400), 260 | ), 261 | ], 262 | ), 263 | ), 264 | ], 265 | ), 266 | ), 267 | ), 268 | Expanded( 269 | flex: 5, 270 | child: Container( 271 | margin: EdgeInsets.symmetric(vertical: 30), 272 | child: Image.asset('assets/qr_placeholder.png'), 273 | ), 274 | ), 275 | ], 276 | ), 277 | ), 278 | ); 279 | } 280 | } 281 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: Example Application for Flutter Ticket View. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^0.1.3 31 | google_fonts: ^1.1.0 32 | ticketview: 33 | path: ../ 34 | 35 | dev_dependencies: 36 | flutter_test: 37 | sdk: flutter 38 | 39 | # For information on the generic Dart part of this file, see the 40 | # following page: https://dart.dev/tools/pub/pubspec 41 | 42 | # The following section is specific to Flutter. 43 | flutter: 44 | 45 | # The following line ensures that the Material Icons font is 46 | # included with your application, so that you can use the icons in 47 | # the material Icons class. 48 | uses-material-design: true 49 | 50 | # To add assets to your application, add an assets section, like this: 51 | assets: 52 | - assets/ 53 | # - images/a_dot_ham.jpeg 54 | 55 | # An image asset can refer to one or more resolution-specific "variants", see 56 | # https://flutter.dev/assets-and-images/#resolution-aware. 57 | 58 | # For details regarding adding assets from package dependencies, see 59 | # https://flutter.dev/assets-and-images/#from-packages 60 | 61 | # To add custom fonts to your application, add a fonts section here, 62 | # in this "flutter" section. Each entry in this list should have a 63 | # "family" key with the font family name, and a "fonts" key with a 64 | # list giving the asset and other descriptors for the font. For 65 | # example: 66 | # fonts: 67 | # - family: Schyler 68 | # fonts: 69 | # - asset: fonts/Schyler-Regular.ttf 70 | # - asset: fonts/Schyler-Italic.ttf 71 | # style: italic 72 | # - family: Trajan Pro 73 | # fonts: 74 | # - asset: fonts/TrajanPro.ttf 75 | # - asset: fonts/TrajanPro_Bold.ttf 76 | # weight: 700 77 | # 78 | # For details regarding fonts from package dependencies, 79 | # see https://flutter.dev/custom-fonts/#from-packages 80 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /example/web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/web/favicon.png -------------------------------------------------------------------------------- /example/web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/web/icons/Icon-192.png -------------------------------------------------------------------------------- /example/web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/example/web/icons/Icon-512.png -------------------------------------------------------------------------------- /example/web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | example 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /example/web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "example", 3 | "short_name": "example", 4 | "start_url": ".", 5 | "display": "minimal-ui", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "Example Application for Flutter Ticket View.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /lib/ticketview.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'dart:math' as math; 3 | 4 | class TicketView extends StatelessWidget { 5 | final bool drawTriangle; 6 | final bool drawArc; 7 | 8 | final Axis triangleAxis; 9 | final Size triangleSize; 10 | final double trianglePos; 11 | 12 | final Color contentBackgroundColor; 13 | final Color backgroundColor; 14 | 15 | final EdgeInsets contentPadding; 16 | final EdgeInsets backgroundPadding; 17 | 18 | final double corderRadius; 19 | 20 | final bool drawDivider; 21 | final Color dividerColor; 22 | final double dividerStrokeWidth; 23 | 24 | final bool drawBorder; 25 | final double borderRadius; 26 | 27 | final bool drawShadow; 28 | 29 | final Widget? child; 30 | 31 | TicketView({ 32 | this.corderRadius = 3, 33 | this.drawTriangle = true, 34 | this.drawArc = false, 35 | this.triangleAxis = Axis.horizontal, 36 | this.triangleSize = const Size(20, 10), 37 | this.trianglePos = .7, 38 | this.contentBackgroundColor = Colors.white, 39 | this.backgroundColor = Colors.red, 40 | this.contentPadding = const EdgeInsets.all(25), 41 | this.backgroundPadding = 42 | const EdgeInsets.symmetric(horizontal: 10, vertical: 40), 43 | this.drawDivider = true, 44 | this.dividerColor = Colors.grey, 45 | this.dividerStrokeWidth = 2, 46 | this.drawBorder = true, 47 | this.borderRadius = 4, 48 | this.drawShadow = true, 49 | this.child, 50 | }); 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | return CustomPaint( 55 | // foregroundPainter: TicketClipper(corderRadius, horizontal, vertical, triangleSize, trianglePos), 56 | painter: TicketViewPainter( 57 | corderRadius, 58 | drawTriangle, 59 | drawArc, 60 | triangleAxis, 61 | triangleSize, 62 | trianglePos, 63 | contentBackgroundColor, 64 | backgroundColor, 65 | contentPadding, 66 | backgroundPadding, 67 | drawDivider, 68 | dividerColor, 69 | dividerStrokeWidth, 70 | drawBorder, 71 | borderRadius, 72 | drawShadow), 73 | 74 | child: Container( 75 | padding: contentPadding, 76 | child: ClipPath( 77 | clipper: TicketViewClipper(drawTriangle, drawArc, triangleAxis, 78 | triangleSize, trianglePos, drawDivider, borderRadius), 79 | child: child)), 80 | ); 81 | } 82 | } 83 | 84 | class TicketViewPainter extends CustomPainter { 85 | final bool drawTriangle; 86 | final bool drawArc; 87 | 88 | final Axis triangleAxis; 89 | final Size triangleSize; 90 | final double trianglePos; 91 | 92 | final Color contentBackgroundColor; 93 | final Color backgroundColor; 94 | 95 | final EdgeInsets contentPadding; 96 | final EdgeInsets backgroundPadding; 97 | 98 | final double corderRadius; 99 | 100 | final bool drawDivider; 101 | final Color dividerColor; 102 | final double dividerStrokeWidth; 103 | 104 | final bool drawBorder; 105 | final double borderRadius; 106 | 107 | final bool drawShadow; 108 | 109 | Offset? dashStart, dashEnd; 110 | 111 | TicketViewPainter( 112 | this.corderRadius, 113 | this.drawTriangle, 114 | this.drawArc, 115 | this.triangleAxis, 116 | this.triangleSize, 117 | this.trianglePos, 118 | this.contentBackgroundColor, 119 | this.backgroundColor, 120 | this.contentPadding, 121 | this.backgroundPadding, 122 | this.drawDivider, 123 | this.dividerColor, 124 | this.dividerStrokeWidth, 125 | this.drawBorder, 126 | this.borderRadius, 127 | this.drawShadow, 128 | ); 129 | 130 | //IMPORTANT: When you are clipping, all the polygon will be treated TicketViewPainter, Clip method will 131 | //close them each and then clip. Let if you have 3 polygon in your path, and you try to clip it, it will close 132 | // then individually and clip, if you tried to draw then will work fine. 133 | 134 | @override 135 | void paint(Canvas canvas, Size size) { 136 | //Get Background Rect 137 | Paint paint = Paint(); 138 | paint.color = backgroundColor; 139 | paint.style = PaintingStyle.fill; 140 | 141 | RRect backgroundRect = RRect.fromLTRBR( 142 | 0 + backgroundPadding.left, 143 | 0 + backgroundPadding.top, 144 | size.width - backgroundPadding.right, 145 | size.height - backgroundPadding.bottom, 146 | Radius.circular(4)); 147 | 148 | Path backgroundRectPath = Path(); 149 | 150 | backgroundRectPath.addPolygon([ 151 | Offset(backgroundRect.left, backgroundRect.top), 152 | Offset(backgroundRect.right, backgroundRect.top), 153 | Offset(backgroundRect.right, backgroundRect.bottom), 154 | Offset(backgroundRect.left, backgroundRect.bottom), 155 | ], true); 156 | 157 | // if (drawShadow) canvas.drawShadow(backgroundRectPath, Colors.grey, 1, true); 158 | 159 | canvas.drawRRect(backgroundRect, paint); 160 | 161 | //Get foreground Rect 162 | paint.color = contentBackgroundColor; 163 | paint.style = PaintingStyle.fill; 164 | paint.strokeWidth = 2; 165 | 166 | Rect foregroundRect = Rect.fromLTRB(contentPadding.left, contentPadding.top, 167 | size.width - contentPadding.right, size.height - contentPadding.bottom); 168 | 169 | //Clip the triangle or Arc 170 | Path path = Path(); 171 | 172 | path.moveTo(foregroundRect.left, foregroundRect.top); 173 | 174 | if (triangleAxis == Axis.horizontal) { 175 | _addTrianglePointToPath( 176 | foregroundRect, 177 | path, 178 | Offset(foregroundRect.left, foregroundRect.top), 179 | Offset(foregroundRect.right, foregroundRect.top), 180 | trianglePos, 181 | triangleSize, 182 | isTriangle: drawTriangle, 183 | isArc: drawArc); 184 | 185 | if (drawBorder) 186 | _addArcPointToPath( 187 | foregroundRect, 188 | path, 189 | Offset(foregroundRect.right, foregroundRect.top), 190 | Offset(foregroundRect.right, foregroundRect.bottom), 191 | borderRadius); 192 | else 193 | path.lineTo(foregroundRect.right, foregroundRect.bottom); 194 | 195 | _addTrianglePointToPath( 196 | foregroundRect, 197 | path, 198 | Offset(foregroundRect.right, foregroundRect.bottom), 199 | Offset(foregroundRect.left, foregroundRect.bottom), 200 | trianglePos, 201 | triangleSize, 202 | isTriangle: drawTriangle, 203 | isArc: drawArc); 204 | 205 | if (drawBorder) 206 | _addArcPointToPath( 207 | foregroundRect, 208 | path, 209 | Offset(foregroundRect.left, foregroundRect.bottom), 210 | Offset(foregroundRect.left, foregroundRect.top), 211 | borderRadius); 212 | else 213 | path.lineTo(foregroundRect.left, foregroundRect.top); 214 | } else { 215 | if (drawBorder) 216 | _addArcPointToPath( 217 | foregroundRect, 218 | path, 219 | Offset(foregroundRect.left, foregroundRect.top), 220 | Offset(foregroundRect.right, foregroundRect.top), 221 | borderRadius); 222 | else 223 | path.lineTo(foregroundRect.right, foregroundRect.bottom); 224 | 225 | _addTrianglePointToPath( 226 | foregroundRect, 227 | path, 228 | Offset(foregroundRect.right, foregroundRect.top), 229 | Offset(foregroundRect.right, foregroundRect.bottom), 230 | trianglePos, 231 | triangleSize, 232 | isTriangle: drawTriangle, 233 | isArc: drawArc); 234 | 235 | if (drawBorder) 236 | _addArcPointToPath( 237 | foregroundRect, 238 | path, 239 | Offset(foregroundRect.right, foregroundRect.bottom), 240 | Offset(foregroundRect.left, foregroundRect.bottom), 241 | borderRadius); 242 | else 243 | path.lineTo(foregroundRect.left, foregroundRect.top); 244 | 245 | _addTrianglePointToPath( 246 | foregroundRect, 247 | path, 248 | Offset(foregroundRect.left, foregroundRect.bottom), 249 | Offset(foregroundRect.left, foregroundRect.top), 250 | trianglePos, 251 | triangleSize, 252 | isTriangle: drawTriangle, 253 | isArc: drawArc); 254 | } 255 | 256 | if (drawShadow) canvas.drawShadow(path, Colors.grey, 2, true); 257 | 258 | canvas.clipPath(path); 259 | 260 | canvas.drawRect(foregroundRect, paint); 261 | 262 | if (drawDivider) drawDashedLine(canvas, dashStart!, dashEnd!); 263 | } 264 | 265 | void _addTrianglePointToPath(Rect size, Path path, Offset start, Offset end, 266 | double trianglePos, Size triangleSize, 267 | {bool isTriangle = false, bool isArc = false}) { 268 | if (start.dy == end.dy) { 269 | //Draw Horizontal Triangle 270 | 271 | if (end.dx > start.dx) { 272 | if (isArc) { 273 | path.lineTo(start.dx, start.dy); 274 | path.lineTo( 275 | start.dx + (size.width * trianglePos) - triangleSize.width / 2, 276 | start.dy); 277 | path.arcToPoint( 278 | Offset( 279 | start.dx + 280 | (size.width * trianglePos) + 281 | triangleSize.width / 2, 282 | start.dy), 283 | radius: Radius.circular(triangleSize.width / 2), 284 | clockwise: false); 285 | path.lineTo(end.dx, end.dy); 286 | _setDashPoints(Offset(start.dx + (size.width * trianglePos), 287 | start.dy + triangleSize.width / 2)); 288 | return; 289 | } 290 | 291 | path.lineTo(start.dx, start.dy); 292 | path.lineTo( 293 | start.dx + (size.width * trianglePos) - triangleSize.width / 2, 294 | start.dy); 295 | if (isTriangle) 296 | path.lineTo(start.dx + (size.width * trianglePos), 297 | start.dy + triangleSize.height); 298 | path.lineTo( 299 | start.dx + (size.width * trianglePos) + triangleSize.width / 2, 300 | start.dy); 301 | path.lineTo(end.dx, end.dy); 302 | _setDashPoints(Offset(start.dx + (size.width * trianglePos), 303 | start.dy + triangleSize.height)); 304 | } else { 305 | if (isArc) { 306 | path.lineTo(start.dx, start.dy); 307 | path.lineTo( 308 | end.dx + (size.width * trianglePos) + triangleSize.width / 2, 309 | end.dy); 310 | path.arcToPoint( 311 | Offset( 312 | end.dx + (size.width * trianglePos) - triangleSize.width / 2, 313 | end.dy), 314 | radius: Radius.circular(triangleSize.width / 2), 315 | clockwise: false); 316 | path.lineTo(end.dx, end.dy); 317 | _setDashPoints(Offset(end.dx + (size.width * trianglePos), 318 | end.dy - triangleSize.height)); 319 | return; 320 | } 321 | 322 | path.lineTo(start.dx, start.dy); 323 | path.lineTo( 324 | end.dx + (size.width * trianglePos) + triangleSize.width / 2, 325 | end.dy); 326 | if (isTriangle) 327 | path.lineTo(end.dx + (size.width * trianglePos), 328 | end.dy - triangleSize.height); 329 | 330 | path.lineTo( 331 | end.dx + (size.width * trianglePos) - triangleSize.width / 2, 332 | end.dy); 333 | path.lineTo(end.dx, end.dy); 334 | _setDashPoints(Offset( 335 | end.dx + (size.width * trianglePos), end.dy - triangleSize.height)); 336 | } 337 | } else if (start.dx == end.dx) { 338 | //Draw Vertical Triangle 339 | if (end.dy > start.dy) { 340 | if (isArc) { 341 | path.lineTo(start.dx, start.dy); 342 | path.lineTo(start.dx, 343 | start.dy + (size.height * trianglePos) - triangleSize.width / 2); 344 | path.arcToPoint( 345 | Offset( 346 | start.dx, 347 | start.dy + 348 | (size.height * trianglePos) + 349 | triangleSize.width / 2), 350 | radius: Radius.circular(triangleSize.width / 2), 351 | clockwise: false); 352 | path.lineTo(end.dx, end.dy); 353 | _setDashPoints(Offset(start.dx - triangleSize.height, 354 | start.dy + (size.height * trianglePos))); 355 | return; 356 | } 357 | 358 | path.lineTo(start.dx, start.dy); 359 | path.lineTo(start.dx, 360 | start.dy + (size.height * trianglePos) - (triangleSize.width / 2)); 361 | if (isTriangle) 362 | path.lineTo(start.dx - triangleSize.height, 363 | start.dy + (size.height * trianglePos)); 364 | path.lineTo(start.dx, 365 | start.dy + (size.height * trianglePos) + (triangleSize.width / 2)); 366 | path.lineTo(end.dx, end.dy); 367 | 368 | _setDashPoints(Offset(start.dx - triangleSize.height, 369 | start.dy + (size.height * trianglePos))); 370 | } else { 371 | if (isArc) { 372 | path.lineTo(start.dx, start.dy); 373 | path.lineTo(end.dx, 374 | end.dy + (size.height * trianglePos) + triangleSize.width / 2); 375 | path.arcToPoint( 376 | Offset( 377 | end.dx, 378 | end.dy + 379 | (size.height * trianglePos) - 380 | triangleSize.width / 2), 381 | radius: Radius.circular(triangleSize.width / 2), 382 | clockwise: false); 383 | path.lineTo(end.dx, end.dy); 384 | 385 | _setDashPoints(Offset(end.dx + triangleSize.height, 386 | end.dy + (size.height * trianglePos))); 387 | 388 | return; 389 | } 390 | 391 | path.lineTo(start.dx, start.dy); 392 | path.lineTo(end.dx, 393 | end.dy + (size.height * trianglePos) + triangleSize.width / 2); 394 | if (isTriangle) 395 | path.lineTo(end.dx + triangleSize.height, 396 | end.dy + (size.height * trianglePos)); 397 | path.lineTo(end.dx, 398 | end.dy + (size.height * trianglePos) - triangleSize.width / 2); 399 | path.lineTo(end.dx, end.dy); 400 | _setDashPoints(Offset(end.dx + triangleSize.height, 401 | end.dy + (size.height * trianglePos))); 402 | } 403 | } 404 | } 405 | 406 | void _setDashPoints(Offset offset) { 407 | if (dashStart == null) { 408 | dashStart = offset; 409 | return; 410 | } 411 | dashEnd = offset; 412 | } 413 | 414 | void _addArcPointToPath( 415 | Rect size, Path path, Offset start, Offset end, double radius) { 416 | if (start.dx == end.dx) { 417 | //Draw vertical lines 418 | 419 | double height = size.height.abs(); 420 | double offsetBothSide = (height % (radius * 3)) / 2; 421 | int numOfArc = (height / (radius * 3)).truncate(); 422 | 423 | if (end.dy > start.dy) { 424 | path.relativeLineTo(0, offsetBothSide); 425 | for (int i = 0; numOfArc > i; i++) { 426 | path.relativeLineTo(0, radius * .5); 427 | path.relativeArcToPoint(Offset(0, radius * 2), 428 | radius: Radius.circular(radius), clockwise: false); 429 | path.relativeLineTo(0, radius * .5); 430 | } 431 | path.relativeLineTo(0, offsetBothSide); 432 | } else { 433 | path.relativeLineTo(0, -offsetBothSide); 434 | for (int i = 0; numOfArc > i; i++) { 435 | path.relativeLineTo(0, -(radius * .5)); 436 | path.relativeArcToPoint(Offset(0, -(radius * 2)), 437 | radius: Radius.circular(radius), clockwise: false); 438 | path.relativeLineTo(0, -(radius * .5)); 439 | } 440 | path.relativeLineTo(0, -offsetBothSide); 441 | } 442 | } else if (start.dy == end.dy) { 443 | double width = size.width.abs(); 444 | double offsetBothSide = (width % (radius * 3)) / 2; 445 | int numOfArc = (width / (radius * 3)).truncate(); 446 | 447 | if (end.dx > start.dx) { 448 | path.relativeLineTo(offsetBothSide, 0); 449 | for (int i = 0; numOfArc > i; i++) { 450 | path.relativeLineTo(radius * .5, 0); 451 | path.relativeArcToPoint(Offset(radius * 2, 0), 452 | radius: Radius.circular(radius), clockwise: false); 453 | path.relativeLineTo(radius * .5, 0); 454 | } 455 | path.relativeLineTo(offsetBothSide, 0); 456 | } else { 457 | path.relativeLineTo(-offsetBothSide, 0); 458 | for (int i = 0; numOfArc > i; i++) { 459 | path.relativeLineTo(-(radius * .5), 0); 460 | path.relativeArcToPoint(Offset(-(radius * 2), 0), 461 | radius: Radius.circular(radius), clockwise: false); 462 | path.relativeLineTo(-(radius * .5), 0); 463 | } 464 | path.relativeLineTo(-offsetBothSide, 0); 465 | } 466 | } 467 | } 468 | 469 | void drawDashedLine(Canvas canvas, Offset start, Offset end) { 470 | 471 | Offset a,b; 472 | if(start.dy == end.dy){ 473 | a = start.dxend.dx ? start : end; 475 | }else{ 476 | a = start; 477 | b = end; 478 | } 479 | Path path = getDashedPath(a: a, b: b, gap: 4); 480 | // path.moveTo(start.dx, start.dy); 481 | 482 | Paint dashLinePaint = Paint(); 483 | dashLinePaint.color = dividerColor; 484 | dashLinePaint.style = PaintingStyle.stroke; 485 | dashLinePaint.strokeWidth = dividerStrokeWidth; 486 | dashLinePaint.strokeCap = StrokeCap.round; 487 | 488 | // path.lineTo(end.dx, end.dy); 489 | 490 | canvas.drawPath(path, dashLinePaint); 491 | } 492 | 493 | Path getDashedPath({ 494 | required Offset a, 495 | required Offset b, 496 | required gap, 497 | }) { 498 | Size size = Size(b.dx - a.dx, b.dy - a.dy); 499 | Path path = Path(); 500 | path.moveTo(a.dx, a.dy); 501 | bool shouldDraw = true; 502 | math.Point currentPoint = math.Point(a.dx, a.dy); 503 | 504 | num radians = math.atan(size.height / size.width); 505 | 506 | num dx = math.cos(radians) * gap < 0 507 | ? math.cos(radians) * gap * -1 508 | : math.cos(radians) * gap; 509 | 510 | num dy = math.sin(radians) * gap < 0 511 | ? math.sin(radians) * gap * -1 512 | : math.sin(radians) * gap; 513 | 514 | while (currentPoint.x <= b.dx && currentPoint.y <= b.dy) { 515 | shouldDraw 516 | ? path.lineTo(currentPoint.x as double, currentPoint.y as double) 517 | : path.moveTo(currentPoint.x as double, currentPoint.y as double); 518 | shouldDraw = !shouldDraw; 519 | currentPoint = math.Point( 520 | currentPoint.x + dx, 521 | currentPoint.y + dy, 522 | ); 523 | } 524 | return path; 525 | } 526 | 527 | @override 528 | bool shouldRepaint(CustomPainter oldDelegate) { 529 | return true; 530 | } 531 | } 532 | 533 | class TicketViewClipper extends CustomClipper { 534 | final bool drawTriangle; 535 | final bool drawArc; 536 | 537 | final Axis triangleAxis; 538 | final Size triangleSize; 539 | final double trianglePos; 540 | 541 | final bool drawBorder; 542 | final double borderRadius; 543 | 544 | TicketViewClipper( 545 | this.drawTriangle, 546 | this.drawArc, 547 | this.triangleAxis, 548 | this.triangleSize, 549 | this.trianglePos, 550 | this.drawBorder, 551 | this.borderRadius, 552 | ); 553 | 554 | @override 555 | Path getClip(Size size) { 556 | Path path = Path(); 557 | 558 | Rect foregroundRect = Rect.fromLTRB(0, 0, size.width, size.height); 559 | 560 | path.moveTo(foregroundRect.left, foregroundRect.top); 561 | 562 | if (triangleAxis == Axis.horizontal) { 563 | _addTrianglePointToPath( 564 | foregroundRect, 565 | path, 566 | Offset(foregroundRect.left, foregroundRect.top), 567 | Offset(foregroundRect.right, foregroundRect.top), 568 | trianglePos, 569 | triangleSize, 570 | isTriangle: drawTriangle, 571 | isArc: drawArc); 572 | 573 | if (drawBorder) 574 | _addArcPointToPath( 575 | foregroundRect, 576 | path, 577 | Offset(foregroundRect.right, foregroundRect.top), 578 | Offset(foregroundRect.right, foregroundRect.bottom), 579 | borderRadius); 580 | else 581 | path.lineTo(foregroundRect.right, foregroundRect.bottom); 582 | 583 | _addTrianglePointToPath( 584 | foregroundRect, 585 | path, 586 | Offset(foregroundRect.right, foregroundRect.bottom), 587 | Offset(foregroundRect.left, foregroundRect.bottom), 588 | trianglePos, 589 | triangleSize, 590 | isTriangle: drawTriangle, 591 | isArc: drawArc); 592 | 593 | if (drawBorder) 594 | _addArcPointToPath( 595 | foregroundRect, 596 | path, 597 | Offset(foregroundRect.left, foregroundRect.bottom), 598 | Offset(foregroundRect.left, foregroundRect.top), 599 | borderRadius); 600 | else 601 | path.lineTo(foregroundRect.left, foregroundRect.top); 602 | } else { 603 | if (drawBorder) 604 | _addArcPointToPath( 605 | foregroundRect, 606 | path, 607 | Offset(foregroundRect.left, foregroundRect.top), 608 | Offset(foregroundRect.right, foregroundRect.top), 609 | borderRadius); 610 | else 611 | path.lineTo(foregroundRect.right, foregroundRect.bottom); 612 | 613 | _addTrianglePointToPath( 614 | foregroundRect, 615 | path, 616 | Offset(foregroundRect.right, foregroundRect.top), 617 | Offset(foregroundRect.right, foregroundRect.bottom), 618 | trianglePos, 619 | triangleSize, 620 | isTriangle: drawTriangle, 621 | isArc: drawArc); 622 | 623 | if (drawBorder) 624 | _addArcPointToPath( 625 | foregroundRect, 626 | path, 627 | Offset(foregroundRect.right, foregroundRect.bottom), 628 | Offset(foregroundRect.left, foregroundRect.bottom), 629 | borderRadius); 630 | else 631 | path.lineTo(foregroundRect.left, foregroundRect.top); 632 | 633 | _addTrianglePointToPath( 634 | foregroundRect, 635 | path, 636 | Offset(foregroundRect.left, foregroundRect.bottom), 637 | Offset(foregroundRect.left, foregroundRect.top), 638 | trianglePos, 639 | triangleSize, 640 | isTriangle: drawTriangle, 641 | isArc: drawArc); 642 | } 643 | 644 | // canvas.drawShadow(path, Colors.grey, 2, true); 645 | 646 | // canvas.clipPath(path); 647 | 648 | return path; 649 | } 650 | 651 | void _addTrianglePointToPath(Rect size, Path path, Offset start, Offset end, 652 | double trianglePos, Size triangleSize, 653 | {bool isTriangle = false, bool isArc = false}) { 654 | if (start.dy == end.dy) { 655 | //Draw Horizontal Triangle 656 | 657 | if (end.dx > start.dx) { 658 | if (isArc) { 659 | path.lineTo(start.dx, start.dy); 660 | path.lineTo( 661 | start.dx + (size.width * trianglePos) - triangleSize.width / 2, 662 | start.dy); 663 | path.arcToPoint( 664 | Offset( 665 | start.dx + 666 | (size.width * trianglePos) + 667 | triangleSize.width / 2, 668 | start.dy), 669 | radius: Radius.circular(triangleSize.width / 2), 670 | clockwise: false); 671 | path.lineTo(end.dx, end.dy); 672 | return; 673 | } 674 | 675 | path.lineTo(start.dx, start.dy); 676 | path.lineTo( 677 | start.dx + (size.width * trianglePos) - triangleSize.width / 2, 678 | start.dy); 679 | if (isTriangle) 680 | path.lineTo(start.dx + (size.width * trianglePos), 681 | start.dy + triangleSize.height); 682 | path.lineTo( 683 | start.dx + (size.width * trianglePos) + triangleSize.width / 2, 684 | start.dy); 685 | path.lineTo(end.dx, end.dy); 686 | } else { 687 | if (isArc) { 688 | path.lineTo(start.dx, start.dy); 689 | path.lineTo( 690 | end.dx + (size.width * trianglePos) + triangleSize.width / 2, 691 | end.dy); 692 | path.arcToPoint( 693 | Offset( 694 | end.dx + (size.width * trianglePos) - triangleSize.width / 2, 695 | end.dy), 696 | radius: Radius.circular(triangleSize.width / 2), 697 | clockwise: false); 698 | path.lineTo(end.dx, end.dy); 699 | return; 700 | } 701 | 702 | path.lineTo(start.dx, start.dy); 703 | path.lineTo( 704 | end.dx + (size.width * trianglePos) + triangleSize.width / 2, 705 | end.dy); 706 | if (isTriangle) 707 | path.lineTo(end.dx + (size.width * trianglePos), 708 | end.dy - triangleSize.height); 709 | 710 | path.lineTo( 711 | end.dx + (size.width * trianglePos) - triangleSize.width / 2, 712 | end.dy); 713 | path.lineTo(end.dx, end.dy); 714 | } 715 | } else if (start.dx == end.dx) { 716 | //Draw Vertical Triangle 717 | if (end.dy > start.dy) { 718 | if (isArc) { 719 | path.lineTo(start.dx, start.dy); 720 | path.lineTo(start.dx, 721 | start.dy + (size.height * trianglePos) - triangleSize.width / 2); 722 | path.arcToPoint( 723 | Offset( 724 | start.dx, 725 | start.dy + 726 | (size.height * trianglePos) + 727 | triangleSize.width / 2), 728 | radius: Radius.circular(triangleSize.width / 2), 729 | clockwise: false); 730 | path.lineTo(end.dx, end.dy); 731 | return; 732 | } 733 | 734 | path.lineTo(start.dx, start.dy); 735 | path.lineTo(start.dx, 736 | start.dy + (size.height * trianglePos) - (triangleSize.width / 2)); 737 | if (isTriangle) 738 | path.lineTo(start.dx - triangleSize.height, 739 | start.dy + (size.height * trianglePos)); 740 | path.lineTo(start.dx, 741 | start.dy + (size.height * trianglePos) + (triangleSize.width / 2)); 742 | path.lineTo(end.dx, end.dy); 743 | } else { 744 | if (isArc) { 745 | path.lineTo(start.dx, start.dy); 746 | path.lineTo(end.dx, 747 | end.dy + (size.height * trianglePos) + triangleSize.width / 2); 748 | path.arcToPoint( 749 | Offset( 750 | end.dx, 751 | end.dy + 752 | (size.height * trianglePos) - 753 | triangleSize.width / 2), 754 | radius: Radius.circular(triangleSize.width / 2), 755 | clockwise: false); 756 | path.lineTo(end.dx, end.dy); 757 | 758 | return; 759 | } 760 | 761 | path.lineTo(start.dx, start.dy); 762 | path.lineTo(end.dx, 763 | end.dy + (size.height * trianglePos) + triangleSize.width / 2); 764 | if (isTriangle) 765 | path.lineTo(end.dx + triangleSize.height, 766 | end.dy + (size.height * trianglePos)); 767 | path.lineTo(end.dx, 768 | end.dy + (size.height * trianglePos) - triangleSize.width / 2); 769 | path.lineTo(end.dx, end.dy); 770 | } 771 | } 772 | } 773 | 774 | void _addArcPointToPath( 775 | Rect size, Path path, Offset start, Offset end, double radius) { 776 | if (start.dx == end.dx) { 777 | //Draw vertical lines 778 | 779 | double height = size.height.abs(); 780 | double offsetBothSide = (height % (radius * 3)) / 2; 781 | int numOfArc = (height / (radius * 3)).truncate(); 782 | 783 | if (end.dy > start.dy) { 784 | path.relativeLineTo(0, offsetBothSide); 785 | for (int i = 0; numOfArc > i; i++) { 786 | path.relativeLineTo(0, radius * .5); 787 | path.relativeArcToPoint(Offset(0, radius * 2), 788 | radius: Radius.circular(radius), clockwise: false); 789 | path.relativeLineTo(0, radius * .5); 790 | } 791 | path.relativeLineTo(0, offsetBothSide); 792 | } else { 793 | path.relativeLineTo(0, -offsetBothSide); 794 | for (int i = 0; numOfArc > i; i++) { 795 | path.relativeLineTo(0, -(radius * .5)); 796 | path.relativeArcToPoint(Offset(0, -(radius * 2)), 797 | radius: Radius.circular(radius), clockwise: false); 798 | path.relativeLineTo(0, -(radius * .5)); 799 | } 800 | path.relativeLineTo(0, -offsetBothSide); 801 | } 802 | } else if (start.dy == end.dy) { 803 | double width = size.width.abs(); 804 | double offsetBothSide = (width % (radius * 3)) / 2; 805 | int numOfArc = (width / (radius * 3)).truncate(); 806 | 807 | if (end.dx > start.dx) { 808 | path.relativeLineTo(offsetBothSide, 0); 809 | for (int i = 0; numOfArc > i; i++) { 810 | path.relativeLineTo(radius * .5, 0); 811 | path.relativeArcToPoint(Offset(radius * 2, 0), 812 | radius: Radius.circular(radius), clockwise: false); 813 | path.relativeLineTo(radius * .5, 0); 814 | } 815 | path.relativeLineTo(offsetBothSide, 0); 816 | } else { 817 | path.relativeLineTo(-offsetBothSide, 0); 818 | for (int i = 0; numOfArc > i; i++) { 819 | path.relativeLineTo(-(radius * .5), 0); 820 | path.relativeArcToPoint(Offset(-(radius * 2), 0), 821 | radius: Radius.circular(radius), clockwise: false); 822 | path.relativeLineTo(-(radius * .5), 0); 823 | } 824 | path.relativeLineTo(-offsetBothSide, 0); 825 | } 826 | } 827 | } 828 | 829 | @override 830 | bool shouldReclip(CustomClipper oldClipper) { 831 | return true; 832 | } 833 | } 834 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: ticketview 2 | description: Its a clean Ticket view or Receipt view for Flutter application with some UI customization. 3 | version: 1.0.0 4 | homepage: https://github.com/Sorbh/ticketviewflutter 5 | 6 | environment: 7 | sdk: '>=2.12.0 <3.0.0' 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | 13 | dev_dependencies: 14 | flutter_test: 15 | sdk: flutter 16 | 17 | # For information on the generic Dart part of this file, see the 18 | # following page: https://dart.dev/tools/pub/pubspec 19 | 20 | # The following section is specific to Flutter. 21 | flutter: 22 | 23 | # To add assets to your package, add an assets section, like this: 24 | # assets: 25 | # - images/a_dot_burr.jpeg 26 | # - images/a_dot_ham.jpeg 27 | # 28 | # For details regarding assets in packages, see 29 | # https://flutter.dev/assets-and-images/#from-packages 30 | # 31 | # An image asset can refer to one or more resolution-specific "variants", see 32 | # https://flutter.dev/assets-and-images/#resolution-aware. 33 | 34 | # To add custom fonts to your package, add a fonts section here, 35 | # in this "flutter" section. Each entry in this list should have a 36 | # "family" key with the font family name, and a "fonts" key with a 37 | # list giving the asset and other descriptors for the font. For 38 | # example: 39 | # fonts: 40 | # - family: Schyler 41 | # fonts: 42 | # - asset: fonts/Schyler-Regular.ttf 43 | # - asset: fonts/Schyler-Italic.ttf 44 | # style: italic 45 | # - family: Trajan Pro 46 | # fonts: 47 | # - asset: fonts/TrajanPro.ttf 48 | # - asset: fonts/TrajanPro_Bold.ttf 49 | # weight: 700 50 | # 51 | # For details regarding fonts in packages, see 52 | # https://flutter.dev/custom-fonts/#from-packages 53 | -------------------------------------------------------------------------------- /raw/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/raw/1.jpg -------------------------------------------------------------------------------- /raw/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Sorbh/ticketviewflutter/b091fbc70422c67064856d27e1522a8e07676ec0/raw/2.jpg -------------------------------------------------------------------------------- /test/ticketview_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_test/flutter_test.dart'; 2 | 3 | void main() { 4 | test('adds one to input values', () { 5 | }); 6 | } 7 | --------------------------------------------------------------------------------