├── .gitignore ├── .metadata ├── README.md ├── android ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── flutteresp32 │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── arduino └── Esp32Bluetooth │ └── Esp32Bluetooth.ino ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ └── contents.xcworkspacedata └── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── Icon-App-1024x1024@1x.png │ │ ├── Icon-App-20x20@1x.png │ │ ├── Icon-App-20x20@2x.png │ │ ├── Icon-App-20x20@3x.png │ │ ├── Icon-App-29x29@1x.png │ │ ├── Icon-App-29x29@2x.png │ │ ├── Icon-App-29x29@3x.png │ │ ├── Icon-App-40x40@1x.png │ │ ├── Icon-App-40x40@2x.png │ │ ├── Icon-App-40x40@3x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-76x76@1x.png │ │ ├── Icon-App-76x76@2x.png │ │ └── Icon-App-83.5x83.5@2x.png │ └── LaunchImage.imageset │ │ ├── Contents.json │ │ ├── LaunchImage.png │ │ ├── LaunchImage@2x.png │ │ ├── LaunchImage@3x.png │ │ └── README.md │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h ├── lib ├── bluetooth.dart ├── bluetoothconnect.dart ├── main.dart └── settings.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | .dart_tool/ 26 | .flutter-plugins 27 | .packages 28 | .pub-cache/ 29 | .pub/ 30 | /build/ 31 | 32 | # Android related 33 | **/android/**/gradle-wrapper.jar 34 | **/android/.gradle 35 | **/android/captures/ 36 | **/android/gradlew 37 | **/android/gradlew.bat 38 | **/android/local.properties 39 | **/android/**/GeneratedPluginRegistrant.java 40 | 41 | # iOS/XCode related 42 | **/ios/**/*.mode1v3 43 | **/ios/**/*.mode2v3 44 | **/ios/**/*.moved-aside 45 | **/ios/**/*.pbxuser 46 | **/ios/**/*.perspectivev3 47 | **/ios/**/*sync/ 48 | **/ios/**/.sconsign.dblite 49 | **/ios/**/.tags* 50 | **/ios/**/.vagrant/ 51 | **/ios/**/DerivedData/ 52 | **/ios/**/Icon? 53 | **/ios/**/Pods/ 54 | **/ios/**/.symlinks/ 55 | **/ios/**/profile 56 | **/ios/**/xcuserdata 57 | **/ios/.generated/ 58 | **/ios/Flutter/App.framework 59 | **/ios/Flutter/Flutter.framework 60 | **/ios/Flutter/Generated.xcconfig 61 | **/ios/Flutter/app.flx 62 | **/ios/Flutter/app.zip 63 | **/ios/Flutter/flutter_assets/ 64 | **/ios/Flutter/flutter_export_environment.sh 65 | **/ios/ServiceDefinitions.json 66 | **/ios/Runner/GeneratedPluginRegistrant.* 67 | 68 | # Exceptions to above rules. 69 | !**/ios/**/default.mode1v3 70 | !**/ios/**/default.mode2v3 71 | !**/ios/**/default.pbxuser 72 | !**/ios/**/default.perspectivev3 73 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 74 | -------------------------------------------------------------------------------- /.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: cc949a8e8b9cf394b9290a8e80f87af3e207dce5 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter Esp32 Bluetooth Template 2 | 3 | Changes in android/ [1 if you take the code to an other project, 2 still nessesarely]: 4 | 5 | 1. Change minSdkVersion from 16 to 19 in android/app/build.gradle on line 42 6 | 2. Add implementation "androidx.core:core:1.1.0" to the Flutter_Blue Plugin in ~/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_blue-0.6.3+1/android/build.gradle on line 80 like described here: https://github.com/pauldemarco/flutter_blue/issues/402#issuecomment-548081305 7 | 8 | You need to give the location and change bluetooth connectivity permission to the app 9 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 28 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | lintOptions { 36 | disable 'InvalidPackage' 37 | } 38 | 39 | defaultConfig { 40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 41 | applicationId "com.example.flutteresp32" 42 | minSdkVersion 19 // 0x4d for flutter blue 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 47 | } 48 | 49 | buildTypes { 50 | release { 51 | // TODO: Add your own signing config for the release build. 52 | // Signing with the debug keys for now, so `flutter run --release` works. 53 | signingConfig signingConfigs.debug 54 | } 55 | } 56 | } 57 | 58 | flutter { 59 | source '../..' 60 | } 61 | 62 | dependencies { 63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 64 | testImplementation 'junit:junit:4.12' 65 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 66 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 67 | } 68 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/flutteresp32/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.flutteresp32 2 | 3 | import android.os.Bundle 4 | 5 | import io.flutter.app.FlutterActivity 6 | import io.flutter.plugins.GeneratedPluginRegistrant 7 | 8 | class MainActivity: FlutterActivity() { 9 | override fun onCreate(savedInstanceState: Bundle?) { 10 | super.onCreate(savedInstanceState) 11 | GeneratedPluginRegistrant.registerWith(this) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.2.71' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.2.1' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | 3 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /arduino/Esp32Bluetooth/Esp32Bluetooth.ino: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | // https://www.uuidgenerator.net/ 7 | 8 | #define DEVICENAME "ESP32" 9 | 10 | #define SEND "f2f9a4de-ef95-4fe1-9c2e-ab5ef6f0d6e9" 11 | #define SEND_INT "e376bd46-0d9a-44ab-bb71-c262d06f60c7" 12 | #define SEND_BOOL "5c409aab-50d4-42c2-bf57-430916e5eaf4" 13 | #define SEND_STRING "9e8fafe1-8966-4276-a3a3-d0b00269541e" 14 | 15 | #define RECIVE "1450dbb0-e48c-4495-ae90-5ff53327ede4" 16 | #define RECIVE_INT "ec693074-43fe-489d-b63b-94456f83beb5" 17 | #define RECIVE_BOOL "45db5a06-5481-49ee-a8e9-10b411d73de7" 18 | #define RECIVE_STRING "9393c756-78ea-4629-a53e-52fb10f9a63f" 19 | 20 | bool deviceConnected = false; 21 | 22 | String strToString(std::string str) { 23 | return str.c_str(); 24 | } 25 | 26 | int strToInt(std::string str) { 27 | const char* encoded = str.c_str(); 28 | return 256 * int(encoded[1]) + int(encoded[0]); 29 | } 30 | 31 | double intToDouble(int value, double max) { 32 | return (1.0 * value) / max; 33 | } 34 | 35 | bool intToBool(int value) { 36 | if (value == 0) { 37 | return false; 38 | } 39 | return true; 40 | } 41 | 42 | class ConnectionServerCallbacks: public BLEServerCallbacks { 43 | void onConnect(BLEServer* pServer) { 44 | deviceConnected = true; 45 | Serial.println("Connected"); 46 | }; 47 | 48 | void onDisconnect(BLEServer* pServer) { 49 | deviceConnected = false; 50 | Serial.println("Disconnected"); 51 | } 52 | }; 53 | 54 | class WriteString: public BLECharacteristicCallbacks { 55 | void onWrite(BLECharacteristic *pCharacteristic) { 56 | String str = strToString(pCharacteristic->getValue()); 57 | Serial.print("Recived String:"); 58 | Serial.println(str); 59 | } 60 | }; 61 | 62 | class WriteInt: public BLECharacteristicCallbacks { 63 | void onWrite(BLECharacteristic *pCharacteristic) { 64 | int rint = strToInt(pCharacteristic->getValue()); 65 | Serial.print("Recived Int:"); 66 | Serial.println(rint); 67 | } 68 | }; 69 | 70 | class WriteBool: public BLECharacteristicCallbacks { 71 | void onWrite(BLECharacteristic *pCharacteristic) { 72 | bool rbool = intToBool(strToInt(pCharacteristic->getValue())); 73 | Serial.print("Recived Bool:"); 74 | Serial.println(rbool ? "ON" : "OFF"); 75 | } 76 | }; 77 | 78 | BLECharacteristic *sSendInt; 79 | BLECharacteristic *sSendBool; 80 | BLECharacteristic *sSendString; 81 | 82 | void setup() { 83 | Serial.begin(115200); 84 | Serial.print("Device Name:"); 85 | Serial.println(DEVICENAME); 86 | 87 | BLEDevice::init(DEVICENAME); 88 | BLEServer *btServer = BLEDevice::createServer(); 89 | btServer->setCallbacks(new ConnectionServerCallbacks()); 90 | 91 | BLEService *sRecive = btServer->createService(RECIVE); 92 | uint32_t cwrite = BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE; 93 | 94 | BLECharacteristic *sReciveInt = sRecive->createCharacteristic(RECIVE_INT, cwrite); 95 | sReciveInt->setCallbacks(new WriteInt()); 96 | 97 | BLECharacteristic *sReciveBool = sRecive->createCharacteristic(RECIVE_BOOL, cwrite); 98 | sReciveBool->setCallbacks(new WriteBool()); 99 | 100 | BLECharacteristic *sReciveString = sRecive->createCharacteristic(RECIVE_STRING, cwrite); 101 | sReciveString->setCallbacks(new WriteString()); 102 | 103 | 104 | BLEService *sSend = btServer->createService(SEND); 105 | uint32_t cnotify = BLECharacteristic::PROPERTY_READ | BLECharacteristic::PROPERTY_WRITE | 106 | BLECharacteristic::PROPERTY_NOTIFY | BLECharacteristic::PROPERTY_INDICATE; 107 | 108 | sSendInt = sSend->createCharacteristic(SEND_INT, cnotify); 109 | sSendInt->addDescriptor(new BLE2902()); 110 | sSendInt->setValue("9000"); 111 | 112 | sSendBool = sSend->createCharacteristic(SEND_BOOL, cnotify); 113 | sSendBool->addDescriptor(new BLE2902()); 114 | sSendBool->setValue("0"); 115 | 116 | sSendString = sSend->createCharacteristic(SEND_STRING, cnotify); 117 | sSendString->addDescriptor(new BLE2902()); 118 | sSendString->setValue("Hi"); 119 | 120 | sRecive->start(); 121 | sSend->start(); 122 | 123 | BLEAdvertising *pAdvertising = btServer->getAdvertising(); 124 | pAdvertising->start(); 125 | } 126 | 127 | uint32_t value = 0; 128 | void loop() { 129 | delay(1000); 130 | if (deviceConnected) { 131 | sSendInt->setValue((uint8_t*)&value, 4); 132 | sSendInt->notify(); 133 | 134 | uint8_t vbool = (value % 2 == 0) ? 1 : 0; 135 | sSendBool->setValue((uint8_t*)&vbool, 1); 136 | sSendBool->notify(); 137 | 138 | sSendString->setValue("0x4d"); 139 | sSendString->notify(); 140 | 141 | value++; 142 | } 143 | } 144 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 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 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 19 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 20 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 21 | /* End PBXBuildFile section */ 22 | 23 | /* Begin PBXCopyFilesBuildPhase section */ 24 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 25 | isa = PBXCopyFilesBuildPhase; 26 | buildActionMask = 2147483647; 27 | dstPath = ""; 28 | dstSubfolderSpec = 10; 29 | files = ( 30 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 31 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 32 | ); 33 | name = "Embed Frameworks"; 34 | runOnlyForDeploymentPostprocessing = 0; 35 | }; 36 | /* End PBXCopyFilesBuildPhase section */ 37 | 38 | /* Begin PBXFileReference section */ 39 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 40 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 41 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 42 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 43 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 44 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 45 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 46 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 47 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 48 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 49 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 50 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 51 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 52 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 53 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 54 | /* End PBXFileReference section */ 55 | 56 | /* Begin PBXFrameworksBuildPhase section */ 57 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 58 | isa = PBXFrameworksBuildPhase; 59 | buildActionMask = 2147483647; 60 | files = ( 61 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 62 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 63 | ); 64 | runOnlyForDeploymentPostprocessing = 0; 65 | }; 66 | /* End PBXFrameworksBuildPhase section */ 67 | 68 | /* Begin PBXGroup section */ 69 | 9740EEB11CF90186004384FC /* Flutter */ = { 70 | isa = PBXGroup; 71 | children = ( 72 | 3B80C3931E831B6300D905FE /* App.framework */, 73 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 74 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 75 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 76 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 77 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 78 | ); 79 | name = Flutter; 80 | sourceTree = ""; 81 | }; 82 | 97C146E51CF9000F007C117D = { 83 | isa = PBXGroup; 84 | children = ( 85 | 9740EEB11CF90186004384FC /* Flutter */, 86 | 97C146F01CF9000F007C117D /* Runner */, 87 | 97C146EF1CF9000F007C117D /* Products */, 88 | ); 89 | sourceTree = ""; 90 | }; 91 | 97C146EF1CF9000F007C117D /* Products */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 97C146EE1CF9000F007C117D /* Runner.app */, 95 | ); 96 | name = Products; 97 | sourceTree = ""; 98 | }; 99 | 97C146F01CF9000F007C117D /* Runner */ = { 100 | isa = PBXGroup; 101 | children = ( 102 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 103 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 104 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 105 | 97C147021CF9000F007C117D /* Info.plist */, 106 | 97C146F11CF9000F007C117D /* Supporting Files */, 107 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 108 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 109 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 110 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 111 | ); 112 | path = Runner; 113 | sourceTree = ""; 114 | }; 115 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | ); 119 | name = "Supporting Files"; 120 | sourceTree = ""; 121 | }; 122 | /* End PBXGroup section */ 123 | 124 | /* Begin PBXNativeTarget section */ 125 | 97C146ED1CF9000F007C117D /* Runner */ = { 126 | isa = PBXNativeTarget; 127 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 128 | buildPhases = ( 129 | 9740EEB61CF901F6004384FC /* Run Script */, 130 | 97C146EA1CF9000F007C117D /* Sources */, 131 | 97C146EB1CF9000F007C117D /* Frameworks */, 132 | 97C146EC1CF9000F007C117D /* Resources */, 133 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 134 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 135 | ); 136 | buildRules = ( 137 | ); 138 | dependencies = ( 139 | ); 140 | name = Runner; 141 | productName = Runner; 142 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 143 | productType = "com.apple.product-type.application"; 144 | }; 145 | /* End PBXNativeTarget section */ 146 | 147 | /* Begin PBXProject section */ 148 | 97C146E61CF9000F007C117D /* Project object */ = { 149 | isa = PBXProject; 150 | attributes = { 151 | LastUpgradeCheck = 1020; 152 | ORGANIZATIONNAME = "The Chromium Authors"; 153 | TargetAttributes = { 154 | 97C146ED1CF9000F007C117D = { 155 | CreatedOnToolsVersion = 7.3.1; 156 | LastSwiftMigration = 0910; 157 | }; 158 | }; 159 | }; 160 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 161 | compatibilityVersion = "Xcode 3.2"; 162 | developmentRegion = en; 163 | hasScannedForEncodings = 0; 164 | knownRegions = ( 165 | en, 166 | Base, 167 | ); 168 | mainGroup = 97C146E51CF9000F007C117D; 169 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 170 | projectDirPath = ""; 171 | projectRoot = ""; 172 | targets = ( 173 | 97C146ED1CF9000F007C117D /* Runner */, 174 | ); 175 | }; 176 | /* End PBXProject section */ 177 | 178 | /* Begin PBXResourcesBuildPhase section */ 179 | 97C146EC1CF9000F007C117D /* Resources */ = { 180 | isa = PBXResourcesBuildPhase; 181 | buildActionMask = 2147483647; 182 | files = ( 183 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 184 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 185 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 186 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 187 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 188 | ); 189 | runOnlyForDeploymentPostprocessing = 0; 190 | }; 191 | /* End PBXResourcesBuildPhase section */ 192 | 193 | /* Begin PBXShellScriptBuildPhase section */ 194 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 195 | isa = PBXShellScriptBuildPhase; 196 | buildActionMask = 2147483647; 197 | files = ( 198 | ); 199 | inputPaths = ( 200 | ); 201 | name = "Thin Binary"; 202 | outputPaths = ( 203 | ); 204 | runOnlyForDeploymentPostprocessing = 0; 205 | shellPath = /bin/sh; 206 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 207 | }; 208 | 9740EEB61CF901F6004384FC /* Run Script */ = { 209 | isa = PBXShellScriptBuildPhase; 210 | buildActionMask = 2147483647; 211 | files = ( 212 | ); 213 | inputPaths = ( 214 | ); 215 | name = "Run Script"; 216 | outputPaths = ( 217 | ); 218 | runOnlyForDeploymentPostprocessing = 0; 219 | shellPath = /bin/sh; 220 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 221 | }; 222 | /* End PBXShellScriptBuildPhase section */ 223 | 224 | /* Begin PBXSourcesBuildPhase section */ 225 | 97C146EA1CF9000F007C117D /* Sources */ = { 226 | isa = PBXSourcesBuildPhase; 227 | buildActionMask = 2147483647; 228 | files = ( 229 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 230 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | }; 234 | /* End PBXSourcesBuildPhase section */ 235 | 236 | /* Begin PBXVariantGroup section */ 237 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 238 | isa = PBXVariantGroup; 239 | children = ( 240 | 97C146FB1CF9000F007C117D /* Base */, 241 | ); 242 | name = Main.storyboard; 243 | sourceTree = ""; 244 | }; 245 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 246 | isa = PBXVariantGroup; 247 | children = ( 248 | 97C147001CF9000F007C117D /* Base */, 249 | ); 250 | name = LaunchScreen.storyboard; 251 | sourceTree = ""; 252 | }; 253 | /* End PBXVariantGroup section */ 254 | 255 | /* Begin XCBuildConfiguration section */ 256 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 257 | isa = XCBuildConfiguration; 258 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 259 | buildSettings = { 260 | ALWAYS_SEARCH_USER_PATHS = NO; 261 | CLANG_ANALYZER_NONNULL = YES; 262 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 263 | CLANG_CXX_LIBRARY = "libc++"; 264 | CLANG_ENABLE_MODULES = YES; 265 | CLANG_ENABLE_OBJC_ARC = YES; 266 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 267 | CLANG_WARN_BOOL_CONVERSION = YES; 268 | CLANG_WARN_COMMA = YES; 269 | CLANG_WARN_CONSTANT_CONVERSION = YES; 270 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 271 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 272 | CLANG_WARN_EMPTY_BODY = YES; 273 | CLANG_WARN_ENUM_CONVERSION = YES; 274 | CLANG_WARN_INFINITE_RECURSION = YES; 275 | CLANG_WARN_INT_CONVERSION = YES; 276 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 277 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 278 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 279 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 280 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 281 | CLANG_WARN_STRICT_PROTOTYPES = YES; 282 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 283 | CLANG_WARN_UNREACHABLE_CODE = YES; 284 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 285 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 286 | COPY_PHASE_STRIP = NO; 287 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 288 | ENABLE_NS_ASSERTIONS = NO; 289 | ENABLE_STRICT_OBJC_MSGSEND = YES; 290 | GCC_C_LANGUAGE_STANDARD = gnu99; 291 | GCC_NO_COMMON_BLOCKS = YES; 292 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 293 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 294 | GCC_WARN_UNDECLARED_SELECTOR = YES; 295 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 296 | GCC_WARN_UNUSED_FUNCTION = YES; 297 | GCC_WARN_UNUSED_VARIABLE = YES; 298 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 299 | MTL_ENABLE_DEBUG_INFO = NO; 300 | SDKROOT = iphoneos; 301 | TARGETED_DEVICE_FAMILY = "1,2"; 302 | VALIDATE_PRODUCT = YES; 303 | }; 304 | name = Profile; 305 | }; 306 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 307 | isa = XCBuildConfiguration; 308 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 309 | buildSettings = { 310 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 311 | CLANG_ENABLE_MODULES = YES; 312 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 313 | ENABLE_BITCODE = NO; 314 | FRAMEWORK_SEARCH_PATHS = ( 315 | "$(inherited)", 316 | "$(PROJECT_DIR)/Flutter", 317 | ); 318 | INFOPLIST_FILE = Runner/Info.plist; 319 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 320 | LIBRARY_SEARCH_PATHS = ( 321 | "$(inherited)", 322 | "$(PROJECT_DIR)/Flutter", 323 | ); 324 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutteresp32; 325 | PRODUCT_NAME = "$(TARGET_NAME)"; 326 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 327 | SWIFT_VERSION = 4.0; 328 | VERSIONING_SYSTEM = "apple-generic"; 329 | }; 330 | name = Profile; 331 | }; 332 | 97C147031CF9000F007C117D /* Debug */ = { 333 | isa = XCBuildConfiguration; 334 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 335 | buildSettings = { 336 | ALWAYS_SEARCH_USER_PATHS = NO; 337 | CLANG_ANALYZER_NONNULL = YES; 338 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 339 | CLANG_CXX_LIBRARY = "libc++"; 340 | CLANG_ENABLE_MODULES = YES; 341 | CLANG_ENABLE_OBJC_ARC = YES; 342 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 343 | CLANG_WARN_BOOL_CONVERSION = YES; 344 | CLANG_WARN_COMMA = YES; 345 | CLANG_WARN_CONSTANT_CONVERSION = YES; 346 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 347 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 348 | CLANG_WARN_EMPTY_BODY = YES; 349 | CLANG_WARN_ENUM_CONVERSION = YES; 350 | CLANG_WARN_INFINITE_RECURSION = YES; 351 | CLANG_WARN_INT_CONVERSION = YES; 352 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 353 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 354 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 355 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 356 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 357 | CLANG_WARN_STRICT_PROTOTYPES = YES; 358 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 359 | CLANG_WARN_UNREACHABLE_CODE = YES; 360 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 361 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 362 | COPY_PHASE_STRIP = NO; 363 | DEBUG_INFORMATION_FORMAT = dwarf; 364 | ENABLE_STRICT_OBJC_MSGSEND = YES; 365 | ENABLE_TESTABILITY = YES; 366 | GCC_C_LANGUAGE_STANDARD = gnu99; 367 | GCC_DYNAMIC_NO_PIC = NO; 368 | GCC_NO_COMMON_BLOCKS = YES; 369 | GCC_OPTIMIZATION_LEVEL = 0; 370 | GCC_PREPROCESSOR_DEFINITIONS = ( 371 | "DEBUG=1", 372 | "$(inherited)", 373 | ); 374 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 375 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 376 | GCC_WARN_UNDECLARED_SELECTOR = YES; 377 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 378 | GCC_WARN_UNUSED_FUNCTION = YES; 379 | GCC_WARN_UNUSED_VARIABLE = YES; 380 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 381 | MTL_ENABLE_DEBUG_INFO = YES; 382 | ONLY_ACTIVE_ARCH = YES; 383 | SDKROOT = iphoneos; 384 | TARGETED_DEVICE_FAMILY = "1,2"; 385 | }; 386 | name = Debug; 387 | }; 388 | 97C147041CF9000F007C117D /* Release */ = { 389 | isa = XCBuildConfiguration; 390 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 391 | buildSettings = { 392 | ALWAYS_SEARCH_USER_PATHS = NO; 393 | CLANG_ANALYZER_NONNULL = YES; 394 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 395 | CLANG_CXX_LIBRARY = "libc++"; 396 | CLANG_ENABLE_MODULES = YES; 397 | CLANG_ENABLE_OBJC_ARC = YES; 398 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 399 | CLANG_WARN_BOOL_CONVERSION = YES; 400 | CLANG_WARN_COMMA = YES; 401 | CLANG_WARN_CONSTANT_CONVERSION = YES; 402 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 403 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 404 | CLANG_WARN_EMPTY_BODY = YES; 405 | CLANG_WARN_ENUM_CONVERSION = YES; 406 | CLANG_WARN_INFINITE_RECURSION = YES; 407 | CLANG_WARN_INT_CONVERSION = YES; 408 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 409 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = 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 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 434 | TARGETED_DEVICE_FAMILY = "1,2"; 435 | VALIDATE_PRODUCT = YES; 436 | }; 437 | name = Release; 438 | }; 439 | 97C147061CF9000F007C117D /* Debug */ = { 440 | isa = XCBuildConfiguration; 441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 442 | buildSettings = { 443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 444 | CLANG_ENABLE_MODULES = YES; 445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 446 | ENABLE_BITCODE = NO; 447 | FRAMEWORK_SEARCH_PATHS = ( 448 | "$(inherited)", 449 | "$(PROJECT_DIR)/Flutter", 450 | ); 451 | INFOPLIST_FILE = Runner/Info.plist; 452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 453 | LIBRARY_SEARCH_PATHS = ( 454 | "$(inherited)", 455 | "$(PROJECT_DIR)/Flutter", 456 | ); 457 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutteresp32; 458 | PRODUCT_NAME = "$(TARGET_NAME)"; 459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 461 | SWIFT_VERSION = 4.0; 462 | VERSIONING_SYSTEM = "apple-generic"; 463 | }; 464 | name = Debug; 465 | }; 466 | 97C147071CF9000F007C117D /* Release */ = { 467 | isa = XCBuildConfiguration; 468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 469 | buildSettings = { 470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 471 | CLANG_ENABLE_MODULES = YES; 472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 473 | ENABLE_BITCODE = NO; 474 | FRAMEWORK_SEARCH_PATHS = ( 475 | "$(inherited)", 476 | "$(PROJECT_DIR)/Flutter", 477 | ); 478 | INFOPLIST_FILE = Runner/Info.plist; 479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 480 | LIBRARY_SEARCH_PATHS = ( 481 | "$(inherited)", 482 | "$(PROJECT_DIR)/Flutter", 483 | ); 484 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutteresp32; 485 | PRODUCT_NAME = "$(TARGET_NAME)"; 486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 487 | SWIFT_VERSION = 4.0; 488 | VERSIONING_SYSTEM = "apple-generic"; 489 | }; 490 | name = Release; 491 | }; 492 | /* End XCBuildConfiguration section */ 493 | 494 | /* Begin XCConfigurationList section */ 495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 496 | isa = XCConfigurationList; 497 | buildConfigurations = ( 498 | 97C147031CF9000F007C117D /* Debug */, 499 | 97C147041CF9000F007C117D /* Release */, 500 | 249021D3217E4FDB00AE95B9 /* Profile */, 501 | ); 502 | defaultConfigurationIsVisible = 0; 503 | defaultConfigurationName = Release; 504 | }; 505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 506 | isa = XCConfigurationList; 507 | buildConfigurations = ( 508 | 97C147061CF9000F007C117D /* Debug */, 509 | 97C147071CF9000F007C117D /* Release */, 510 | 249021D4217E4FDB00AE95B9 /* Profile */, 511 | ); 512 | defaultConfigurationIsVisible = 0; 513 | defaultConfigurationName = Release; 514 | }; 515 | /* End XCConfigurationList section */ 516 | 517 | }; 518 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 519 | } 520 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/martinloretzzz/flutter-esp32-bluetooth/3a2c6b285ff945cc13ab07d5caf75752679cd849/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | flutteresp32 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 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" -------------------------------------------------------------------------------- /lib/bluetooth.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import './bluetoothconnect.dart'; 4 | 5 | class RECIVE { 6 | static const SERVICE = 'f2f9a4de-ef95-4fe1-9c2e-ab5ef6f0d6e9'; 7 | static const INT = 'e376bd46-0d9a-44ab-bb71-c262d06f60c7'; 8 | static const BOOL = '5c409aab-50d4-42c2-bf57-430916e5eaf4'; 9 | static const STRING = '9e8fafe1-8966-4276-a3a3-d0b00269541e'; 10 | } 11 | 12 | class SEND { 13 | static const SERVICE = '1450dbb0-e48c-4495-ae90-5ff53327ede4'; 14 | static const INT = 'ec693074-43fe-489d-b63b-94456f83beb5'; 15 | static const BOOL = '45db5a06-5481-49ee-a8e9-10b411d73de7'; 16 | static const STRING = '9393c756-78ea-4629-a53e-52fb10f9a63f'; 17 | } 18 | 19 | class BluetoothController extends BluetoothConnector { 20 | double _sliderValue = 0; 21 | String _textfieldValue = "Hi"; 22 | bool _buttonState = false; 23 | 24 | var _textStream = StreamController(); 25 | var _numberStream = StreamController(); 26 | var _boolStream = StreamController(); 27 | 28 | @override 29 | sendInit() async { 30 | await sendSliderValue(_sliderValue); 31 | await sendTextFieldValue(_textfieldValue); 32 | await sendButtonPressed(_buttonState); 33 | subscribeServiceString(RECIVE.STRING, _textStream); 34 | subscribeServiceInt(RECIVE.INT, _numberStream); 35 | subscribeServiceBool(RECIVE.BOOL, _boolStream); 36 | } 37 | 38 | @override 39 | close() async { 40 | //_textStream.close(); 41 | //_numberStream.close(); 42 | //_boolStream.close(); 43 | } 44 | 45 | BluetoothController() : super(); 46 | 47 | sendSliderValue(double slider) async { 48 | _sliderValue = slider; 49 | int value = (slider * 100).toInt(); 50 | await writeServiceInt(SEND.INT, value, false); 51 | } 52 | 53 | sendTextFieldValue(String text) async { 54 | _textfieldValue = text; 55 | await writeServiceString(SEND.STRING, text, true); 56 | } 57 | 58 | sendButtonPressed(bool state) async { 59 | _buttonState = state; 60 | await writeServiceBool(SEND.BOOL, state, true); 61 | } 62 | 63 | Stream getStringStream() { 64 | return _textStream.stream; 65 | } 66 | 67 | Stream getIntStream() { 68 | return _numberStream.stream; 69 | } 70 | 71 | Stream getBoolStream() { 72 | return _boolStream.stream; 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/bluetoothconnect.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_blue/flutter_blue.dart'; 5 | 6 | import 'package:rxdart/rxdart.dart'; 7 | import 'package:get_it/get_it.dart'; 8 | 9 | import 'dart:async'; 10 | import 'dart:collection'; 11 | import 'dart:convert'; 12 | 13 | import './settings.dart'; 14 | import './bluetooth.dart'; 15 | 16 | GetIt getIt = GetIt.instance; 17 | 18 | class BluetoothConnect extends StatelessWidget { 19 | final bluetooth = getIt.get(); 20 | final snackbar = getIt.get(); 21 | 22 | BluetoothConnect({Key key, String deviceName}) : super(key: key) { 23 | bluetooth.setTargetDeviceName(deviceName); 24 | } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | snackbar.stream.listen( 29 | (snack) { 30 | if (snack != null) { 31 | Scaffold.of(context).showSnackBar(snack); 32 | } 33 | }, 34 | ); 35 | 36 | return StreamBuilder( 37 | stream: bluetooth.stream, 38 | initialData: 1, 39 | builder: (c, snapshot) { 40 | if (snapshot.data == 1) { 41 | return IconButton( 42 | icon: Icon(Icons.bluetooth), 43 | iconSize: 32, 44 | onPressed: () => bluetooth.startScan(), 45 | ); 46 | } else if (snapshot.data == 2) { 47 | return IconButton( 48 | icon: Icon(Icons.bluetooth_searching), 49 | iconSize: 32, 50 | onPressed: () => bluetooth.stopScan(), 51 | ); 52 | } else if (snapshot.data == 3) { 53 | return IconButton( 54 | icon: Icon(Icons.bluetooth_connected), 55 | iconSize: 32, 56 | onPressed: () => bluetooth.disconnect(), 57 | ); 58 | } else { 59 | return IconButton( 60 | icon: Icon(Icons.bluetooth_disabled), 61 | iconSize: 32, 62 | onPressed: () => bluetooth.showSnackbar( 63 | Icons.bluetooth_disabled, 'Turn on Bluetooth!'), 64 | ); 65 | } 66 | }, 67 | ); 68 | } 69 | } 70 | 71 | class SnackbarController { 72 | BehaviorSubject _controller; 73 | String _lastMsg = ""; 74 | 75 | SnackbarController() { 76 | _controller = BehaviorSubject.seeded(null); 77 | } 78 | 79 | Observable get stream => _controller.stream; 80 | Widget get current => _controller.value; 81 | 82 | openSnackbar(Widget widget, String msg) { 83 | if (msg != _lastMsg) { 84 | _lastMsg = msg; 85 | _controller.add(widget); 86 | } 87 | } 88 | } 89 | 90 | class BluetoothConnector { 91 | final settings = getIt.get(); 92 | final snackbar = getIt.get(); 93 | 94 | BehaviorSubject _controller = BehaviorSubject.seeded(0); 95 | 96 | BluetoothDevice device; 97 | String targetDeviceName; 98 | 99 | bool isBtAvalible = false; 100 | bool isScanning = false; 101 | bool isConnected = false; 102 | bool isWriting = false; 103 | 104 | String _lastSnackbar = ""; 105 | 106 | List>> msgStack = List(); 107 | HashMap map; 108 | 109 | sendInit() async {} 110 | close() async {} 111 | 112 | BluetoothConnector() { 113 | settings.stream.listen((data) { 114 | targetDeviceName = data; 115 | }); 116 | initDevice(); 117 | } 118 | 119 | Observable get stream => _controller.stream; 120 | int get current => _controller.value; 121 | 122 | startScan() async { 123 | if (!isScanning) { 124 | (await FlutterBlue.instance.connectedDevices).forEach((connected) { 125 | print('Connected: ${connected.name}'); 126 | setDevice(connected); 127 | }); 128 | FlutterBlue.instance.startScan(timeout: Duration(seconds: 16)); 129 | } 130 | } 131 | 132 | stopScan() async { 133 | if (isScanning) { 134 | FlutterBlue.instance.stopScan(); 135 | } 136 | } 137 | 138 | disconnect() async { 139 | if (device != null) { 140 | showSnackbar(Icons.bluetooth_disabled, 'Disonnected from ${device.name}'); 141 | device.disconnect(); 142 | close(); 143 | 144 | map = null; 145 | device = null; 146 | isConnected = false; 147 | isScanning = false; 148 | 149 | calcState(); 150 | } 151 | } 152 | 153 | setTargetDeviceName(String name) { 154 | targetDeviceName = name; 155 | } 156 | 157 | Future initDevice() async { 158 | FlutterBlue.instance.state.listen((data) { 159 | bool isAvalible = (data == BluetoothState.on); 160 | isBtAvalible = isAvalible; 161 | if (isAvalible) { 162 | // showSnackbar(Icons.bluetooth, 'Bluetooth is online again!'); 163 | } 164 | calcState(); 165 | }); 166 | 167 | FlutterBlue.instance.isScanning.listen((data) { 168 | isScanning = data; 169 | print(isScanning); 170 | calcState(); 171 | }); 172 | 173 | (await FlutterBlue.instance.connectedDevices).forEach((connected) { 174 | print('Connected: ${connected.name}'); 175 | setDevice(connected); 176 | }); 177 | FlutterBlue.instance.scanResults.listen((scans) { 178 | for (var scan in scans) { 179 | setScanResult(scan); 180 | } 181 | }); 182 | } 183 | 184 | void calcState() { 185 | int stage = 1; // waiting for scanning 186 | stage = (isScanning) ? 2 : stage; // searching 187 | stage = (isConnected) ? 3 : stage; // connected 188 | stage = (!isBtAvalible) ? 0 : stage; // not avalible 189 | print(stage); 190 | _controller.add(stage); 191 | } 192 | 193 | Future setScanResult(ScanResult scan) async { 194 | BluetoothDevice _device = scan.device; 195 | await setDevice(_device); 196 | } 197 | 198 | Future setDevice(BluetoothDevice _device) async { 199 | if (_device.name == targetDeviceName && device == null) { 200 | print(_device.name); 201 | 202 | await _device.disconnect(); 203 | await _device.connect(); 204 | 205 | map = new HashMap(); 206 | 207 | showSnackbar(Icons.bluetooth, 'Connected to ${_device.name}'); 208 | device = _device; 209 | isConnected = true; 210 | calcState(); 211 | 212 | List services = await _device.discoverServices(); 213 | 214 | for (var service in services) { 215 | for (var c in service.characteristics) { 216 | map[c.uuid.toString()] = c; 217 | bool read = c.properties.read; 218 | bool write = c.properties.write; 219 | bool notify = c.properties.notify; 220 | bool indicate = c.properties.indicate; 221 | String properties = ""; 222 | properties += (read ? "R" : "") + (write ? "W" : ""); 223 | properties += (notify ? "N" : "") + (indicate ? "I" : ""); 224 | print('${c.serviceUuid} ${c.uuid} [$properties] found!'); 225 | 226 | if (notify || indicate) { 227 | await c.setNotifyValue(true); 228 | } 229 | } 230 | } 231 | 232 | await sendInit(); 233 | } 234 | } 235 | 236 | subscribeService(String characteristicGuid, StreamController controller, 237 | T Function(List) parse) { 238 | if (map != null) { 239 | var characteristic = map[characteristicGuid]; 240 | if (characteristic != null) { 241 | Stream> listener = characteristic.value; 242 | 243 | listener.listen((onData) { 244 | if (!controller.isClosed) { 245 | T value = parse(onData); 246 | controller.sink.add(value); 247 | } 248 | }); 249 | } 250 | } 251 | } 252 | 253 | subscribeServiceString( 254 | String guid, StreamController controller) async { 255 | var parse = (List data) => String.fromCharCodes(data); 256 | subscribeService(guid, controller, parse); 257 | } 258 | 259 | void subscribeServiceInt(String guid, StreamController controller) { 260 | var parse = (List data) => bytesToInteger(data); 261 | subscribeService(guid, controller, parse); 262 | } 263 | 264 | void subscribeServiceBool(String guid, StreamController controller) { 265 | var parse = (List data) { 266 | if (data.isNotEmpty) { 267 | return data[0] != 0 ? true : false; 268 | } 269 | return false; 270 | }; 271 | subscribeService(guid, controller, parse); 272 | } 273 | 274 | Future> readService(String characteristicGuid) async { 275 | if (map != null) { 276 | BluetoothCharacteristic characteristic = map[characteristicGuid]; 277 | print(map); 278 | if (characteristic != null) { 279 | return await characteristic.read(); 280 | } 281 | } 282 | return List(); 283 | } 284 | 285 | Future writeServiceInt( 286 | String characteristicGuid, int value, bool importand) async { 287 | int byte1 = value & 0xff; 288 | int byte2 = (value >> 8) & 0xff; 289 | await writeService(characteristicGuid, [byte1, byte2], importand); 290 | } 291 | 292 | Future writeServiceString( 293 | String characteristicGuid, String msg, bool importand) async { 294 | await writeService(characteristicGuid, utf8.encode(msg), importand); 295 | } 296 | 297 | Future writeServiceBool( 298 | String characteristicGuid, bool value, bool importand) async { 299 | int byte = value ? 0x01 : 0x00; 300 | await writeService(characteristicGuid, [byte], importand); 301 | } 302 | 303 | Future writeService( 304 | String characteristicGuid, List data, bool importand) async { 305 | // print("$characteristicGuid $isWriting"); 306 | if (!isWriting) { 307 | isWriting = true; 308 | await writeCharacteristics(characteristicGuid, data); 309 | 310 | if (msgStack.length > 0) { 311 | for (int i = 0; i < msgStack.length; i++) { 312 | await writeCharacteristics(msgStack[i].key, msgStack[i].value); 313 | } 314 | msgStack = List(); 315 | } 316 | isWriting = false; 317 | } else if (importand) { 318 | msgStack.add(MapEntry(characteristicGuid, data)); 319 | } 320 | } 321 | 322 | Future writeCharacteristics( 323 | String characteristicGuid, List data) async { 324 | if (map != null) { 325 | var characteristic = map[characteristicGuid]; 326 | if (characteristic != null) { 327 | await characteristic.write(data); 328 | return; 329 | } 330 | } 331 | } 332 | 333 | void showSnackbar(IconData icon, String msg) { 334 | if (msg != _lastSnackbar) { 335 | snackbar.openSnackbar( 336 | SnackBar( 337 | duration: Duration(seconds: 1), 338 | content: Row( 339 | children: [ 340 | Icon(icon), 341 | Text(msg), 342 | ], 343 | ), 344 | ), 345 | msg, 346 | ); 347 | } 348 | _lastSnackbar = msg; 349 | } 350 | 351 | int bytesToInteger(List bytes) { 352 | var value = 0; 353 | for (var i = 0, length = bytes.length; i < length; i++) { 354 | value += bytes[i] * pow(256, i); 355 | } 356 | return value; 357 | } 358 | } 359 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:get_it/get_it.dart'; 3 | 4 | import './bluetooth.dart'; 5 | import './bluetoothconnect.dart'; 6 | import './settings.dart'; 7 | 8 | GetIt getIt = GetIt.instance; 9 | 10 | void main() { 11 | getIt.registerSingleton(ConfigNameController("ESP32")); 12 | getIt.registerSingleton(SnackbarController()); 13 | getIt.registerSingleton(BluetoothController()); 14 | runApp(MainApp()); 15 | } 16 | 17 | class MainApp extends StatelessWidget { 18 | @override 19 | Widget build(BuildContext context) { 20 | return MaterialApp( 21 | title: 'ESP32 Controller', 22 | theme: ThemeData( 23 | brightness: Brightness.dark, 24 | primaryColor: Colors.blue, 25 | accentColor: Colors.blueAccent, 26 | ), 27 | home: App(), 28 | ); 29 | } 30 | } 31 | 32 | class App extends StatelessWidget { 33 | @override 34 | Widget build(BuildContext context) { 35 | return Scaffold( 36 | appBar: AppBar( 37 | backgroundColor: Theme.of(context).primaryColor, 38 | title: Text("ESP32 Controller"), 39 | actions: [ 40 | IconButton( 41 | icon: Icon(Icons.settings), 42 | onPressed: () { 43 | showDialog( 44 | context: context, 45 | builder: (BuildContext context) { 46 | return AlertDialog( 47 | content: SettingsButton(), 48 | ); 49 | }, 50 | ); 51 | }, 52 | ), 53 | BluetoothConnect( 54 | deviceName: "ESP32", 55 | ), 56 | ], 57 | ), 58 | body: AppHomeScreen(), 59 | ); 60 | } 61 | } 62 | 63 | class AppHomeScreen extends StatefulWidget { 64 | @override 65 | createState() => _AppHomeScreenState(); 66 | } 67 | 68 | class _AppHomeScreenState extends State { 69 | final bluetooth = getIt.get(); 70 | 71 | double _slider = 0.5; 72 | bool _pressed = false; 73 | 74 | void changeSlider(double value) { 75 | bluetooth.sendSliderValue(_slider); 76 | setState(() { 77 | _slider = value; 78 | }); 79 | } 80 | 81 | @override 82 | Widget build(BuildContext context) { 83 | Color primary = Theme.of(context).primaryColor; 84 | TextStyle headline = DefaultTextStyle.of(context) 85 | .style 86 | .apply(fontSizeFactor: 2.0, color: primary); 87 | 88 | return Padding( 89 | padding: EdgeInsets.all(20), 90 | child: Column( 91 | children: [ 92 | Container( 93 | child: Column( 94 | crossAxisAlignment: CrossAxisAlignment.stretch, 95 | children: [ 96 | Text( 97 | "Input", 98 | textAlign: TextAlign.left, 99 | style: headline, 100 | ), 101 | SizedBox(height: 10), 102 | TextFormField( 103 | initialValue: "Hello World", 104 | onFieldSubmitted: (String text) => 105 | bluetooth.sendTextFieldValue(text), 106 | ), 107 | SizedBox(height: 10), 108 | Slider( 109 | value: _slider, 110 | onChangeStart: changeSlider, 111 | onChanged: changeSlider, 112 | onChangeEnd: changeSlider, 113 | ), 114 | SizedBox(height: 10), 115 | RaisedButton( 116 | child: Text("TOGGLE"), 117 | onPressed: () { 118 | setState(() { 119 | _pressed = !_pressed; 120 | }); 121 | bluetooth.sendButtonPressed(_pressed); 122 | }, 123 | ), 124 | ], 125 | ), 126 | ), 127 | SizedBox(height: 20), 128 | Divider( 129 | color: primary, 130 | ), 131 | SizedBox(height: 20), 132 | Container( 133 | child: Column( 134 | crossAxisAlignment: CrossAxisAlignment.stretch, 135 | children: [ 136 | Text( 137 | "Output", 138 | textAlign: TextAlign.left, 139 | style: headline, 140 | ), 141 | SizedBox(height: 10), 142 | StreamBuilder( 143 | initialData: "No Data arrived", 144 | stream: bluetooth.getStringStream(), 145 | builder: (context, snapshot) { 146 | // print(snapshot.data); 147 | return Text(snapshot.data); 148 | }, 149 | ), 150 | StreamBuilder( 151 | initialData: false, 152 | stream: bluetooth.getBoolStream(), 153 | builder: (context, snapshot) { 154 | // print(snapshot.data); 155 | return Text(snapshot.data.toString()); 156 | }, 157 | ), 158 | StreamBuilder( 159 | initialData: 0, 160 | stream: bluetooth.getIntStream(), 161 | builder: (context, snapshot) { 162 | // print(snapshot.data); 163 | return Text(snapshot.data.toString()); 164 | }, 165 | ), 166 | ], 167 | ), 168 | ), 169 | ], 170 | ), 171 | ); 172 | } 173 | } 174 | -------------------------------------------------------------------------------- /lib/settings.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:rxdart/rxdart.dart'; 4 | import 'package:get_it/get_it.dart'; 5 | 6 | GetIt getIt = GetIt.instance; 7 | 8 | class ConfigNameController { 9 | BehaviorSubject _controller; 10 | 11 | ConfigNameController(String deviceName) { 12 | _controller = BehaviorSubject.seeded(deviceName); 13 | } 14 | 15 | Observable get stream => _controller.stream; 16 | String get current => _controller.value; 17 | 18 | setDeviceName(String name) { 19 | _controller.add(name); 20 | } 21 | } 22 | 23 | class SettingsButton extends StatefulWidget { 24 | @override 25 | createState() => _SettingsButtonState(); 26 | } 27 | 28 | class _SettingsButtonState extends State { 29 | final name = getIt.get(); 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return Column( 34 | mainAxisSize: MainAxisSize.min, 35 | children: [ 36 | Row( 37 | children: [ 38 | Expanded( 39 | child: Text("Settings", style: Theme.of(context).textTheme.title), 40 | ), 41 | IconButton( 42 | padding: EdgeInsets.all(0), 43 | icon: Icon(Icons.close), 44 | color: Theme.of(context).primaryColor, 45 | onPressed: () => Navigator.pop(context), 46 | ), 47 | ], 48 | ), 49 | SizedBox(height: 10), 50 | TextFormField( 51 | decoration: InputDecoration(labelText: "Device Name"), 52 | initialValue: name.current, 53 | onFieldSubmitted: (String text) { 54 | name.setDeviceName(text); 55 | }, 56 | ), 57 | SizedBox(height: 10), 58 | ], 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.3.0" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.0.5" 18 | charcode: 19 | dependency: transitive 20 | description: 21 | name: charcode 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.2" 25 | collection: 26 | dependency: transitive 27 | description: 28 | name: collection 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.14.11" 32 | convert: 33 | dependency: transitive 34 | description: 35 | name: convert 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.1.1" 39 | cupertino_icons: 40 | dependency: "direct main" 41 | description: 42 | name: cupertino_icons 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "0.1.2" 46 | fixnum: 47 | dependency: transitive 48 | description: 49 | name: fixnum 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "0.10.11" 53 | flutter: 54 | dependency: "direct main" 55 | description: flutter 56 | source: sdk 57 | version: "0.0.0" 58 | flutter_blue: 59 | dependency: "direct main" 60 | description: 61 | name: flutter_blue 62 | url: "https://pub.dartlang.org" 63 | source: hosted 64 | version: "0.6.3+1" 65 | flutter_page_indicator: 66 | dependency: transitive 67 | description: 68 | name: flutter_page_indicator 69 | url: "https://pub.dartlang.org" 70 | source: hosted 71 | version: "0.0.3" 72 | flutter_swiper: 73 | dependency: "direct main" 74 | description: 75 | name: flutter_swiper 76 | url: "https://pub.dartlang.org" 77 | source: hosted 78 | version: "1.1.6" 79 | flutter_test: 80 | dependency: "direct dev" 81 | description: flutter 82 | source: sdk 83 | version: "0.0.0" 84 | get_it: 85 | dependency: "direct main" 86 | description: 87 | name: get_it 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "2.1.0" 91 | matcher: 92 | dependency: transitive 93 | description: 94 | name: matcher 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "0.12.5" 98 | meta: 99 | dependency: transitive 100 | description: 101 | name: meta 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "1.1.7" 105 | path: 106 | dependency: transitive 107 | description: 108 | name: path 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "1.6.4" 112 | pedantic: 113 | dependency: transitive 114 | description: 115 | name: pedantic 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "1.8.0+1" 119 | protobuf: 120 | dependency: transitive 121 | description: 122 | name: protobuf 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "1.0.0" 126 | quiver: 127 | dependency: transitive 128 | description: 129 | name: quiver 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "2.0.5" 133 | rxdart: 134 | dependency: "direct main" 135 | description: 136 | name: rxdart 137 | url: "https://pub.dartlang.org" 138 | source: hosted 139 | version: "0.22.6" 140 | sky_engine: 141 | dependency: transitive 142 | description: flutter 143 | source: sdk 144 | version: "0.0.99" 145 | source_span: 146 | dependency: transitive 147 | description: 148 | name: source_span 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.5.5" 152 | stack_trace: 153 | dependency: transitive 154 | description: 155 | name: stack_trace 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "1.9.3" 159 | stream_channel: 160 | dependency: transitive 161 | description: 162 | name: stream_channel 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "2.0.0" 166 | string_scanner: 167 | dependency: transitive 168 | description: 169 | name: string_scanner 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.0.5" 173 | term_glyph: 174 | dependency: transitive 175 | description: 176 | name: term_glyph 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "1.1.0" 180 | test_api: 181 | dependency: transitive 182 | description: 183 | name: test_api 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "0.2.5" 187 | transformer_page_view: 188 | dependency: transitive 189 | description: 190 | name: transformer_page_view 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "0.1.6" 194 | typed_data: 195 | dependency: transitive 196 | description: 197 | name: typed_data 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "1.1.6" 201 | vector_math: 202 | dependency: transitive 203 | description: 204 | name: vector_math 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "2.0.8" 208 | sdks: 209 | dart: ">=2.2.2 <3.0.0" 210 | flutter: ">=0.1.4 <3.0.0" 211 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutteresp32 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 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.0+1 15 | 16 | environment: 17 | sdk: '>=2.1.0 <3.0.0' 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | flutter_blue: ^0.6.3+1 23 | flutter_swiper: ^1.1.6 24 | rxdart: ^0.22.1+1 25 | get_it: ^2.0.1 26 | 27 | # The following adds the Cupertino Icons font to your application. 28 | # Use with the CupertinoIcons class for iOS style icons. 29 | cupertino_icons: ^0.1.2 30 | 31 | dev_dependencies: 32 | flutter_test: 33 | sdk: flutter 34 | 35 | # For information on the generic Dart part of this file, see the 36 | # following page: https://dart.dev/tools/pub/pubspec 37 | 38 | # The following section is specific to Flutter. 39 | flutter: 40 | # The following line ensures that the Material Icons font is 41 | # included with your application, so that you can use the icons in 42 | # the material Icons class. 43 | uses-material-design: true 44 | # To add assets to your application, add an assets section, like this: 45 | # assets: 46 | # - images/a_dot_burr.jpeg 47 | # - images/a_dot_ham.jpeg 48 | # An image asset can refer to one or more resolution-specific "variants", see 49 | # https://flutter.dev/assets-and-images/#resolution-aware. 50 | # For details regarding adding assets from package dependencies, see 51 | # https://flutter.dev/assets-and-images/#from-packages 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.dev/custom-fonts/#from-packages 71 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | /* 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutteresp32/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | */ 32 | --------------------------------------------------------------------------------