├── .gitignore ├── .idea ├── libraries │ └── Dart_SDK.xml ├── modules.xml └── workspace.xml ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── cieloecommerce.iml ├── example ├── .gitignore ├── .metadata ├── README.md ├── android │ ├── .project │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── app │ │ ├── .classpath │ │ ├── .project │ │ ├── .settings │ │ │ └── org.eclipse.buildship.core.prefs │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── exemple │ │ │ │ └── MainActivity.java │ │ │ └── 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 │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.h │ │ ├── AppDelegate.m │ │ ├── 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 │ │ └── main.m ├── lib │ ├── main.dart │ └── view │ │ └── CieloCheckout.dart └── pubspec.yaml ├── lib ├── flutter_cielo.dart └── src │ ├── Address.dart │ ├── Address.g.dart │ ├── CieloError.dart │ ├── CieloException.dart │ ├── CreditCard.dart │ ├── CreditCard.g.dart │ ├── Customer.dart │ ├── Customer.g.dart │ ├── Environment.dart │ ├── Link.dart │ ├── Link.g.dart │ ├── Merchant.dart │ ├── Payment.dart │ ├── Payment.g.dart │ ├── Sale.dart │ ├── Sale.g.dart │ └── cielo_ecommerce.dart ├── pubspec.lock └── pubspec.yaml /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | 4 | .packages 5 | .pub/ 6 | 7 | build/ 8 | ios/.generated/ 9 | ios/Flutter/Generated.xcconfig 10 | ios/Runner/GeneratedPluginRegistrant.* 11 | -------------------------------------------------------------------------------- /.idea/libraries/Dart_SDK.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.idea/workspace.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /.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: 5391447fae6209bb21a89e6a5a6583cac1af9b4b 8 | channel: beta 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [1.0.5] - 12 de Fevereiro 2019. 2 | 3 | * Correções na criação de cartão tokenizado 4 | 5 | ## [1.0.1] - 12 de Fevereiro 2019. 6 | 7 | * Adicionado tratamento de erros (veja página principal) 8 | * Correções no README.md 9 | 10 | ## [1.0.0] - 11 de Fevereiro 2019. 11 | 12 | * Adicionado tutorial 13 | 14 | ## [0.0.1] - TODO: Add release date. 15 | 16 | * TODO: Describe initial release. 17 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | TODO: Add your license here. 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # flutter-cielo 2 | 3 | [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6UTC2V72FL644&source=url) 4 | 5 | Package para criar transações usando o SDK da Cielo e-Commerce. Para mais informações acesse a [`documentação`](https://developercielo.github.io/manual/cielo-ecommerce). 6 | 7 | 8 | 9 | ## Start 10 | 11 | 12 | Adicionar [`flutter_cielo`](https://pub.dartlang.org/packages/flutter_cielo) no seu pubspec.yaml. 13 | 14 | ``` dart 15 | import 'package:flutter_cielo/flutter_cielo.dart'; 16 | 17 | ... 18 | //inicia objeto da api 19 | final CieloEcommerce cielo = CieloEcommerce( 20 | environment: Environment.SANDBOX, // ambiente de desenvolvimento 21 | merchant: Merchant( 22 | merchantId: "SEU_MERCHANT_ID", 23 | merchantKey: "SEU_MERCHANT_KEY", 24 | )); 25 | 26 | ... 27 | //Objeto de venda 28 | Sale sale = Sale( 29 | merchantOrderId: "123", // id único de sua venda 30 | customer: Customer( //objeto de dados do usuário 31 | name: "Comprador crédito simples" 32 | ), 33 | payment: Payment( // objeto para de pagamento 34 | type: TypePayment.creditCard, //tipo de pagamento 35 | amount: 7777, // valor da compra em centavos 36 | installments: 1, // número de parcelas 37 | softDescriptor: "Cielo", //descrição que aparecerá no extrato do usuário. Apenas 15 caracteres 38 | creditCard: CreditCard( //objeto de Cartão de crédito 39 | cardNumber: "1234123412341231", //número do cartão 40 | holder: "Teste Holder", //nome do usuário impresso no cartão 41 | expirationDate: "12/2030", // data de expiração 42 | securityCode: "123", // código de segurança 43 | brand: "Visa", // bandeira 44 | ) 45 | ) 46 | ); 47 | 48 | try{ 49 | var response = await cielo.createSale(sale); 50 | print(response.payment.paymentId); 51 | } catch(e){ 52 | print(e); 53 | } 54 | 55 | ``` 56 | 57 | ## Tokenizando um cartão 58 | 59 | ``` dart 60 | 61 | ... 62 | 63 | CreditCard cart = CreditCard( 64 | customerName: "Comprador Teste Cielo", 65 | cardNumber: "1234123412341231", 66 | holder: "Teste Holder", 67 | expirationDate: "12/2030", 68 | brand: "Visa", 69 | ); 70 | try { 71 | var response = await cielo.tokenizeCard(cart); 72 | print(response.cardToken); 73 | } on CieloException catch(e){ 74 | print(e.message); 75 | print(e.errors[0].message); 76 | print(e.errors[0].code); 77 | } 78 | 79 | ... 80 | 81 | ``` 82 | 83 | ## Venda com um cartão tokenizado 84 | 85 | ``` dart 86 | 87 | Sale sale = Sale( 88 | merchantOrderId: "123", 89 | customer: Customer( 90 | name: "Comprador crédito simples" 91 | ), 92 | payment: Payment( 93 | type: TypePayment.creditCard, 94 | amount: 7777, 95 | installments: 1, 96 | softDescriptor: "Cielo", 97 | creditCard: CreditCard.token( 98 | cardToken: "1234123412341231", 99 | securityCode: "123", 100 | brand: "Visa", 101 | ); 102 | ) 103 | ); 104 | 105 | try{ 106 | var response = await cielo.createSale(sale); 107 | print(response.payment.paymentId); 108 | } on CieloException catch(e){ 109 | print(e.message); 110 | print(e.errors[0].message); 111 | print(e.errors[0].code); 112 | } 113 | 114 | .... 115 | 116 | 117 | } 118 | 119 | ``` 120 | 121 | ## Para mais informações 122 | 123 | 124 | Acesse o Blog do Flutterando Clicando [aqui](https://flutterando.com.br/) . 125 | -------------------------------------------------------------------------------- /cieloecommerce.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /example/.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 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/ServiceDefinitions.json 64 | **/ios/Runner/GeneratedPluginRegistrant.* 65 | 66 | # Exceptions to above rules. 67 | !**/ios/**/default.mode1v3 68 | !**/ios/**/default.mode2v3 69 | !**/ios/**/default.pbxuser 70 | !**/ios/**/default.perspectivev3 71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 72 | -------------------------------------------------------------------------------- /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: 5391447fae6209bb21a89e6a5a6583cac1af9b4b 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # exemple 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://flutter.io/docs/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://flutter.io/docs/cookbook) 13 | 14 | For help getting started with Flutter, view our 15 | [online documentation](https://flutter.io/docs), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /example/android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /example/android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /example/android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /example/android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /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 from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 26 | 27 | android { 28 | compileSdkVersion 27 29 | 30 | lintOptions { 31 | disable 'InvalidPackage' 32 | } 33 | 34 | defaultConfig { 35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 36 | applicationId "com.example.exemple" 37 | minSdkVersion 16 38 | targetSdkVersion 27 39 | versionCode flutterVersionCode.toInteger() 40 | versionName flutterVersionName 41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | testImplementation 'junit:junit:4.12' 59 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 61 | } 62 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 15 | 19 | 26 | 30 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /example/android/app/src/main/java/com/example/exemple/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.exemple; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /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-4.10.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/ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 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 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 19 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 20 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 21 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 22 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 23 | /* End PBXBuildFile section */ 24 | 25 | /* Begin PBXCopyFilesBuildPhase section */ 26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 27 | isa = PBXCopyFilesBuildPhase; 28 | buildActionMask = 2147483647; 29 | dstPath = ""; 30 | dstSubfolderSpec = 10; 31 | files = ( 32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 34 | ); 35 | name = "Embed Frameworks"; 36 | runOnlyForDeploymentPostprocessing = 0; 37 | }; 38 | /* End PBXCopyFilesBuildPhase section */ 39 | 40 | /* Begin PBXFileReference section */ 41 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 42 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 43 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 46 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 47 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 48 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 49 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 50 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 51 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 52 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 53 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 58 | /* End PBXFileReference section */ 59 | 60 | /* Begin PBXFrameworksBuildPhase section */ 61 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 62 | isa = PBXFrameworksBuildPhase; 63 | buildActionMask = 2147483647; 64 | files = ( 65 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 66 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 67 | ); 68 | runOnlyForDeploymentPostprocessing = 0; 69 | }; 70 | /* End PBXFrameworksBuildPhase section */ 71 | 72 | /* Begin PBXGroup section */ 73 | 9740EEB11CF90186004384FC /* Flutter */ = { 74 | isa = PBXGroup; 75 | children = ( 76 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 77 | 3B80C3931E831B6300D905FE /* App.framework */, 78 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 79 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 80 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 81 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 82 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 83 | ); 84 | name = Flutter; 85 | sourceTree = ""; 86 | }; 87 | 97C146E51CF9000F007C117D = { 88 | isa = PBXGroup; 89 | children = ( 90 | 9740EEB11CF90186004384FC /* Flutter */, 91 | 97C146F01CF9000F007C117D /* Runner */, 92 | 97C146EF1CF9000F007C117D /* Products */, 93 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, 94 | ); 95 | sourceTree = ""; 96 | }; 97 | 97C146EF1CF9000F007C117D /* Products */ = { 98 | isa = PBXGroup; 99 | children = ( 100 | 97C146EE1CF9000F007C117D /* Runner.app */, 101 | ); 102 | name = Products; 103 | sourceTree = ""; 104 | }; 105 | 97C146F01CF9000F007C117D /* Runner */ = { 106 | isa = PBXGroup; 107 | children = ( 108 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 109 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 110 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 111 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 112 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 113 | 97C147021CF9000F007C117D /* Info.plist */, 114 | 97C146F11CF9000F007C117D /* Supporting Files */, 115 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 116 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 117 | ); 118 | path = Runner; 119 | sourceTree = ""; 120 | }; 121 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 122 | isa = PBXGroup; 123 | children = ( 124 | 97C146F21CF9000F007C117D /* main.m */, 125 | ); 126 | name = "Supporting Files"; 127 | sourceTree = ""; 128 | }; 129 | /* End PBXGroup section */ 130 | 131 | /* Begin PBXNativeTarget section */ 132 | 97C146ED1CF9000F007C117D /* Runner */ = { 133 | isa = PBXNativeTarget; 134 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 135 | buildPhases = ( 136 | 9740EEB61CF901F6004384FC /* Run Script */, 137 | 97C146EA1CF9000F007C117D /* Sources */, 138 | 97C146EB1CF9000F007C117D /* Frameworks */, 139 | 97C146EC1CF9000F007C117D /* Resources */, 140 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 142 | ); 143 | buildRules = ( 144 | ); 145 | dependencies = ( 146 | ); 147 | name = Runner; 148 | productName = Runner; 149 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 150 | productType = "com.apple.product-type.application"; 151 | }; 152 | /* End PBXNativeTarget section */ 153 | 154 | /* Begin PBXProject section */ 155 | 97C146E61CF9000F007C117D /* Project object */ = { 156 | isa = PBXProject; 157 | attributes = { 158 | LastUpgradeCheck = 0910; 159 | ORGANIZATIONNAME = "The Chromium Authors"; 160 | TargetAttributes = { 161 | 97C146ED1CF9000F007C117D = { 162 | CreatedOnToolsVersion = 7.3.1; 163 | }; 164 | }; 165 | }; 166 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 167 | compatibilityVersion = "Xcode 3.2"; 168 | developmentRegion = English; 169 | hasScannedForEncodings = 0; 170 | knownRegions = ( 171 | en, 172 | Base, 173 | ); 174 | mainGroup = 97C146E51CF9000F007C117D; 175 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 176 | projectDirPath = ""; 177 | projectRoot = ""; 178 | targets = ( 179 | 97C146ED1CF9000F007C117D /* Runner */, 180 | ); 181 | }; 182 | /* End PBXProject section */ 183 | 184 | /* Begin PBXResourcesBuildPhase section */ 185 | 97C146EC1CF9000F007C117D /* Resources */ = { 186 | isa = PBXResourcesBuildPhase; 187 | buildActionMask = 2147483647; 188 | files = ( 189 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 190 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 191 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 192 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 193 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | }; 198 | /* End PBXResourcesBuildPhase section */ 199 | 200 | /* Begin PBXShellScriptBuildPhase section */ 201 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 202 | isa = PBXShellScriptBuildPhase; 203 | buildActionMask = 2147483647; 204 | files = ( 205 | ); 206 | inputPaths = ( 207 | ); 208 | name = "Thin Binary"; 209 | outputPaths = ( 210 | ); 211 | runOnlyForDeploymentPostprocessing = 0; 212 | shellPath = /bin/sh; 213 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 214 | }; 215 | 9740EEB61CF901F6004384FC /* Run Script */ = { 216 | isa = PBXShellScriptBuildPhase; 217 | buildActionMask = 2147483647; 218 | files = ( 219 | ); 220 | inputPaths = ( 221 | ); 222 | name = "Run Script"; 223 | outputPaths = ( 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | shellPath = /bin/sh; 227 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 228 | }; 229 | /* End PBXShellScriptBuildPhase section */ 230 | 231 | /* Begin PBXSourcesBuildPhase section */ 232 | 97C146EA1CF9000F007C117D /* Sources */ = { 233 | isa = PBXSourcesBuildPhase; 234 | buildActionMask = 2147483647; 235 | files = ( 236 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 237 | 97C146F31CF9000F007C117D /* main.m in Sources */, 238 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | }; 242 | /* End PBXSourcesBuildPhase section */ 243 | 244 | /* Begin PBXVariantGroup section */ 245 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 246 | isa = PBXVariantGroup; 247 | children = ( 248 | 97C146FB1CF9000F007C117D /* Base */, 249 | ); 250 | name = Main.storyboard; 251 | sourceTree = ""; 252 | }; 253 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 254 | isa = PBXVariantGroup; 255 | children = ( 256 | 97C147001CF9000F007C117D /* Base */, 257 | ); 258 | name = LaunchScreen.storyboard; 259 | sourceTree = ""; 260 | }; 261 | /* End PBXVariantGroup section */ 262 | 263 | /* Begin XCBuildConfiguration section */ 264 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 265 | isa = XCBuildConfiguration; 266 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 267 | buildSettings = { 268 | ALWAYS_SEARCH_USER_PATHS = NO; 269 | CLANG_ANALYZER_NONNULL = YES; 270 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 271 | CLANG_CXX_LIBRARY = "libc++"; 272 | CLANG_ENABLE_MODULES = YES; 273 | CLANG_ENABLE_OBJC_ARC = YES; 274 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 275 | CLANG_WARN_BOOL_CONVERSION = YES; 276 | CLANG_WARN_COMMA = YES; 277 | CLANG_WARN_CONSTANT_CONVERSION = YES; 278 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 279 | CLANG_WARN_EMPTY_BODY = YES; 280 | CLANG_WARN_ENUM_CONVERSION = YES; 281 | CLANG_WARN_INFINITE_RECURSION = YES; 282 | CLANG_WARN_INT_CONVERSION = YES; 283 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 284 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 285 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 286 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 287 | CLANG_WARN_STRICT_PROTOTYPES = YES; 288 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 289 | CLANG_WARN_UNREACHABLE_CODE = YES; 290 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 291 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 292 | COPY_PHASE_STRIP = NO; 293 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 294 | ENABLE_NS_ASSERTIONS = NO; 295 | ENABLE_STRICT_OBJC_MSGSEND = YES; 296 | GCC_C_LANGUAGE_STANDARD = gnu99; 297 | GCC_NO_COMMON_BLOCKS = YES; 298 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 299 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 300 | GCC_WARN_UNDECLARED_SELECTOR = YES; 301 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 302 | GCC_WARN_UNUSED_FUNCTION = YES; 303 | GCC_WARN_UNUSED_VARIABLE = YES; 304 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 305 | MTL_ENABLE_DEBUG_INFO = NO; 306 | SDKROOT = iphoneos; 307 | TARGETED_DEVICE_FAMILY = "1,2"; 308 | VALIDATE_PRODUCT = YES; 309 | }; 310 | name = Profile; 311 | }; 312 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 313 | isa = XCBuildConfiguration; 314 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 315 | buildSettings = { 316 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 317 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 318 | DEVELOPMENT_TEAM = S8QB4VV633; 319 | ENABLE_BITCODE = NO; 320 | FRAMEWORK_SEARCH_PATHS = ( 321 | "$(inherited)", 322 | "$(PROJECT_DIR)/Flutter", 323 | ); 324 | INFOPLIST_FILE = Runner/Info.plist; 325 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 326 | LIBRARY_SEARCH_PATHS = ( 327 | "$(inherited)", 328 | "$(PROJECT_DIR)/Flutter", 329 | ); 330 | PRODUCT_BUNDLE_IDENTIFIER = com.example.exemple; 331 | PRODUCT_NAME = "$(TARGET_NAME)"; 332 | VERSIONING_SYSTEM = "apple-generic"; 333 | }; 334 | name = Profile; 335 | }; 336 | 97C147031CF9000F007C117D /* Debug */ = { 337 | isa = XCBuildConfiguration; 338 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 339 | buildSettings = { 340 | ALWAYS_SEARCH_USER_PATHS = NO; 341 | CLANG_ANALYZER_NONNULL = YES; 342 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 343 | CLANG_CXX_LIBRARY = "libc++"; 344 | CLANG_ENABLE_MODULES = YES; 345 | CLANG_ENABLE_OBJC_ARC = YES; 346 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 347 | CLANG_WARN_BOOL_CONVERSION = YES; 348 | CLANG_WARN_COMMA = YES; 349 | CLANG_WARN_CONSTANT_CONVERSION = YES; 350 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 351 | CLANG_WARN_EMPTY_BODY = YES; 352 | CLANG_WARN_ENUM_CONVERSION = YES; 353 | CLANG_WARN_INFINITE_RECURSION = YES; 354 | CLANG_WARN_INT_CONVERSION = YES; 355 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 356 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 357 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 358 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 359 | CLANG_WARN_STRICT_PROTOTYPES = YES; 360 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 361 | CLANG_WARN_UNREACHABLE_CODE = YES; 362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 363 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 364 | COPY_PHASE_STRIP = NO; 365 | DEBUG_INFORMATION_FORMAT = dwarf; 366 | ENABLE_STRICT_OBJC_MSGSEND = YES; 367 | ENABLE_TESTABILITY = YES; 368 | GCC_C_LANGUAGE_STANDARD = gnu99; 369 | GCC_DYNAMIC_NO_PIC = NO; 370 | GCC_NO_COMMON_BLOCKS = YES; 371 | GCC_OPTIMIZATION_LEVEL = 0; 372 | GCC_PREPROCESSOR_DEFINITIONS = ( 373 | "DEBUG=1", 374 | "$(inherited)", 375 | ); 376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 378 | GCC_WARN_UNDECLARED_SELECTOR = YES; 379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 380 | GCC_WARN_UNUSED_FUNCTION = YES; 381 | GCC_WARN_UNUSED_VARIABLE = YES; 382 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 383 | MTL_ENABLE_DEBUG_INFO = YES; 384 | ONLY_ACTIVE_ARCH = YES; 385 | SDKROOT = iphoneos; 386 | TARGETED_DEVICE_FAMILY = "1,2"; 387 | }; 388 | name = Debug; 389 | }; 390 | 97C147041CF9000F007C117D /* Release */ = { 391 | isa = XCBuildConfiguration; 392 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 393 | buildSettings = { 394 | ALWAYS_SEARCH_USER_PATHS = NO; 395 | CLANG_ANALYZER_NONNULL = YES; 396 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 397 | CLANG_CXX_LIBRARY = "libc++"; 398 | CLANG_ENABLE_MODULES = YES; 399 | CLANG_ENABLE_OBJC_ARC = YES; 400 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 401 | CLANG_WARN_BOOL_CONVERSION = YES; 402 | CLANG_WARN_COMMA = YES; 403 | CLANG_WARN_CONSTANT_CONVERSION = YES; 404 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 405 | CLANG_WARN_EMPTY_BODY = YES; 406 | CLANG_WARN_ENUM_CONVERSION = YES; 407 | CLANG_WARN_INFINITE_RECURSION = YES; 408 | CLANG_WARN_INT_CONVERSION = YES; 409 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 410 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 412 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 413 | CLANG_WARN_STRICT_PROTOTYPES = YES; 414 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 415 | CLANG_WARN_UNREACHABLE_CODE = YES; 416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 418 | COPY_PHASE_STRIP = NO; 419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 420 | ENABLE_NS_ASSERTIONS = NO; 421 | ENABLE_STRICT_OBJC_MSGSEND = YES; 422 | GCC_C_LANGUAGE_STANDARD = gnu99; 423 | GCC_NO_COMMON_BLOCKS = YES; 424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 426 | GCC_WARN_UNDECLARED_SELECTOR = YES; 427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 428 | GCC_WARN_UNUSED_FUNCTION = YES; 429 | GCC_WARN_UNUSED_VARIABLE = YES; 430 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 431 | MTL_ENABLE_DEBUG_INFO = NO; 432 | SDKROOT = iphoneos; 433 | TARGETED_DEVICE_FAMILY = "1,2"; 434 | VALIDATE_PRODUCT = YES; 435 | }; 436 | name = Release; 437 | }; 438 | 97C147061CF9000F007C117D /* Debug */ = { 439 | isa = XCBuildConfiguration; 440 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 441 | buildSettings = { 442 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 443 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 444 | ENABLE_BITCODE = NO; 445 | FRAMEWORK_SEARCH_PATHS = ( 446 | "$(inherited)", 447 | "$(PROJECT_DIR)/Flutter", 448 | ); 449 | INFOPLIST_FILE = Runner/Info.plist; 450 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 451 | LIBRARY_SEARCH_PATHS = ( 452 | "$(inherited)", 453 | "$(PROJECT_DIR)/Flutter", 454 | ); 455 | PRODUCT_BUNDLE_IDENTIFIER = com.example.exemple; 456 | PRODUCT_NAME = "$(TARGET_NAME)"; 457 | VERSIONING_SYSTEM = "apple-generic"; 458 | }; 459 | name = Debug; 460 | }; 461 | 97C147071CF9000F007C117D /* Release */ = { 462 | isa = XCBuildConfiguration; 463 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 464 | buildSettings = { 465 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 466 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 467 | ENABLE_BITCODE = NO; 468 | FRAMEWORK_SEARCH_PATHS = ( 469 | "$(inherited)", 470 | "$(PROJECT_DIR)/Flutter", 471 | ); 472 | INFOPLIST_FILE = Runner/Info.plist; 473 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 474 | LIBRARY_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | PRODUCT_BUNDLE_IDENTIFIER = com.example.exemple; 479 | PRODUCT_NAME = "$(TARGET_NAME)"; 480 | VERSIONING_SYSTEM = "apple-generic"; 481 | }; 482 | name = Release; 483 | }; 484 | /* End XCBuildConfiguration section */ 485 | 486 | /* Begin XCConfigurationList section */ 487 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 488 | isa = XCConfigurationList; 489 | buildConfigurations = ( 490 | 97C147031CF9000F007C117D /* Debug */, 491 | 97C147041CF9000F007C117D /* Release */, 492 | 249021D3217E4FDB00AE95B9 /* Profile */, 493 | ); 494 | defaultConfigurationIsVisible = 0; 495 | defaultConfigurationName = Release; 496 | }; 497 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 498 | isa = XCConfigurationList; 499 | buildConfigurations = ( 500 | 97C147061CF9000F007C117D /* Debug */, 501 | 97C147071CF9000F007C117D /* Release */, 502 | 249021D4217E4FDB00AE95B9 /* Profile */, 503 | ); 504 | defaultConfigurationIsVisible = 0; 505 | defaultConfigurationName = Release; 506 | }; 507 | /* End XCConfigurationList section */ 508 | }; 509 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 510 | } 511 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 43 | 44 | 45 | 56 | 58 | 64 | 65 | 66 | 67 | 68 | 69 | 75 | 77 | 83 | 84 | 85 | 86 | 88 | 89 | 92 | 93 | 94 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/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 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | exemple 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/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_cielo/flutter_cielo.dart'; 3 | 4 | void main() => runApp(MyApp()); 5 | 6 | class MyApp extends StatelessWidget { 7 | // This widget is the root of your application. 8 | @override 9 | Widget build(BuildContext context) { 10 | return MaterialApp( 11 | title: 'Flutter Demo', 12 | theme: ThemeData( 13 | primarySwatch: Colors.blue, 14 | ), 15 | home: MyHomePage(title: 'Flutter Demo Home Page'), 16 | ); 17 | } 18 | } 19 | 20 | class MyHomePage extends StatefulWidget { 21 | MyHomePage({Key key, this.title}) : super(key: key); 22 | 23 | final String title; 24 | 25 | @override 26 | _MyHomePageState createState() => _MyHomePageState(); 27 | } 28 | 29 | class _MyHomePageState extends State { 30 | int _counter = 0; 31 | 32 | final CieloEcommerce cielo = CieloEcommerce( 33 | environment: Environment.SANDBOX, 34 | merchant: Merchant( 35 | merchantId: "933fc4e5-ddfd-4cba-a6de-4c07232d73c6", 36 | merchantKey: "KDRTLNYFNKMXHBSAVREHOZHBHWSWWYIXWWNQWRCN", 37 | )); 38 | 39 | _incrementCounter() async { 40 | // print("Iniciando pagamento...."); 41 | // Sale sale = Sale( 42 | // merchantOrderId: "123", 43 | // customer: Customer( 44 | // name: "Comprador crédito simples" 45 | // ), 46 | // payment: Payment( 47 | // type: TypePayment.creditCard, 48 | // amount: 7777, 49 | // installments: 1, 50 | // softDescriptor: "Pagame", 51 | // creditCard: CreditCard( 52 | // cardNumber: "1234123412341231", 53 | // holder: "Teste Holder", 54 | // expirationDate: "12/2030", 55 | // securityCode: "123", 56 | // brand: "Visa", 57 | // ) 58 | // ) 59 | // ); 60 | 61 | // try{ 62 | // var response = await cielo.createSale(sale); 63 | // print(response.payment.paymentId); 64 | 65 | // } on CieloException catch(e){ 66 | // print(e.message); 67 | // print(e.errors[0].message); 68 | // print(e.errors[0].code); 69 | // } 70 | 71 | 72 | print("Iniciando pagamento tokenizado...."); 73 | Sale sale = Sale( 74 | merchantOrderId: "123", 75 | customer: Customer( 76 | name: "Comprador crédito simples" 77 | ), 78 | payment: Payment( 79 | type: TypePayment.creditCard, 80 | amount: 7777, 81 | installments: 1, 82 | softDescriptor: "Pagame", 83 | creditCard: CreditCard( 84 | cardToken: "302c35e9-be30-487c-9c09-44ad0746e4b5", 85 | securityCode: "123", 86 | brand: "Visa", 87 | ) 88 | ) 89 | ); 90 | 91 | try{ 92 | var response = await cielo.createSale(sale); 93 | print(response.payment.paymentId); 94 | 95 | } on CieloException catch(e){ 96 | print(e.message); 97 | print(e.errors[0].message); 98 | print(e.errors[0].code); 99 | } 100 | 101 | // print("Tokenizando cartão...."); 102 | 103 | // CreditCard cart = CreditCard( 104 | // customerName: "Comprador Teste Cielo", 105 | // cardNumber: "1234123412341231", 106 | // securityCode: "123", 107 | // holder: "SARA M M F", 108 | // expirationDate: "10/2026", 109 | // brand: "Visa", 110 | // ); 111 | // try { 112 | // var response = await cielo.tokenizeCard(cart); 113 | // print(response.cardToken); 114 | // print(response.cardNumber); 115 | // } catch (e) { 116 | // print(e.message); 117 | // print(e.errors[0].message); 118 | // print(e.errors[0].code); 119 | // } 120 | 121 | 122 | } 123 | 124 | @override 125 | Widget build(BuildContext context) { 126 | // This method is rerun every time setState is called, for instance as done 127 | // by the _incrementCounter method above. 128 | // 129 | // The Flutter framework has been optimized to make rerunning build methods 130 | // fast, so that you can just rebuild anything that needs updating rather 131 | // than having to individually change instances of widgets. 132 | return Scaffold( 133 | appBar: AppBar( 134 | // Here we take the value from the MyHomePage object that was created by 135 | // the App.build method, and use it to set our appbar title. 136 | title: Text(widget.title), 137 | ), 138 | body: Center( 139 | // Center is a layout widget. It takes a single child and positions it 140 | // in the middle of the parent. 141 | child: Column( 142 | // Column is also layout widget. It takes a list of children and 143 | // arranges them vertically. By default, it sizes itself to fit its 144 | // children horizontally, and tries to be as tall as its parent. 145 | // 146 | // Invoke "debug painting" (press "p" in the console, choose the 147 | // "Toggle Debug Paint" action from the Flutter Inspector in Android 148 | // Studio, or the "Toggle Debug Paint" command in Visual Studio Code) 149 | // to see the wireframe for each widget. 150 | // 151 | // Column has various properties to control how it sizes itself and 152 | // how it positions its children. Here we use mainAxisAlignment to 153 | // center the children vertically; the main axis here is the vertical 154 | // axis because Columns are vertical (the cross axis would be 155 | // horizontal). 156 | mainAxisAlignment: MainAxisAlignment.center, 157 | children: [ 158 | Text( 159 | 'You have pushed the button this many times:', 160 | ), 161 | Text( 162 | '$_counter', 163 | style: Theme.of(context).textTheme.display1, 164 | ), 165 | ], 166 | ), 167 | ), 168 | floatingActionButton: FloatingActionButton( 169 | onPressed: _incrementCounter, 170 | tooltip: 'Increment', 171 | child: Icon(Icons.add), 172 | ), // This trailing comma makes auto-formatting nicer for build methods. 173 | ); 174 | } 175 | } 176 | -------------------------------------------------------------------------------- /example/lib/view/CieloCheckout.dart: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jacobaraujo7/flutter-cielo/52f48479c10084196ae7f799263c5a025359eb1a/example/lib/view/CieloCheckout.dart -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # Read more about versioning at semver.org. 10 | version: 1.0.0+1 11 | 12 | environment: 13 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 14 | 15 | dependencies: 16 | flutter: 17 | sdk: flutter 18 | 19 | # The following adds the Cupertino Icons font to your application. 20 | # Use with the CupertinoIcons class for iOS style icons. 21 | cupertino_icons: ^0.1.2 22 | flutter_cielo: 23 | path: ../../cieloecommerce 24 | 25 | dev_dependencies: 26 | flutter_test: 27 | sdk: flutter 28 | 29 | 30 | # For information on the generic Dart part of this file, see the 31 | # following page: https://www.dartlang.org/tools/pub/pubspec 32 | 33 | # The following section is specific to Flutter. 34 | flutter: 35 | 36 | # The following line ensures that the Material Icons font is 37 | # included with your application, so that you can use the icons in 38 | # the material Icons class. 39 | uses-material-design: true 40 | 41 | # To add assets to your application, add an assets section, like this: 42 | # assets: 43 | # - images/a_dot_burr.jpeg 44 | # - images/a_dot_ham.jpeg 45 | 46 | # An image asset can refer to one or more resolution-specific "variants", see 47 | # https://flutter.io/assets-and-images/#resolution-aware. 48 | 49 | # For details regarding adding assets from package dependencies, see 50 | # https://flutter.io/assets-and-images/#from-packages 51 | 52 | # To add custom fonts to your application, add a fonts section here, 53 | # in this "flutter" section. Each entry in this list should have a 54 | # "family" key with the font family name, and a "fonts" key with a 55 | # list giving the asset and other descriptors for the font. For 56 | # example: 57 | # fonts: 58 | # - family: Schyler 59 | # fonts: 60 | # - asset: fonts/Schyler-Regular.ttf 61 | # - asset: fonts/Schyler-Italic.ttf 62 | # style: italic 63 | # - family: Trajan Pro 64 | # fonts: 65 | # - asset: fonts/TrajanPro.ttf 66 | # - asset: fonts/TrajanPro_Bold.ttf 67 | # weight: 700 68 | # 69 | # For details regarding fonts from package dependencies, 70 | # see https://flutter.io/custom-fonts/#from-packages 71 | -------------------------------------------------------------------------------- /lib/flutter_cielo.dart: -------------------------------------------------------------------------------- 1 | library flutter_cielo; 2 | 3 | export 'src/cielo_ecommerce.dart'; 4 | export 'src/Address.dart'; 5 | export 'src/CreditCard.dart'; 6 | export 'src/Customer.dart'; 7 | export 'src/Environment.dart'; 8 | export 'src/Link.dart'; 9 | export 'src/Merchant.dart'; 10 | export 'src/Payment.dart'; 11 | export 'src/Sale.dart'; 12 | export 'src/CieloError.dart'; 13 | export 'src/CieloException.dart'; 14 | -------------------------------------------------------------------------------- /lib/src/Address.dart: -------------------------------------------------------------------------------- 1 | part 'Address.g.dart'; 2 | 3 | class Address { 4 | String street; 5 | String number; 6 | String complement; 7 | String zipCode; 8 | String district; 9 | String city; 10 | String state; 11 | String country; 12 | 13 | Address({ 14 | this.street, 15 | this.number, 16 | this.complement, 17 | this.zipCode, 18 | this.district, 19 | this.city, 20 | this.state, 21 | this.country, 22 | }); 23 | 24 | factory Address.fromJson(Map json) => 25 | _$AddressFromJson(json); 26 | Map toJson() => _$AddressToJson(this); 27 | } 28 | -------------------------------------------------------------------------------- /lib/src/Address.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'Address.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Address _$AddressFromJson(Map json) { 10 | return Address( 11 | street: json['Street'] as String, 12 | number: json['Number'] as String, 13 | complement: json['Complement'] as String, 14 | zipCode: json['ZipCode'] as String, 15 | district: json['District'] as String, 16 | city: json['City'] as String, 17 | state: json['State'] as String, 18 | country: json['Country'] as String); 19 | } 20 | 21 | Map _$AddressToJson(Address instance) => { 22 | 'Street': instance.street, 23 | 'Number': instance.number, 24 | 'Complement': instance.complement, 25 | 'ZipCode': instance.zipCode, 26 | 'District': instance.district, 27 | 'City': instance.city, 28 | 'State': instance.state, 29 | 'Country': instance.country 30 | }; 31 | -------------------------------------------------------------------------------- /lib/src/CieloError.dart: -------------------------------------------------------------------------------- 1 | class CieloError { 2 | int code; 3 | String message; 4 | 5 | CieloError({ 6 | this.code, 7 | this.message, 8 | }); 9 | 10 | factory CieloError.fromJson(Map json) { 11 | return CieloError( 12 | code: json['Code'] as int, message: json['Message'] as String); 13 | } 14 | 15 | Map toJson(CieloError instance) => { 16 | 'Code': instance.code, 17 | 'Message': instance.message, 18 | }; 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/CieloException.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_cielo/src/CieloError.dart'; 2 | 3 | class CieloException implements Exception { 4 | final List errors; 5 | final String message; 6 | 7 | CieloException(this.errors, this.message); 8 | } 9 | -------------------------------------------------------------------------------- /lib/src/CreditCard.dart: -------------------------------------------------------------------------------- 1 | // Generated by https://quicktype.io 2 | 3 | part 'CreditCard.g.dart'; 4 | 5 | class CreditCard { 6 | String cardNumber; 7 | String holder; 8 | String expirationDate; 9 | String securityCode; 10 | String brand; 11 | String cardToken; 12 | String customerName; 13 | 14 | CreditCard({ 15 | this.cardNumber, 16 | this.holder, 17 | this.expirationDate, 18 | this.securityCode, 19 | this.brand, 20 | this.cardToken, 21 | this.customerName, 22 | }); 23 | 24 | factory CreditCard.token( 25 | {String cardToken, String securityCode, String brand}) { 26 | return CreditCard( 27 | cardToken: cardToken, securityCode: securityCode, brand: brand); 28 | } 29 | 30 | factory CreditCard.fromJson(Map json) => 31 | _$CreditCardFromJson(json); 32 | Map toJson() => _$CreditCardToJson(this); 33 | } 34 | -------------------------------------------------------------------------------- /lib/src/CreditCard.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'CreditCard.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | CreditCard _$CreditCardFromJson(Map json) { 10 | return CreditCard( 11 | cardNumber: json['CardNumber'] as String, 12 | holder: json['Holder'] as String, 13 | expirationDate: json['ExpirationDate'] as String, 14 | securityCode: json['SecurityCode'] as String, 15 | brand: json['Brand'] as String, 16 | customerName: json['CustomerName'] as String, 17 | cardToken: json['CardToken'] as String); 18 | } 19 | 20 | Map _$CreditCardToJson(CreditCard instance) => 21 | { 22 | 'CardNumber': instance.cardNumber, 23 | 'Holder': instance.holder, 24 | 'ExpirationDate': instance.expirationDate, 25 | 'SecurityCode': instance.securityCode, 26 | 'Brand': instance.brand, 27 | 'CustomerName': instance.customerName, 28 | 'CardToken': instance.cardToken 29 | }; 30 | -------------------------------------------------------------------------------- /lib/src/Customer.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_cielo/src/Address.dart'; 2 | 3 | part 'Customer.g.dart'; 4 | 5 | class Customer { 6 | String name; 7 | String identity; 8 | Address address; 9 | 10 | Customer({ 11 | this.name, 12 | this.identity, 13 | this.address, 14 | }); 15 | 16 | factory Customer.fromJson(Map json) => 17 | _$CustomerFromJson(json); 18 | Map toJson() => _$CustomerToJson(this); 19 | } 20 | -------------------------------------------------------------------------------- /lib/src/Customer.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'Customer.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Customer _$CustomerFromJson(Map json) { 10 | return Customer( 11 | name: json['Name'] as String, 12 | identity: json['Identity'] as String, 13 | address: json['Address'] == null 14 | ? null 15 | : Address.fromJson(json['Address'] as Map)); 16 | } 17 | 18 | Map _$CustomerToJson(Customer instance) => { 19 | 'Name': instance.name, 20 | 'Identity': instance.identity, 21 | 'Address': instance.address 22 | }; 23 | -------------------------------------------------------------------------------- /lib/src/Environment.dart: -------------------------------------------------------------------------------- 1 | class Environment { 2 | static Environment get PRODUCTION => const Environment( 3 | apiUrl: "https://api.cieloecommerce.cielo.com.br", 4 | apiQueryUrl: "https://apiquery.cieloecommerce.cielo.com.br"); 5 | static Environment get SANDBOX => const Environment( 6 | apiUrl: "https://apisandbox.cieloecommerce.cielo.com.br", 7 | apiQueryUrl: "https://apiquerysandbox.cieloecommerce.cielo.com.br"); 8 | 9 | final String apiUrl; 10 | final String apiQueryUrl; 11 | 12 | const Environment({this.apiUrl, this.apiQueryUrl}); 13 | } 14 | -------------------------------------------------------------------------------- /lib/src/Link.dart: -------------------------------------------------------------------------------- 1 | part 'Link.g.dart'; 2 | 3 | class Link { 4 | String method; 5 | String rel; 6 | String href; 7 | 8 | Link({ 9 | this.method, 10 | this.rel, 11 | this.href, 12 | }); 13 | 14 | factory Link.fromJson(Map json) => _$LinkFromJson(json); 15 | Map toJson() => _$LinkToJson(this); 16 | } 17 | -------------------------------------------------------------------------------- /lib/src/Link.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'Link.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Link _$LinkFromJson(Map json) { 10 | return Link( 11 | method: json['Method'] as String, 12 | rel: json['Eel'] as String, 13 | href: json['Href'] as String); 14 | } 15 | 16 | Map _$LinkToJson(Link instance) => { 17 | 'Method': instance.method, 18 | 'Rel': instance.rel, 19 | 'Href': instance.href 20 | }; 21 | -------------------------------------------------------------------------------- /lib/src/Merchant.dart: -------------------------------------------------------------------------------- 1 | class Merchant { 2 | final String merchantId; 3 | final String merchantKey; 4 | 5 | Merchant({this.merchantId, this.merchantKey}); 6 | } 7 | -------------------------------------------------------------------------------- /lib/src/Payment.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_cielo/src/CreditCard.dart'; 2 | import 'package:flutter_cielo/src/Link.dart'; 3 | 4 | part 'Payment.g.dart'; 5 | 6 | class Payment { 7 | String type; 8 | int amount; 9 | int installments; 10 | String provider; 11 | String address; 12 | String boletoNumber; 13 | String assignor; 14 | String demonstrative; 15 | String expirationDate; 16 | String identification; 17 | String instructions; 18 | String softDescriptor; 19 | CreditCard creditCard; 20 | 21 | String url; 22 | String number; 23 | String barCodeNumber; 24 | String digitableLine; 25 | String paymentId; 26 | String currency; 27 | String country; 28 | List extraDataCollection; 29 | int status; 30 | List links; 31 | 32 | int serviceTaxAmount; 33 | dynamic interest; 34 | bool capture; 35 | bool authenticate; 36 | String proofOfSale; 37 | String tid; 38 | String authorizationCode; 39 | String returnCode; 40 | String returnMessage; 41 | 42 | Payment({ 43 | this.type, 44 | this.amount, 45 | this.provider, 46 | this.address, 47 | this.boletoNumber, 48 | this.assignor, 49 | this.demonstrative, 50 | this.expirationDate, 51 | this.identification, 52 | this.instructions, 53 | this.installments, 54 | this.softDescriptor, 55 | this.creditCard, 56 | this.url, 57 | this.number, 58 | this.barCodeNumber, 59 | this.digitableLine, 60 | this.paymentId, 61 | this.currency, 62 | this.country, 63 | this.extraDataCollection, 64 | this.status, 65 | this.links, 66 | this.serviceTaxAmount, 67 | this.interest, 68 | this.capture, 69 | this.authenticate, 70 | this.proofOfSale, 71 | this.tid, 72 | this.authorizationCode, 73 | this.returnCode, 74 | this.returnMessage, 75 | }); 76 | 77 | factory Payment.fromJson(Map json) => 78 | _$PaymentFromJson(json); 79 | Map toJson() => _$PaymentToJson(this); 80 | } 81 | 82 | class TypePayment { 83 | static String get creditCard => 'CreditCard'; 84 | static String get boleto => 'Boleto'; 85 | } -------------------------------------------------------------------------------- /lib/src/Payment.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'Payment.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Payment _$PaymentFromJson(Map json) { 10 | return Payment( 11 | type: json['Type'] as String, 12 | amount: json['Amount'] as int, 13 | provider: json['Provider'] as String, 14 | address: json['Address'] as String, 15 | boletoNumber: json['BoletoNumber'] as String, 16 | assignor: json['Assignor'] as String, 17 | demonstrative: json['Demonstrative'] as String, 18 | expirationDate: json['ExpirationDate'] as String, 19 | identification: json['Identification'] as String, 20 | instructions: json['Instructions'] as String, 21 | installments: json['Installments'] as int, 22 | softDescriptor: json['SoftDescriptor'] as String, 23 | creditCard: json['CreditCard'] == null 24 | ? null 25 | : CreditCard.fromJson(json['CreditCard'] as Map), 26 | url: json['Url'] as String, 27 | number: json['Number'] as String, 28 | barCodeNumber: json['BarCodeNumber'] as String, 29 | digitableLine: json['DigitableLine'] as String, 30 | paymentId: json['PaymentId'] as String, 31 | currency: json['Currency'] as String, 32 | country: json['Country'] as String, 33 | extraDataCollection: json['ExtraDataCollection'] as List, 34 | status: json['Status'] as int, 35 | links: (json['Links'] as List) 36 | ?.map((e) => 37 | e == null ? null : Link.fromJson(e as Map)) 38 | ?.toList(), 39 | serviceTaxAmount: json['ServiceTaxAmount'] as int, 40 | interest: json['Interest'], 41 | capture: json['Capture'] as bool, 42 | authenticate: json['Authenticate'] as bool, 43 | proofOfSale: json['ProofOfSale'] as String, 44 | tid: json['Tid'] as String, 45 | authorizationCode: json['AuthorizationCode'] as String, 46 | returnCode: json['ReturnCode'] as String, 47 | returnMessage: json['ReturnMessage'] as String); 48 | } 49 | 50 | Map _$PaymentToJson(Payment instance) => { 51 | 'Type': instance.type, 52 | 'Amount': instance.amount, 53 | 'Installments': instance.installments, 54 | 'Provider': instance.provider, 55 | 'Address': instance.address, 56 | 'BoletoNumber': instance.boletoNumber, 57 | 'Assignor': instance.assignor, 58 | 'Demonstrative': instance.demonstrative, 59 | 'ExpirationDate': instance.expirationDate, 60 | 'Identification': instance.identification, 61 | 'Instructions': instance.instructions, 62 | 'SoftDescriptor': instance.softDescriptor, 63 | 'CreditCard': instance.creditCard, 64 | 'Url': instance.url, 65 | 'Number': instance.number, 66 | 'BarCodeNumber': instance.barCodeNumber, 67 | 'DigitableLine': instance.digitableLine, 68 | 'PaymentId': instance.paymentId, 69 | 'Currency': instance.currency, 70 | 'Country': instance.country, 71 | 'ExtraDataCollection': instance.extraDataCollection, 72 | 'Status': instance.status, 73 | 'Links': instance.links, 74 | 'ServiceTaxAmount': instance.serviceTaxAmount, 75 | 'Interest': instance.interest, 76 | 'Capture': instance.capture, 77 | 'Authenticate': instance.authenticate, 78 | 'ProofOfSale': instance.proofOfSale, 79 | 'Tid': instance.tid, 80 | 'AuthorizationCode': instance.authorizationCode, 81 | 'ReturnCode': instance.returnCode, 82 | 'ReturnMessage': instance.returnMessage 83 | }; 84 | -------------------------------------------------------------------------------- /lib/src/Sale.dart: -------------------------------------------------------------------------------- 1 | // Generated by https://quicktype.io 2 | 3 | import 'package:flutter_cielo/src/Customer.dart'; 4 | import 'package:flutter_cielo/src/Payment.dart'; 5 | 6 | part 'Sale.g.dart'; 7 | 8 | class Sale { 9 | String merchantOrderId; 10 | Customer customer; 11 | Payment payment; 12 | 13 | Sale({ 14 | this.merchantOrderId, 15 | this.customer, 16 | this.payment, 17 | }) { 18 | if (this.customer == null) this.customer = Customer(); 19 | if (this.payment == null) this.payment = Payment(); 20 | } 21 | 22 | factory Sale.fromJson(Map json) => _$SaleFromJson(json); 23 | Map toJson() => _$SaleToJson(this); 24 | } 25 | -------------------------------------------------------------------------------- /lib/src/Sale.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'Sale.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Sale _$SaleFromJson(Map json) { 10 | return Sale( 11 | merchantOrderId: json['MerchantOrderId'] as String, 12 | customer: json['Customer'] == null 13 | ? null 14 | : Customer.fromJson(json['Customer'] as Map), 15 | payment: json['Payment'] == null 16 | ? null 17 | : Payment.fromJson(json['Payment'] as Map)); 18 | } 19 | 20 | Map _$SaleToJson(Sale instance) => { 21 | 'MerchantOrderId': instance.merchantOrderId, 22 | 'Customer': instance.customer, 23 | 'Payment': instance.payment 24 | }; 25 | -------------------------------------------------------------------------------- /lib/src/cielo_ecommerce.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_cielo/src/CieloError.dart'; 2 | import 'package:flutter_cielo/src/CieloException.dart'; 3 | import 'package:flutter_cielo/src/CreditCard.dart'; 4 | import 'package:flutter_cielo/src/Environment.dart'; 5 | import 'package:flutter_cielo/src/Merchant.dart'; 6 | import 'package:flutter_cielo/src/Sale.dart'; 7 | import 'package:dio/dio.dart'; 8 | 9 | class CieloEcommerce { 10 | final Environment environment; 11 | final Merchant merchant; 12 | Dio dio; 13 | 14 | CieloEcommerce({this.environment, this.merchant}) { 15 | dio = Dio(BaseOptions(headers: { 16 | "MerchantId": this.merchant.merchantId, 17 | "MerchantKey": this.merchant.merchantKey 18 | })); 19 | } 20 | 21 | Future createSale(Sale sale) async { 22 | try { 23 | Response response = 24 | await dio.post("${environment.apiUrl}/1/sales/", data: sale.toJson()); 25 | return Sale.fromJson(response.data); 26 | } on DioError catch (e) { 27 | _getErrorDio(e); 28 | } catch (e) { 29 | throw CieloException( 30 | List() 31 | ..add(CieloError( 32 | code: 0, 33 | message: e.message, 34 | )), 35 | "unknown"); 36 | } 37 | return null; 38 | } 39 | 40 | Future tokenizeCard(CreditCard card) async { 41 | try { 42 | Response response = 43 | await dio.post("${environment.apiUrl}/1/card/", data: card.toJson()); 44 | card.cardToken = response.data["CardToken"]; 45 | card.cardNumber = "****"+card.cardNumber.substring(card.cardNumber.length - 4); 46 | return card; 47 | } on DioError catch (e) { 48 | _getErrorDio(e); 49 | } catch (e) { 50 | throw CieloException( 51 | List() 52 | ..add(CieloError( 53 | code: 0, 54 | message: e.message, 55 | )), 56 | "unknown"); 57 | } 58 | return null; 59 | } 60 | 61 | _getErrorDio(DioError e) { 62 | if (e?.response != null) { 63 | List errors = 64 | (e.response.data as List).map((i) => CieloError.fromJson(i)).toList(); 65 | throw CieloException(errors, e.message); 66 | } else { 67 | throw CieloException( 68 | List()..add(CieloError(code: 0, message: "unknown")), 69 | e.message); 70 | } 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://www.dartlang.org/tools/pub/glossary#lockfile 3 | packages: 4 | analyzer: 5 | dependency: transitive 6 | description: 7 | name: analyzer 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "0.34.3" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.5.1" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.0.8" 25 | build: 26 | dependency: transitive 27 | description: 28 | name: build 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.1.0" 32 | build_config: 33 | dependency: transitive 34 | description: 35 | name: build_config 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "0.3.1+4" 39 | build_resolvers: 40 | dependency: transitive 41 | description: 42 | name: build_resolvers 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "0.2.3" 46 | build_runner: 47 | dependency: "direct dev" 48 | description: 49 | name: build_runner 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.1.3" 53 | build_runner_core: 54 | dependency: transitive 55 | description: 56 | name: build_runner_core 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.1.3" 60 | built_collection: 61 | dependency: transitive 62 | description: 63 | name: built_collection 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "4.1.0" 67 | built_value: 68 | dependency: transitive 69 | description: 70 | name: built_value 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "6.3.0" 74 | charcode: 75 | dependency: transitive 76 | description: 77 | name: charcode 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.1.2" 81 | code_builder: 82 | dependency: transitive 83 | description: 84 | name: code_builder 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "3.2.0" 88 | collection: 89 | dependency: transitive 90 | description: 91 | name: collection 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "1.14.11" 95 | convert: 96 | dependency: transitive 97 | description: 98 | name: convert 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "2.1.1" 102 | cookie_jar: 103 | dependency: transitive 104 | description: 105 | name: cookie_jar 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "0.0.7" 109 | crypto: 110 | dependency: transitive 111 | description: 112 | name: crypto 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "2.0.6" 116 | csslib: 117 | dependency: transitive 118 | description: 119 | name: csslib 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "0.14.6" 123 | dart_style: 124 | dependency: transitive 125 | description: 126 | name: dart_style 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.2.3" 130 | dio: 131 | dependency: "direct main" 132 | description: 133 | name: dio 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "2.0.0" 137 | fixnum: 138 | dependency: transitive 139 | description: 140 | name: fixnum 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "0.10.9" 144 | flutter: 145 | dependency: "direct main" 146 | description: flutter 147 | source: sdk 148 | version: "0.0.0" 149 | front_end: 150 | dependency: transitive 151 | description: 152 | name: front_end 153 | url: "https://pub.dartlang.org" 154 | source: hosted 155 | version: "0.1.9+1" 156 | glob: 157 | dependency: transitive 158 | description: 159 | name: glob 160 | url: "https://pub.dartlang.org" 161 | source: hosted 162 | version: "1.1.7" 163 | graphs: 164 | dependency: transitive 165 | description: 166 | name: graphs 167 | url: "https://pub.dartlang.org" 168 | source: hosted 169 | version: "0.2.0" 170 | html: 171 | dependency: transitive 172 | description: 173 | name: html 174 | url: "https://pub.dartlang.org" 175 | source: hosted 176 | version: "0.13.3+3" 177 | http_multi_server: 178 | dependency: transitive 179 | description: 180 | name: http_multi_server 181 | url: "https://pub.dartlang.org" 182 | source: hosted 183 | version: "2.0.5" 184 | http_parser: 185 | dependency: transitive 186 | description: 187 | name: http_parser 188 | url: "https://pub.dartlang.org" 189 | source: hosted 190 | version: "3.1.3" 191 | io: 192 | dependency: transitive 193 | description: 194 | name: io 195 | url: "https://pub.dartlang.org" 196 | source: hosted 197 | version: "0.3.3" 198 | js: 199 | dependency: transitive 200 | description: 201 | name: js 202 | url: "https://pub.dartlang.org" 203 | source: hosted 204 | version: "0.6.1+1" 205 | json_annotation: 206 | dependency: transitive 207 | description: 208 | name: json_annotation 209 | url: "https://pub.dartlang.org" 210 | source: hosted 211 | version: "2.0.0" 212 | json_serializable: 213 | dependency: "direct dev" 214 | description: 215 | name: json_serializable 216 | url: "https://pub.dartlang.org" 217 | source: hosted 218 | version: "2.0.2" 219 | kernel: 220 | dependency: transitive 221 | description: 222 | name: kernel 223 | url: "https://pub.dartlang.org" 224 | source: hosted 225 | version: "0.3.9+1" 226 | logging: 227 | dependency: transitive 228 | description: 229 | name: logging 230 | url: "https://pub.dartlang.org" 231 | source: hosted 232 | version: "0.11.3+2" 233 | matcher: 234 | dependency: transitive 235 | description: 236 | name: matcher 237 | url: "https://pub.dartlang.org" 238 | source: hosted 239 | version: "0.12.4" 240 | meta: 241 | dependency: transitive 242 | description: 243 | name: meta 244 | url: "https://pub.dartlang.org" 245 | source: hosted 246 | version: "1.1.6" 247 | mime: 248 | dependency: transitive 249 | description: 250 | name: mime 251 | url: "https://pub.dartlang.org" 252 | source: hosted 253 | version: "0.9.6+2" 254 | package_config: 255 | dependency: transitive 256 | description: 257 | name: package_config 258 | url: "https://pub.dartlang.org" 259 | source: hosted 260 | version: "1.0.5" 261 | path: 262 | dependency: transitive 263 | description: 264 | name: path 265 | url: "https://pub.dartlang.org" 266 | source: hosted 267 | version: "1.6.2" 268 | pedantic: 269 | dependency: transitive 270 | description: 271 | name: pedantic 272 | url: "https://pub.dartlang.org" 273 | source: hosted 274 | version: "1.4.0" 275 | plugin: 276 | dependency: transitive 277 | description: 278 | name: plugin 279 | url: "https://pub.dartlang.org" 280 | source: hosted 281 | version: "0.2.0+3" 282 | pool: 283 | dependency: transitive 284 | description: 285 | name: pool 286 | url: "https://pub.dartlang.org" 287 | source: hosted 288 | version: "1.4.0" 289 | pub_semver: 290 | dependency: transitive 291 | description: 292 | name: pub_semver 293 | url: "https://pub.dartlang.org" 294 | source: hosted 295 | version: "1.4.2" 296 | pubspec_parse: 297 | dependency: transitive 298 | description: 299 | name: pubspec_parse 300 | url: "https://pub.dartlang.org" 301 | source: hosted 302 | version: "0.1.4" 303 | quiver: 304 | dependency: transitive 305 | description: 306 | name: quiver 307 | url: "https://pub.dartlang.org" 308 | source: hosted 309 | version: "2.0.1" 310 | shelf: 311 | dependency: transitive 312 | description: 313 | name: shelf 314 | url: "https://pub.dartlang.org" 315 | source: hosted 316 | version: "0.7.4" 317 | shelf_web_socket: 318 | dependency: transitive 319 | description: 320 | name: shelf_web_socket 321 | url: "https://pub.dartlang.org" 322 | source: hosted 323 | version: "0.2.2+4" 324 | sky_engine: 325 | dependency: transitive 326 | description: flutter 327 | source: sdk 328 | version: "0.0.99" 329 | source_gen: 330 | dependency: transitive 331 | description: 332 | name: source_gen 333 | url: "https://pub.dartlang.org" 334 | source: hosted 335 | version: "0.9.4+1" 336 | source_span: 337 | dependency: transitive 338 | description: 339 | name: source_span 340 | url: "https://pub.dartlang.org" 341 | source: hosted 342 | version: "1.5.4" 343 | stack_trace: 344 | dependency: transitive 345 | description: 346 | name: stack_trace 347 | url: "https://pub.dartlang.org" 348 | source: hosted 349 | version: "1.9.3" 350 | stream_channel: 351 | dependency: transitive 352 | description: 353 | name: stream_channel 354 | url: "https://pub.dartlang.org" 355 | source: hosted 356 | version: "1.6.8" 357 | stream_transform: 358 | dependency: transitive 359 | description: 360 | name: stream_transform 361 | url: "https://pub.dartlang.org" 362 | source: hosted 363 | version: "0.0.14+1" 364 | string_scanner: 365 | dependency: transitive 366 | description: 367 | name: string_scanner 368 | url: "https://pub.dartlang.org" 369 | source: hosted 370 | version: "1.0.4" 371 | term_glyph: 372 | dependency: transitive 373 | description: 374 | name: term_glyph 375 | url: "https://pub.dartlang.org" 376 | source: hosted 377 | version: "1.1.0" 378 | timing: 379 | dependency: transitive 380 | description: 381 | name: timing 382 | url: "https://pub.dartlang.org" 383 | source: hosted 384 | version: "0.1.1+1" 385 | typed_data: 386 | dependency: transitive 387 | description: 388 | name: typed_data 389 | url: "https://pub.dartlang.org" 390 | source: hosted 391 | version: "1.1.6" 392 | utf: 393 | dependency: transitive 394 | description: 395 | name: utf 396 | url: "https://pub.dartlang.org" 397 | source: hosted 398 | version: "0.9.0+5" 399 | vector_math: 400 | dependency: transitive 401 | description: 402 | name: vector_math 403 | url: "https://pub.dartlang.org" 404 | source: hosted 405 | version: "2.0.8" 406 | watcher: 407 | dependency: transitive 408 | description: 409 | name: watcher 410 | url: "https://pub.dartlang.org" 411 | source: hosted 412 | version: "0.9.7+10" 413 | web_socket_channel: 414 | dependency: transitive 415 | description: 416 | name: web_socket_channel 417 | url: "https://pub.dartlang.org" 418 | source: hosted 419 | version: "1.0.9" 420 | yaml: 421 | dependency: transitive 422 | description: 423 | name: yaml 424 | url: "https://pub.dartlang.org" 425 | source: hosted 426 | version: "2.1.15" 427 | sdks: 428 | dart: ">=2.1.0-dev.5.0 <3.0.0" 429 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_cielo 2 | description: Pacote para criar pagamentos usando o SDK da Cielo e-Commerce. Para mais informações acesse a documentação oficial da Cielo e-Commerce para desenvolvedores. 3 | version: 1.0.6 4 | author: Jacob Moura 5 | homepage: https://github.com/jacobaraujo7/flutter-cielo 6 | 7 | environment: 8 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 9 | 10 | dependencies: 11 | #json_annotation: ^2.0.0 12 | dio: ^2.0.0 13 | flutter: 14 | sdk: flutter 15 | 16 | dev_dependencies: 17 | build_runner: ^1.0.0 18 | json_serializable: ^2.0.0 19 | --------------------------------------------------------------------------------