├── .gitignore ├── .metadata ├── CHANGELOG.md ├── LICENSE ├── README.md ├── analysis_options.yaml ├── example ├── .gitignore ├── .metadata ├── README.md ├── analysis_options.yaml ├── android │ ├── .gitignore │ ├── app │ │ ├── build.gradle │ │ └── src │ │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ │ ├── main │ │ │ ├── AndroidManifest.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── example │ │ │ │ │ └── MainActivity.kt │ │ │ └── res │ │ │ │ ├── drawable-v21 │ │ │ │ └── launch_background.xml │ │ │ │ ├── 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-night │ │ │ │ └── styles.xml │ │ │ │ └── values │ │ │ │ └── styles.xml │ │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── build.gradle │ ├── gradle.properties │ ├── gradle │ │ └── wrapper │ │ │ └── gradle-wrapper.properties │ └── settings.gradle ├── ios │ ├── .gitignore │ ├── Flutter │ │ ├── AppFrameworkInfo.plist │ │ ├── Debug.xcconfig │ │ └── Release.xcconfig │ ├── Runner.xcodeproj │ │ ├── project.pbxproj │ │ ├── project.xcworkspace │ │ │ ├── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ │ └── WorkspaceSettings.xcsettings │ │ └── xcshareddata │ │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ ├── Runner.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── Runner │ │ ├── AppDelegate.swift │ │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ │ ├── Info.plist │ │ └── Runner-Bridging-Header.h ├── lib │ └── main.dart ├── pubspec.lock ├── pubspec.yaml └── test │ └── widget_test.dart ├── lib └── async_value_group.dart ├── pubspec.yaml └── test └── async_value_group_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | # Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. 26 | /pubspec.lock 27 | **/doc/api/ 28 | .dart_tool/ 29 | .packages 30 | build/ 31 | -------------------------------------------------------------------------------- /.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: 4f9d92fbbdf072a70a70d2179a9f87392b94104c 8 | channel: stable 9 | 10 | project_type: package 11 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 0.0.1 2 | * initial release. 3 | 4 | ## 1.0.0 5 | * Fix version. 6 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2022 bannzai 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Features 2 | async_value_group is a a Dart library for grouping some [riverpod](https://github.com/rrousselGit/riverpod) `AsyncValue`s into single `AsyncValue`. 3 | - Grouping some `AsyncValue`s into single `AsyncValue` and retrieve all `AsyncValue.data` as a tuple. 4 | - Waiting to be done multiple asynchronous process. 5 | - If you use hooks_riverpod, call `AsyncValue.when` only once in `Widget.build` method even if multiple AsyncValues are required. 6 | 7 | ## Usage 8 | ```dart 9 | import 'package:flutter/material.dart'; 10 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 11 | import 'package:async_value_group/async_value_group.dart'; 12 | 13 | class TweetsPage extends HookConsumerWidget { 14 | const TweetsPage({Key? key}) : super(key: key); 15 | 16 | @override 17 | Widget build(BuildContext context, WidgetRef ref) { 18 | return AsyncValueGroup.group2( 19 | ref.watch(tweetsProvider), 20 | ref.watch(userProvider), 21 | ).when( 22 | data: (t) => t.$1.isEmpty ? const TweetsEmpty() : TweetsBody(tweets: t.$1, user: t.$2), 23 | error: (error, st) => ErrorPage(error: error), 24 | loading: () => const Loading(), 25 | ); 26 | } 27 | } 28 | ``` 29 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | include: package:flutter_lints/flutter.yaml 2 | # Additional information about this file can be found at 3 | # https://dart.dev/guides/language/analysis-options 4 | -------------------------------------------------------------------------------- /example/.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /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. 5 | 6 | version: 7 | revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c 17 | base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c 18 | - platform: android 19 | create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c 20 | base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c 21 | - platform: ios 22 | create_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c 23 | base_revision: 4f9d92fbbdf072a70a70d2179a9f87392b94104c 24 | 25 | # User provided section 26 | 27 | # List of Local paths (relative to this file) that should be 28 | # ignored by the migrate tool. 29 | # 30 | # Files that are not part of the templates will be ignored by default. 31 | unmanaged_files: 32 | - 'lib/main.dart' 33 | - 'ios/Runner.xcodeproj/project.pbxproj' 34 | -------------------------------------------------------------------------------- /example/README.md: -------------------------------------------------------------------------------- 1 | # example 2 | 3 | A new Flutter project. 4 | 5 | ## Getting Started 6 | 7 | This project is a starting point for a Flutter application. 8 | 9 | A few resources to get you started if this is your first Flutter project: 10 | 11 | - [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) 12 | - [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) 13 | 14 | For help getting started with Flutter development, view the 15 | [online documentation](https://docs.flutter.dev/), which offers tutorials, 16 | samples, guidance on mobile development, and a full API reference. 17 | -------------------------------------------------------------------------------- /example/analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /example/android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /example/android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | ndkVersion flutter.ndkVersion 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | 37 | kotlinOptions { 38 | jvmTarget = '1.8' 39 | } 40 | 41 | sourceSets { 42 | main.java.srcDirs += 'src/main/kotlin' 43 | } 44 | 45 | defaultConfig { 46 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 47 | applicationId "com.example.example" 48 | // You can update the following values to match your application needs. 49 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. 50 | minSdkVersion flutter.minSdkVersion 51 | targetSdkVersion flutter.targetSdkVersion 52 | versionCode flutterVersionCode.toInteger() 53 | versionName flutterVersionName 54 | } 55 | 56 | buildTypes { 57 | release { 58 | // TODO: Add your own signing config for the release build. 59 | // Signing with the debug keys for now, so `flutter run --release` works. 60 | signingConfig signingConfigs.debug 61 | } 62 | } 63 | } 64 | 65 | flutter { 66 | source '../..' 67 | } 68 | 69 | dependencies { 70 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 71 | } 72 | -------------------------------------------------------------------------------- /example/android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /example/android/app/src/main/kotlin/com/example/example/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.example 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/example/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /example/android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /example/android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.1.2' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /example/android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /example/android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip 6 | -------------------------------------------------------------------------------- /example/android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /example/ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /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 | 11.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1300; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | DEVELOPMENT_TEAM = D3249BUKD2; 292 | ENABLE_BITCODE = NO; 293 | INFOPLIST_FILE = Runner/Info.plist; 294 | LD_RUNPATH_SEARCH_PATHS = ( 295 | "$(inherited)", 296 | "@executable_path/Frameworks", 297 | ); 298 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 299 | PRODUCT_NAME = "$(TARGET_NAME)"; 300 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 301 | SWIFT_VERSION = 5.0; 302 | VERSIONING_SYSTEM = "apple-generic"; 303 | }; 304 | name = Profile; 305 | }; 306 | 97C147031CF9000F007C117D /* Debug */ = { 307 | isa = XCBuildConfiguration; 308 | buildSettings = { 309 | ALWAYS_SEARCH_USER_PATHS = NO; 310 | CLANG_ANALYZER_NONNULL = YES; 311 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 312 | CLANG_CXX_LIBRARY = "libc++"; 313 | CLANG_ENABLE_MODULES = YES; 314 | CLANG_ENABLE_OBJC_ARC = YES; 315 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 316 | CLANG_WARN_BOOL_CONVERSION = YES; 317 | CLANG_WARN_COMMA = YES; 318 | CLANG_WARN_CONSTANT_CONVERSION = YES; 319 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 320 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 321 | CLANG_WARN_EMPTY_BODY = YES; 322 | CLANG_WARN_ENUM_CONVERSION = YES; 323 | CLANG_WARN_INFINITE_RECURSION = YES; 324 | CLANG_WARN_INT_CONVERSION = YES; 325 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 326 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 327 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 328 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 329 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 330 | CLANG_WARN_STRICT_PROTOTYPES = YES; 331 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 332 | CLANG_WARN_UNREACHABLE_CODE = YES; 333 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 334 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 335 | COPY_PHASE_STRIP = NO; 336 | DEBUG_INFORMATION_FORMAT = dwarf; 337 | ENABLE_STRICT_OBJC_MSGSEND = YES; 338 | ENABLE_TESTABILITY = YES; 339 | GCC_C_LANGUAGE_STANDARD = gnu99; 340 | GCC_DYNAMIC_NO_PIC = NO; 341 | GCC_NO_COMMON_BLOCKS = YES; 342 | GCC_OPTIMIZATION_LEVEL = 0; 343 | GCC_PREPROCESSOR_DEFINITIONS = ( 344 | "DEBUG=1", 345 | "$(inherited)", 346 | ); 347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 349 | GCC_WARN_UNDECLARED_SELECTOR = YES; 350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 351 | GCC_WARN_UNUSED_FUNCTION = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 354 | MTL_ENABLE_DEBUG_INFO = YES; 355 | ONLY_ACTIVE_ARCH = YES; 356 | SDKROOT = iphoneos; 357 | TARGETED_DEVICE_FAMILY = "1,2"; 358 | }; 359 | name = Debug; 360 | }; 361 | 97C147041CF9000F007C117D /* Release */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | ALWAYS_SEARCH_USER_PATHS = NO; 365 | CLANG_ANALYZER_NONNULL = YES; 366 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 367 | CLANG_CXX_LIBRARY = "libc++"; 368 | CLANG_ENABLE_MODULES = YES; 369 | CLANG_ENABLE_OBJC_ARC = YES; 370 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 371 | CLANG_WARN_BOOL_CONVERSION = YES; 372 | CLANG_WARN_COMMA = YES; 373 | CLANG_WARN_CONSTANT_CONVERSION = YES; 374 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 375 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 376 | CLANG_WARN_EMPTY_BODY = YES; 377 | CLANG_WARN_ENUM_CONVERSION = YES; 378 | CLANG_WARN_INFINITE_RECURSION = YES; 379 | CLANG_WARN_INT_CONVERSION = YES; 380 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 381 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 382 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 384 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 385 | CLANG_WARN_STRICT_PROTOTYPES = YES; 386 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 387 | CLANG_WARN_UNREACHABLE_CODE = YES; 388 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 389 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 390 | COPY_PHASE_STRIP = NO; 391 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 392 | ENABLE_NS_ASSERTIONS = NO; 393 | ENABLE_STRICT_OBJC_MSGSEND = YES; 394 | GCC_C_LANGUAGE_STANDARD = gnu99; 395 | GCC_NO_COMMON_BLOCKS = YES; 396 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 397 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 398 | GCC_WARN_UNDECLARED_SELECTOR = YES; 399 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 400 | GCC_WARN_UNUSED_FUNCTION = YES; 401 | GCC_WARN_UNUSED_VARIABLE = YES; 402 | IPHONEOS_DEPLOYMENT_TARGET = 11.0; 403 | MTL_ENABLE_DEBUG_INFO = NO; 404 | SDKROOT = iphoneos; 405 | SUPPORTED_PLATFORMS = iphoneos; 406 | SWIFT_COMPILATION_MODE = wholemodule; 407 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 408 | TARGETED_DEVICE_FAMILY = "1,2"; 409 | VALIDATE_PRODUCT = YES; 410 | }; 411 | name = Release; 412 | }; 413 | 97C147061CF9000F007C117D /* Debug */ = { 414 | isa = XCBuildConfiguration; 415 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 416 | buildSettings = { 417 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 418 | CLANG_ENABLE_MODULES = YES; 419 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 420 | DEVELOPMENT_TEAM = D3249BUKD2; 421 | ENABLE_BITCODE = NO; 422 | INFOPLIST_FILE = Runner/Info.plist; 423 | LD_RUNPATH_SEARCH_PATHS = ( 424 | "$(inherited)", 425 | "@executable_path/Frameworks", 426 | ); 427 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 428 | PRODUCT_NAME = "$(TARGET_NAME)"; 429 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 430 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 431 | SWIFT_VERSION = 5.0; 432 | VERSIONING_SYSTEM = "apple-generic"; 433 | }; 434 | name = Debug; 435 | }; 436 | 97C147071CF9000F007C117D /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 439 | buildSettings = { 440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 441 | CLANG_ENABLE_MODULES = YES; 442 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 443 | DEVELOPMENT_TEAM = D3249BUKD2; 444 | ENABLE_BITCODE = NO; 445 | INFOPLIST_FILE = Runner/Info.plist; 446 | LD_RUNPATH_SEARCH_PATHS = ( 447 | "$(inherited)", 448 | "@executable_path/Frameworks", 449 | ); 450 | PRODUCT_BUNDLE_IDENTIFIER = com.example.example; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 453 | SWIFT_VERSION = 5.0; 454 | VERSIONING_SYSTEM = "apple-generic"; 455 | }; 456 | name = Release; 457 | }; 458 | /* End XCBuildConfiguration section */ 459 | 460 | /* Begin XCConfigurationList section */ 461 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 462 | isa = XCConfigurationList; 463 | buildConfigurations = ( 464 | 97C147031CF9000F007C117D /* Debug */, 465 | 97C147041CF9000F007C117D /* Release */, 466 | 249021D3217E4FDB00AE95B9 /* Profile */, 467 | ); 468 | defaultConfigurationIsVisible = 0; 469 | defaultConfigurationName = Release; 470 | }; 471 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 472 | isa = XCConfigurationList; 473 | buildConfigurations = ( 474 | 97C147061CF9000F007C117D /* Debug */, 475 | 97C147071CF9000F007C117D /* Release */, 476 | 249021D4217E4FDB00AE95B9 /* Profile */, 477 | ); 478 | defaultConfigurationIsVisible = 0; 479 | defaultConfigurationName = Release; 480 | }; 481 | /* End XCConfigurationList section */ 482 | }; 483 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 484 | } 485 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 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 | 8 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /example/ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/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/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bannzai/async_value_group/1e9b4b6152d216156be10a2b1690d6b38d6479db/example/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /example/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /example/ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /example/ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Example 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | example 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /example/ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /example/lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:async_value_group/async_value_group.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:hooks_riverpod/hooks_riverpod.dart'; 4 | 5 | void main() { 6 | runApp(const MyApp()); 7 | } 8 | 9 | class MyApp extends StatelessWidget { 10 | const MyApp({super.key}); 11 | 12 | // This widget is the root of your application. 13 | @override 14 | Widget build(BuildContext context) { 15 | return ProviderScope( 16 | child: MaterialApp( 17 | title: 'Flutter Demo', 18 | theme: ThemeData( 19 | // This is the theme of your application. 20 | // 21 | // Try running your application with "flutter run". You'll see the 22 | // application has a blue toolbar. Then, without quitting the app, try 23 | // changing the primarySwatch below to Colors.green and then invoke 24 | // "hot reload" (press "r" in the console where you ran "flutter run", 25 | // or simply save your changes to "hot reload" in a Flutter IDE). 26 | // Notice that the counter didn't reset back to zero; the application 27 | // is not restarted. 28 | primarySwatch: Colors.blue, 29 | ), 30 | home: const TweetsPage(), 31 | ), 32 | ); 33 | } 34 | } 35 | 36 | class Tweet {} 37 | 38 | class User {} 39 | 40 | final tweetsProvider = FutureProvider>((ref) async { 41 | final tweets = [Tweet()]; 42 | return tweets; 43 | }); 44 | final userProvider = StreamProvider((ref) => Stream.value(User())); 45 | 46 | class TweetsPage extends HookConsumerWidget { 47 | const TweetsPage({Key? key}) : super(key: key); 48 | 49 | @override 50 | Widget build(BuildContext context, WidgetRef ref) { 51 | return AsyncValueGroup.group2( 52 | ref.watch(tweetsProvider), 53 | ref.watch(userProvider), 54 | ).when( 55 | data: (t) => t.$1.isEmpty 56 | ? const TweetsEmpty() 57 | : TweetsBody(tweets: t.$1, user: t.$2), 58 | error: (error, st) => ErrorPage(error: error), 59 | loading: () => const Loading(), 60 | ); 61 | } 62 | } 63 | 64 | class TweetsEmpty extends StatelessWidget { 65 | const TweetsEmpty({super.key}); 66 | 67 | @override 68 | Widget build(BuildContext context) { 69 | return const Center(child: Text('No tweets')); 70 | } 71 | } 72 | 73 | class TweetsBody extends StatelessWidget { 74 | final User user; 75 | final List tweets; 76 | 77 | const TweetsBody({super.key, required this.user, required this.tweets}); 78 | 79 | @override 80 | Widget build(BuildContext context) { 81 | return Center(child: Text('Tweets length ${tweets.length}')); 82 | } 83 | } 84 | 85 | class ErrorPage extends StatelessWidget { 86 | final Object error; 87 | 88 | const ErrorPage({super.key, required this.error}); 89 | 90 | @override 91 | Widget build(BuildContext context) { 92 | throw UnimplementedError(); 93 | } 94 | } 95 | 96 | class Loading extends StatelessWidget { 97 | const Loading({super.key}); 98 | 99 | @override 100 | Widget build(BuildContext context) { 101 | throw UnimplementedError(); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /example/pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "2.11.0" 12 | async_value_group: 13 | dependency: "direct main" 14 | description: 15 | path: ".." 16 | relative: true 17 | source: path 18 | version: "1.0.0" 19 | boolean_selector: 20 | dependency: transitive 21 | description: 22 | name: boolean_selector 23 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 24 | url: "https://pub.dev" 25 | source: hosted 26 | version: "2.1.1" 27 | characters: 28 | dependency: transitive 29 | description: 30 | name: characters 31 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" 32 | url: "https://pub.dev" 33 | source: hosted 34 | version: "1.3.0" 35 | clock: 36 | dependency: transitive 37 | description: 38 | name: clock 39 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 40 | url: "https://pub.dev" 41 | source: hosted 42 | version: "1.1.1" 43 | collection: 44 | dependency: transitive 45 | description: 46 | name: collection 47 | sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a 48 | url: "https://pub.dev" 49 | source: hosted 50 | version: "1.18.0" 51 | cupertino_icons: 52 | dependency: "direct main" 53 | description: 54 | name: cupertino_icons 55 | sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be 56 | url: "https://pub.dev" 57 | source: hosted 58 | version: "1.0.5" 59 | fake_async: 60 | dependency: transitive 61 | description: 62 | name: fake_async 63 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 64 | url: "https://pub.dev" 65 | source: hosted 66 | version: "1.3.1" 67 | flutter: 68 | dependency: "direct main" 69 | description: flutter 70 | source: sdk 71 | version: "0.0.0" 72 | flutter_hooks: 73 | dependency: transitive 74 | description: 75 | name: flutter_hooks 76 | sha256: "2b202559a4ed3656bbb7aae9d8b335fb0037b23acc7ae3f377d1ba0b95c21aec" 77 | url: "https://pub.dev" 78 | source: hosted 79 | version: "0.18.5+1" 80 | flutter_lints: 81 | dependency: "direct dev" 82 | description: 83 | name: flutter_lints 84 | sha256: aeb0b80a8b3709709c9cc496cdc027c5b3216796bc0af0ce1007eaf24464fd4c 85 | url: "https://pub.dev" 86 | source: hosted 87 | version: "2.0.1" 88 | flutter_riverpod: 89 | dependency: transitive 90 | description: 91 | name: flutter_riverpod 92 | sha256: "371f6e8acb69dbe8aa3e0a50c8a65f8a9352b599134d585cc4923261cb5ae4d6" 93 | url: "https://pub.dev" 94 | source: hosted 95 | version: "2.1.1" 96 | flutter_test: 97 | dependency: "direct dev" 98 | description: flutter 99 | source: sdk 100 | version: "0.0.0" 101 | hooks_riverpod: 102 | dependency: "direct main" 103 | description: 104 | name: hooks_riverpod 105 | sha256: "33b7f91a10d385e3b4e8aac60fe15711d7bf53d199cb672789b44623770ae7ae" 106 | url: "https://pub.dev" 107 | source: hosted 108 | version: "2.1.1" 109 | lints: 110 | dependency: transitive 111 | description: 112 | name: lints 113 | sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" 114 | url: "https://pub.dev" 115 | source: hosted 116 | version: "2.0.1" 117 | matcher: 118 | dependency: transitive 119 | description: 120 | name: matcher 121 | sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" 122 | url: "https://pub.dev" 123 | source: hosted 124 | version: "0.12.16" 125 | material_color_utilities: 126 | dependency: transitive 127 | description: 128 | name: material_color_utilities 129 | sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" 130 | url: "https://pub.dev" 131 | source: hosted 132 | version: "0.5.0" 133 | meta: 134 | dependency: transitive 135 | description: 136 | name: meta 137 | sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e 138 | url: "https://pub.dev" 139 | source: hosted 140 | version: "1.10.0" 141 | path: 142 | dependency: transitive 143 | description: 144 | name: path 145 | sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" 146 | url: "https://pub.dev" 147 | source: hosted 148 | version: "1.8.3" 149 | riverpod: 150 | dependency: "direct main" 151 | description: 152 | name: riverpod 153 | sha256: "899cd0999b2f3b798349d9b5639cfea81d406c011bd914097145ff92e91b29f9" 154 | url: "https://pub.dev" 155 | source: hosted 156 | version: "2.1.1" 157 | sky_engine: 158 | dependency: transitive 159 | description: flutter 160 | source: sdk 161 | version: "0.0.99" 162 | source_span: 163 | dependency: transitive 164 | description: 165 | name: source_span 166 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 167 | url: "https://pub.dev" 168 | source: hosted 169 | version: "1.10.0" 170 | stack_trace: 171 | dependency: transitive 172 | description: 173 | name: stack_trace 174 | sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" 175 | url: "https://pub.dev" 176 | source: hosted 177 | version: "1.11.1" 178 | state_notifier: 179 | dependency: transitive 180 | description: 181 | name: state_notifier 182 | sha256: "8fe42610f179b843b12371e40db58c9444f8757f8b69d181c97e50787caed289" 183 | url: "https://pub.dev" 184 | source: hosted 185 | version: "0.7.2+1" 186 | stream_channel: 187 | dependency: transitive 188 | description: 189 | name: stream_channel 190 | sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 191 | url: "https://pub.dev" 192 | source: hosted 193 | version: "2.1.2" 194 | string_scanner: 195 | dependency: transitive 196 | description: 197 | name: string_scanner 198 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 199 | url: "https://pub.dev" 200 | source: hosted 201 | version: "1.2.0" 202 | term_glyph: 203 | dependency: transitive 204 | description: 205 | name: term_glyph 206 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 207 | url: "https://pub.dev" 208 | source: hosted 209 | version: "1.2.1" 210 | test_api: 211 | dependency: transitive 212 | description: 213 | name: test_api 214 | sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" 215 | url: "https://pub.dev" 216 | source: hosted 217 | version: "0.6.1" 218 | vector_math: 219 | dependency: transitive 220 | description: 221 | name: vector_math 222 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 223 | url: "https://pub.dev" 224 | source: hosted 225 | version: "2.1.4" 226 | web: 227 | dependency: transitive 228 | description: 229 | name: web 230 | sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 231 | url: "https://pub.dev" 232 | source: hosted 233 | version: "0.3.0" 234 | sdks: 235 | dart: ">=3.2.0-194.0.dev <4.0.0" 236 | flutter: ">=3.0.0" 237 | -------------------------------------------------------------------------------- /example/pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: example 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | # In Windows, build-name is used as the major, minor, and patch parts 19 | # of the product and file versions while build-number is used as the build suffix. 20 | version: 1.0.0+1 21 | 22 | environment: 23 | sdk: ">=3.0.0 <4.0.0" 24 | 25 | # Dependencies specify other packages that your package needs in order to work. 26 | # To automatically upgrade your package dependencies to the latest versions 27 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 28 | # dependencies can be manually updated by changing the version numbers below to 29 | # the latest version available on pub.dev. To see which dependencies have newer 30 | # versions available, run `flutter pub outdated`. 31 | dependencies: 32 | flutter: 33 | sdk: flutter 34 | riverpod: ^2.0.0 35 | hooks_riverpod: ^2.0.0 36 | async_value_group: 37 | path: ../ 38 | 39 | # The following adds the Cupertino Icons font to your application. 40 | # Use with the CupertinoIcons class for iOS style icons. 41 | cupertino_icons: ^1.0.2 42 | 43 | dev_dependencies: 44 | flutter_test: 45 | sdk: flutter 46 | 47 | # The "flutter_lints" package below contains a set of recommended lints to 48 | # encourage good coding practices. The lint set provided by the package is 49 | # activated in the `analysis_options.yaml` file located at the root of your 50 | # package. See that file for information about deactivating specific lint 51 | # rules and activating additional ones. 52 | flutter_lints: ^2.0.0 53 | 54 | # For information on the generic Dart part of this file, see the 55 | # following page: https://dart.dev/tools/pub/pubspec 56 | 57 | # The following section is specific to Flutter packages. 58 | flutter: 59 | # The following line ensures that the Material Icons font is 60 | # included with your application, so that you can use the icons in 61 | # the material Icons class. 62 | uses-material-design: true 63 | 64 | # To add assets to your application, add an assets section, like this: 65 | # assets: 66 | # - images/a_dot_burr.jpeg 67 | # - images/a_dot_ham.jpeg 68 | 69 | # An image asset can refer to one or more resolution-specific "variants", see 70 | # https://flutter.dev/assets-and-images/#resolution-aware 71 | 72 | # For details regarding adding assets from package dependencies, see 73 | # https://flutter.dev/assets-and-images/#from-packages 74 | 75 | # To add custom fonts to your application, add a fonts section here, 76 | # in this "flutter" section. Each entry in this list should have a 77 | # "family" key with the font family name, and a "fonts" key with a 78 | # list giving the asset and other descriptors for the font. For 79 | # example: 80 | # fonts: 81 | # - family: Schyler 82 | # fonts: 83 | # - asset: fonts/Schyler-Regular.ttf 84 | # - asset: fonts/Schyler-Italic.ttf 85 | # style: italic 86 | # - family: Trajan Pro 87 | # fonts: 88 | # - asset: fonts/TrajanPro.ttf 89 | # - asset: fonts/TrajanPro_Bold.ttf 90 | # weight: 700 91 | # 92 | # For details regarding fonts from package dependencies, 93 | # see https://flutter.dev/custom-fonts/#from-packages 94 | -------------------------------------------------------------------------------- /example/test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility in the flutter_test package. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:example/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/async_value_group.dart: -------------------------------------------------------------------------------- 1 | import 'package:riverpod/riverpod.dart'; 2 | 3 | /// An extension that groups some [AsyncValue]s into a single [AsyncValue]. 4 | extension AsyncValueGroup on AsyncValue { 5 | static AsyncValue<(T1, T2)> group2( 6 | AsyncValue t1, AsyncValue t2) { 7 | if (t1 is AsyncLoading || t2 is AsyncLoading) { 8 | return const AsyncLoading(); 9 | } 10 | try { 11 | return AsyncData((t1.value as T1, t2.value as T2)); 12 | } catch (e, st) { 13 | return AsyncError(e, st); 14 | } 15 | } 16 | 17 | static AsyncValue<(T1, T2, T3)> group3( 18 | AsyncValue t1, AsyncValue t2, AsyncValue t3) { 19 | if (t1 is AsyncLoading || t2 is AsyncLoading || t3 is AsyncLoading) { 20 | return const AsyncLoading(); 21 | } 22 | try { 23 | return AsyncData((t1.value as T1, t2.value as T2, t3.value as T3)); 24 | } catch (e, st) { 25 | return AsyncError(e, st); 26 | } 27 | } 28 | 29 | static AsyncValue<(T1, T2, T3, T4)> group4(AsyncValue t1, 30 | AsyncValue t2, AsyncValue t3, AsyncValue t4) { 31 | if (t1 is AsyncLoading || 32 | t2 is AsyncLoading || 33 | t3 is AsyncLoading || 34 | t4 is AsyncLoading) { 35 | return const AsyncLoading(); 36 | } 37 | try { 38 | return AsyncData( 39 | (t1.value as T1, t2.value as T2, t3.value as T3, t4.value as T4)); 40 | } catch (e, st) { 41 | return AsyncError(e, st); 42 | } 43 | } 44 | 45 | static AsyncValue<(T1, T2, T3, T4, T5)> group5( 46 | AsyncValue t1, 47 | AsyncValue t2, 48 | AsyncValue t3, 49 | AsyncValue t4, 50 | AsyncValue t5) { 51 | if (t1 is AsyncLoading || 52 | t2 is AsyncLoading || 53 | t3 is AsyncLoading || 54 | t4 is AsyncLoading || 55 | t5 is AsyncLoading) { 56 | return const AsyncLoading(); 57 | } 58 | try { 59 | return AsyncData(( 60 | t1.value as T1, 61 | t2.value as T2, 62 | t3.value as T3, 63 | t4.value as T4, 64 | t5.value as T5 65 | )); 66 | } catch (e, st) { 67 | return AsyncError(e, st); 68 | } 69 | } 70 | 71 | static AsyncValue<(T1, T2, T3, T4, T5, T6)> group6( 72 | AsyncValue t1, 73 | AsyncValue t2, 74 | AsyncValue t3, 75 | AsyncValue t4, 76 | AsyncValue t5, 77 | AsyncValue t6) { 78 | if (t1 is AsyncLoading || 79 | t2 is AsyncLoading || 80 | t3 is AsyncLoading || 81 | t4 is AsyncLoading || 82 | t5 is AsyncLoading || 83 | t6 is AsyncLoading) { 84 | return const AsyncLoading(); 85 | } 86 | try { 87 | return AsyncData(( 88 | t1.value as T1, 89 | t2.value as T2, 90 | t3.value as T3, 91 | t4.value as T4, 92 | t5.value as T5, 93 | t6.value as T6 94 | )); 95 | } catch (e, st) { 96 | return AsyncError(e, st); 97 | } 98 | } 99 | 100 | static AsyncValue<(T1, T2, T3, T4, T5, T6, T7)> 101 | group7( 102 | AsyncValue t1, 103 | AsyncValue t2, 104 | AsyncValue t3, 105 | AsyncValue t4, 106 | AsyncValue t5, 107 | AsyncValue t6, 108 | AsyncValue t7) { 109 | if (t1 is AsyncLoading || 110 | t2 is AsyncLoading || 111 | t3 is AsyncLoading || 112 | t4 is AsyncLoading || 113 | t5 is AsyncLoading || 114 | t6 is AsyncLoading || 115 | t7 is AsyncLoading) { 116 | return const AsyncLoading(); 117 | } 118 | try { 119 | return AsyncData(( 120 | t1.value as T1, 121 | t2.value as T2, 122 | t3.value as T3, 123 | t4.value as T4, 124 | t5.value as T5, 125 | t6.value as T6, 126 | t7.value as T7 127 | )); 128 | } catch (e, st) { 129 | return AsyncError(e, st); 130 | } 131 | } 132 | 133 | static AsyncValue<(T1, T2, T3, T4, T5, T6, T7, T8)> 134 | group8( 135 | AsyncValue t1, 136 | AsyncValue t2, 137 | AsyncValue t3, 138 | AsyncValue t4, 139 | AsyncValue t5, 140 | AsyncValue t6, 141 | AsyncValue t7, 142 | AsyncValue t8) { 143 | if (t1 is AsyncLoading || 144 | t2 is AsyncLoading || 145 | t3 is AsyncLoading || 146 | t4 is AsyncLoading || 147 | t5 is AsyncLoading || 148 | t6 is AsyncLoading || 149 | t7 is AsyncLoading || 150 | t8 is AsyncLoading) { 151 | return const AsyncLoading(); 152 | } 153 | try { 154 | return AsyncData(( 155 | t1.value as T1, 156 | t2.value as T2, 157 | t3.value as T3, 158 | t4.value as T4, 159 | t5.value as T5, 160 | t6.value as T6, 161 | t7.value as T7, 162 | t8.value as T8 163 | )); 164 | } catch (e, st) { 165 | return AsyncError(e, st); 166 | } 167 | } 168 | 169 | static AsyncValue<(T1, T2, T3, T4, T5, T6, T7, T8, T9)> 170 | group9( 171 | AsyncValue t1, 172 | AsyncValue t2, 173 | AsyncValue t3, 174 | AsyncValue t4, 175 | AsyncValue t5, 176 | AsyncValue t6, 177 | AsyncValue t7, 178 | AsyncValue t8, 179 | AsyncValue t9) { 180 | if (t1 is AsyncLoading || 181 | t2 is AsyncLoading || 182 | t3 is AsyncLoading || 183 | t4 is AsyncLoading || 184 | t5 is AsyncLoading || 185 | t6 is AsyncLoading || 186 | t7 is AsyncLoading || 187 | t8 is AsyncLoading || 188 | t9 is AsyncLoading) { 189 | return const AsyncLoading(); 190 | } 191 | try { 192 | return AsyncData(( 193 | t1.value as T1, 194 | t2.value as T2, 195 | t3.value as T3, 196 | t4.value as T4, 197 | t5.value as T5, 198 | t6.value as T6, 199 | t7.value as T7, 200 | t8.value as T8, 201 | t9.value as T9 202 | )); 203 | } catch (e, st) { 204 | return AsyncError(e, st); 205 | } 206 | } 207 | 208 | static AsyncValue<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10)> 209 | group10( 210 | AsyncValue t1, 211 | AsyncValue t2, 212 | AsyncValue t3, 213 | AsyncValue t4, 214 | AsyncValue t5, 215 | AsyncValue t6, 216 | AsyncValue t7, 217 | AsyncValue t8, 218 | AsyncValue t9, 219 | AsyncValue t10) { 220 | if (t1 is AsyncLoading || 221 | t2 is AsyncLoading || 222 | t3 is AsyncLoading || 223 | t4 is AsyncLoading || 224 | t5 is AsyncLoading || 225 | t6 is AsyncLoading || 226 | t7 is AsyncLoading || 227 | t8 is AsyncLoading || 228 | t9 is AsyncLoading || 229 | t10 is AsyncLoading) { 230 | return const AsyncLoading(); 231 | } 232 | try { 233 | return AsyncData(( 234 | t1.value as T1, 235 | t2.value as T2, 236 | t3.value as T3, 237 | t4.value as T4, 238 | t5.value as T5, 239 | t6.value as T6, 240 | t7.value as T7, 241 | t8.value as T8, 242 | t9.value as T9, 243 | t10.value as T10 244 | )); 245 | } catch (e, st) { 246 | return AsyncError(e, st); 247 | } 248 | } 249 | 250 | static AsyncValue<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11)> 251 | group11( 252 | AsyncValue t1, 253 | AsyncValue t2, 254 | AsyncValue t3, 255 | AsyncValue t4, 256 | AsyncValue t5, 257 | AsyncValue t6, 258 | AsyncValue t7, 259 | AsyncValue t8, 260 | AsyncValue t9, 261 | AsyncValue t10, 262 | AsyncValue t11) { 263 | if (t1 is AsyncLoading || 264 | t2 is AsyncLoading || 265 | t3 is AsyncLoading || 266 | t4 is AsyncLoading || 267 | t5 is AsyncLoading || 268 | t6 is AsyncLoading || 269 | t7 is AsyncLoading || 270 | t8 is AsyncLoading || 271 | t9 is AsyncLoading || 272 | t10 is AsyncLoading || 273 | t11 is AsyncLoading) { 274 | return const AsyncLoading(); 275 | } 276 | try { 277 | return AsyncData(( 278 | t1.value as T1, 279 | t2.value as T2, 280 | t3.value as T3, 281 | t4.value as T4, 282 | t5.value as T5, 283 | t6.value as T6, 284 | t7.value as T7, 285 | t8.value as T8, 286 | t9.value as T9, 287 | t10.value as T10, 288 | t11.value as T11 289 | )); 290 | } catch (e, st) { 291 | return AsyncError(e, st); 292 | } 293 | } 294 | 295 | static AsyncValue<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12)> 296 | group12( 297 | AsyncValue t1, 298 | AsyncValue t2, 299 | AsyncValue t3, 300 | AsyncValue t4, 301 | AsyncValue t5, 302 | AsyncValue t6, 303 | AsyncValue t7, 304 | AsyncValue t8, 305 | AsyncValue t9, 306 | AsyncValue t10, 307 | AsyncValue t11, 308 | AsyncValue t12) { 309 | if (t1 is AsyncLoading || 310 | t2 is AsyncLoading || 311 | t3 is AsyncLoading || 312 | t4 is AsyncLoading || 313 | t5 is AsyncLoading || 314 | t6 is AsyncLoading || 315 | t7 is AsyncLoading || 316 | t8 is AsyncLoading || 317 | t9 is AsyncLoading || 318 | t10 is AsyncLoading || 319 | t11 is AsyncLoading || 320 | t12 is AsyncLoading) { 321 | return const AsyncLoading(); 322 | } 323 | try { 324 | return AsyncData(( 325 | t1.value as T1, 326 | t2.value as T2, 327 | t3.value as T3, 328 | t4.value as T4, 329 | t5.value as T5, 330 | t6.value as T6, 331 | t7.value as T7, 332 | t8.value as T8, 333 | t9.value as T9, 334 | t10.value as T10, 335 | t11.value as T11, 336 | t12.value as T12 337 | )); 338 | } catch (e, st) { 339 | return AsyncError(e, st); 340 | } 341 | } 342 | 343 | static AsyncValue<(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13)> 344 | group13( 345 | AsyncValue t1, 346 | AsyncValue t2, 347 | AsyncValue t3, 348 | AsyncValue t4, 349 | AsyncValue t5, 350 | AsyncValue t6, 351 | AsyncValue t7, 352 | AsyncValue t8, 353 | AsyncValue t9, 354 | AsyncValue t10, 355 | AsyncValue t11, 356 | AsyncValue t12, 357 | AsyncValue t13) { 358 | if (t1 is AsyncLoading || 359 | t2 is AsyncLoading || 360 | t3 is AsyncLoading || 361 | t4 is AsyncLoading || 362 | t5 is AsyncLoading || 363 | t6 is AsyncLoading || 364 | t7 is AsyncLoading || 365 | t8 is AsyncLoading || 366 | t9 is AsyncLoading || 367 | t10 is AsyncLoading || 368 | t11 is AsyncLoading || 369 | t12 is AsyncLoading || 370 | t13 is AsyncLoading) { 371 | return const AsyncLoading(); 372 | } 373 | try { 374 | return AsyncData(( 375 | t1.value as T1, 376 | t2.value as T2, 377 | t3.value as T3, 378 | t4.value as T4, 379 | t5.value as T5, 380 | t6.value as T6, 381 | t7.value as T7, 382 | t8.value as T8, 383 | t9.value as T9, 384 | t10.value as T10, 385 | t11.value as T11, 386 | t12.value as T12, 387 | t13.value as T13 388 | )); 389 | } catch (e, st) { 390 | return AsyncError(e, st); 391 | } 392 | } 393 | 394 | static AsyncValue< 395 | (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14)> 396 | group14( 397 | AsyncValue t1, 398 | AsyncValue t2, 399 | AsyncValue t3, 400 | AsyncValue t4, 401 | AsyncValue t5, 402 | AsyncValue t6, 403 | AsyncValue t7, 404 | AsyncValue t8, 405 | AsyncValue t9, 406 | AsyncValue t10, 407 | AsyncValue t11, 408 | AsyncValue t12, 409 | AsyncValue t13, 410 | AsyncValue t14) { 411 | if (t1 is AsyncLoading || 412 | t2 is AsyncLoading || 413 | t3 is AsyncLoading || 414 | t4 is AsyncLoading || 415 | t5 is AsyncLoading || 416 | t6 is AsyncLoading || 417 | t7 is AsyncLoading || 418 | t8 is AsyncLoading || 419 | t9 is AsyncLoading || 420 | t10 is AsyncLoading || 421 | t11 is AsyncLoading || 422 | t12 is AsyncLoading || 423 | t13 is AsyncLoading || 424 | t14 is AsyncLoading) { 425 | return const AsyncLoading(); 426 | } 427 | try { 428 | return AsyncData(( 429 | t1.value as T1, 430 | t2.value as T2, 431 | t3.value as T3, 432 | t4.value as T4, 433 | t5.value as T5, 434 | t6.value as T6, 435 | t7.value as T7, 436 | t8.value as T8, 437 | t9.value as T9, 438 | t10.value as T10, 439 | t11.value as T11, 440 | t12.value as T12, 441 | t13.value as T13, 442 | t14.value as T14 443 | )); 444 | } catch (e, st) { 445 | return AsyncError(e, st); 446 | } 447 | } 448 | 449 | static AsyncValue< 450 | (T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15)> 451 | group15( 452 | AsyncValue t1, 453 | AsyncValue t2, 454 | AsyncValue t3, 455 | AsyncValue t4, 456 | AsyncValue t5, 457 | AsyncValue t6, 458 | AsyncValue t7, 459 | AsyncValue t8, 460 | AsyncValue t9, 461 | AsyncValue t10, 462 | AsyncValue t11, 463 | AsyncValue t12, 464 | AsyncValue t13, 465 | AsyncValue t14, 466 | AsyncValue t15) { 467 | if (t1 is AsyncLoading || 468 | t2 is AsyncLoading || 469 | t3 is AsyncLoading || 470 | t4 is AsyncLoading || 471 | t5 is AsyncLoading || 472 | t6 is AsyncLoading || 473 | t7 is AsyncLoading || 474 | t8 is AsyncLoading || 475 | t9 is AsyncLoading || 476 | t10 is AsyncLoading || 477 | t11 is AsyncLoading || 478 | t12 is AsyncLoading || 479 | t13 is AsyncLoading || 480 | t14 is AsyncLoading || 481 | t15 is AsyncLoading) { 482 | return const AsyncLoading(); 483 | } 484 | try { 485 | return AsyncData(( 486 | t1.value as T1, 487 | t2.value as T2, 488 | t3.value as T3, 489 | t4.value as T4, 490 | t5.value as T5, 491 | t6.value as T6, 492 | t7.value as T7, 493 | t8.value as T8, 494 | t9.value as T9, 495 | t10.value as T10, 496 | t11.value as T11, 497 | t12.value as T12, 498 | t13.value as T13, 499 | t14.value as T14, 500 | t15.value as T15 501 | )); 502 | } catch (e, st) { 503 | return AsyncError(e, st); 504 | } 505 | } 506 | 507 | static AsyncValue< 508 | ( 509 | T1, 510 | T2, 511 | T3, 512 | T4, 513 | T5, 514 | T6, 515 | T7, 516 | T8, 517 | T9, 518 | T10, 519 | T11, 520 | T12, 521 | T13, 522 | T14, 523 | T15, 524 | T16 525 | )> group16( 527 | AsyncValue t1, 528 | AsyncValue t2, 529 | AsyncValue t3, 530 | AsyncValue t4, 531 | AsyncValue t5, 532 | AsyncValue t6, 533 | AsyncValue t7, 534 | AsyncValue t8, 535 | AsyncValue t9, 536 | AsyncValue t10, 537 | AsyncValue t11, 538 | AsyncValue t12, 539 | AsyncValue t13, 540 | AsyncValue t14, 541 | AsyncValue t15, 542 | AsyncValue t16) { 543 | if (t1 is AsyncLoading || 544 | t2 is AsyncLoading || 545 | t3 is AsyncLoading || 546 | t4 is AsyncLoading || 547 | t5 is AsyncLoading || 548 | t6 is AsyncLoading || 549 | t7 is AsyncLoading || 550 | t8 is AsyncLoading || 551 | t9 is AsyncLoading || 552 | t10 is AsyncLoading || 553 | t11 is AsyncLoading || 554 | t12 is AsyncLoading || 555 | t13 is AsyncLoading || 556 | t14 is AsyncLoading || 557 | t15 is AsyncLoading || 558 | t16 is AsyncLoading) { 559 | return const AsyncLoading(); 560 | } 561 | try { 562 | return AsyncData(( 563 | t1.value as T1, 564 | t2.value as T2, 565 | t3.value as T3, 566 | t4.value as T4, 567 | t5.value as T5, 568 | t6.value as T6, 569 | t7.value as T7, 570 | t8.value as T8, 571 | t9.value as T9, 572 | t10.value as T10, 573 | t11.value as T11, 574 | t12.value as T12, 575 | t13.value as T13, 576 | t14.value as T14, 577 | t15.value as T15, 578 | t16.value as T16 579 | )); 580 | } catch (e, st) { 581 | return AsyncError(e, st); 582 | } 583 | } 584 | 585 | static AsyncValue< 586 | ( 587 | T1, 588 | T2, 589 | T3, 590 | T4, 591 | T5, 592 | T6, 593 | T7, 594 | T8, 595 | T9, 596 | T10, 597 | T11, 598 | T12, 599 | T13, 600 | T14, 601 | T15, 602 | T16, 603 | T17 604 | )> group17( 606 | AsyncValue t1, 607 | AsyncValue t2, 608 | AsyncValue t3, 609 | AsyncValue t4, 610 | AsyncValue t5, 611 | AsyncValue t6, 612 | AsyncValue t7, 613 | AsyncValue t8, 614 | AsyncValue t9, 615 | AsyncValue t10, 616 | AsyncValue t11, 617 | AsyncValue t12, 618 | AsyncValue t13, 619 | AsyncValue t14, 620 | AsyncValue t15, 621 | AsyncValue t16, 622 | AsyncValue t17) { 623 | if (t1 is AsyncLoading || 624 | t2 is AsyncLoading || 625 | t3 is AsyncLoading || 626 | t4 is AsyncLoading || 627 | t5 is AsyncLoading || 628 | t6 is AsyncLoading || 629 | t7 is AsyncLoading || 630 | t8 is AsyncLoading || 631 | t9 is AsyncLoading || 632 | t10 is AsyncLoading || 633 | t11 is AsyncLoading || 634 | t12 is AsyncLoading || 635 | t13 is AsyncLoading || 636 | t14 is AsyncLoading || 637 | t15 is AsyncLoading || 638 | t16 is AsyncLoading || 639 | t17 is AsyncLoading) { 640 | return const AsyncLoading(); 641 | } 642 | try { 643 | return AsyncData(( 644 | t1.value as T1, 645 | t2.value as T2, 646 | t3.value as T3, 647 | t4.value as T4, 648 | t5.value as T5, 649 | t6.value as T6, 650 | t7.value as T7, 651 | t8.value as T8, 652 | t9.value as T9, 653 | t10.value as T10, 654 | t11.value as T11, 655 | t12.value as T12, 656 | t13.value as T13, 657 | t14.value as T14, 658 | t15.value as T15, 659 | t16.value as T16, 660 | t17.value as T17 661 | )); 662 | } catch (e, st) { 663 | return AsyncError(e, st); 664 | } 665 | } 666 | 667 | static AsyncValue< 668 | ( 669 | T1, 670 | T2, 671 | T3, 672 | T4, 673 | T5, 674 | T6, 675 | T7, 676 | T8, 677 | T9, 678 | T10, 679 | T11, 680 | T12, 681 | T13, 682 | T14, 683 | T15, 684 | T16, 685 | T17, 686 | T18 687 | )> group18( 689 | AsyncValue t1, 690 | AsyncValue t2, 691 | AsyncValue t3, 692 | AsyncValue t4, 693 | AsyncValue t5, 694 | AsyncValue t6, 695 | AsyncValue t7, 696 | AsyncValue t8, 697 | AsyncValue t9, 698 | AsyncValue t10, 699 | AsyncValue t11, 700 | AsyncValue t12, 701 | AsyncValue t13, 702 | AsyncValue t14, 703 | AsyncValue t15, 704 | AsyncValue t16, 705 | AsyncValue t17, 706 | AsyncValue t18) { 707 | if (t1 is AsyncLoading || 708 | t2 is AsyncLoading || 709 | t3 is AsyncLoading || 710 | t4 is AsyncLoading || 711 | t5 is AsyncLoading || 712 | t6 is AsyncLoading || 713 | t7 is AsyncLoading || 714 | t8 is AsyncLoading || 715 | t9 is AsyncLoading || 716 | t10 is AsyncLoading || 717 | t11 is AsyncLoading || 718 | t12 is AsyncLoading || 719 | t13 is AsyncLoading || 720 | t14 is AsyncLoading || 721 | t15 is AsyncLoading || 722 | t16 is AsyncLoading || 723 | t17 is AsyncLoading || 724 | t18 is AsyncLoading) { 725 | return const AsyncLoading(); 726 | } 727 | try { 728 | return AsyncData(( 729 | t1.value as T1, 730 | t2.value as T2, 731 | t3.value as T3, 732 | t4.value as T4, 733 | t5.value as T5, 734 | t6.value as T6, 735 | t7.value as T7, 736 | t8.value as T8, 737 | t9.value as T9, 738 | t10.value as T10, 739 | t11.value as T11, 740 | t12.value as T12, 741 | t13.value as T13, 742 | t14.value as T14, 743 | t15.value as T15, 744 | t16.value as T16, 745 | t17.value as T17, 746 | t18.value as T18 747 | )); 748 | } catch (e, st) { 749 | return AsyncError(e, st); 750 | } 751 | } 752 | 753 | static AsyncValue< 754 | ( 755 | T1, 756 | T2, 757 | T3, 758 | T4, 759 | T5, 760 | T6, 761 | T7, 762 | T8, 763 | T9, 764 | T10, 765 | T11, 766 | T12, 767 | T13, 768 | T14, 769 | T15, 770 | T16, 771 | T17, 772 | T18, 773 | T19 774 | )> group19( 776 | AsyncValue t1, 777 | AsyncValue t2, 778 | AsyncValue t3, 779 | AsyncValue t4, 780 | AsyncValue t5, 781 | AsyncValue t6, 782 | AsyncValue t7, 783 | AsyncValue t8, 784 | AsyncValue t9, 785 | AsyncValue t10, 786 | AsyncValue t11, 787 | AsyncValue t12, 788 | AsyncValue t13, 789 | AsyncValue t14, 790 | AsyncValue t15, 791 | AsyncValue t16, 792 | AsyncValue t17, 793 | AsyncValue t18, 794 | AsyncValue t19) { 795 | if (t1 is AsyncLoading || 796 | t2 is AsyncLoading || 797 | t3 is AsyncLoading || 798 | t4 is AsyncLoading || 799 | t5 is AsyncLoading || 800 | t6 is AsyncLoading || 801 | t7 is AsyncLoading || 802 | t8 is AsyncLoading || 803 | t9 is AsyncLoading || 804 | t10 is AsyncLoading || 805 | t11 is AsyncLoading || 806 | t12 is AsyncLoading || 807 | t13 is AsyncLoading || 808 | t14 is AsyncLoading || 809 | t15 is AsyncLoading || 810 | t16 is AsyncLoading || 811 | t17 is AsyncLoading || 812 | t18 is AsyncLoading || 813 | t19 is AsyncLoading) { 814 | return const AsyncLoading(); 815 | } 816 | try { 817 | return AsyncData(( 818 | t1.value as T1, 819 | t2.value as T2, 820 | t3.value as T3, 821 | t4.value as T4, 822 | t5.value as T5, 823 | t6.value as T6, 824 | t7.value as T7, 825 | t8.value as T8, 826 | t9.value as T9, 827 | t10.value as T10, 828 | t11.value as T11, 829 | t12.value as T12, 830 | t13.value as T13, 831 | t14.value as T14, 832 | t15.value as T15, 833 | t16.value as T16, 834 | t17.value as T17, 835 | t18.value as T18, 836 | t19.value as T19 837 | )); 838 | } catch (e, st) { 839 | return AsyncError(e, st); 840 | } 841 | } 842 | 843 | static AsyncValue< 844 | ( 845 | T1, 846 | T2, 847 | T3, 848 | T4, 849 | T5, 850 | T6, 851 | T7, 852 | T8, 853 | T9, 854 | T10, 855 | T11, 856 | T12, 857 | T13, 858 | T14, 859 | T15, 860 | T16, 861 | T17, 862 | T18, 863 | T19, 864 | T20 865 | )> group20( 867 | AsyncValue t1, 868 | AsyncValue t2, 869 | AsyncValue t3, 870 | AsyncValue t4, 871 | AsyncValue t5, 872 | AsyncValue t6, 873 | AsyncValue t7, 874 | AsyncValue t8, 875 | AsyncValue t9, 876 | AsyncValue t10, 877 | AsyncValue t11, 878 | AsyncValue t12, 879 | AsyncValue t13, 880 | AsyncValue t14, 881 | AsyncValue t15, 882 | AsyncValue t16, 883 | AsyncValue t17, 884 | AsyncValue t18, 885 | AsyncValue t19, 886 | AsyncValue t20) { 887 | if (t1 is AsyncLoading || 888 | t2 is AsyncLoading || 889 | t3 is AsyncLoading || 890 | t4 is AsyncLoading || 891 | t5 is AsyncLoading || 892 | t6 is AsyncLoading || 893 | t7 is AsyncLoading || 894 | t8 is AsyncLoading || 895 | t9 is AsyncLoading || 896 | t10 is AsyncLoading || 897 | t11 is AsyncLoading || 898 | t12 is AsyncLoading || 899 | t13 is AsyncLoading || 900 | t14 is AsyncLoading || 901 | t15 is AsyncLoading || 902 | t16 is AsyncLoading || 903 | t17 is AsyncLoading || 904 | t18 is AsyncLoading || 905 | t19 is AsyncLoading || 906 | t20 is AsyncLoading) { 907 | return const AsyncLoading(); 908 | } 909 | try { 910 | return AsyncData(( 911 | t1.value as T1, 912 | t2.value as T2, 913 | t3.value as T3, 914 | t4.value as T4, 915 | t5.value as T5, 916 | t6.value as T6, 917 | t7.value as T7, 918 | t8.value as T8, 919 | t9.value as T9, 920 | t10.value as T10, 921 | t11.value as T11, 922 | t12.value as T12, 923 | t13.value as T13, 924 | t14.value as T14, 925 | t15.value as T15, 926 | t16.value as T16, 927 | t17.value as T17, 928 | t18.value as T18, 929 | t19.value as T19, 930 | t20.value as T20 931 | )); 932 | } catch (e, st) { 933 | return AsyncError(e, st); 934 | } 935 | } 936 | } 937 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: async_value_group 2 | description: async_value_group is a a Dart library for grouping some riverpod AsyncValues into single AsyncValue. 3 | version: 1.0.1 4 | repository: https://github.com/bannzai/async_value_group 5 | 6 | environment: 7 | sdk: ">=3.0.0 <4.0.0" 8 | flutter: ">=1.17.0" 9 | 10 | dependencies: 11 | flutter: 12 | sdk: flutter 13 | riverpod: ^2.0.0 14 | 15 | dev_dependencies: 16 | flutter_test: 17 | sdk: flutter 18 | flutter_lints: ^2.0.0 19 | 20 | # For information on the generic Dart part of this file, see the 21 | # following page: https://dart.dev/tools/pub/pubspec 22 | 23 | # The following section is specific to Flutter packages. 24 | flutter: 25 | 26 | # To add assets to your package, add an assets section, like this: 27 | # assets: 28 | # - images/a_dot_burr.jpeg 29 | # - images/a_dot_ham.jpeg 30 | # 31 | # For details regarding assets in packages, see 32 | # https://flutter.dev/assets-and-images/#from-packages 33 | # 34 | # An image asset can refer to one or more resolution-specific "variants", see 35 | # https://flutter.dev/assets-and-images/#resolution-aware 36 | 37 | # To add custom fonts to your package, add a fonts section here, 38 | # in this "flutter" section. Each entry in this list should have a 39 | # "family" key with the font family name, and a "fonts" key with a 40 | # list giving the asset and other descriptors for the font. For 41 | # example: 42 | # fonts: 43 | # - family: Schyler 44 | # fonts: 45 | # - asset: fonts/Schyler-Regular.ttf 46 | # - asset: fonts/Schyler-Italic.ttf 47 | # style: italic 48 | # - family: Trajan Pro 49 | # fonts: 50 | # - asset: fonts/TrajanPro.ttf 51 | # - asset: fonts/TrajanPro_Bold.ttf 52 | # weight: 700 53 | # 54 | # For details regarding fonts in packages, see 55 | # https://flutter.dev/custom-fonts/#from-packages 56 | -------------------------------------------------------------------------------- /test/async_value_group_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:async_value_group/async_value_group.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | import 'package:riverpod/riverpod.dart'; 5 | 6 | void main() { 7 | test('Simple AsyncValue case', () { 8 | // Check nullish and non nullish values 9 | const AsyncValue t1 = AsyncData(1); 10 | const AsyncValue t2 = AsyncData("value"); 11 | const AsyncValue t3 = AsyncData(null); 12 | const AsyncValue t4 = AsyncData("value"); 13 | final group = AsyncValueGroup.group4(t1, t2, t3, t4); 14 | expect(group.value!.$1, 1); 15 | expect(group.value!.$2, "value"); 16 | expect(group.value!.$3, null); 17 | expect(group.value!.$4, "value"); 18 | expect(group is AsyncData, true); 19 | }); 20 | 21 | group("group2", () { 22 | test("#AsyncValue", () { 23 | const AsyncValue t1 = AsyncData(1); 24 | const AsyncValue t2 = AsyncData("value"); 25 | final group = AsyncValueGroup.group2(t1, t2); 26 | expect(group.value!.$1, 1); 27 | expect(group.value!.$2, "value"); 28 | expect(group is AsyncData, true); 29 | }); 30 | test("#AsyncLoading", () { 31 | const AsyncValue t1 = AsyncData(1); 32 | const AsyncValue t2 = AsyncLoading(); 33 | final group = AsyncValueGroup.group2(t1, t2); 34 | expect(group.value, null); 35 | expect(group.isLoading, true); 36 | expect(group is AsyncLoading, true); 37 | }); 38 | test("#AsyncError", () { 39 | const AsyncValue t1 = AsyncData(1); 40 | const AsyncValue t2 = 41 | AsyncError(FormatException(""), StackTrace.empty); 42 | final group = AsyncValueGroup.group2(t1, t2); 43 | expect(group.asData?.valueOrNull, null); 44 | expect(group.error, isNotNull); 45 | expect(group is AsyncError, true); 46 | }); 47 | }); 48 | 49 | group("group3", () { 50 | test("#AsyncValue", () { 51 | const AsyncValue t1 = AsyncData(1); 52 | const AsyncValue t2 = AsyncData("value"); 53 | const AsyncValue t3 = AsyncData(1.0); 54 | final group = AsyncValueGroup.group3(t1, t2, t3); 55 | expect(group.value!.$1, 1); 56 | expect(group.value!.$2, "value"); 57 | expect(group.value!.$3, 1.0); 58 | expect(group is AsyncData, true); 59 | }); 60 | test("#AsyncLoading", () { 61 | const AsyncValue t1 = AsyncData(1); 62 | const AsyncValue t2 = AsyncLoading(); 63 | const AsyncValue t3 = AsyncData(1.0); 64 | final group = AsyncValueGroup.group3(t1, t2, t3); 65 | expect(group.value, null); 66 | expect(group.isLoading, true); 67 | expect(group is AsyncLoading, true); 68 | }); 69 | test("#AsyncError", () { 70 | const AsyncValue t1 = AsyncData(1); 71 | const AsyncValue t2 = 72 | AsyncError(FormatException(""), StackTrace.empty); 73 | const AsyncValue t3 = AsyncData(1.0); 74 | final group = AsyncValueGroup.group3(t1, t2, t3); 75 | expect(group.asData?.valueOrNull, null); 76 | expect(group.error, isNotNull); 77 | expect(group is AsyncError, true); 78 | }); 79 | }); 80 | 81 | group("group4", () { 82 | test("#AsyncValue", () { 83 | const AsyncValue t1 = AsyncData(1); 84 | const AsyncValue t2 = AsyncData("value"); 85 | const AsyncValue t3 = AsyncData(1.0); 86 | const AsyncValue t4 = AsyncData("value"); 87 | final group = AsyncValueGroup.group4(t1, t2, t3, t4); 88 | expect(group.value!.$1, 1); 89 | expect(group.value!.$2, "value"); 90 | expect(group.value!.$3, 1.0); 91 | expect(group.value!.$4, "value"); 92 | expect(group is AsyncData, true); 93 | }); 94 | test("#AsyncLoading", () { 95 | const AsyncValue t1 = AsyncData(1); 96 | const AsyncValue t2 = AsyncLoading(); 97 | const AsyncValue t3 = AsyncData(1.0); 98 | const AsyncValue t4 = AsyncData("value"); 99 | final group = AsyncValueGroup.group4(t1, t2, t3, t4); 100 | expect(group.value, null); 101 | expect(group.isLoading, true); 102 | expect(group is AsyncLoading, true); 103 | }); 104 | test("#AsyncError", () { 105 | const AsyncValue t1 = AsyncData(1); 106 | const AsyncValue t2 = 107 | AsyncError(FormatException(""), StackTrace.empty); 108 | const AsyncValue t3 = AsyncData(1.0); 109 | const AsyncValue t4 = AsyncData("value"); 110 | final group = AsyncValueGroup.group4(t1, t2, t3, t4); 111 | expect(group.asData?.valueOrNull, null); 112 | expect(group.error, isNotNull); 113 | expect(group is AsyncError, true); 114 | }); 115 | }); 116 | 117 | group("group5", () { 118 | test("#AsyncValue", () { 119 | const AsyncValue t1 = AsyncData(1); 120 | const AsyncValue t2 = AsyncData("value"); 121 | const AsyncValue t3 = AsyncData(1.0); 122 | const AsyncValue t4 = AsyncData("value"); 123 | const AsyncValue t5 = AsyncData("value"); 124 | final group = AsyncValueGroup.group5(t1, t2, t3, t4, t5); 125 | expect(group.value!.$1, 1); 126 | expect(group.value!.$2, "value"); 127 | expect(group.value!.$3, 1.0); 128 | expect(group.value!.$4, "value"); 129 | expect(group.value!.$5, "value"); 130 | expect(group is AsyncData, true); 131 | }); 132 | test("#AsyncLoading", () { 133 | const AsyncValue t1 = AsyncData(1); 134 | const AsyncValue t2 = AsyncLoading(); 135 | const AsyncValue t3 = AsyncData(1.0); 136 | const AsyncValue t4 = AsyncData("value"); 137 | const AsyncValue t5 = AsyncData("value"); 138 | final group = AsyncValueGroup.group5(t1, t2, t3, t4, t5); 139 | expect(group.value, null); 140 | expect(group.isLoading, true); 141 | expect(group is AsyncLoading, true); 142 | }); 143 | test("#AsyncError", () { 144 | const AsyncValue t1 = AsyncData(1); 145 | const AsyncValue t2 = 146 | AsyncError(FormatException(""), StackTrace.empty); 147 | const AsyncValue t3 = AsyncData(1.0); 148 | const AsyncValue t4 = AsyncData("value"); 149 | const AsyncValue t5 = AsyncData("value"); 150 | final group = AsyncValueGroup.group5(t1, t2, t3, t4, t5); 151 | expect(group.asData?.valueOrNull, null); 152 | expect(group.error, isNotNull); 153 | expect(group is AsyncError, true); 154 | }); 155 | }); 156 | 157 | group("group6", () { 158 | test("#AsyncValue", () { 159 | const AsyncValue t1 = AsyncData(1); 160 | const AsyncValue t2 = AsyncData("value"); 161 | const AsyncValue t3 = AsyncData(1.0); 162 | const AsyncValue t4 = AsyncData("value"); 163 | const AsyncValue t5 = AsyncData("value"); 164 | const AsyncValue t6 = AsyncData("value"); 165 | final group = AsyncValueGroup.group6(t1, t2, t3, t4, t5, t6); 166 | expect(group.value!.$1, 1); 167 | expect(group.value!.$2, "value"); 168 | expect(group.value!.$3, 1.0); 169 | expect(group.value!.$4, "value"); 170 | expect(group.value!.$5, "value"); 171 | expect(group.value!.$6, "value"); 172 | expect(group is AsyncData, true); 173 | }); 174 | test("#AsyncLoading", () { 175 | const AsyncValue t1 = AsyncData(1); 176 | const AsyncValue t2 = AsyncLoading(); 177 | const AsyncValue t3 = AsyncData(1.0); 178 | const AsyncValue t4 = AsyncData("value"); 179 | const AsyncValue t5 = AsyncData("value"); 180 | const AsyncValue t6 = AsyncData("value"); 181 | final group = AsyncValueGroup.group6(t1, t2, t3, t4, t5, t6); 182 | expect(group.value, null); 183 | expect(group.isLoading, true); 184 | expect(group is AsyncLoading, true); 185 | }); 186 | test("#AsyncError", () { 187 | const AsyncValue t1 = AsyncData(1); 188 | const AsyncValue t2 = 189 | AsyncError(FormatException(""), StackTrace.empty); 190 | const AsyncValue t3 = AsyncData(1.0); 191 | const AsyncValue t4 = AsyncData("value"); 192 | const AsyncValue t5 = AsyncData("value"); 193 | const AsyncValue t6 = AsyncData("value"); 194 | final group = AsyncValueGroup.group6(t1, t2, t3, t4, t5, t6); 195 | expect(group.asData?.valueOrNull, null); 196 | expect(group.error, isNotNull); 197 | expect(group is AsyncError, true); 198 | }); 199 | }); 200 | 201 | group("group7", () { 202 | test("#AsyncValue", () { 203 | const AsyncValue t1 = AsyncData(1); 204 | const AsyncValue t2 = AsyncData("value"); 205 | const AsyncValue t3 = AsyncData(1.0); 206 | const AsyncValue t4 = AsyncData("value"); 207 | const AsyncValue t5 = AsyncData("value"); 208 | const AsyncValue t6 = AsyncData("value"); 209 | const AsyncValue t7 = AsyncData("value"); 210 | final group = AsyncValueGroup.group7(t1, t2, t3, t4, t5, t6, t7); 211 | expect(group.value!.$1, 1); 212 | expect(group.value!.$2, "value"); 213 | expect(group.value!.$3, 1.0); 214 | expect(group.value!.$4, "value"); 215 | expect(group.value!.$5, "value"); 216 | expect(group.value!.$6, "value"); 217 | expect(group.value!.$7, "value"); 218 | expect(group is AsyncData, true); 219 | }); 220 | test("#AsyncLoading", () { 221 | const AsyncValue t1 = AsyncData(1); 222 | const AsyncValue t2 = AsyncLoading(); 223 | const AsyncValue t3 = AsyncData(1.0); 224 | const AsyncValue t4 = AsyncData("value"); 225 | const AsyncValue t5 = AsyncData("value"); 226 | const AsyncValue t6 = AsyncData("value"); 227 | const AsyncValue t7 = AsyncData("value"); 228 | final group = AsyncValueGroup.group7(t1, t2, t3, t4, t5, t6, t7); 229 | expect(group.value, null); 230 | expect(group.isLoading, true); 231 | expect(group is AsyncLoading, true); 232 | }); 233 | test("#AsyncError", () { 234 | const AsyncValue t1 = AsyncData(1); 235 | const AsyncValue t2 = 236 | AsyncError(FormatException(""), StackTrace.empty); 237 | const AsyncValue t3 = AsyncData(1.0); 238 | const AsyncValue t4 = AsyncData("value"); 239 | const AsyncValue t5 = AsyncData("value"); 240 | const AsyncValue t6 = AsyncData("value"); 241 | const AsyncValue t7 = AsyncData("value"); 242 | final group = AsyncValueGroup.group7(t1, t2, t3, t4, t5, t6, t7); 243 | expect(group.asData?.valueOrNull, null); 244 | expect(group.error, isNotNull); 245 | expect(group is AsyncError, true); 246 | }); 247 | }); 248 | 249 | group("group8", () { 250 | test("#AsyncValue", () { 251 | const AsyncValue t1 = AsyncData(1); 252 | const AsyncValue t2 = AsyncData("value"); 253 | const AsyncValue t3 = AsyncData(1.0); 254 | const AsyncValue t4 = AsyncData("value"); 255 | const AsyncValue t5 = AsyncData("value"); 256 | const AsyncValue t6 = AsyncData("value"); 257 | const AsyncValue t7 = AsyncData("value"); 258 | const AsyncValue t8 = AsyncData("value"); 259 | final group = AsyncValueGroup.group8(t1, t2, t3, t4, t5, t6, t7, t8); 260 | expect(group.value!.$1, 1); 261 | expect(group.value!.$2, "value"); 262 | expect(group.value!.$3, 1.0); 263 | expect(group.value!.$4, "value"); 264 | expect(group.value!.$5, "value"); 265 | expect(group.value!.$6, "value"); 266 | expect(group.value!.$7, "value"); 267 | expect(group.value!.$8, "value"); 268 | expect(group is AsyncData, true); 269 | }); 270 | test("#AsyncLoading", () { 271 | const AsyncValue t1 = AsyncData(1); 272 | const AsyncValue t2 = AsyncLoading(); 273 | const AsyncValue t3 = AsyncData(1.0); 274 | const AsyncValue t4 = AsyncData("value"); 275 | const AsyncValue t5 = AsyncData("value"); 276 | const AsyncValue t6 = AsyncData("value"); 277 | const AsyncValue t7 = AsyncData("value"); 278 | const AsyncValue t8 = AsyncData("value"); 279 | final group = AsyncValueGroup.group8(t1, t2, t3, t4, t5, t6, t7, t8); 280 | expect(group.value, null); 281 | expect(group.isLoading, true); 282 | expect(group is AsyncLoading, true); 283 | }); 284 | test("#AsyncError", () { 285 | const AsyncValue t1 = AsyncData(1); 286 | const AsyncValue t2 = 287 | AsyncError(FormatException(""), StackTrace.empty); 288 | const AsyncValue t3 = AsyncData(1.0); 289 | const AsyncValue t4 = AsyncData("value"); 290 | const AsyncValue t5 = AsyncData("value"); 291 | const AsyncValue t6 = AsyncData("value"); 292 | const AsyncValue t7 = AsyncData("value"); 293 | const AsyncValue t8 = AsyncData("value"); 294 | final group = AsyncValueGroup.group8(t1, t2, t3, t4, t5, t6, t7, t8); 295 | expect(group.asData?.valueOrNull, null); 296 | expect(group.error, isNotNull); 297 | expect(group is AsyncError, true); 298 | }); 299 | }); 300 | 301 | group("group9", () { 302 | test("#AsyncValue", () { 303 | const AsyncValue t1 = AsyncData(1); 304 | const AsyncValue t2 = AsyncData("value"); 305 | const AsyncValue t3 = AsyncData(1.0); 306 | const AsyncValue t4 = AsyncData("value"); 307 | const AsyncValue t5 = AsyncData("value"); 308 | const AsyncValue t6 = AsyncData("value"); 309 | const AsyncValue t7 = AsyncData("value"); 310 | const AsyncValue t8 = AsyncData("value"); 311 | const AsyncValue t9 = AsyncData("value"); 312 | final group = AsyncValueGroup.group9(t1, t2, t3, t4, t5, t6, t7, t8, t9); 313 | expect(group.value!.$1, 1); 314 | expect(group.value!.$2, "value"); 315 | expect(group.value!.$3, 1.0); 316 | expect(group.value!.$4, "value"); 317 | expect(group.value!.$5, "value"); 318 | expect(group.value!.$6, "value"); 319 | expect(group.value!.$7, "value"); 320 | expect(group.value!.$8, "value"); 321 | expect(group.value!.$9, "value"); 322 | expect(group is AsyncData, true); 323 | }); 324 | test("#AsyncLoading", () { 325 | const AsyncValue t1 = AsyncData(1); 326 | const AsyncValue t2 = AsyncLoading(); 327 | const AsyncValue t3 = AsyncData(1.0); 328 | const AsyncValue t4 = AsyncData("value"); 329 | const AsyncValue t5 = AsyncData("value"); 330 | const AsyncValue t6 = AsyncData("value"); 331 | const AsyncValue t7 = AsyncData("value"); 332 | const AsyncValue t8 = AsyncData("value"); 333 | const AsyncValue t9 = AsyncData("value"); 334 | final group = AsyncValueGroup.group9(t1, t2, t3, t4, t5, t6, t7, t8, t9); 335 | expect(group.value, null); 336 | expect(group.isLoading, true); 337 | expect(group is AsyncLoading, true); 338 | }); 339 | test("#AsyncError", () { 340 | const AsyncValue t1 = AsyncData(1); 341 | const AsyncValue t2 = 342 | AsyncError(FormatException(""), StackTrace.empty); 343 | const AsyncValue t3 = AsyncData(1.0); 344 | const AsyncValue t4 = AsyncData("value"); 345 | const AsyncValue t5 = AsyncData("value"); 346 | const AsyncValue t6 = AsyncData("value"); 347 | const AsyncValue t7 = AsyncData("value"); 348 | const AsyncValue t8 = AsyncData("value"); 349 | const AsyncValue t9 = AsyncData("value"); 350 | final group = AsyncValueGroup.group9(t1, t2, t3, t4, t5, t6, t7, t8, t9); 351 | expect(group.asData?.valueOrNull, null); 352 | expect(group.error, isNotNull); 353 | expect(group is AsyncError, true); 354 | }); 355 | }); 356 | 357 | group("group10", () { 358 | test("#AsyncValue", () { 359 | const AsyncValue t1 = AsyncData(1); 360 | const AsyncValue t2 = AsyncData("value"); 361 | const AsyncValue t3 = AsyncData(1.0); 362 | const AsyncValue t4 = AsyncData("value"); 363 | const AsyncValue t5 = AsyncData("value"); 364 | const AsyncValue t6 = AsyncData("value"); 365 | const AsyncValue t7 = AsyncData("value"); 366 | const AsyncValue t8 = AsyncData("value"); 367 | const AsyncValue t9 = AsyncData("value"); 368 | const AsyncValue t10 = AsyncData("value"); 369 | final group = 370 | AsyncValueGroup.group10(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); 371 | expect(group.value!.$1, 1); 372 | expect(group.value!.$2, "value"); 373 | expect(group.value!.$3, 1.0); 374 | expect(group.value!.$4, "value"); 375 | expect(group.value!.$5, "value"); 376 | expect(group.value!.$6, "value"); 377 | expect(group.value!.$7, "value"); 378 | expect(group.value!.$8, "value"); 379 | expect(group.value!.$9, "value"); 380 | expect(group.value!.$10, "value"); 381 | expect(group is AsyncData, true); 382 | }); 383 | test("#AsyncLoading", () { 384 | const AsyncValue t1 = AsyncData(1); 385 | const AsyncValue t2 = AsyncLoading(); 386 | const AsyncValue t3 = AsyncData(1.0); 387 | const AsyncValue t4 = AsyncData("value"); 388 | const AsyncValue t5 = AsyncData("value"); 389 | const AsyncValue t6 = AsyncData("value"); 390 | const AsyncValue t7 = AsyncData("value"); 391 | const AsyncValue t8 = AsyncData("value"); 392 | const AsyncValue t9 = AsyncData("value"); 393 | const AsyncValue t10 = AsyncData("value"); 394 | final group = 395 | AsyncValueGroup.group10(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); 396 | expect(group.value, null); 397 | expect(group.isLoading, true); 398 | expect(group is AsyncLoading, true); 399 | }); 400 | test("#AsyncError", () { 401 | const AsyncValue t1 = AsyncData(1); 402 | const AsyncValue t2 = 403 | AsyncError(FormatException(""), StackTrace.empty); 404 | const AsyncValue t3 = AsyncData(1.0); 405 | const AsyncValue t4 = AsyncData("value"); 406 | const AsyncValue t5 = AsyncData("value"); 407 | const AsyncValue t6 = AsyncData("value"); 408 | const AsyncValue t7 = AsyncData("value"); 409 | const AsyncValue t8 = AsyncData("value"); 410 | const AsyncValue t9 = AsyncData("value"); 411 | const AsyncValue t10 = AsyncData("value"); 412 | final group = 413 | AsyncValueGroup.group10(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10); 414 | expect(group.asData?.valueOrNull, null); 415 | expect(group.error, isNotNull); 416 | expect(group is AsyncError, true); 417 | }); 418 | }); 419 | 420 | group("group11", () { 421 | test("#AsyncValue", () { 422 | const AsyncValue t1 = AsyncData(1); 423 | const AsyncValue t2 = AsyncData("value"); 424 | const AsyncValue t3 = AsyncData(1.0); 425 | const AsyncValue t4 = AsyncData("value"); 426 | const AsyncValue t5 = AsyncData("value"); 427 | const AsyncValue t6 = AsyncData("value"); 428 | const AsyncValue t7 = AsyncData("value"); 429 | const AsyncValue t8 = AsyncData("value"); 430 | const AsyncValue t9 = AsyncData("value"); 431 | const AsyncValue t10 = AsyncData("value"); 432 | const AsyncValue t11 = AsyncData("value"); 433 | final group = 434 | AsyncValueGroup.group11(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); 435 | expect(group.value!.$1, 1); 436 | expect(group.value!.$2, "value"); 437 | expect(group.value!.$3, 1.0); 438 | expect(group.value!.$4, "value"); 439 | expect(group.value!.$5, "value"); 440 | expect(group.value!.$6, "value"); 441 | expect(group.value!.$7, "value"); 442 | expect(group.value!.$8, "value"); 443 | expect(group.value!.$9, "value"); 444 | expect(group.value!.$10, "value"); 445 | expect(group.value!.$11, "value"); 446 | expect(group is AsyncData, true); 447 | }); 448 | test("#AsyncLoading", () { 449 | const AsyncValue t1 = AsyncData(1); 450 | const AsyncValue t2 = AsyncLoading(); 451 | const AsyncValue t3 = AsyncData(1.0); 452 | const AsyncValue t4 = AsyncData("value"); 453 | const AsyncValue t5 = AsyncData("value"); 454 | const AsyncValue t6 = AsyncData("value"); 455 | const AsyncValue t7 = AsyncData("value"); 456 | const AsyncValue t8 = AsyncData("value"); 457 | const AsyncValue t9 = AsyncData("value"); 458 | const AsyncValue t10 = AsyncData("value"); 459 | const AsyncValue t11 = AsyncData("value"); 460 | final group = 461 | AsyncValueGroup.group11(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); 462 | expect(group.value, null); 463 | expect(group.isLoading, true); 464 | expect(group is AsyncLoading, true); 465 | }); 466 | test("#AsyncError", () { 467 | const AsyncValue t1 = AsyncData(1); 468 | const AsyncValue t2 = 469 | AsyncError(FormatException(""), StackTrace.empty); 470 | const AsyncValue t3 = AsyncData(1.0); 471 | const AsyncValue t4 = AsyncData("value"); 472 | const AsyncValue t5 = AsyncData("value"); 473 | const AsyncValue t6 = AsyncData("value"); 474 | const AsyncValue t7 = AsyncData("value"); 475 | const AsyncValue t8 = AsyncData("value"); 476 | const AsyncValue t9 = AsyncData("value"); 477 | const AsyncValue t10 = AsyncData("value"); 478 | const AsyncValue t11 = AsyncData("value"); 479 | final group = 480 | AsyncValueGroup.group11(t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11); 481 | expect(group.asData?.valueOrNull, null); 482 | expect(group.error, isNotNull); 483 | expect(group is AsyncError, true); 484 | }); 485 | }); 486 | 487 | group("group12", () { 488 | test("#AsyncValue", () { 489 | const AsyncValue t1 = AsyncData(1); 490 | const AsyncValue t2 = AsyncData("value"); 491 | const AsyncValue t3 = AsyncData(1.0); 492 | const AsyncValue t4 = AsyncData("value"); 493 | const AsyncValue t5 = AsyncData("value"); 494 | const AsyncValue t6 = AsyncData("value"); 495 | const AsyncValue t7 = AsyncData("value"); 496 | const AsyncValue t8 = AsyncData("value"); 497 | const AsyncValue t9 = AsyncData("value"); 498 | const AsyncValue t10 = AsyncData("value"); 499 | const AsyncValue t11 = AsyncData("value"); 500 | const AsyncValue t12 = AsyncData("value"); 501 | final group = AsyncValueGroup.group12( 502 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); 503 | expect(group.value!.$1, 1); 504 | expect(group.value!.$2, "value"); 505 | expect(group.value!.$3, 1.0); 506 | expect(group.value!.$4, "value"); 507 | expect(group.value!.$5, "value"); 508 | expect(group.value!.$6, "value"); 509 | expect(group.value!.$7, "value"); 510 | expect(group.value!.$8, "value"); 511 | expect(group.value!.$9, "value"); 512 | expect(group.value!.$10, "value"); 513 | expect(group.value!.$11, "value"); 514 | expect(group.value!.$12, "value"); 515 | expect(group is AsyncData, true); 516 | }); 517 | 518 | test("#AsyncLoading", () { 519 | const AsyncValue t1 = AsyncData(1); 520 | const AsyncValue t2 = AsyncLoading(); 521 | const AsyncValue t3 = AsyncData(1.0); 522 | const AsyncValue t4 = AsyncData("value"); 523 | const AsyncValue t5 = AsyncData("value"); 524 | const AsyncValue t6 = AsyncData("value"); 525 | const AsyncValue t7 = AsyncData("value"); 526 | const AsyncValue t8 = AsyncData("value"); 527 | const AsyncValue t9 = AsyncData("value"); 528 | const AsyncValue t10 = AsyncData("value"); 529 | const AsyncValue t11 = AsyncData("value"); 530 | const AsyncValue t12 = AsyncData("value"); 531 | final group = AsyncValueGroup.group12( 532 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); 533 | expect(group.value, null); 534 | expect(group.isLoading, true); 535 | expect(group is AsyncLoading, true); 536 | }); 537 | 538 | test("#AsyncError", () { 539 | const AsyncValue t1 = AsyncData(1); 540 | const AsyncValue t2 = 541 | AsyncError(FormatException(""), StackTrace.empty); 542 | const AsyncValue t3 = AsyncData(1.0); 543 | const AsyncValue t4 = AsyncData("value"); 544 | const AsyncValue t5 = AsyncData("value"); 545 | const AsyncValue t6 = AsyncData("value"); 546 | const AsyncValue t7 = AsyncData("value"); 547 | const AsyncValue t8 = AsyncData("value"); 548 | const AsyncValue t9 = AsyncData("value"); 549 | const AsyncValue t10 = AsyncData("value"); 550 | const AsyncValue t11 = AsyncData("value"); 551 | const AsyncValue t12 = AsyncData("value"); 552 | final group = AsyncValueGroup.group12( 553 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12); 554 | expect(group.asData?.valueOrNull, null); 555 | expect(group.error, isNotNull); 556 | expect(group is AsyncError, true); 557 | }); 558 | }); 559 | 560 | group("group13", () { 561 | test("#AsyncValue", () { 562 | const AsyncValue t1 = AsyncData(1); 563 | const AsyncValue t2 = AsyncData("value"); 564 | const AsyncValue t3 = AsyncData(1.0); 565 | const AsyncValue t4 = AsyncData("value"); 566 | const AsyncValue t5 = AsyncData("value"); 567 | const AsyncValue t6 = AsyncData("value"); 568 | const AsyncValue t7 = AsyncData("value"); 569 | const AsyncValue t8 = AsyncData("value"); 570 | const AsyncValue t9 = AsyncData("value"); 571 | const AsyncValue t10 = AsyncData("value"); 572 | const AsyncValue t11 = AsyncData("value"); 573 | const AsyncValue t12 = AsyncData("value"); 574 | const AsyncValue t13 = AsyncData("value"); 575 | final group = AsyncValueGroup.group13( 576 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); 577 | expect(group.value!.$1, 1); 578 | expect(group.value!.$2, "value"); 579 | expect(group.value!.$3, 1.0); 580 | expect(group.value!.$4, "value"); 581 | expect(group.value!.$5, "value"); 582 | expect(group.value!.$6, "value"); 583 | expect(group.value!.$7, "value"); 584 | expect(group.value!.$8, "value"); 585 | expect(group.value!.$9, "value"); 586 | expect(group.value!.$10, "value"); 587 | expect(group.value!.$11, "value"); 588 | expect(group.value!.$12, "value"); 589 | expect(group.value!.$13, "value"); 590 | expect(group is AsyncData, true); 591 | }); 592 | test("#AsyncLoading", () { 593 | const AsyncValue t1 = AsyncData(1); 594 | const AsyncValue t2 = AsyncLoading(); 595 | const AsyncValue t3 = AsyncData(1.0); 596 | const AsyncValue t4 = AsyncData("value"); 597 | const AsyncValue t5 = AsyncData("value"); 598 | const AsyncValue t6 = AsyncData("value"); 599 | const AsyncValue t7 = AsyncData("value"); 600 | const AsyncValue t8 = AsyncData("value"); 601 | const AsyncValue t9 = AsyncData("value"); 602 | const AsyncValue t10 = AsyncData("value"); 603 | const AsyncValue t11 = AsyncData("value"); 604 | const AsyncValue t12 = AsyncData("value"); 605 | const AsyncValue t13 = AsyncData("value"); 606 | final group = AsyncValueGroup.group13( 607 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); 608 | expect(group.value, null); 609 | expect(group.isLoading, true); 610 | expect(group is AsyncLoading, true); 611 | }); 612 | test("#AsyncError", () { 613 | const AsyncValue t1 = AsyncData(1); 614 | const AsyncValue t2 = 615 | AsyncError(FormatException(""), StackTrace.empty); 616 | const AsyncValue t3 = AsyncData(1.0); 617 | const AsyncValue t4 = AsyncData("value"); 618 | const AsyncValue t5 = AsyncData("value"); 619 | const AsyncValue t6 = AsyncData("value"); 620 | const AsyncValue t7 = AsyncData("value"); 621 | const AsyncValue t8 = AsyncData("value"); 622 | const AsyncValue t9 = AsyncData("value"); 623 | const AsyncValue t10 = AsyncData("value"); 624 | const AsyncValue t11 = AsyncData("value"); 625 | const AsyncValue t12 = AsyncData("value"); 626 | const AsyncValue t13 = AsyncData("value"); 627 | final group = AsyncValueGroup.group13( 628 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13); 629 | expect(group.asData?.valueOrNull, null); 630 | expect(group.error, isNotNull); 631 | expect(group is AsyncError, true); 632 | }); 633 | }); 634 | 635 | group("group14", () { 636 | test("#AsyncValue", () { 637 | const AsyncValue t1 = AsyncData(1); 638 | const AsyncValue t2 = AsyncData("value"); 639 | const AsyncValue t3 = AsyncData(1.0); 640 | const AsyncValue t4 = AsyncData("value"); 641 | const AsyncValue t5 = AsyncData("value"); 642 | const AsyncValue t6 = AsyncData("value"); 643 | const AsyncValue t7 = AsyncData("value"); 644 | const AsyncValue t8 = AsyncData("value"); 645 | const AsyncValue t9 = AsyncData("value"); 646 | const AsyncValue t10 = AsyncData("value"); 647 | const AsyncValue t11 = AsyncData("value"); 648 | const AsyncValue t12 = AsyncData("value"); 649 | const AsyncValue t13 = AsyncData("value"); 650 | const AsyncValue t14 = AsyncData("value"); 651 | final group = AsyncValueGroup.group14( 652 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); 653 | expect(group.value!.$1, 1); 654 | expect(group.value!.$2, "value"); 655 | expect(group.value!.$3, 1.0); 656 | expect(group.value!.$4, "value"); 657 | expect(group.value!.$5, "value"); 658 | expect(group.value!.$6, "value"); 659 | expect(group.value!.$7, "value"); 660 | expect(group.value!.$8, "value"); 661 | expect(group.value!.$9, "value"); 662 | expect(group.value!.$10, "value"); 663 | expect(group.value!.$11, "value"); 664 | expect(group.value!.$12, "value"); 665 | expect(group.value!.$13, "value"); 666 | expect(group.value!.$14, "value"); 667 | expect(group is AsyncData, true); 668 | }); 669 | test("#AsyncLoading", () { 670 | const AsyncValue t1 = AsyncData(1); 671 | const AsyncValue t2 = AsyncLoading(); 672 | const AsyncValue t3 = AsyncData(1.0); 673 | const AsyncValue t4 = AsyncData("value"); 674 | const AsyncValue t5 = AsyncData("value"); 675 | const AsyncValue t6 = AsyncData("value"); 676 | const AsyncValue t7 = AsyncData("value"); 677 | const AsyncValue t8 = AsyncData("value"); 678 | const AsyncValue t9 = AsyncData("value"); 679 | const AsyncValue t10 = AsyncData("value"); 680 | const AsyncValue t11 = AsyncData("value"); 681 | const AsyncValue t12 = AsyncData("value"); 682 | const AsyncValue t13 = AsyncData("value"); 683 | const AsyncValue t14 = AsyncData("value"); 684 | final group = AsyncValueGroup.group14( 685 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); 686 | expect(group.value, null); 687 | expect(group.isLoading, true); 688 | expect(group is AsyncLoading, true); 689 | }); 690 | test("#AsyncError", () { 691 | const AsyncValue t1 = AsyncData(1); 692 | const AsyncValue t2 = 693 | AsyncError(FormatException(""), StackTrace.empty); 694 | const AsyncValue t3 = AsyncData(1.0); 695 | const AsyncValue t4 = AsyncData("value"); 696 | const AsyncValue t5 = AsyncData("value"); 697 | const AsyncValue t6 = AsyncData("value"); 698 | const AsyncValue t7 = AsyncData("value"); 699 | const AsyncValue t8 = AsyncData("value"); 700 | const AsyncValue t9 = AsyncData("value"); 701 | const AsyncValue t10 = AsyncData("value"); 702 | const AsyncValue t11 = AsyncData("value"); 703 | const AsyncValue t12 = AsyncData("value"); 704 | const AsyncValue t13 = AsyncData("value"); 705 | const AsyncValue t14 = AsyncData("value"); 706 | final group = AsyncValueGroup.group14( 707 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14); 708 | expect(group.asData?.valueOrNull, null); 709 | expect(group.error, isNotNull); 710 | expect(group is AsyncError, true); 711 | }); 712 | }); 713 | 714 | group("group15", () { 715 | test("#AsyncValue", () { 716 | const AsyncValue t1 = AsyncData(1); 717 | const AsyncValue t2 = AsyncData("value"); 718 | const AsyncValue t3 = AsyncData(1.0); 719 | const AsyncValue t4 = AsyncData("value"); 720 | const AsyncValue t5 = AsyncData("value"); 721 | const AsyncValue t6 = AsyncData("value"); 722 | const AsyncValue t7 = AsyncData("value"); 723 | const AsyncValue t8 = AsyncData("value"); 724 | const AsyncValue t9 = AsyncData("value"); 725 | const AsyncValue t10 = AsyncData("value"); 726 | const AsyncValue t11 = AsyncData("value"); 727 | const AsyncValue t12 = AsyncData("value"); 728 | const AsyncValue t13 = AsyncData("value"); 729 | const AsyncValue t14 = AsyncData("value"); 730 | const AsyncValue t15 = AsyncData("value"); 731 | final group = AsyncValueGroup.group15( 732 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); 733 | expect(group.value!.$1, 1); 734 | expect(group.value!.$2, "value"); 735 | expect(group.value!.$3, 1.0); 736 | expect(group.value!.$4, "value"); 737 | expect(group.value!.$5, "value"); 738 | expect(group.value!.$6, "value"); 739 | expect(group.value!.$7, "value"); 740 | expect(group.value!.$8, "value"); 741 | expect(group.value!.$9, "value"); 742 | expect(group.value!.$10, "value"); 743 | expect(group.value!.$11, "value"); 744 | expect(group.value!.$12, "value"); 745 | expect(group.value!.$13, "value"); 746 | expect(group.value!.$14, "value"); 747 | expect(group.value!.$15, "value"); 748 | expect(group is AsyncData, true); 749 | }); 750 | test("#AsyncLoading", () { 751 | const AsyncValue t1 = AsyncData(1); 752 | const AsyncValue t2 = AsyncLoading(); 753 | const AsyncValue t3 = AsyncData(1.0); 754 | const AsyncValue t4 = AsyncData("value"); 755 | const AsyncValue t5 = AsyncData("value"); 756 | const AsyncValue t6 = AsyncData("value"); 757 | const AsyncValue t7 = AsyncData("value"); 758 | const AsyncValue t8 = AsyncData("value"); 759 | const AsyncValue t9 = AsyncData("value"); 760 | const AsyncValue t10 = AsyncData("value"); 761 | const AsyncValue t11 = AsyncData("value"); 762 | const AsyncValue t12 = AsyncData("value"); 763 | const AsyncValue t13 = AsyncData("value"); 764 | const AsyncValue t14 = AsyncData("value"); 765 | const AsyncValue t15 = AsyncData("value"); 766 | final group = AsyncValueGroup.group15( 767 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); 768 | expect(group.value, null); 769 | expect(group.isLoading, true); 770 | expect(group is AsyncLoading, true); 771 | }); 772 | test("#AsyncError", () { 773 | const AsyncValue t1 = AsyncData(1); 774 | const AsyncValue t2 = 775 | AsyncError(FormatException(""), StackTrace.empty); 776 | const AsyncValue t3 = AsyncData(1.0); 777 | const AsyncValue t4 = AsyncData("value"); 778 | const AsyncValue t5 = AsyncData("value"); 779 | const AsyncValue t6 = AsyncData("value"); 780 | const AsyncValue t7 = AsyncData("value"); 781 | const AsyncValue t8 = AsyncData("value"); 782 | const AsyncValue t9 = AsyncData("value"); 783 | const AsyncValue t10 = AsyncData("value"); 784 | const AsyncValue t11 = AsyncData("value"); 785 | const AsyncValue t12 = AsyncData("value"); 786 | const AsyncValue t13 = AsyncData("value"); 787 | const AsyncValue t14 = AsyncData("value"); 788 | const AsyncValue t15 = AsyncData("value"); 789 | final group = AsyncValueGroup.group15( 790 | t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15); 791 | expect(group.asData?.valueOrNull, null); 792 | expect(group.error, isNotNull); 793 | expect(group is AsyncError, true); 794 | }); 795 | }); 796 | 797 | group("group16", () { 798 | test("#AsyncValue", () { 799 | const AsyncValue t1 = AsyncData(1); 800 | const AsyncValue t2 = AsyncData("value"); 801 | const AsyncValue t3 = AsyncData(1.0); 802 | const AsyncValue t4 = AsyncData("value"); 803 | const AsyncValue t5 = AsyncData("value"); 804 | const AsyncValue t6 = AsyncData("value"); 805 | const AsyncValue t7 = AsyncData("value"); 806 | const AsyncValue t8 = AsyncData("value"); 807 | const AsyncValue t9 = AsyncData("value"); 808 | const AsyncValue t10 = AsyncData("value"); 809 | const AsyncValue t11 = AsyncData("value"); 810 | const AsyncValue t12 = AsyncData("value"); 811 | const AsyncValue t13 = AsyncData("value"); 812 | const AsyncValue t14 = AsyncData("value"); 813 | const AsyncValue t15 = AsyncData("value"); 814 | const AsyncValue t16 = AsyncData("value"); 815 | final group = AsyncValueGroup.group16(t1, t2, t3, t4, t5, t6, t7, t8, t9, 816 | t10, t11, t12, t13, t14, t15, t16); 817 | expect(group.value!.$1, 1); 818 | expect(group.value!.$2, "value"); 819 | expect(group.value!.$3, 1.0); 820 | expect(group.value!.$4, "value"); 821 | expect(group.value!.$5, "value"); 822 | expect(group.value!.$6, "value"); 823 | expect(group.value!.$7, "value"); 824 | expect(group.value!.$8, "value"); 825 | expect(group.value!.$9, "value"); 826 | expect(group.value!.$10, "value"); 827 | expect(group.value!.$11, "value"); 828 | expect(group.value!.$12, "value"); 829 | expect(group.value!.$13, "value"); 830 | expect(group.value!.$14, "value"); 831 | expect(group.value!.$15, "value"); 832 | expect(group.value!.$16, "value"); 833 | expect(group is AsyncData, true); 834 | }); 835 | test("#AsyncLoading", () { 836 | const AsyncValue t1 = AsyncData(1); 837 | const AsyncValue t2 = AsyncLoading(); 838 | const AsyncValue t3 = AsyncData(1.0); 839 | const AsyncValue t4 = AsyncData("value"); 840 | const AsyncValue t5 = AsyncData("value"); 841 | const AsyncValue t6 = AsyncData("value"); 842 | const AsyncValue t7 = AsyncData("value"); 843 | const AsyncValue t8 = AsyncData("value"); 844 | const AsyncValue t9 = AsyncData("value"); 845 | const AsyncValue t10 = AsyncData("value"); 846 | const AsyncValue t11 = AsyncData("value"); 847 | const AsyncValue t12 = AsyncData("value"); 848 | const AsyncValue t13 = AsyncData("value"); 849 | const AsyncValue t14 = AsyncData("value"); 850 | const AsyncValue t15 = AsyncData("value"); 851 | const AsyncValue t16 = AsyncData("value"); 852 | final group = AsyncValueGroup.group16(t1, t2, t3, t4, t5, t6, t7, t8, t9, 853 | t10, t11, t12, t13, t14, t15, t16); 854 | expect(group.value, null); 855 | expect(group.isLoading, true); 856 | expect(group is AsyncLoading, true); 857 | }); 858 | test("#AsyncError", () { 859 | const AsyncValue t1 = AsyncData(1); 860 | const AsyncValue t2 = 861 | AsyncError(FormatException(""), StackTrace.empty); 862 | const AsyncValue t3 = AsyncData(1.0); 863 | const AsyncValue t4 = AsyncData("value"); 864 | const AsyncValue t5 = AsyncData("value"); 865 | const AsyncValue t6 = AsyncData("value"); 866 | const AsyncValue t7 = AsyncData("value"); 867 | const AsyncValue t8 = AsyncData("value"); 868 | const AsyncValue t9 = AsyncData("value"); 869 | const AsyncValue t10 = AsyncData("value"); 870 | const AsyncValue t11 = AsyncData("value"); 871 | const AsyncValue t12 = AsyncData("value"); 872 | const AsyncValue t13 = AsyncData("value"); 873 | const AsyncValue t14 = AsyncData("value"); 874 | const AsyncValue t15 = AsyncData("value"); 875 | const AsyncValue t16 = AsyncData("value"); 876 | final group = AsyncValueGroup.group16(t1, t2, t3, t4, t5, t6, t7, t8, t9, 877 | t10, t11, t12, t13, t14, t15, t16); 878 | expect(group.asData?.valueOrNull, null); 879 | expect(group.error, isNotNull); 880 | expect(group is AsyncError, true); 881 | }); 882 | }); 883 | 884 | group("group17", () { 885 | test("#AsyncValue", () { 886 | const AsyncValue t1 = AsyncData(1); 887 | const AsyncValue t2 = AsyncData("value"); 888 | const AsyncValue t3 = AsyncData(1.0); 889 | const AsyncValue t4 = AsyncData("value"); 890 | const AsyncValue t5 = AsyncData("value"); 891 | const AsyncValue t6 = AsyncData("value"); 892 | const AsyncValue t7 = AsyncData("value"); 893 | const AsyncValue t8 = AsyncData("value"); 894 | const AsyncValue t9 = AsyncData("value"); 895 | const AsyncValue t10 = AsyncData("value"); 896 | const AsyncValue t11 = AsyncData("value"); 897 | const AsyncValue t12 = AsyncData("value"); 898 | const AsyncValue t13 = AsyncData("value"); 899 | const AsyncValue t14 = AsyncData("value"); 900 | const AsyncValue t15 = AsyncData("value"); 901 | const AsyncValue t16 = AsyncData("value"); 902 | const AsyncValue t17 = AsyncData("value"); 903 | final group = AsyncValueGroup.group17(t1, t2, t3, t4, t5, t6, t7, t8, t9, 904 | t10, t11, t12, t13, t14, t15, t16, t17); 905 | expect(group.value!.$1, 1); 906 | expect(group.value!.$2, "value"); 907 | expect(group.value!.$3, 1.0); 908 | expect(group.value!.$4, "value"); 909 | expect(group.value!.$5, "value"); 910 | expect(group.value!.$6, "value"); 911 | expect(group.value!.$7, "value"); 912 | expect(group.value!.$8, "value"); 913 | expect(group.value!.$9, "value"); 914 | expect(group.value!.$10, "value"); 915 | expect(group.value!.$11, "value"); 916 | expect(group.value!.$12, "value"); 917 | expect(group.value!.$13, "value"); 918 | expect(group.value!.$14, "value"); 919 | expect(group.value!.$15, "value"); 920 | expect(group.value!.$16, "value"); 921 | expect(group.value!.$17, "value"); 922 | expect(group is AsyncData, true); 923 | }); 924 | test("#AsyncLoading", () { 925 | const AsyncValue t1 = AsyncData(1); 926 | const AsyncValue t2 = AsyncLoading(); 927 | const AsyncValue t3 = AsyncData(1.0); 928 | const AsyncValue t4 = AsyncData("value"); 929 | const AsyncValue t5 = AsyncData("value"); 930 | const AsyncValue t6 = AsyncData("value"); 931 | const AsyncValue t7 = AsyncData("value"); 932 | const AsyncValue t8 = AsyncData("value"); 933 | const AsyncValue t9 = AsyncData("value"); 934 | const AsyncValue t10 = AsyncData("value"); 935 | const AsyncValue t11 = AsyncData("value"); 936 | const AsyncValue t12 = AsyncData("value"); 937 | const AsyncValue t13 = AsyncData("value"); 938 | const AsyncValue t14 = AsyncData("value"); 939 | const AsyncValue t15 = AsyncData("value"); 940 | const AsyncValue t16 = AsyncData("value"); 941 | const AsyncValue t17 = AsyncData("value"); 942 | final group = AsyncValueGroup.group17(t1, t2, t3, t4, t5, t6, t7, t8, t9, 943 | t10, t11, t12, t13, t14, t15, t16, t17); 944 | expect(group.value, null); 945 | expect(group.isLoading, true); 946 | expect(group is AsyncLoading, true); 947 | }); 948 | test("#AsyncError", () { 949 | const AsyncValue t1 = AsyncData(1); 950 | const AsyncValue t2 = 951 | AsyncError(FormatException(""), StackTrace.empty); 952 | const AsyncValue t3 = AsyncData(1.0); 953 | const AsyncValue t4 = AsyncData("value"); 954 | const AsyncValue t5 = AsyncData("value"); 955 | const AsyncValue t6 = AsyncData("value"); 956 | const AsyncValue t7 = AsyncData("value"); 957 | const AsyncValue t8 = AsyncData("value"); 958 | const AsyncValue t9 = AsyncData("value"); 959 | const AsyncValue t10 = AsyncData("value"); 960 | const AsyncValue t11 = AsyncData("value"); 961 | const AsyncValue t12 = AsyncData("value"); 962 | const AsyncValue t13 = AsyncData("value"); 963 | const AsyncValue t14 = AsyncData("value"); 964 | const AsyncValue t15 = AsyncData("value"); 965 | const AsyncValue t16 = AsyncData("value"); 966 | const AsyncValue t17 = AsyncData("value"); 967 | final group = AsyncValueGroup.group17(t1, t2, t3, t4, t5, t6, t7, t8, t9, 968 | t10, t11, t12, t13, t14, t15, t16, t17); 969 | expect(group.asData?.valueOrNull, null); 970 | expect(group.error, isNotNull); 971 | expect(group is AsyncError, true); 972 | }); 973 | }); 974 | 975 | group("group18", () { 976 | test("#AsyncValue", () { 977 | const AsyncValue t1 = AsyncData(1); 978 | const AsyncValue t2 = AsyncData("value"); 979 | const AsyncValue t3 = AsyncData(1.0); 980 | const AsyncValue t4 = AsyncData("value"); 981 | const AsyncValue t5 = AsyncData("value"); 982 | const AsyncValue t6 = AsyncData("value"); 983 | const AsyncValue t7 = AsyncData("value"); 984 | const AsyncValue t8 = AsyncData("value"); 985 | const AsyncValue t9 = AsyncData("value"); 986 | const AsyncValue t10 = AsyncData("value"); 987 | const AsyncValue t11 = AsyncData("value"); 988 | const AsyncValue t12 = AsyncData("value"); 989 | const AsyncValue t13 = AsyncData("value"); 990 | const AsyncValue t14 = AsyncData("value"); 991 | const AsyncValue t15 = AsyncData("value"); 992 | const AsyncValue t16 = AsyncData("value"); 993 | const AsyncValue t17 = AsyncData("value"); 994 | const AsyncValue t18 = AsyncData("value"); 995 | final group = AsyncValueGroup.group18(t1, t2, t3, t4, t5, t6, t7, t8, t9, 996 | t10, t11, t12, t13, t14, t15, t16, t17, t18); 997 | expect(group.value!.$1, 1); 998 | expect(group.value!.$2, "value"); 999 | expect(group.value!.$3, 1.0); 1000 | expect(group.value!.$4, "value"); 1001 | expect(group.value!.$5, "value"); 1002 | expect(group.value!.$6, "value"); 1003 | expect(group.value!.$7, "value"); 1004 | expect(group.value!.$8, "value"); 1005 | expect(group.value!.$9, "value"); 1006 | expect(group.value!.$10, "value"); 1007 | expect(group.value!.$11, "value"); 1008 | expect(group.value!.$12, "value"); 1009 | expect(group.value!.$13, "value"); 1010 | expect(group.value!.$14, "value"); 1011 | expect(group.value!.$15, "value"); 1012 | expect(group.value!.$16, "value"); 1013 | expect(group.value!.$17, "value"); 1014 | expect(group.value!.$18, "value"); 1015 | expect(group is AsyncData, true); 1016 | }); 1017 | test("#AsyncLoading", () { 1018 | const AsyncValue t1 = AsyncData(1); 1019 | const AsyncValue t2 = AsyncLoading(); 1020 | const AsyncValue t3 = AsyncData(1.0); 1021 | const AsyncValue t4 = AsyncData("value"); 1022 | const AsyncValue t5 = AsyncData("value"); 1023 | const AsyncValue t6 = AsyncData("value"); 1024 | const AsyncValue t7 = AsyncData("value"); 1025 | const AsyncValue t8 = AsyncData("value"); 1026 | const AsyncValue t9 = AsyncData("value"); 1027 | const AsyncValue t10 = AsyncData("value"); 1028 | const AsyncValue t11 = AsyncData("value"); 1029 | const AsyncValue t12 = AsyncData("value"); 1030 | const AsyncValue t13 = AsyncData("value"); 1031 | const AsyncValue t14 = AsyncData("value"); 1032 | const AsyncValue t15 = AsyncData("value"); 1033 | const AsyncValue t16 = AsyncData("value"); 1034 | const AsyncValue t17 = AsyncData("value"); 1035 | const AsyncValue t18 = AsyncData("value"); 1036 | final group = AsyncValueGroup.group18(t1, t2, t3, t4, t5, t6, t7, t8, t9, 1037 | t10, t11, t12, t13, t14, t15, t16, t17, t18); 1038 | expect(group.value, null); 1039 | expect(group.isLoading, true); 1040 | expect(group is AsyncLoading, true); 1041 | }); 1042 | test("#AsyncError", () { 1043 | const AsyncValue t1 = AsyncData(1); 1044 | const AsyncValue t2 = 1045 | AsyncError(FormatException(""), StackTrace.empty); 1046 | const AsyncValue t3 = AsyncData(1.0); 1047 | const AsyncValue t4 = AsyncData("value"); 1048 | const AsyncValue t5 = AsyncData("value"); 1049 | const AsyncValue t6 = AsyncData("value"); 1050 | const AsyncValue t7 = AsyncData("value"); 1051 | const AsyncValue t8 = AsyncData("value"); 1052 | const AsyncValue t9 = AsyncData("value"); 1053 | const AsyncValue t10 = AsyncData("value"); 1054 | const AsyncValue t11 = AsyncData("value"); 1055 | const AsyncValue t12 = AsyncData("value"); 1056 | const AsyncValue t13 = AsyncData("value"); 1057 | const AsyncValue t14 = AsyncData("value"); 1058 | const AsyncValue t15 = AsyncData("value"); 1059 | const AsyncValue t16 = AsyncData("value"); 1060 | const AsyncValue t17 = AsyncData("value"); 1061 | const AsyncValue t18 = AsyncData("value"); 1062 | final group = AsyncValueGroup.group18(t1, t2, t3, t4, t5, t6, t7, t8, t9, 1063 | t10, t11, t12, t13, t14, t15, t16, t17, t18); 1064 | expect(group.asData?.valueOrNull, null); 1065 | expect(group.error, isNotNull); 1066 | expect(group is AsyncError, true); 1067 | }); 1068 | }); 1069 | 1070 | group("group19", () { 1071 | test("#AsyncValue", () { 1072 | const AsyncValue t1 = AsyncData(1); 1073 | const AsyncValue t2 = AsyncData("value"); 1074 | const AsyncValue t3 = AsyncData(1.0); 1075 | const AsyncValue t4 = AsyncData("value"); 1076 | const AsyncValue t5 = AsyncData("value"); 1077 | const AsyncValue t6 = AsyncData("value"); 1078 | const AsyncValue t7 = AsyncData("value"); 1079 | const AsyncValue t8 = AsyncData("value"); 1080 | const AsyncValue t9 = AsyncData("value"); 1081 | const AsyncValue t10 = AsyncData("value"); 1082 | const AsyncValue t11 = AsyncData("value"); 1083 | const AsyncValue t12 = AsyncData("value"); 1084 | const AsyncValue t13 = AsyncData("value"); 1085 | const AsyncValue t14 = AsyncData("value"); 1086 | const AsyncValue t15 = AsyncData("value"); 1087 | const AsyncValue t16 = AsyncData("value"); 1088 | const AsyncValue t17 = AsyncData("value"); 1089 | const AsyncValue t18 = AsyncData("value"); 1090 | const AsyncValue t19 = AsyncData("value"); 1091 | final group = AsyncValueGroup.group19(t1, t2, t3, t4, t5, t6, t7, t8, t9, 1092 | t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); 1093 | expect(group.value!.$1, 1); 1094 | expect(group.value!.$2, "value"); 1095 | expect(group.value!.$3, 1.0); 1096 | expect(group.value!.$4, "value"); 1097 | expect(group.value!.$5, "value"); 1098 | expect(group.value!.$6, "value"); 1099 | expect(group.value!.$7, "value"); 1100 | expect(group.value!.$8, "value"); 1101 | expect(group.value!.$9, "value"); 1102 | expect(group.value!.$10, "value"); 1103 | expect(group.value!.$11, "value"); 1104 | expect(group.value!.$12, "value"); 1105 | expect(group.value!.$13, "value"); 1106 | expect(group.value!.$14, "value"); 1107 | expect(group.value!.$15, "value"); 1108 | expect(group.value!.$16, "value"); 1109 | expect(group.value!.$17, "value"); 1110 | expect(group.value!.$18, "value"); 1111 | expect(group.value!.$19, "value"); 1112 | expect(group is AsyncData, true); 1113 | }); 1114 | test("#AsyncLoading", () { 1115 | const AsyncValue t1 = AsyncData(1); 1116 | const AsyncValue t2 = AsyncLoading(); 1117 | const AsyncValue t3 = AsyncData(1.0); 1118 | const AsyncValue t4 = AsyncData("value"); 1119 | const AsyncValue t5 = AsyncData("value"); 1120 | const AsyncValue t6 = AsyncData("value"); 1121 | const AsyncValue t7 = AsyncData("value"); 1122 | const AsyncValue t8 = AsyncData("value"); 1123 | const AsyncValue t9 = AsyncData("value"); 1124 | const AsyncValue t10 = AsyncData("value"); 1125 | const AsyncValue t11 = AsyncData("value"); 1126 | const AsyncValue t12 = AsyncData("value"); 1127 | const AsyncValue t13 = AsyncData("value"); 1128 | const AsyncValue t14 = AsyncData("value"); 1129 | const AsyncValue t15 = AsyncData("value"); 1130 | const AsyncValue t16 = AsyncData("value"); 1131 | const AsyncValue t17 = AsyncData("value"); 1132 | const AsyncValue t18 = AsyncData("value"); 1133 | const AsyncValue t19 = AsyncData("value"); 1134 | final group = AsyncValueGroup.group19(t1, t2, t3, t4, t5, t6, t7, t8, t9, 1135 | t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); 1136 | expect(group.value, null); 1137 | expect(group.isLoading, true); 1138 | expect(group is AsyncLoading, true); 1139 | }); 1140 | test("#AsyncError", () { 1141 | const AsyncValue t1 = AsyncData(1); 1142 | const AsyncValue t2 = 1143 | AsyncError(FormatException(""), StackTrace.empty); 1144 | const AsyncValue t3 = AsyncData(1.0); 1145 | const AsyncValue t4 = AsyncData("value"); 1146 | const AsyncValue t5 = AsyncData("value"); 1147 | const AsyncValue t6 = AsyncData("value"); 1148 | const AsyncValue t7 = AsyncData("value"); 1149 | const AsyncValue t8 = AsyncData("value"); 1150 | const AsyncValue t9 = AsyncData("value"); 1151 | const AsyncValue t10 = AsyncData("value"); 1152 | const AsyncValue t11 = AsyncData("value"); 1153 | const AsyncValue t12 = AsyncData("value"); 1154 | const AsyncValue t13 = AsyncData("value"); 1155 | const AsyncValue t14 = AsyncData("value"); 1156 | const AsyncValue t15 = AsyncData("value"); 1157 | const AsyncValue t16 = AsyncData("value"); 1158 | const AsyncValue t17 = AsyncData("value"); 1159 | const AsyncValue t18 = AsyncData("value"); 1160 | const AsyncValue t19 = AsyncData("value"); 1161 | final group = AsyncValueGroup.group19(t1, t2, t3, t4, t5, t6, t7, t8, t9, 1162 | t10, t11, t12, t13, t14, t15, t16, t17, t18, t19); 1163 | expect(group.asData?.valueOrNull, null); 1164 | expect(group.error, isNotNull); 1165 | expect(group is AsyncError, true); 1166 | }); 1167 | }); 1168 | 1169 | group("group20", () { 1170 | test("#AsyncValue", () { 1171 | const AsyncValue t1 = AsyncData(1); 1172 | const AsyncValue t2 = AsyncData("value"); 1173 | const AsyncValue t3 = AsyncData(1.0); 1174 | const AsyncValue t4 = AsyncData("value"); 1175 | const AsyncValue t5 = AsyncData("value"); 1176 | const AsyncValue t6 = AsyncData("value"); 1177 | const AsyncValue t7 = AsyncData("value"); 1178 | const AsyncValue t8 = AsyncData("value"); 1179 | const AsyncValue t9 = AsyncData("value"); 1180 | const AsyncValue t10 = AsyncData("value"); 1181 | const AsyncValue t11 = AsyncData("value"); 1182 | const AsyncValue t12 = AsyncData("value"); 1183 | const AsyncValue t13 = AsyncData("value"); 1184 | const AsyncValue t14 = AsyncData("value"); 1185 | const AsyncValue t15 = AsyncData("value"); 1186 | const AsyncValue t16 = AsyncData("value"); 1187 | const AsyncValue t17 = AsyncData("value"); 1188 | const AsyncValue t18 = AsyncData("value"); 1189 | const AsyncValue t19 = AsyncData("value"); 1190 | const AsyncValue t20 = AsyncData("value"); 1191 | final group = AsyncValueGroup.group20(t1, t2, t3, t4, t5, t6, t7, t8, t9, 1192 | t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); 1193 | expect(group.value!.$1, 1); 1194 | expect(group.value!.$2, "value"); 1195 | expect(group.value!.$3, 1.0); 1196 | expect(group.value!.$4, "value"); 1197 | expect(group.value!.$5, "value"); 1198 | expect(group.value!.$6, "value"); 1199 | expect(group.value!.$7, "value"); 1200 | expect(group.value!.$8, "value"); 1201 | expect(group.value!.$9, "value"); 1202 | expect(group.value!.$10, "value"); 1203 | expect(group.value!.$11, "value"); 1204 | expect(group.value!.$12, "value"); 1205 | expect(group.value!.$13, "value"); 1206 | expect(group.value!.$14, "value"); 1207 | expect(group.value!.$15, "value"); 1208 | expect(group.value!.$16, "value"); 1209 | expect(group.value!.$17, "value"); 1210 | expect(group.value!.$18, "value"); 1211 | expect(group.value!.$19, "value"); 1212 | expect(group.value!.$20, "value"); 1213 | expect(group is AsyncData, true); 1214 | }); 1215 | test("#AsyncLoading", () { 1216 | const AsyncValue t1 = AsyncData(1); 1217 | const AsyncValue t2 = AsyncLoading(); 1218 | const AsyncValue t3 = AsyncData(1.0); 1219 | const AsyncValue t4 = AsyncData("value"); 1220 | const AsyncValue t5 = AsyncData("value"); 1221 | const AsyncValue t6 = AsyncData("value"); 1222 | const AsyncValue t7 = AsyncData("value"); 1223 | const AsyncValue t8 = AsyncData("value"); 1224 | const AsyncValue t9 = AsyncData("value"); 1225 | const AsyncValue t10 = AsyncData("value"); 1226 | const AsyncValue t11 = AsyncData("value"); 1227 | const AsyncValue t12 = AsyncData("value"); 1228 | const AsyncValue t13 = AsyncData("value"); 1229 | const AsyncValue t14 = AsyncData("value"); 1230 | const AsyncValue t15 = AsyncData("value"); 1231 | const AsyncValue t16 = AsyncData("value"); 1232 | const AsyncValue t17 = AsyncData("value"); 1233 | const AsyncValue t18 = AsyncData("value"); 1234 | const AsyncValue t19 = AsyncData("value"); 1235 | const AsyncValue t20 = AsyncData("value"); 1236 | final group = AsyncValueGroup.group20(t1, t2, t3, t4, t5, t6, t7, t8, t9, 1237 | t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); 1238 | expect(group.value, null); 1239 | expect(group.isLoading, true); 1240 | expect(group is AsyncLoading, true); 1241 | }); 1242 | test("#AsyncError", () { 1243 | const AsyncValue t1 = AsyncData(1); 1244 | const AsyncValue t2 = 1245 | AsyncError(FormatException(""), StackTrace.empty); 1246 | const AsyncValue t3 = AsyncData(1.0); 1247 | const AsyncValue t4 = AsyncData("value"); 1248 | const AsyncValue t5 = AsyncData("value"); 1249 | const AsyncValue t6 = AsyncData("value"); 1250 | const AsyncValue t7 = AsyncData("value"); 1251 | const AsyncValue t8 = AsyncData("value"); 1252 | const AsyncValue t9 = AsyncData("value"); 1253 | const AsyncValue t10 = AsyncData("value"); 1254 | const AsyncValue t11 = AsyncData("value"); 1255 | const AsyncValue t12 = AsyncData("value"); 1256 | const AsyncValue t13 = AsyncData("value"); 1257 | const AsyncValue t14 = AsyncData("value"); 1258 | const AsyncValue t15 = AsyncData("value"); 1259 | const AsyncValue t16 = AsyncData("value"); 1260 | const AsyncValue t17 = AsyncData("value"); 1261 | const AsyncValue t18 = AsyncData("value"); 1262 | const AsyncValue t19 = AsyncData("value"); 1263 | const AsyncValue t20 = AsyncData("value"); 1264 | final group = AsyncValueGroup.group20(t1, t2, t3, t4, t5, t6, t7, t8, t9, 1265 | t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t20); 1266 | expect(group.asData?.valueOrNull, null); 1267 | expect(group.error, isNotNull); 1268 | expect(group is AsyncError, true); 1269 | }); 1270 | }); 1271 | } 1272 | --------------------------------------------------------------------------------