├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── example ├── .gitignore ├── .metadata ├── android │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ └── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── demoapp │ │ │ │ └── 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 │ ├── Podfile │ ├── Podfile.lock │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── IDEWorkspaceChecks.plist │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── 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 └── pubspec.yaml ├── lib └── flutter_persistent_queue.dart ├── pubspec.yaml └── test ├── .gitignore ├── .metadata ├── android ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── test_app │ │ │ │ └── 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 │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── ios ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ └── IDEWorkspaceChecks.plist │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ └── IDEWorkspaceChecks.plist └── 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 ├── pubspec.yaml └── test_driver ├── app.dart └── app_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | .idea/ 4 | 5 | *.iml 6 | *.log 7 | *.pyc 8 | *.swp 9 | 10 | .buildlog/ 11 | .history 12 | .vscode/ 13 | 14 | .packages 15 | .pub/ 16 | 17 | build/ 18 | ios/.generated/ 19 | ios/Flutter/Generated.xcconfig 20 | ios/Runner/GeneratedPluginRegistrant.* 21 | android/local.properties 22 | android/app/src/main/java/io/flutter/plugins/Generated* 23 | 24 | packages 25 | pubspec.lock 26 | 27 | **/doc/api/ 28 | .dart_tool/ 29 | .flutter-plugins 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | build/ 34 | 35 | **/ios/Flutter/App.framework/flutter_assets/kernel_blob.bin 36 | **/ios/Flutter/flutter_export_environment.sh 37 | **/.flutter-plugins-dependencies 38 | **/Flutter.podspec 39 | -------------------------------------------------------------------------------- /.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: 985ccb6d14c6ce5ce74823a4d366df2438eac44f 8 | channel: beta 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## [6.2.0] - 2021-04-22 2 | - dependency updates 3 | 4 | ## [6.1.1+1] - 2020-08-31 5 | - fix ::clear method interface 6 | 7 | ## [6.1.1] - 2020-08-31 8 | - minor refactor 9 | 10 | ## [6.0.4] - 2020-04-29 11 | - dependency updates 12 | 13 | ## [6.0.3] - 2020-02-20 14 | - improve config overriding 15 | 16 | ## [6.0.2] - 2020-02-20 17 | - fix: allow config overrides to match previous v5 behavior 18 | 19 | ## [6.0.1] - 2020-02-20 20 | - major refactor to improve maintainability 21 | 22 | ## [5.1.1] - 2019-12-26 23 | - updated dependencies 24 | 25 | ## [5.1.0] - 2019-10-24 26 | - [localstorage](https://pub.dev/packages/localstorage) dependency bumped to v3 27 | - integration tests reviewed 28 | 29 | ## [5.0.1] - 2019-10-16 30 | - fixed a caching bug related to the OnFlush callback 31 | 32 | ## [5.0.0] - 2019-10-14 33 | - breaking change: constructor now always overrides previous queue settings, even on cache hits 34 | - deprecated parameters: filePath, growable, noCache, noPersist 35 | - updated iOS build settings 36 | 37 | ## [4.0.0] - 2019-10-11 38 | - breaking change: `` json encodable data beyond `Map` now accepted 39 | 40 | ## [3.0.0+1] - 2019-09-17 41 | - minor maintenance 42 | 43 | ## [3.0.0] - 2019-05-22 44 | - breaking change: `OnFlush` handlers must now return a `boolean` "ack" instead 45 | of `void` 46 | 47 | ## [2.0.1+2] - 2019-05-21 48 | - minor style fix 49 | 50 | ## [2.0.1+1] - 2019-05-21 51 | - rebuilt docs 52 | 53 | ## [2.0.1] - 2019-05-21 54 | - alias feature added 55 | - cleaner example and tests 56 | - updated `localstorage` to v2.0.0 57 | - breaking change: `length()` method now returns `Future` to avoid 58 | ambiguity and edgy race conditions 59 | 60 | ## [1.0.2] - 2019-05-09 61 | - updated documentation 62 | 63 | ## [1.0.1] - 2019-05-09 64 | - minor source code whitespace fix 65 | 66 | ## [1.0.0] - 2019-05-09 67 | - new buffered implementation to enforce sequential behavior 68 | - integration tests added, including throughput performance benchmarking 69 | 70 | ## [0.1.4] - 2019-02-27 71 | - bump [synchronized](https://pub.dartlang.org/packages/synchronized) to 72 | [v2.1.0](https://pub.dartlang.org/packages/synchronized/versions/2.1.0) to properly 73 | synchronize inner blocks on reentrant locks. 74 | - improved [example](https://pub.dartlang.org/packages/flutter_persistent_queue#-example-tab-) 75 | 76 | ## [0.1.3] - 2019-02-27 77 | - silent flush/push error handling if user does not provide handlers 78 | - hard `maxLength` parameter added to enforce an absolute maximum queue length 79 | 80 | ## [0.1.2] - 2019-02-26 81 | - fix error message and add stack trace to error handling 82 | 83 | ## [0.1.1] - 2019-02-25 84 | - user-specified error handling behavior while flushing 85 | 86 | ## [0.1.0] - 2019-02-21 87 | - minor source code readability improvements 88 | - no-reload feature added to `setup` method 89 | - improved example using `FutureBuilder` 90 | - no additional example dependencies 91 | 92 | ## [0.0.1] - 2019-02-20 93 | - Initial release 94 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright 2019 Romulo Carvalho 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # persistent_queue 2 | 3 | Simple file-based non-volatile queue library for flutter. 4 | 5 | Typical use-case scenario is for small to medium sized in-device buffers 6 | storing persistent yet temporary mission-critical data, until it can be 7 | efficiently and safely consumed / delivered permanently - such as for 8 | custom analytics and specialized logging applications. 9 | 10 | ## Installation 11 | 12 | Add dependency to `pubspec.yaml`: 13 | 14 | ```yaml 15 | dependencies: 16 | ... 17 | flutter_persistent_queue: ^6.2.0 18 | ``` 19 | 20 | Run in your terminal: 21 | 22 | ```sh 23 | flutter packages get 24 | ``` 25 | 26 | ## Example 27 | 28 | ```dart 29 | import 'package:flutter_persistent_queue/flutter_persistent_queue.dart'; 30 | 31 | // instantiate a new queue `pq`, with auto-flush set at 10 items 32 | final pq = PersistentQueue('pq', flushAt: 10, onFlush: (list) async { 33 | print('auto-flush\n$list'); 34 | }); 35 | 36 | // push 25 Map<> items (await is optional) 37 | for (int i = 0; i < 25; ++i) { 38 | pq.push({'i': i}); 39 | } 40 | 41 | // trigger a final manual flush for the remaining items 42 | pq.flush((list) async => print('manual-flush\n$list')); 43 | 44 | // check if all items have been flushed 45 | assert(await pq.futureLength == 0); 46 | 47 | // deallocate resources, if needed 48 | await pq.destroy(); 49 | ``` 50 | 51 | ## Testing 52 | 53 | For integration / performance tests: 54 | 55 | ```sh 56 | git clone https://github.com/oakromulo/flutter_persistent_queue.git 57 | cd ~/flutter_persistent_queue/test 58 | flutter drive --target=test_driver/app.dart 59 | ``` 60 | 61 | ## Building documentation files 62 | 63 | ```sh 64 | rm -rf doc 65 | dartdoc --exclude 'dart:async,dart:collection,dart:convert,dart:core,dart:developer,dart:io,dart:isolate,dart:math,dart:typed_data,dart:ui' 66 | ``` 67 | 68 | ## How it works 69 | 70 | Each JSON-encodable item when enqueued goes to its own indexed key in a single 71 | non-volatile file (one file per uniquely named queue) to an unspecified location 72 | on the permanent storage of a flutter-compatible device. 73 | 74 | This particular design choice limits potential use cases requiring very long 75 | queues but otherwise provides good performance within a limited resource 76 | footprint, as it doesn't require serializing and deserializing 77 | contiguous or chunked [`dart:collections`](https://pub.dartlang.org/documentation/collection/latest/) to the filesystem. 78 | 79 | Every `push()` call triggers an asynchronous and isolated write to the 80 | permanent storage. If the caller awaits until its completion, it is notified 81 | via [Completers](api.dartlang.org/stable/2.2.0/dart-async/Completer-class.html) 82 | and afterwards there's no possibility of data loss from the application 83 | perspective. 84 | 85 | After user-defined `flush()` operations (either manual or auto-triggered) the 86 | queue is fully emptied if and only if the user-defined `onFlush` does not throw 87 | any errors. 88 | 89 | All PersistentQueue methods are consumed sequentially (according to the strict 90 | chronological order of its calls) one at a time on a dedicated 91 | producer / consumer event loop. 92 | 93 | Performance of persisted queues on standard simulated devices must be of at 94 | least 500 writes/second. This constraint is verified on integration tests. 95 | 96 | All filesystem and JSON operations are abstracted by the minimalistic 97 | [flutter_localstorage](https://github.com/lesnitsky/flutter_localstorage) 98 | library. 99 | 100 | ## License 101 | 102 | MIT 103 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | analyzer: 2 | strong-mode: 3 | implicit-casts: false 4 | exclude: 5 | - test/test_driver/** 6 | 7 | linter: 8 | rules: 9 | - always_declare_return_types 10 | - avoid_slow_async_io 11 | - avoid_types_on_closure_parameters 12 | - avoid_unused_constructor_parameters 13 | - avoid_void_async 14 | - await_only_futures 15 | - camel_case_types 16 | - comment_references 17 | - directives_ordering 18 | - file_names 19 | - implementation_imports 20 | - invariant_booleans 21 | - iterable_contains_unrelated_type 22 | - join_return_with_assignment 23 | - library_prefixes 24 | - lines_longer_than_80_chars 25 | - list_remove_unrelated_type 26 | - null_closures 27 | - package_api_docs 28 | - package_names 29 | - package_prefixed_library_names 30 | - parameter_assignments 31 | - prefer_collection_literals 32 | - prefer_conditional_assignment 33 | - prefer_const_declarations 34 | - prefer_contains 35 | - prefer_equal_for_default_values 36 | - prefer_final_fields 37 | - prefer_final_locals 38 | - prefer_foreach 39 | - prefer_function_declarations_over_variables 40 | - prefer_generic_function_type_aliases 41 | - prefer_initializing_formals 42 | - prefer_int_literals 43 | - prefer_is_empty 44 | - prefer_is_not_empty 45 | - prefer_iterable_whereType 46 | - prefer_single_quotes 47 | - prefer_typing_uninitialized_variables 48 | - prefer_void_to_null 49 | - public_member_api_docs 50 | - recursive_getters 51 | - slash_for_doc_comments 52 | - sort_constructors_first 53 | - sort_pub_dependencies 54 | - sort_unnamed_constructors_first 55 | - test_types_in_equals 56 | - type_annotate_public_apis 57 | - type_init_formals 58 | - unawaited_futures 59 | - unnecessary_await_in_return 60 | - unnecessary_brace_in_string_interps 61 | - unnecessary_const 62 | - unnecessary_getters_setters 63 | - unnecessary_lambdas 64 | - unnecessary_new 65 | - unnecessary_null_aware_assignments 66 | - unnecessary_null_in_if_null_operators 67 | - unnecessary_overrides 68 | - unnecessary_parenthesis 69 | - unnecessary_statements 70 | - unnecessary_this 71 | - unrelated_type_equality_checks 72 | - use_rethrow_when_possible 73 | - use_setters_to_change_properties 74 | - use_string_buffers 75 | - use_to_and_as_if_applicable 76 | - valid_regexps 77 | - void_checks 78 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | .idea 4 | *.iml 5 | 6 | .packages 7 | .pub/ 8 | 9 | build/ 10 | ios/.generated/ 11 | ios/Flutter/Generated.xcconfig 12 | ios/Runner/GeneratedPluginRegistrant.* 13 | android/local.properties 14 | android/app/src/main/java/io/flutter/plugins/Generated* 15 | 16 | # Miscellaneous 17 | *.log 18 | *.pyc 19 | *.swp 20 | .DS_Store 21 | .atom/ 22 | .buildlog/ 23 | .history 24 | .svn/ 25 | 26 | # IntelliJ related 27 | *.iml 28 | *.ipr 29 | *.iws 30 | .idea/ 31 | 32 | # Visual Studio Code related 33 | .vscode/ 34 | 35 | # Flutter/Dart/Pub related 36 | **/doc/api/ 37 | .dart_tool/ 38 | .flutter-plugins 39 | .packages 40 | .pub-cache/ 41 | .pub/ 42 | build/ 43 | 44 | # Android related 45 | **/android/**/gradle-wrapper.jar 46 | **/android/.gradle 47 | **/android/captures/ 48 | **/android/gradlew 49 | **/android/gradlew.bat 50 | **/android/local.properties 51 | **/android/**/GeneratedPluginRegistrant.java 52 | 53 | # iOS/XCode related 54 | **/ios/**/*.mode1v3 55 | **/ios/**/*.mode2v3 56 | **/ios/**/*.moved-aside 57 | **/ios/**/*.pbxuser 58 | **/ios/**/*.perspectivev3 59 | **/ios/**/*sync/ 60 | **/ios/**/.sconsign.dblite 61 | **/ios/**/.tags* 62 | **/ios/**/.vagrant/ 63 | **/ios/**/DerivedData/ 64 | **/ios/**/Icon? 65 | **/ios/**/Pods/ 66 | **/ios/**/.symlinks/ 67 | **/ios/**/profile 68 | **/ios/**/xcuserdata 69 | **/ios/.generated/ 70 | **/ios/Flutter/.last_build_id 71 | **/ios/Flutter/App.framework 72 | **/ios/Flutter/Flutter.framework 73 | **/ios/Flutter/Generated.xcconfig 74 | **/ios/Flutter/app.flx 75 | **/ios/Flutter/app.zip 76 | **/ios/Flutter/flutter_assets/ 77 | **/ios/ServiceDefinitions.json 78 | **/ios/Runner/GeneratedPluginRegistrant.* 79 | 80 | # Exceptions to above rules. 81 | !**/ios/**/default.mode1v3 82 | !**/ios/**/default.mode2v3 83 | !**/ios/**/default.pbxuser 84 | !**/ios/**/default.perspectivev3 85 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 86 | -------------------------------------------------------------------------------- /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: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /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.demoapp" 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/demoapp/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.demoapp; 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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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 "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /example/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 32 | end 33 | 34 | post_install do |installer| 35 | installer.pods_project.targets.each do |target| 36 | flutter_additional_ios_build_settings(target) 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /example/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - path_provider (0.0.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `Flutter`) 8 | - path_provider (from `.symlinks/plugins/path_provider/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: Flutter 13 | path_provider: 14 | :path: ".symlinks/plugins/path_provider/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 0e3d915762c693b495b44d77113d4970485de6ec 18 | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c 19 | 20 | PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d 21 | 22 | COCOAPODS: 1.9.3 23 | -------------------------------------------------------------------------------- /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 | 0F5B9D735DAFE91B444563BA /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 53ED52BE75994B9ECE6D7080 /* libPods-Runner.a */; }; 11 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 14 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 15 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 16 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 17 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 18 | /* End PBXBuildFile section */ 19 | 20 | /* Begin PBXCopyFilesBuildPhase section */ 21 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 22 | isa = PBXCopyFilesBuildPhase; 23 | buildActionMask = 2147483647; 24 | dstPath = ""; 25 | dstSubfolderSpec = 10; 26 | files = ( 27 | ); 28 | name = "Embed Frameworks"; 29 | runOnlyForDeploymentPostprocessing = 0; 30 | }; 31 | /* End PBXCopyFilesBuildPhase section */ 32 | 33 | /* Begin PBXFileReference section */ 34 | 12A86209055D4C8F0326837C /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 35 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 36 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 37 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 38 | 53ED52BE75994B9ECE6D7080 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 39 | 5B692A46E0E1CC62098ABFFC /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 40 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 41 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 42 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 43 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 44 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 45 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 46 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 47 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 48 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 49 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 50 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 51 | B3866DC0DCC95F72425627EB /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Pods/Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 52 | /* End PBXFileReference section */ 53 | 54 | /* Begin PBXFrameworksBuildPhase section */ 55 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 56 | isa = PBXFrameworksBuildPhase; 57 | buildActionMask = 2147483647; 58 | files = ( 59 | 0F5B9D735DAFE91B444563BA /* libPods-Runner.a in Frameworks */, 60 | ); 61 | runOnlyForDeploymentPostprocessing = 0; 62 | }; 63 | /* End PBXFrameworksBuildPhase section */ 64 | 65 | /* Begin PBXGroup section */ 66 | 9740EEB11CF90186004384FC /* Flutter */ = { 67 | isa = PBXGroup; 68 | children = ( 69 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 70 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 71 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 72 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 73 | ); 74 | name = Flutter; 75 | sourceTree = ""; 76 | }; 77 | 97C146E51CF9000F007C117D = { 78 | isa = PBXGroup; 79 | children = ( 80 | 9740EEB11CF90186004384FC /* Flutter */, 81 | 97C146F01CF9000F007C117D /* Runner */, 82 | 97C146EF1CF9000F007C117D /* Products */, 83 | FB165F509A4860872BF1C164 /* Pods */, 84 | C69FC7AD2B734035297E34C0 /* Frameworks */, 85 | ); 86 | sourceTree = ""; 87 | }; 88 | 97C146EF1CF9000F007C117D /* Products */ = { 89 | isa = PBXGroup; 90 | children = ( 91 | 97C146EE1CF9000F007C117D /* Runner.app */, 92 | ); 93 | name = Products; 94 | sourceTree = ""; 95 | }; 96 | 97C146F01CF9000F007C117D /* Runner */ = { 97 | isa = PBXGroup; 98 | children = ( 99 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 100 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 101 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 104 | 97C147021CF9000F007C117D /* Info.plist */, 105 | 97C146F11CF9000F007C117D /* Supporting Files */, 106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 108 | ); 109 | path = Runner; 110 | sourceTree = ""; 111 | }; 112 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 113 | isa = PBXGroup; 114 | children = ( 115 | 97C146F21CF9000F007C117D /* main.m */, 116 | ); 117 | name = "Supporting Files"; 118 | sourceTree = ""; 119 | }; 120 | C69FC7AD2B734035297E34C0 /* Frameworks */ = { 121 | isa = PBXGroup; 122 | children = ( 123 | 53ED52BE75994B9ECE6D7080 /* libPods-Runner.a */, 124 | ); 125 | name = Frameworks; 126 | sourceTree = ""; 127 | }; 128 | FB165F509A4860872BF1C164 /* Pods */ = { 129 | isa = PBXGroup; 130 | children = ( 131 | 5B692A46E0E1CC62098ABFFC /* Pods-Runner.debug.xcconfig */, 132 | 12A86209055D4C8F0326837C /* Pods-Runner.release.xcconfig */, 133 | B3866DC0DCC95F72425627EB /* Pods-Runner.profile.xcconfig */, 134 | ); 135 | name = Pods; 136 | sourceTree = ""; 137 | }; 138 | /* End PBXGroup section */ 139 | 140 | /* Begin PBXNativeTarget section */ 141 | 97C146ED1CF9000F007C117D /* Runner */ = { 142 | isa = PBXNativeTarget; 143 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 144 | buildPhases = ( 145 | 545541FB718824A9DF5FB904 /* [CP] Check Pods Manifest.lock */, 146 | 9740EEB61CF901F6004384FC /* Run Script */, 147 | 97C146EA1CF9000F007C117D /* Sources */, 148 | 97C146EB1CF9000F007C117D /* Frameworks */, 149 | 97C146EC1CF9000F007C117D /* Resources */, 150 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 151 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 152 | 0E815F45F10E857198D84F0E /* [CP] Embed Pods Frameworks */, 153 | ); 154 | buildRules = ( 155 | ); 156 | dependencies = ( 157 | ); 158 | name = Runner; 159 | productName = Runner; 160 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 161 | productType = "com.apple.product-type.application"; 162 | }; 163 | /* End PBXNativeTarget section */ 164 | 165 | /* Begin PBXProject section */ 166 | 97C146E61CF9000F007C117D /* Project object */ = { 167 | isa = PBXProject; 168 | attributes = { 169 | LastUpgradeCheck = 1110; 170 | ORGANIZATIONNAME = "The Chromium Authors"; 171 | TargetAttributes = { 172 | 97C146ED1CF9000F007C117D = { 173 | CreatedOnToolsVersion = 7.3.1; 174 | DevelopmentTeam = 3WP67Y22A3; 175 | ProvisioningStyle = Automatic; 176 | }; 177 | }; 178 | }; 179 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 180 | compatibilityVersion = "Xcode 3.2"; 181 | developmentRegion = en; 182 | hasScannedForEncodings = 0; 183 | knownRegions = ( 184 | Base, 185 | en, 186 | ); 187 | mainGroup = 97C146E51CF9000F007C117D; 188 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 189 | projectDirPath = ""; 190 | projectRoot = ""; 191 | targets = ( 192 | 97C146ED1CF9000F007C117D /* Runner */, 193 | ); 194 | }; 195 | /* End PBXProject section */ 196 | 197 | /* Begin PBXResourcesBuildPhase section */ 198 | 97C146EC1CF9000F007C117D /* Resources */ = { 199 | isa = PBXResourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 203 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 204 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 205 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 206 | ); 207 | runOnlyForDeploymentPostprocessing = 0; 208 | }; 209 | /* End PBXResourcesBuildPhase section */ 210 | 211 | /* Begin PBXShellScriptBuildPhase section */ 212 | 0E815F45F10E857198D84F0E /* [CP] Embed Pods Frameworks */ = { 213 | isa = PBXShellScriptBuildPhase; 214 | buildActionMask = 2147483647; 215 | files = ( 216 | ); 217 | inputPaths = ( 218 | "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 219 | "${PODS_ROOT}/../Flutter/Flutter.framework", 220 | ); 221 | name = "[CP] Embed Pods Frameworks"; 222 | outputPaths = ( 223 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 224 | ); 225 | runOnlyForDeploymentPostprocessing = 0; 226 | shellPath = /bin/sh; 227 | shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 228 | showEnvVarsInLog = 0; 229 | }; 230 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 231 | isa = PBXShellScriptBuildPhase; 232 | buildActionMask = 2147483647; 233 | files = ( 234 | ); 235 | inputPaths = ( 236 | ); 237 | name = "Thin Binary"; 238 | outputPaths = ( 239 | ); 240 | runOnlyForDeploymentPostprocessing = 0; 241 | shellPath = /bin/sh; 242 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 243 | }; 244 | 545541FB718824A9DF5FB904 /* [CP] Check Pods Manifest.lock */ = { 245 | isa = PBXShellScriptBuildPhase; 246 | buildActionMask = 2147483647; 247 | files = ( 248 | ); 249 | inputFileListPaths = ( 250 | ); 251 | inputPaths = ( 252 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 253 | "${PODS_ROOT}/Manifest.lock", 254 | ); 255 | name = "[CP] Check Pods Manifest.lock"; 256 | outputFileListPaths = ( 257 | ); 258 | outputPaths = ( 259 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 260 | ); 261 | runOnlyForDeploymentPostprocessing = 0; 262 | shellPath = /bin/sh; 263 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 264 | showEnvVarsInLog = 0; 265 | }; 266 | 9740EEB61CF901F6004384FC /* Run Script */ = { 267 | isa = PBXShellScriptBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | ); 271 | inputPaths = ( 272 | ); 273 | name = "Run Script"; 274 | outputPaths = ( 275 | ); 276 | runOnlyForDeploymentPostprocessing = 0; 277 | shellPath = /bin/sh; 278 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 279 | }; 280 | /* End PBXShellScriptBuildPhase section */ 281 | 282 | /* Begin PBXSourcesBuildPhase section */ 283 | 97C146EA1CF9000F007C117D /* Sources */ = { 284 | isa = PBXSourcesBuildPhase; 285 | buildActionMask = 2147483647; 286 | files = ( 287 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 288 | 97C146F31CF9000F007C117D /* main.m in Sources */, 289 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 290 | ); 291 | runOnlyForDeploymentPostprocessing = 0; 292 | }; 293 | /* End PBXSourcesBuildPhase section */ 294 | 295 | /* Begin PBXVariantGroup section */ 296 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 297 | isa = PBXVariantGroup; 298 | children = ( 299 | 97C146FB1CF9000F007C117D /* Base */, 300 | ); 301 | name = Main.storyboard; 302 | sourceTree = ""; 303 | }; 304 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 305 | isa = PBXVariantGroup; 306 | children = ( 307 | 97C147001CF9000F007C117D /* Base */, 308 | ); 309 | name = LaunchScreen.storyboard; 310 | sourceTree = ""; 311 | }; 312 | /* End PBXVariantGroup section */ 313 | 314 | /* Begin XCBuildConfiguration section */ 315 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 316 | isa = XCBuildConfiguration; 317 | buildSettings = { 318 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 319 | ALWAYS_SEARCH_USER_PATHS = NO; 320 | CLANG_ANALYZER_NONNULL = YES; 321 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 322 | CLANG_CXX_LIBRARY = "libc++"; 323 | CLANG_ENABLE_MODULES = YES; 324 | CLANG_ENABLE_OBJC_ARC = YES; 325 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 326 | CLANG_WARN_BOOL_CONVERSION = YES; 327 | CLANG_WARN_COMMA = YES; 328 | CLANG_WARN_CONSTANT_CONVERSION = YES; 329 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 330 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 331 | CLANG_WARN_EMPTY_BODY = YES; 332 | CLANG_WARN_ENUM_CONVERSION = YES; 333 | CLANG_WARN_INFINITE_RECURSION = YES; 334 | CLANG_WARN_INT_CONVERSION = YES; 335 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 336 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 337 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 338 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 339 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 340 | CLANG_WARN_STRICT_PROTOTYPES = YES; 341 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 342 | CLANG_WARN_UNREACHABLE_CODE = YES; 343 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 344 | CODE_SIGN_IDENTITY = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 345 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 346 | COPY_PHASE_STRIP = NO; 347 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 348 | ENABLE_NS_ASSERTIONS = NO; 349 | ENABLE_STRICT_OBJC_MSGSEND = YES; 350 | GCC_C_LANGUAGE_STANDARD = gnu99; 351 | GCC_NO_COMMON_BLOCKS = YES; 352 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 353 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 354 | GCC_WARN_UNDECLARED_SELECTOR = YES; 355 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 356 | GCC_WARN_UNUSED_FUNCTION = YES; 357 | GCC_WARN_UNUSED_VARIABLE = YES; 358 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 359 | MTL_ENABLE_DEBUG_INFO = NO; 360 | SDKROOT = iphoneos; 361 | TARGETED_DEVICE_FAMILY = "1,2"; 362 | VALIDATE_PRODUCT = YES; 363 | }; 364 | name = Profile; 365 | }; 366 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 367 | isa = XCBuildConfiguration; 368 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 369 | buildSettings = { 370 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 371 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 372 | CODE_SIGN_IDENTITY = "iPhone Developer"; 373 | CODE_SIGN_STYLE = Automatic; 374 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 375 | DEVELOPMENT_TEAM = 3WP67Y22A3; 376 | ENABLE_BITCODE = NO; 377 | FRAMEWORK_SEARCH_PATHS = ( 378 | "$(inherited)", 379 | "$(PROJECT_DIR)/Flutter", 380 | ); 381 | INFOPLIST_FILE = Runner/Info.plist; 382 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 383 | LIBRARY_SEARCH_PATHS = ( 384 | "$(inherited)", 385 | "$(PROJECT_DIR)/Flutter", 386 | ); 387 | PRODUCT_BUNDLE_IDENTIFIER = "com.oakromulo.persistent-queue-example"; 388 | PRODUCT_NAME = "$(TARGET_NAME)"; 389 | PROVISIONING_PROFILE_SPECIFIER = ""; 390 | VERSIONING_SYSTEM = "apple-generic"; 391 | }; 392 | name = Profile; 393 | }; 394 | 97C147031CF9000F007C117D /* Debug */ = { 395 | isa = XCBuildConfiguration; 396 | buildSettings = { 397 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 398 | ALWAYS_SEARCH_USER_PATHS = NO; 399 | CLANG_ANALYZER_NONNULL = YES; 400 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 401 | CLANG_CXX_LIBRARY = "libc++"; 402 | CLANG_ENABLE_MODULES = YES; 403 | CLANG_ENABLE_OBJC_ARC = YES; 404 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 405 | CLANG_WARN_BOOL_CONVERSION = YES; 406 | CLANG_WARN_COMMA = YES; 407 | CLANG_WARN_CONSTANT_CONVERSION = YES; 408 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 409 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 410 | CLANG_WARN_EMPTY_BODY = YES; 411 | CLANG_WARN_ENUM_CONVERSION = YES; 412 | CLANG_WARN_INFINITE_RECURSION = YES; 413 | CLANG_WARN_INT_CONVERSION = YES; 414 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 415 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 416 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 417 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 418 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 419 | CLANG_WARN_STRICT_PROTOTYPES = YES; 420 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 421 | CLANG_WARN_UNREACHABLE_CODE = YES; 422 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 423 | CODE_SIGN_IDENTITY = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 424 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 425 | COPY_PHASE_STRIP = NO; 426 | DEBUG_INFORMATION_FORMAT = dwarf; 427 | ENABLE_STRICT_OBJC_MSGSEND = YES; 428 | ENABLE_TESTABILITY = YES; 429 | GCC_C_LANGUAGE_STANDARD = gnu99; 430 | GCC_DYNAMIC_NO_PIC = NO; 431 | GCC_NO_COMMON_BLOCKS = YES; 432 | GCC_OPTIMIZATION_LEVEL = 0; 433 | GCC_PREPROCESSOR_DEFINITIONS = ( 434 | "DEBUG=1", 435 | "$(inherited)", 436 | ); 437 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 438 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 439 | GCC_WARN_UNDECLARED_SELECTOR = YES; 440 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 441 | GCC_WARN_UNUSED_FUNCTION = YES; 442 | GCC_WARN_UNUSED_VARIABLE = YES; 443 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 444 | MTL_ENABLE_DEBUG_INFO = YES; 445 | ONLY_ACTIVE_ARCH = YES; 446 | SDKROOT = iphoneos; 447 | TARGETED_DEVICE_FAMILY = "1,2"; 448 | }; 449 | name = Debug; 450 | }; 451 | 97C147041CF9000F007C117D /* Release */ = { 452 | isa = XCBuildConfiguration; 453 | buildSettings = { 454 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 455 | ALWAYS_SEARCH_USER_PATHS = NO; 456 | CLANG_ANALYZER_NONNULL = YES; 457 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 458 | CLANG_CXX_LIBRARY = "libc++"; 459 | CLANG_ENABLE_MODULES = YES; 460 | CLANG_ENABLE_OBJC_ARC = YES; 461 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 462 | CLANG_WARN_BOOL_CONVERSION = YES; 463 | CLANG_WARN_COMMA = YES; 464 | CLANG_WARN_CONSTANT_CONVERSION = YES; 465 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 466 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 467 | CLANG_WARN_EMPTY_BODY = YES; 468 | CLANG_WARN_ENUM_CONVERSION = YES; 469 | CLANG_WARN_INFINITE_RECURSION = YES; 470 | CLANG_WARN_INT_CONVERSION = YES; 471 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 472 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 473 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 474 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 475 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 476 | CLANG_WARN_STRICT_PROTOTYPES = YES; 477 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 478 | CLANG_WARN_UNREACHABLE_CODE = YES; 479 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 480 | CODE_SIGN_IDENTITY = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 481 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 482 | COPY_PHASE_STRIP = NO; 483 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 484 | ENABLE_NS_ASSERTIONS = NO; 485 | ENABLE_STRICT_OBJC_MSGSEND = YES; 486 | GCC_C_LANGUAGE_STANDARD = gnu99; 487 | GCC_NO_COMMON_BLOCKS = YES; 488 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 489 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 490 | GCC_WARN_UNDECLARED_SELECTOR = YES; 491 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 492 | GCC_WARN_UNUSED_FUNCTION = YES; 493 | GCC_WARN_UNUSED_VARIABLE = YES; 494 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 495 | MTL_ENABLE_DEBUG_INFO = NO; 496 | SDKROOT = iphoneos; 497 | TARGETED_DEVICE_FAMILY = "1,2"; 498 | VALIDATE_PRODUCT = YES; 499 | }; 500 | name = Release; 501 | }; 502 | 97C147061CF9000F007C117D /* Debug */ = { 503 | isa = XCBuildConfiguration; 504 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 505 | buildSettings = { 506 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 507 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 508 | CODE_SIGN_IDENTITY = "iPhone Developer"; 509 | CODE_SIGN_STYLE = Automatic; 510 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 511 | DEVELOPMENT_TEAM = 3WP67Y22A3; 512 | ENABLE_BITCODE = NO; 513 | FRAMEWORK_SEARCH_PATHS = ( 514 | "$(inherited)", 515 | "$(PROJECT_DIR)/Flutter", 516 | ); 517 | INFOPLIST_FILE = Runner/Info.plist; 518 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 519 | LIBRARY_SEARCH_PATHS = ( 520 | "$(inherited)", 521 | "$(PROJECT_DIR)/Flutter", 522 | ); 523 | PRODUCT_BUNDLE_IDENTIFIER = "com.oakromulo.persistent-queue-example"; 524 | PRODUCT_NAME = "$(TARGET_NAME)"; 525 | PROVISIONING_PROFILE_SPECIFIER = ""; 526 | VERSIONING_SYSTEM = "apple-generic"; 527 | }; 528 | name = Debug; 529 | }; 530 | 97C147071CF9000F007C117D /* Release */ = { 531 | isa = XCBuildConfiguration; 532 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 533 | buildSettings = { 534 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 535 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 536 | CODE_SIGN_IDENTITY = "iPhone Developer"; 537 | CODE_SIGN_STYLE = Automatic; 538 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 539 | DEVELOPMENT_TEAM = 3WP67Y22A3; 540 | ENABLE_BITCODE = NO; 541 | FRAMEWORK_SEARCH_PATHS = ( 542 | "$(inherited)", 543 | "$(PROJECT_DIR)/Flutter", 544 | ); 545 | INFOPLIST_FILE = Runner/Info.plist; 546 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 547 | LIBRARY_SEARCH_PATHS = ( 548 | "$(inherited)", 549 | "$(PROJECT_DIR)/Flutter", 550 | ); 551 | PRODUCT_BUNDLE_IDENTIFIER = "com.oakromulo.persistent-queue-example"; 552 | PRODUCT_NAME = "$(TARGET_NAME)"; 553 | PROVISIONING_PROFILE_SPECIFIER = ""; 554 | VERSIONING_SYSTEM = "apple-generic"; 555 | }; 556 | name = Release; 557 | }; 558 | /* End XCBuildConfiguration section */ 559 | 560 | /* Begin XCConfigurationList section */ 561 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 562 | isa = XCConfigurationList; 563 | buildConfigurations = ( 564 | 97C147031CF9000F007C117D /* Debug */, 565 | 97C147041CF9000F007C117D /* Release */, 566 | 249021D3217E4FDB00AE95B9 /* Profile */, 567 | ); 568 | defaultConfigurationIsVisible = 0; 569 | defaultConfigurationName = Release; 570 | }; 571 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 572 | isa = XCConfigurationList; 573 | buildConfigurations = ( 574 | 97C147061CF9000F007C117D /* Debug */, 575 | 97C147071CF9000F007C117D /* Release */, 576 | 249021D4217E4FDB00AE95B9 /* Profile */, 577 | ); 578 | defaultConfigurationIsVisible = 0; 579 | defaultConfigurationName = Release; 580 | }; 581 | /* End XCConfigurationList section */ 582 | }; 583 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 584 | } 585 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/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 | demo_app 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 | // ignore_for_file: unawaited_futures, public_member_api_docs 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_persistent_queue/flutter_persistent_queue.dart'; 4 | 5 | Future> example() async { 6 | final persistedValues = {}; 7 | 8 | const int flushAt = 12; 9 | 10 | int autoFlushCnt = 0, pushCnt = 0; 11 | 12 | List toStrList(List list) => 13 | list.map((dynamic v) => '${v['μs']}').toList(); 14 | 15 | // instantiate queue and define implicit flush to fill [persistedValues] 16 | final pq = PersistentQueue('pq', flushAt: flushAt, onFlush: (list) async { 17 | persistedValues.addAll(toStrList(list)); 18 | 19 | autoFlushCnt += list.length; 20 | print('# of FLUSHED elements: ${list.length}'); 21 | 22 | return true; 23 | }); 24 | 25 | // register # of persisted items from previous run 26 | final initCnt = await pq.length; 27 | 28 | // preview old elements before adding new ones, without dequeueing 29 | persistedValues.addAll(toStrList(await pq.toList())); 30 | 31 | // enqueue a random-ish amount of values, without awaiting 32 | for (int i = 0; i < 36; ++i) { 33 | final int microseconds = DateTime.now().microsecondsSinceEpoch; 34 | 35 | if (microseconds % 10 > 0) { 36 | continue; 37 | } 38 | 39 | pq.push({'μs': '$microseconds'}); 40 | ++pushCnt; 41 | } 42 | 43 | print('''\t 44 | items reloaded from previous run: $initCnt 45 | items left due to persist until next run: ${await pq.length} 46 | items read from the queue: ${persistedValues.length} 47 | items flushed from the queue: $autoFlushCnt 48 | items written to the queue: $pushCnt 49 | queue configured to flush at: $flushAt 50 | '''); 51 | 52 | await pq.destroy(); 53 | print('the queue is gone'); 54 | 55 | return persistedValues.toList(growable: false)..sort(); 56 | } 57 | 58 | void main() => runApp(ExampleApp()); 59 | 60 | class ExampleApp extends StatelessWidget { 61 | @override 62 | Widget build(_) => FutureBuilder(future: example(), builder: app); 63 | } 64 | 65 | Widget app(BuildContext context, AsyncSnapshot snapshot) => 66 | MaterialApp(home: home(snapshot)); 67 | 68 | Widget home(AsyncSnapshot snapshot) => 69 | Scaffold(appBar: AppBar(title: Text('Example')), body: body(snapshot)); 70 | 71 | Widget body(AsyncSnapshot snapshot) { 72 | if (snapshot.data == null) { 73 | return Center(child: CircularProgressIndicator()); 74 | } 75 | 76 | final children = (snapshot.data as List) 77 | .map((s) => ListTile(leading: Icon(Icons.grade), title: Text(s))) 78 | .toList(); 79 | 80 | return ListView(children: children); 81 | } 82 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: an example 3 | version: 0.0.1+1 4 | 5 | environment: 6 | flutter: ">=1.2.0 <2.0.0" 7 | sdk: ">=2.3.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | flutter_persistent_queue: 13 | path: ../ 14 | 15 | flutter: 16 | uses-material-design: true 17 | -------------------------------------------------------------------------------- /lib/flutter_persistent_queue.dart: -------------------------------------------------------------------------------- 1 | /// A file-based queue that persists on local storage for flutter mobile apps. 2 | /// 3 | /// Typical use-case scenario is for small to medium sized in-device buffers 4 | /// storing persistent yet temporary mission-critical data, until it can be 5 | /// efficiently and safely consumed / delivered permanently - such as for 6 | /// custom analytics and specialized logging applications. 7 | /// 8 | /// The current implementation is minimalist by design and only supports a 9 | /// very minimal subset of methods. All methods calls are buffered and 10 | /// executed sequentially on an isolated event loop per queue. 11 | library flutter_persistent_queue; 12 | 13 | import 'dart:async' 14 | show Completer, FutureOr, StreamController, StreamSubscription; 15 | import 'package:localstorage/localstorage.dart' show LocalStorage; 16 | 17 | /// A [PersistentQueue] stores data via [push] and clears it via [flush] calls. 18 | class PersistentQueue { 19 | /// Constructs a new [PersistentQueue] or returns a previously cached one. 20 | /// 21 | /// [filename] gets instantiated under `ApplicationDocumentsDirectory` to 22 | /// store/load the persistent queue. 23 | /// 24 | /// An optional [onFlush] handler can be supplied at construction 25 | /// time, to be called implicitly before each [flush()] operation emptying 26 | /// the queue. When [onFlush] is provided the queue will be emptied as long 27 | /// as the handler does not return `false`. 28 | /// 29 | /// The [flushAt] and [flushTimeout] parameters specify trigger conditions 30 | /// for firing automatic implicit [flush()] operations. 31 | /// 32 | /// [flushAt] establishes a desired target ceiling for locally store items, 33 | /// with a default of `100`. It's also possible to set a [flushTimeout] 34 | /// for a time-based [flush()] trigger, with a default [Duration] of 5 35 | /// minutes. Both parameters can only be bypassed by setting very large 36 | /// values, by design. 37 | /// 38 | /// Setting [maxLength] causes the queue to throw exceptions at [push] time 39 | /// when the queue internally holds more elements than this hard maximum. By 40 | /// default it's calculated as 5 times the size of [flushAt]. 41 | factory PersistentQueue(String filename, 42 | {int flushAt = 100, 43 | Duration flushTimeout = const Duration(minutes: 5), 44 | int maxLength, 45 | String nickname, 46 | FutureOr Function(List) onFlush}) { 47 | _configs[filename] = _Config( 48 | flushAt: flushAt, 49 | flushTimeout: flushTimeout, 50 | maxLength: maxLength ?? flushAt * 5, 51 | onFlush: onFlush); 52 | 53 | if (_queues.containsKey(filename)) { 54 | return _queues[filename]; 55 | } 56 | 57 | return _queues[filename] = 58 | PersistentQueue._internal(filename, nickname ?? filename); 59 | } 60 | 61 | PersistentQueue._internal(this.filename, this.nickname) 62 | : _buffer = _Buffer() { 63 | _ready = _defer(_reload); 64 | } 65 | 66 | /// Permanent storage extensionless destination filename. 67 | final String filename; 68 | 69 | /// Optional queue name/alias for debug purposes, defaults to [filename]. 70 | final String nickname; 71 | 72 | static final _configs = {}; 73 | static final _queues = {}; 74 | 75 | final _Buffer _buffer; 76 | 77 | DateTime _deadline; 78 | Exception _errorState; 79 | int _len = 0; 80 | Future _ready; 81 | 82 | /// Actual queue length after buffered operations go through. 83 | Future get length => _defer(() => _len); 84 | 85 | /// Flag indicating queue readiness after initial reload event. 86 | Future get ready => _ready; 87 | 88 | /// Clear the list and return queued items. 89 | Future clear() => _flushWrap(true); 90 | 91 | /// Dispose all queue resources. 92 | Future destroy() => _buffer.defer(_destroy); 93 | 94 | /// Schedule a flush instruction to happen after current task buffer clears. 95 | /// 96 | /// An optional callback [onFlush] may be provided and the queue only gets 97 | /// emptied if [onFlush] does not return `false`. It holds priority over the 98 | /// also optional onFlush defined at construction time. 99 | Future flush([FutureOr Function(List) onFlush]) => 100 | _defer(() => _flush(onFlush)); 101 | 102 | /// Push an [item] to the end of the [PersistentQueue] after buffer clears. 103 | /// 104 | /// p.s. [item] must be json encodable, as `json.encode()` is called over it 105 | Future push(dynamic item) => _defer(() => _push(item)); 106 | 107 | /// Preview a [List] of currently buffered items, without any dequeuing. 108 | Future toList() => _flushWrap(false); 109 | 110 | _Config get _config => _configs[filename]; 111 | bool get _isExpired => _deadline != null && _nowUtc.isAfter(_deadline); 112 | DateTime get _nowUtc => DateTime.now().toUtc(); 113 | 114 | Future _defer(FutureOr Function() action) { 115 | void checkErrorState() { 116 | if (_errorState != null) { 117 | throw Exception(_errorState); 118 | } 119 | } 120 | 121 | checkErrorState(); 122 | 123 | return _buffer 124 | .defer(() => Future.sync(checkErrorState).then((_) => action())); 125 | } 126 | 127 | Future _destroy() { 128 | _configs.remove(filename); 129 | _queues.remove(filename); 130 | 131 | _errorState ??= Exception('Queue Destroyed'); 132 | 133 | return _buffer.destroy(); 134 | } 135 | 136 | Future _file(Future Function(LocalStorage) inputFunc) async { 137 | final storage = LocalStorage(filename); 138 | 139 | await storage.ready; 140 | await inputFunc(storage); 141 | } 142 | 143 | Future _flush([FutureOr Function(List) onFlushParam]) async { 144 | final onFlush = onFlushParam ?? _config.onFlush ?? (_) => true; 145 | 146 | if (((await onFlush(await _toList())) ?? true) != false) { 147 | await _reset(); 148 | } 149 | } 150 | 151 | Future _flushWrap(bool shouldClear) { 152 | List list; 153 | 154 | return flush((_list) { 155 | list = _list; 156 | 157 | return shouldClear; 158 | }).then((_) => list); 159 | } 160 | 161 | Future _push(dynamic item) async { 162 | if (_len > _config.maxLength) { 163 | throw Exception('QueueOverflow'); 164 | } 165 | 166 | await _write(item); 167 | 168 | if ((_len >= _config.flushAt) || _isExpired) { 169 | await _flush(); 170 | } 171 | } 172 | 173 | Future _reload() async { 174 | try { 175 | _errorState = null; 176 | _len = 0; 177 | 178 | await _file((storage) async { 179 | while (await storage.getItem('$_len') != null) { 180 | ++_len; 181 | } 182 | }); 183 | } catch (e) { 184 | _errorState = Exception(e.toString()); 185 | } 186 | } 187 | 188 | Future _reset() async { 189 | await _file((storage) async { 190 | await storage.clear(); 191 | 192 | _len = 0; 193 | }); 194 | } 195 | 196 | void _resetDeadline() => _deadline = _nowUtc.add(_config.flushTimeout); 197 | 198 | Future _toList() async { 199 | if ((_len ?? 0) < 1) { 200 | return []; 201 | } 202 | 203 | final li = List(_len); 204 | 205 | await _file((storage) async { 206 | for (int k = 0; k < _len; ++k) { 207 | li[k] = await storage.getItem('$k'); 208 | } 209 | }); 210 | 211 | return li; 212 | } 213 | 214 | Future _write(dynamic value) async { 215 | await _file((storage) async { 216 | await storage.setItem('$_len', value); 217 | 218 | if (++_len == 1) { 219 | _resetDeadline(); 220 | } 221 | }); 222 | } 223 | } 224 | 225 | class _Buffer { 226 | _Buffer() { 227 | _sub = _controller.stream.listen((action) => _sub.pause(action.run())); 228 | } 229 | 230 | final _controller = StreamController<_BufferItem>(); 231 | StreamSubscription<_BufferItem> _sub; 232 | 233 | Future defer(FutureOr Function() action) { 234 | final item = _BufferItem(action); 235 | 236 | _controller.add(item); 237 | 238 | return item.future; 239 | } 240 | 241 | Future destroy() => _sub.cancel().then((_) => _controller.close()); 242 | } 243 | 244 | class _BufferItem { 245 | _BufferItem(this._handler); 246 | 247 | final _completer = Completer(); 248 | final FutureOr Function() _handler; 249 | 250 | Future get future => _completer.future; 251 | 252 | Future run() async { 253 | try { 254 | final res = await Future.sync(_handler); 255 | 256 | _completer.complete(res); 257 | 258 | return res; 259 | } catch (e, s) { 260 | _completer.completeError(e, s); 261 | 262 | return null; 263 | } 264 | } 265 | } 266 | 267 | class _Config { 268 | _Config({this.flushAt, this.flushTimeout, this.maxLength, this.onFlush}); 269 | 270 | final int flushAt; 271 | final Duration flushTimeout; 272 | final int maxLength; 273 | final FutureOr Function(List) onFlush; 274 | } 275 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_persistent_queue 2 | description: > 3 | Simple file-based non-volatile persistent queue implementation for flutter. 4 | Ideal for in-device sequential buffers that must persist between app runs. 5 | version: 6.2.0 6 | homepage: https://github.com/oakromulo/flutter_persistent_queue 7 | repository: https://github.com/oakromulo/flutter_persistent_queue.git 8 | issue_tracker: https://github.com/oakromulo/flutter_persistent_queue/issues 9 | 10 | environment: 11 | sdk: ">=2.12.0 <3.0.0" 12 | 13 | dependencies: 14 | flutter: 15 | sdk: flutter 16 | localstorage: ^4.0.0+1 17 | 18 | dev_dependencies: 19 | flutter_driver: 20 | sdk: flutter 21 | test: any 22 | -------------------------------------------------------------------------------- /test/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .dart_tool/ 3 | .idea 4 | *.iml 5 | 6 | .packages 7 | .pub/ 8 | 9 | build/ 10 | ios/.generated/ 11 | ios/Flutter/Generated.xcconfig 12 | ios/Runner/GeneratedPluginRegistrant.* 13 | android/local.properties 14 | android/app/src/main/java/io/flutter/plugins/Generated* 15 | 16 | # Miscellaneous 17 | *.log 18 | *.pyc 19 | *.swp 20 | .DS_Store 21 | .atom/ 22 | .buildlog/ 23 | .history 24 | .svn/ 25 | 26 | # IntelliJ related 27 | *.iml 28 | *.ipr 29 | *.iws 30 | .idea/ 31 | 32 | # Visual Studio Code related 33 | .vscode/ 34 | 35 | # Flutter/Dart/Pub related 36 | **/doc/api/ 37 | .dart_tool/ 38 | .flutter-plugins 39 | .packages 40 | .pub-cache/ 41 | .pub/ 42 | build/ 43 | 44 | # Android related 45 | **/android/**/gradle-wrapper.jar 46 | **/android/.gradle 47 | **/android/captures/ 48 | **/android/gradlew 49 | **/android/gradlew.bat 50 | **/android/local.properties 51 | **/android/**/GeneratedPluginRegistrant.java 52 | 53 | # iOS/XCode related 54 | **/ios/**/*.mode1v3 55 | **/ios/**/*.mode2v3 56 | **/ios/**/*.moved-aside 57 | **/ios/**/*.pbxuser 58 | **/ios/**/*.perspectivev3 59 | **/ios/**/*sync/ 60 | **/ios/**/.sconsign.dblite 61 | **/ios/**/.tags* 62 | **/ios/**/.vagrant/ 63 | **/ios/**/DerivedData/ 64 | **/ios/**/Icon? 65 | **/ios/**/Pods/ 66 | **/ios/**/.symlinks/ 67 | **/ios/**/profile 68 | **/ios/**/xcuserdata 69 | **/ios/.generated/ 70 | **/ios/Flutter/.last_build_id 71 | **/ios/Flutter/App.framework 72 | **/ios/Flutter/Flutter.framework 73 | **/ios/Flutter/Generated.xcconfig 74 | **/ios/Flutter/app.flx 75 | **/ios/Flutter/app.zip 76 | **/ios/Flutter/flutter_assets/ 77 | **/ios/ServiceDefinitions.json 78 | **/ios/Runner/GeneratedPluginRegistrant.* 79 | 80 | # Exceptions to above rules. 81 | !**/ios/**/default.mode1v3 82 | !**/ios/**/default.mode2v3 83 | !**/ios/**/default.pbxuser 84 | !**/ios/**/default.perspectivev3 85 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 86 | -------------------------------------------------------------------------------- /test/.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: 8661d8aecd626f7f57ccbcb735553edc05a2e713 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /test/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 28 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.test_app" 37 | minSdkVersion 16 38 | targetSdkVersion 28 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 | -------------------------------------------------------------------------------- /test/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 9 | 13 | 20 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /test/android/app/src/main/java/com/example/test_app/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.test_app; 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 | -------------------------------------------------------------------------------- /test/android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /test/android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /test/android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /test/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /test/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /test/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /test/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /test/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/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 | -------------------------------------------------------------------------------- /test/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /test/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 | -------------------------------------------------------------------------------- /test/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 | -------------------------------------------------------------------------------- /test/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 | -------------------------------------------------------------------------------- /test/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /test/ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 32 | end 33 | 34 | post_install do |installer| 35 | installer.pods_project.targets.each do |target| 36 | flutter_additional_ios_build_settings(target) 37 | end 38 | end 39 | -------------------------------------------------------------------------------- /test/ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - Flutter (1.0.0) 3 | - path_provider (0.0.1): 4 | - Flutter 5 | 6 | DEPENDENCIES: 7 | - Flutter (from `Flutter`) 8 | - path_provider (from `.symlinks/plugins/path_provider/ios`) 9 | 10 | EXTERNAL SOURCES: 11 | Flutter: 12 | :path: Flutter 13 | path_provider: 14 | :path: ".symlinks/plugins/path_provider/ios" 15 | 16 | SPEC CHECKSUMS: 17 | Flutter: 434fef37c0980e73bb6479ef766c45957d4b510c 18 | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c 19 | 20 | PODFILE CHECKSUM: 8e679eca47255a8ca8067c4c67aab20e64cb974d 21 | 22 | COCOAPODS: 1.10.0 23 | -------------------------------------------------------------------------------- /test/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 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 13 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 14 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 15 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 16 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 17 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 18 | BE918B3C5B68C90F63D838C1 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F3323B16F107C8A8FC9CD48 /* libPods-Runner.a */; }; 19 | /* End PBXBuildFile section */ 20 | 21 | /* Begin PBXCopyFilesBuildPhase section */ 22 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 23 | isa = PBXCopyFilesBuildPhase; 24 | buildActionMask = 2147483647; 25 | dstPath = ""; 26 | dstSubfolderSpec = 10; 27 | files = ( 28 | ); 29 | name = "Embed Frameworks"; 30 | runOnlyForDeploymentPostprocessing = 0; 31 | }; 32 | /* End PBXCopyFilesBuildPhase section */ 33 | 34 | /* Begin PBXFileReference section */ 35 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 36 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 37 | 1F3323B16F107C8A8FC9CD48 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 38 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 39 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 40 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 41 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 42 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 43 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 44 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 45 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 46 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 47 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 48 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 49 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 50 | C7CFAB22653A0A0C7EC2738B /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; 51 | E0BF26DAFF00744611AD6B93 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; 52 | E161EDC6BAC0257C436C5778 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 53 | /* End PBXFileReference section */ 54 | 55 | /* Begin PBXFrameworksBuildPhase section */ 56 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 57 | isa = PBXFrameworksBuildPhase; 58 | buildActionMask = 2147483647; 59 | files = ( 60 | BE918B3C5B68C90F63D838C1 /* libPods-Runner.a in Frameworks */, 61 | ); 62 | runOnlyForDeploymentPostprocessing = 0; 63 | }; 64 | /* End PBXFrameworksBuildPhase section */ 65 | 66 | /* Begin PBXGroup section */ 67 | 3D878F80915BB6C64A3A5452 /* Pods */ = { 68 | isa = PBXGroup; 69 | children = ( 70 | E161EDC6BAC0257C436C5778 /* Pods-Runner.debug.xcconfig */, 71 | C7CFAB22653A0A0C7EC2738B /* Pods-Runner.release.xcconfig */, 72 | E0BF26DAFF00744611AD6B93 /* Pods-Runner.profile.xcconfig */, 73 | ); 74 | path = Pods; 75 | sourceTree = ""; 76 | }; 77 | 5BA9DA881B4003D2D2AFBB57 /* Frameworks */ = { 78 | isa = PBXGroup; 79 | children = ( 80 | 1F3323B16F107C8A8FC9CD48 /* libPods-Runner.a */, 81 | ); 82 | name = Frameworks; 83 | sourceTree = ""; 84 | }; 85 | 9740EEB11CF90186004384FC /* Flutter */ = { 86 | isa = PBXGroup; 87 | children = ( 88 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 89 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 90 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 91 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 92 | ); 93 | name = Flutter; 94 | sourceTree = ""; 95 | }; 96 | 97C146E51CF9000F007C117D = { 97 | isa = PBXGroup; 98 | children = ( 99 | 9740EEB11CF90186004384FC /* Flutter */, 100 | 97C146F01CF9000F007C117D /* Runner */, 101 | 97C146EF1CF9000F007C117D /* Products */, 102 | 3D878F80915BB6C64A3A5452 /* Pods */, 103 | 5BA9DA881B4003D2D2AFBB57 /* Frameworks */, 104 | ); 105 | sourceTree = ""; 106 | }; 107 | 97C146EF1CF9000F007C117D /* Products */ = { 108 | isa = PBXGroup; 109 | children = ( 110 | 97C146EE1CF9000F007C117D /* Runner.app */, 111 | ); 112 | name = Products; 113 | sourceTree = ""; 114 | }; 115 | 97C146F01CF9000F007C117D /* Runner */ = { 116 | isa = PBXGroup; 117 | children = ( 118 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 119 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 120 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 121 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 122 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 123 | 97C147021CF9000F007C117D /* Info.plist */, 124 | 97C146F11CF9000F007C117D /* Supporting Files */, 125 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 126 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 127 | ); 128 | path = Runner; 129 | sourceTree = ""; 130 | }; 131 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 132 | isa = PBXGroup; 133 | children = ( 134 | 97C146F21CF9000F007C117D /* main.m */, 135 | ); 136 | name = "Supporting Files"; 137 | sourceTree = ""; 138 | }; 139 | /* End PBXGroup section */ 140 | 141 | /* Begin PBXNativeTarget section */ 142 | 97C146ED1CF9000F007C117D /* Runner */ = { 143 | isa = PBXNativeTarget; 144 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 145 | buildPhases = ( 146 | 96CA5406CD24FD6FC0751570 /* [CP] Check Pods Manifest.lock */, 147 | 9740EEB61CF901F6004384FC /* Run Script */, 148 | 97C146EA1CF9000F007C117D /* Sources */, 149 | 97C146EB1CF9000F007C117D /* Frameworks */, 150 | 97C146EC1CF9000F007C117D /* Resources */, 151 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 152 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 153 | ); 154 | buildRules = ( 155 | ); 156 | dependencies = ( 157 | ); 158 | name = Runner; 159 | productName = Runner; 160 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 161 | productType = "com.apple.product-type.application"; 162 | }; 163 | /* End PBXNativeTarget section */ 164 | 165 | /* Begin PBXProject section */ 166 | 97C146E61CF9000F007C117D /* Project object */ = { 167 | isa = PBXProject; 168 | attributes = { 169 | LastUpgradeCheck = 1110; 170 | ORGANIZATIONNAME = "The Chromium Authors"; 171 | TargetAttributes = { 172 | 97C146ED1CF9000F007C117D = { 173 | CreatedOnToolsVersion = 7.3.1; 174 | DevelopmentTeam = 3WP67Y22A3; 175 | ProvisioningStyle = Automatic; 176 | }; 177 | }; 178 | }; 179 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 180 | compatibilityVersion = "Xcode 3.2"; 181 | developmentRegion = en; 182 | hasScannedForEncodings = 0; 183 | knownRegions = ( 184 | Base, 185 | en, 186 | ); 187 | mainGroup = 97C146E51CF9000F007C117D; 188 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 189 | projectDirPath = ""; 190 | projectRoot = ""; 191 | targets = ( 192 | 97C146ED1CF9000F007C117D /* Runner */, 193 | ); 194 | }; 195 | /* End PBXProject section */ 196 | 197 | /* Begin PBXResourcesBuildPhase section */ 198 | 97C146EC1CF9000F007C117D /* Resources */ = { 199 | isa = PBXResourcesBuildPhase; 200 | buildActionMask = 2147483647; 201 | files = ( 202 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 203 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 204 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 205 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 206 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 207 | ); 208 | runOnlyForDeploymentPostprocessing = 0; 209 | }; 210 | /* End PBXResourcesBuildPhase section */ 211 | 212 | /* Begin PBXShellScriptBuildPhase section */ 213 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 214 | isa = PBXShellScriptBuildPhase; 215 | buildActionMask = 2147483647; 216 | files = ( 217 | ); 218 | inputPaths = ( 219 | ); 220 | name = "Thin Binary"; 221 | outputPaths = ( 222 | ); 223 | runOnlyForDeploymentPostprocessing = 0; 224 | shellPath = /bin/sh; 225 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 226 | }; 227 | 96CA5406CD24FD6FC0751570 /* [CP] Check Pods Manifest.lock */ = { 228 | isa = PBXShellScriptBuildPhase; 229 | buildActionMask = 2147483647; 230 | files = ( 231 | ); 232 | inputFileListPaths = ( 233 | ); 234 | inputPaths = ( 235 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 236 | "${PODS_ROOT}/Manifest.lock", 237 | ); 238 | name = "[CP] Check Pods Manifest.lock"; 239 | outputFileListPaths = ( 240 | ); 241 | outputPaths = ( 242 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 243 | ); 244 | runOnlyForDeploymentPostprocessing = 0; 245 | shellPath = /bin/sh; 246 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; 247 | showEnvVarsInLog = 0; 248 | }; 249 | 9740EEB61CF901F6004384FC /* Run Script */ = { 250 | isa = PBXShellScriptBuildPhase; 251 | buildActionMask = 2147483647; 252 | files = ( 253 | ); 254 | inputPaths = ( 255 | ); 256 | name = "Run Script"; 257 | outputPaths = ( 258 | ); 259 | runOnlyForDeploymentPostprocessing = 0; 260 | shellPath = /bin/sh; 261 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 262 | }; 263 | /* End PBXShellScriptBuildPhase section */ 264 | 265 | /* Begin PBXSourcesBuildPhase section */ 266 | 97C146EA1CF9000F007C117D /* Sources */ = { 267 | isa = PBXSourcesBuildPhase; 268 | buildActionMask = 2147483647; 269 | files = ( 270 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 271 | 97C146F31CF9000F007C117D /* main.m in Sources */, 272 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 273 | ); 274 | runOnlyForDeploymentPostprocessing = 0; 275 | }; 276 | /* End PBXSourcesBuildPhase section */ 277 | 278 | /* Begin PBXVariantGroup section */ 279 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 280 | isa = PBXVariantGroup; 281 | children = ( 282 | 97C146FB1CF9000F007C117D /* Base */, 283 | ); 284 | name = Main.storyboard; 285 | sourceTree = ""; 286 | }; 287 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 288 | isa = PBXVariantGroup; 289 | children = ( 290 | 97C147001CF9000F007C117D /* Base */, 291 | ); 292 | name = LaunchScreen.storyboard; 293 | sourceTree = ""; 294 | }; 295 | /* End PBXVariantGroup section */ 296 | 297 | /* Begin XCBuildConfiguration section */ 298 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 299 | isa = XCBuildConfiguration; 300 | buildSettings = { 301 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 302 | ALWAYS_SEARCH_USER_PATHS = NO; 303 | CLANG_ANALYZER_NONNULL = YES; 304 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 305 | CLANG_CXX_LIBRARY = "libc++"; 306 | CLANG_ENABLE_MODULES = YES; 307 | CLANG_ENABLE_OBJC_ARC = YES; 308 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 309 | CLANG_WARN_BOOL_CONVERSION = YES; 310 | CLANG_WARN_COMMA = YES; 311 | CLANG_WARN_CONSTANT_CONVERSION = YES; 312 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 313 | CLANG_WARN_EMPTY_BODY = YES; 314 | CLANG_WARN_ENUM_CONVERSION = YES; 315 | CLANG_WARN_INFINITE_RECURSION = YES; 316 | CLANG_WARN_INT_CONVERSION = YES; 317 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 318 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 319 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 320 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 321 | CLANG_WARN_STRICT_PROTOTYPES = YES; 322 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 323 | CLANG_WARN_UNREACHABLE_CODE = YES; 324 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 325 | CODE_SIGN_IDENTITY = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 326 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 327 | COPY_PHASE_STRIP = NO; 328 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 329 | ENABLE_NS_ASSERTIONS = NO; 330 | ENABLE_STRICT_OBJC_MSGSEND = YES; 331 | GCC_C_LANGUAGE_STANDARD = gnu99; 332 | GCC_NO_COMMON_BLOCKS = YES; 333 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 334 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 335 | GCC_WARN_UNDECLARED_SELECTOR = YES; 336 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 337 | GCC_WARN_UNUSED_FUNCTION = YES; 338 | GCC_WARN_UNUSED_VARIABLE = YES; 339 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 340 | MTL_ENABLE_DEBUG_INFO = NO; 341 | SDKROOT = iphoneos; 342 | TARGETED_DEVICE_FAMILY = "1,2"; 343 | VALIDATE_PRODUCT = YES; 344 | }; 345 | name = Profile; 346 | }; 347 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 348 | isa = XCBuildConfiguration; 349 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 350 | buildSettings = { 351 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 352 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 353 | CODE_SIGN_IDENTITY = "iPhone Developer"; 354 | CODE_SIGN_STYLE = Automatic; 355 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 356 | DEVELOPMENT_TEAM = 3WP67Y22A3; 357 | ENABLE_BITCODE = NO; 358 | FRAMEWORK_SEARCH_PATHS = ( 359 | "$(inherited)", 360 | "$(PROJECT_DIR)/Flutter", 361 | ); 362 | INFOPLIST_FILE = Runner/Info.plist; 363 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 364 | LIBRARY_SEARCH_PATHS = ( 365 | "$(inherited)", 366 | "$(PROJECT_DIR)/Flutter", 367 | ); 368 | PRODUCT_BUNDLE_IDENTIFIER = "com.oakromulo.flutter-persistent-queue-test-app"; 369 | PRODUCT_NAME = "$(TARGET_NAME)"; 370 | PROVISIONING_PROFILE_SPECIFIER = ""; 371 | TARGETED_DEVICE_FAMILY = 1; 372 | VERSIONING_SYSTEM = "apple-generic"; 373 | }; 374 | name = Profile; 375 | }; 376 | 97C147031CF9000F007C117D /* Debug */ = { 377 | isa = XCBuildConfiguration; 378 | buildSettings = { 379 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 380 | ALWAYS_SEARCH_USER_PATHS = NO; 381 | CLANG_ANALYZER_NONNULL = YES; 382 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 383 | CLANG_CXX_LIBRARY = "libc++"; 384 | CLANG_ENABLE_MODULES = YES; 385 | CLANG_ENABLE_OBJC_ARC = YES; 386 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 387 | CLANG_WARN_BOOL_CONVERSION = YES; 388 | CLANG_WARN_COMMA = YES; 389 | CLANG_WARN_CONSTANT_CONVERSION = YES; 390 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 391 | CLANG_WARN_EMPTY_BODY = YES; 392 | CLANG_WARN_ENUM_CONVERSION = YES; 393 | CLANG_WARN_INFINITE_RECURSION = YES; 394 | CLANG_WARN_INT_CONVERSION = YES; 395 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 396 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 397 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 398 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 399 | CLANG_WARN_STRICT_PROTOTYPES = YES; 400 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 401 | CLANG_WARN_UNREACHABLE_CODE = YES; 402 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 403 | CODE_SIGN_IDENTITY = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 404 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 405 | COPY_PHASE_STRIP = NO; 406 | DEBUG_INFORMATION_FORMAT = dwarf; 407 | ENABLE_STRICT_OBJC_MSGSEND = YES; 408 | ENABLE_TESTABILITY = YES; 409 | GCC_C_LANGUAGE_STANDARD = gnu99; 410 | GCC_DYNAMIC_NO_PIC = NO; 411 | GCC_NO_COMMON_BLOCKS = YES; 412 | GCC_OPTIMIZATION_LEVEL = 0; 413 | GCC_PREPROCESSOR_DEFINITIONS = ( 414 | "DEBUG=1", 415 | "$(inherited)", 416 | ); 417 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 418 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 419 | GCC_WARN_UNDECLARED_SELECTOR = YES; 420 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 421 | GCC_WARN_UNUSED_FUNCTION = YES; 422 | GCC_WARN_UNUSED_VARIABLE = YES; 423 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 424 | MTL_ENABLE_DEBUG_INFO = YES; 425 | ONLY_ACTIVE_ARCH = YES; 426 | SDKROOT = iphoneos; 427 | TARGETED_DEVICE_FAMILY = "1,2"; 428 | }; 429 | name = Debug; 430 | }; 431 | 97C147041CF9000F007C117D /* Release */ = { 432 | isa = XCBuildConfiguration; 433 | buildSettings = { 434 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 435 | ALWAYS_SEARCH_USER_PATHS = NO; 436 | CLANG_ANALYZER_NONNULL = YES; 437 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 438 | CLANG_CXX_LIBRARY = "libc++"; 439 | CLANG_ENABLE_MODULES = YES; 440 | CLANG_ENABLE_OBJC_ARC = YES; 441 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 442 | CLANG_WARN_BOOL_CONVERSION = YES; 443 | CLANG_WARN_COMMA = YES; 444 | CLANG_WARN_CONSTANT_CONVERSION = YES; 445 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 446 | CLANG_WARN_EMPTY_BODY = YES; 447 | CLANG_WARN_ENUM_CONVERSION = YES; 448 | CLANG_WARN_INFINITE_RECURSION = YES; 449 | CLANG_WARN_INT_CONVERSION = YES; 450 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 451 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 452 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 453 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 454 | CLANG_WARN_STRICT_PROTOTYPES = YES; 455 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 456 | CLANG_WARN_UNREACHABLE_CODE = YES; 457 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 458 | CODE_SIGN_IDENTITY = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 459 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: oakromulo@gmail.com (N25KH699YF)"; 460 | COPY_PHASE_STRIP = NO; 461 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 462 | ENABLE_NS_ASSERTIONS = NO; 463 | ENABLE_STRICT_OBJC_MSGSEND = YES; 464 | GCC_C_LANGUAGE_STANDARD = gnu99; 465 | GCC_NO_COMMON_BLOCKS = YES; 466 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 467 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 468 | GCC_WARN_UNDECLARED_SELECTOR = YES; 469 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 470 | GCC_WARN_UNUSED_FUNCTION = YES; 471 | GCC_WARN_UNUSED_VARIABLE = YES; 472 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 473 | MTL_ENABLE_DEBUG_INFO = NO; 474 | SDKROOT = iphoneos; 475 | TARGETED_DEVICE_FAMILY = "1,2"; 476 | VALIDATE_PRODUCT = YES; 477 | }; 478 | name = Release; 479 | }; 480 | 97C147061CF9000F007C117D /* Debug */ = { 481 | isa = XCBuildConfiguration; 482 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 483 | buildSettings = { 484 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 485 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 486 | CODE_SIGN_IDENTITY = "iPhone Developer"; 487 | CODE_SIGN_STYLE = Automatic; 488 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 489 | DEVELOPMENT_TEAM = 3WP67Y22A3; 490 | ENABLE_BITCODE = NO; 491 | FRAMEWORK_SEARCH_PATHS = ( 492 | "$(inherited)", 493 | "$(PROJECT_DIR)/Flutter", 494 | ); 495 | INFOPLIST_FILE = Runner/Info.plist; 496 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 497 | LIBRARY_SEARCH_PATHS = ( 498 | "$(inherited)", 499 | "$(PROJECT_DIR)/Flutter", 500 | ); 501 | PRODUCT_BUNDLE_IDENTIFIER = "com.oakromulo.flutter-persistent-queue-test-app"; 502 | PRODUCT_NAME = "$(TARGET_NAME)"; 503 | PROVISIONING_PROFILE_SPECIFIER = ""; 504 | TARGETED_DEVICE_FAMILY = 1; 505 | VERSIONING_SYSTEM = "apple-generic"; 506 | }; 507 | name = Debug; 508 | }; 509 | 97C147071CF9000F007C117D /* Release */ = { 510 | isa = XCBuildConfiguration; 511 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 512 | buildSettings = { 513 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; 514 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 515 | CODE_SIGN_IDENTITY = "iPhone Developer"; 516 | CODE_SIGN_STYLE = Automatic; 517 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 518 | DEVELOPMENT_TEAM = 3WP67Y22A3; 519 | ENABLE_BITCODE = NO; 520 | FRAMEWORK_SEARCH_PATHS = ( 521 | "$(inherited)", 522 | "$(PROJECT_DIR)/Flutter", 523 | ); 524 | INFOPLIST_FILE = Runner/Info.plist; 525 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 526 | LIBRARY_SEARCH_PATHS = ( 527 | "$(inherited)", 528 | "$(PROJECT_DIR)/Flutter", 529 | ); 530 | PRODUCT_BUNDLE_IDENTIFIER = "com.oakromulo.flutter-persistent-queue-test-app"; 531 | PRODUCT_NAME = "$(TARGET_NAME)"; 532 | PROVISIONING_PROFILE_SPECIFIER = ""; 533 | TARGETED_DEVICE_FAMILY = 1; 534 | VERSIONING_SYSTEM = "apple-generic"; 535 | }; 536 | name = Release; 537 | }; 538 | /* End XCBuildConfiguration section */ 539 | 540 | /* Begin XCConfigurationList section */ 541 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 542 | isa = XCConfigurationList; 543 | buildConfigurations = ( 544 | 97C147031CF9000F007C117D /* Debug */, 545 | 97C147041CF9000F007C117D /* Release */, 546 | 249021D3217E4FDB00AE95B9 /* Profile */, 547 | ); 548 | defaultConfigurationIsVisible = 0; 549 | defaultConfigurationName = Release; 550 | }; 551 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 552 | isa = XCConfigurationList; 553 | buildConfigurations = ( 554 | 97C147061CF9000F007C117D /* Debug */, 555 | 97C147071CF9000F007C117D /* Release */, 556 | 249021D4217E4FDB00AE95B9 /* Profile */, 557 | ); 558 | defaultConfigurationIsVisible = 0; 559 | defaultConfigurationName = Release; 560 | }; 561 | /* End XCConfigurationList section */ 562 | }; 563 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 564 | } 565 | -------------------------------------------------------------------------------- /test/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /test/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /test/ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /test/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /test/ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /test/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 | -------------------------------------------------------------------------------- /test/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 | -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /test/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 | -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /test/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oakromulo/flutter_persistent_queue/693d4fa0c600c4269ea1033e63bc4b2013c46122/test/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /test/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. -------------------------------------------------------------------------------- /test/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 | -------------------------------------------------------------------------------- /test/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 | -------------------------------------------------------------------------------- /test/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 | test_app 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 | -------------------------------------------------------------------------------- /test/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 | -------------------------------------------------------------------------------- /test/lib/main.dart: -------------------------------------------------------------------------------- 1 | /// @nodoc 2 | // ignore_for_file: unawaited_futures, public_member_api_docs 3 | import 'dart:math'; 4 | import 'package:flutter/foundation.dart'; 5 | import 'package:flutter/material.dart'; 6 | import 'package:flutter_persistent_queue/flutter_persistent_queue.dart'; 7 | 8 | void main() => runApp(MyApp()); 9 | 10 | class MyApp extends StatefulWidget { 11 | @override 12 | State createState() => _MyAppState(); 13 | } 14 | 15 | class _MyAppState extends State { 16 | String txt1 = '', txt2 = ''; 17 | bool unwaitEnabled = true, seqEnabled = true; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return MaterialApp( 22 | home: Scaffold( 23 | body: Center( 24 | child: Column( 25 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 26 | children: [ 27 | Text('UNAWAITED TEST'), 28 | Text(txt1, key: Key('txt1')), 29 | Divider(), 30 | Text('SEQUENTIAL TEST'), 31 | Text(txt2, key: Key('txt2')) 32 | ], 33 | ), 34 | ), 35 | appBar: AppBar(title: Text('Load Test')), 36 | bottomNavigationBar: BottomAppBar( 37 | child: Row( 38 | mainAxisAlignment: MainAxisAlignment.center, 39 | children: [ 40 | Text('Unawaited Test'), 41 | IconButton( 42 | key: Key('unawaited'), 43 | icon: Icon(Icons.grade), 44 | onPressed: () { 45 | if (!unwaitEnabled) return; 46 | unwaitEnabled = false; 47 | _unawaitedTest() 48 | .then((res) => setState(() => txt1 = res)) 49 | .timeout(Duration(seconds: 120)) 50 | .catchError((dynamic e) => setState(() => txt1 = '$e')) 51 | .whenComplete(() => setState(() => unwaitEnabled = true)); 52 | }), 53 | Text('Sequential Test'), 54 | IconButton( 55 | key: Key('sequential'), 56 | icon: Icon(Icons.grade), 57 | onPressed: () { 58 | if (!seqEnabled) return; 59 | seqEnabled = false; 60 | _sequentialTest() 61 | .then((res) => setState(() => txt2 = res)) 62 | .timeout(Duration(seconds: 120)) 63 | .catchError((dynamic e) => setState(() => txt2 = '$e')) 64 | .whenComplete(() => setState(() => seqEnabled = true)); 65 | }) 66 | ], 67 | )), 68 | ), 69 | ); 70 | } 71 | } 72 | 73 | Future _unawaitedTest() async { 74 | const testLen = 5000; 75 | final source = [], target = []; 76 | 77 | Future flushAction(List list) async { 78 | try { 79 | target.addAll(list.map((dynamic v) => v['v'] as int)); 80 | 81 | return true; 82 | } catch (_) { 83 | return false; 84 | } 85 | } 86 | 87 | final pq = PersistentQueue('_unawaited_test_', 88 | flushAt: testLen ~/ 20, maxLength: testLen * 2, onFlush: flushAction); 89 | 90 | await pq.flush((_) async { 91 | debugPrint('queue cleared for unawait test'); 92 | 93 | return true; 94 | }); 95 | 96 | for (int i = testLen; i > 0; --i) { 97 | final v = Random().nextInt(4294967295); 98 | source.add(v); 99 | pq.push({'v': v}); 100 | } 101 | debugPrint('all data pushed to queue'); 102 | 103 | bool hasReset = false; 104 | pq.flush((list) => flushAction(list).then((_) { 105 | hasReset = true; 106 | debugPrint('queue flushed: $testLen items'); 107 | return true; 108 | })); 109 | debugPrint('final flush scheduled with control flag'); 110 | 111 | while (!hasReset) { 112 | debugPrint('1s polling'); 113 | 114 | await Future.delayed(Duration(seconds: 1)); 115 | } 116 | debugPrint('polling finished'); 117 | 118 | await _finalize(pq, source, target); 119 | 120 | return 'unawaited test completed successfully'; 121 | } 122 | 123 | Future _sequentialTest() async { 124 | const testLen = 5000; 125 | final source = [], target = []; 126 | 127 | Future flushAction(List list) async { 128 | try { 129 | target.addAll(list.map((dynamic v) => v['v'] as int)); 130 | debugPrint('flush: ${target.length} / $testLen'); 131 | 132 | return true; 133 | } catch (_) { 134 | return false; 135 | } 136 | } 137 | 138 | final pq = PersistentQueue('_regular_test_', 139 | flushAt: testLen ~/ 20, maxLength: testLen * 2, onFlush: flushAction); 140 | 141 | await pq.flush((_) async { 142 | debugPrint('queue cleared for seq. test'); 143 | 144 | return true; 145 | }); 146 | 147 | for (int i = testLen; i > 0; --i) { 148 | final v = Random().nextInt(4294967295); 149 | 150 | source.add(v); 151 | 152 | await pq.push({'v': v}); 153 | } 154 | 155 | await pq.flush(); 156 | debugPrint('queue operations complete'); 157 | 158 | await _finalize(pq, source, target); 159 | 160 | return 'sequential test completed successfully'; 161 | } 162 | 163 | Future _finalize(PersistentQueue pq, List src, List tgt) async { 164 | _assert((await pq.length) == 0); 165 | _assert(tgt.length == src.length); 166 | 167 | for (int i = src.length - 1; i >= 0; --i) { 168 | _assert(src[i] == tgt[i]); 169 | } 170 | 171 | await pq.destroy(); 172 | } 173 | 174 | void _assert(bool cta) { 175 | if (cta == true) { 176 | return; 177 | } 178 | 179 | throw Exception('TestFailed'); 180 | } 181 | -------------------------------------------------------------------------------- /test/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: test_app 2 | description: dummy app for integration tests 3 | version: 0.0.1+1 4 | 5 | environment: 6 | flutter: ">=1.2.0 <2.0.0" 7 | sdk: ">=2.3.0 <3.0.0" 8 | 9 | dependencies: 10 | flutter: 11 | sdk: flutter 12 | flutter_persistent_queue: 13 | path: ../ 14 | 15 | dev_dependencies: 16 | flutter_driver: 17 | sdk: flutter 18 | test: any 19 | 20 | flutter: 21 | uses-material-design: true 22 | -------------------------------------------------------------------------------- /test/test_driver/app.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_driver/driver_extension.dart'; 2 | import '../lib/main.dart' as app; 3 | 4 | void main() { 5 | enableFlutterDriverExtension(); 6 | app.main(); 7 | } 8 | -------------------------------------------------------------------------------- /test/test_driver/app_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_driver/flutter_driver.dart'; 2 | import 'package:test/test.dart'; 3 | 4 | void main() { 5 | group('Load Test App', () { 6 | final txt1Finder = find.byValueKey('txt1'); 7 | final txt2Finder = find.byValueKey('txt2'); 8 | final unawaitedFinder = find.byValueKey('unawaited'); 9 | final seqFinder = find.byValueKey('sequential'); 10 | 11 | FlutterDriver driver; 12 | 13 | setUpAll(() async => driver = await FlutterDriver.connect()); 14 | 15 | tearDownAll(() async { 16 | if (driver != null) await driver.close(); 17 | }); 18 | 19 | test('run sequential test', () async { 20 | await driver.tap(seqFinder); 21 | 22 | int i = 120; 23 | bool success = false; 24 | 25 | while (--i > 0) { 26 | final txt = await driver.getText(txt2Finder); 27 | if (txt.contains('success')) { 28 | success = true; 29 | break; 30 | } else { 31 | await Future.delayed(Duration(seconds: 1)); 32 | } 33 | } 34 | 35 | expect(success, true); 36 | }); 37 | 38 | test('run unawaited test', () async { 39 | const testLen = 5000; 40 | 41 | await driver.tap(unawaitedFinder); 42 | 43 | final t0 = DateTime.now(); 44 | DateTime t1; 45 | 46 | int i = 600; 47 | bool success = false; 48 | 49 | while (--i > 0) { 50 | final txt = await driver.getText(txt1Finder); 51 | 52 | if (txt.contains('success')) { 53 | t1 = DateTime.now(); 54 | success = true; 55 | break; 56 | } 57 | 58 | await Future.delayed(Duration(milliseconds: 100)); 59 | } 60 | expect(success, true); 61 | 62 | final tput = testLen / t1.difference(t0).inSeconds; 63 | print('throughput: ${tput.toStringAsFixed(2)}'); 64 | expect(tput, greaterThan(250.0)); 65 | }); 66 | }); 67 | } 68 | --------------------------------------------------------------------------------