text:
Error when first sliver of CustomScrollView changes from single-child (SliverToBoxAdapter) to multi-child (SliverList)

Steps to Reproduce

Create new app
Update main.dart as follows:

import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Test Sliver'),
      ),
      body: CustomScrollView(
        slivers: <Widget>[
          BodyContent(),
        ],
      ),
    );
  }
}

class BodyContent extends StatefulWidget {
  @override
  BodyContentState createState() => BodyContentState();
}

class BodyContentState extends State<BodyContent> {
  bool useList = false;

  @override
  Widget build(BuildContext context) {
    if (useList) {
      return SliverList(
        delegate: SliverChildListDelegate(
          <Widget>[
            ListTile(
              title: Text('Using SliverList'),
              subtitle: Text('Tap to use SliverToBoxAdapter'),
              onTap: () => setState(() => useList = false),
            ),
          ],
        ),
      );
    } else {
      return SliverToBoxAdapter(
        child: ListTile(
          title: Text('Using SliverToBoxAdapter'),
          subtitle: Text('Tap to use SliverList'),
          onTap: () => setState(() => useList = true),
        ),
      );
    }
  }
}

Full example app repo

Run the app
Tap the first tile

Expected results: the first tile is replaced (Using SliverToBoxAdapter is changed to Using SliverList)
Actual results: tile is not replaced, the following exception is thrown, the app freezes:
════════ Exception caught by scheduler library ═════════════════════════════════════════════════════
The following assertion was thrown during a scheduler callback:
'package:flutter/src/rendering/viewport.dart': Failed assertion: line 1568 pos 12: 'center.parent == this': is not true.

Either the assertion indicates an error in the framework itself, or we should provide substantially more information in this error message to help you determine and fix the underlying cause.
In either case, please report this assertion by filing a bug on GitHub:
  https://github.com/flutter/flutter/issues/new?template=BUG.md

When the exception was thrown, this was the stack:
#2      RenderViewport.indexOfFirstChild (package:flutter/src/rendering/viewport.dart:1568:12)
#3      RenderViewportBase.debugDescribeChildren (package:flutter/src/rendering/viewport.dart:852:17)
#4      DiagnosticableTreeNode.getChildren (package:flutter/src/foundation/diagnostics.dart:2977:20)
#5      DiagnosticsNode.toJsonMap.<anonymous closure> (package:flutter/src/foundation/diagnostics.dart:1555:32)
#6      DiagnosticsNode.toJsonMap (package:flutter/src/foundation/diagnostics.dart:1596:6)
...
════════════════════════════════════════════════════════════════════════════════════════════════════

════════ Exception caught by scheduler library ═════════════════════════════════════════════════════
'package:flutter/src/rendering/box.dart': Failed assertion: line 1705 pos 18: 'debugDoingThisResize || debugDoingThisLayout ||
                 (RenderObject.debugActiveLayout == parent && _size._canBeUsedByParent)': is not true.
════════════════════════════════════════════════════════════════════════════════════════════════════

Logs (flutter run --verbose)
C:\Users\Pavel\AndroidStudioProjects\test_sliver>flutter run --verbose
[  +22 ms] executing: [C:\flutterSdk\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +69 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +1 ms] 8af6b2f038c1172e61d418869363a28dffec3cb4
[   +1 ms] executing: [C:\flutterSdk\flutter/] git tag --contains HEAD
[ +274 ms] Exit code 0 from: git tag --contains HEAD
[   +2 ms] 1.17.5
[  +12 ms] executing: [C:\flutterSdk\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +49 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +1 ms] origin/stable
[   +1 ms] executing: [C:\flutterSdk\flutter/] git ls-remote --get-url origin
[  +39 ms] Exit code 0 from: git ls-remote --get-url origin
[   +1 ms] https://github.com/flutter/flutter.git
[ +117 ms] executing: [C:\flutterSdk\flutter/] git rev-parse --abbrev-ref HEAD
[  +40 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +40 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +34 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +60 ms] List of devices attached
           emulator-5554          device product:sdk_gphone_x86 model:Android_SDK_built_for_x86 device:generic_x86
           transport_id:1
[  +12 ms] C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell getprop
[  +56 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +5 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +4 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +3 ms] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +2 ms] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +1 ms] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[ +157 ms] Generating
C:\Users\Pavel\AndroidStudioProjects\test_sliver\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.
java
[  +34 ms] ro.hardware = ranchu
[  +39 ms] Using hardware rendering with device Android SDK built for x86. If you get graphics artifacts, consider
enabling
           software rendering with "--enable-software-rendering".
[  +34 ms] Launching lib\main.dart on Android SDK built for x86 in debug mode...
[  +13 ms] C:\flutterSdk\flutter\bin\cache\dart-sdk\bin\dart.exe
C:\flutterSdk\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\flutterSdk\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter
--debugger-module-names -Ddart.developer.causal_async_stacks=true --output-dill
C:\Users\Pavel\AppData\Local\Temp\flutter_tool.eb2ab1c5-cddc-11ea-915c-a0c5896af152\app.dill --packages
C:\Users\Pavel\AndroidStudioProjects\test_sliver\.packages -Ddart.vm.profile=false -Ddart.vm.product=false
--bytecode-options=source-positions,local-var-info,debugger-stops,instance-field-initializers,keep-unreachable-code,avoi
d-closure-call-instructions --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root
[  +18 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\build-tools\29.0.3\aapt dump xmltree
C:\Users\Pavel\AndroidStudioProjects\test_sliver\build\app\outputs\apk\app.apk AndroidManifest.xml
[  +18 ms] Exit code 0 from: C:\Users\Pavel\AppData\Local\Android\sdk\build-tools\29.0.3\aapt dump xmltree
C:\Users\Pavel\AndroidStudioProjects\test_sliver\build\app\outputs\apk\app.apk AndroidManifest.xml
[   +6 ms] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="0.0.0" (Raw: "0.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1c
               A: android:compileSdkVersionCodename(0x01010573)="9" (Raw: "9")
               A: package="p.test_sliver" (Raw: "p.test_sliver")
               A: platformBuildVersionCode=(type 0x10)0x1c
               A: platformBuildVersionName=(type 0x10)0x9
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1c
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: application (line=22)
                 A: android:label(0x01010001)="test_sliver" (Raw: "test_sliver")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw:
                 "io.flutter.app.FlutterApplication")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
                 "androidx.core.app.CoreComponentFactory")
                 E: activity (line=28)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="p.test_sliver.MainActivity" (Raw: "p.test_sliver.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=42)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw:
                     "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=52)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw:
                     "io.flutter.embedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=56)
                     E: action (line=57)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=59)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
                       "android.intent.category.LAUNCHER")
                 E: meta-data (line=66)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
[  +22 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell -x logcat
-v time -t 1
[  +56 ms] Exit code 0 from: C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell -x
logcat -v time -t 1
[   +2 ms] --------- beginning of main
           07-24 18:38:48.571 W/GmsLocationProvider( 3378): Error removing location updates: 16
[  +23 ms] <- compile package:test_sliver/main.dart
[  +17 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe version
[ +106 ms] Android Debug Bridge version 1.0.41
                    Version 30.0.3-6597393
                    Installed as C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe
[   +8 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe start-server
[  +62 ms] Building APK
[  +29 ms] Invalid build-number: 0 for Android, overridden by 1.
           See versionCode at https://developer.android.com/studio/publish/versioning
[   +3 ms] Running Gradle task 'assembleDebug'...
[   +3 ms] gradle.properties already sets `android.enableR8`
[   +8 ms] Using gradle from C:\Users\Pavel\AndroidStudioProjects\test_sliver\android\gradlew.bat.
[   +8 ms] C:\Users\Pavel\AndroidStudioProjects\test_sliver\android\gradlew.bat mode: 33279 rwxrwxrwx.
[  +31 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +156 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[   +2 ms] openjdk version "1.8.0_242-release"
           OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
           OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode)
[  +11 ms] executing: [C:\Users\Pavel\AndroidStudioProjects\test_sliver\android/]
C:\Users\Pavel\AndroidStudioProjects\test_sliver\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-x86
-Ptarget=C:\Users\Pavel\AndroidStudioProjects\test_sliver\lib\main.dart -Ptrack-widget-creation=true
-Pfilesystem-scheme=org-dartlang-root assembleDebug
[+5441 ms] > Task :app:compileFlutterBuildDebug
[  +47 ms] [  +24 ms] executing: [C:\flutterSdk\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +6 ms] [ +100 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +3 ms] [   +1 ms] 8af6b2f038c1172e61d418869363a28dffec3cb4
[  +27 ms] [        ] executing: [C:\flutterSdk\flutter/] git tag --contains HEAD
[ +109 ms] [ +311 ms] Exit code 0 from: git tag --contains HEAD
[ +123 ms] [        ] 1.17.5
[  +98 ms] [  +12 ms] executing: [C:\flutterSdk\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +2 ms] [  +45 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[   +1 ms] [        ] origin/stable
[   +1 ms] [        ] executing: [C:\flutterSdk\flutter/] git ls-remote --get-url origin
[   +2 ms] [  +44 ms] Exit code 0 from: git ls-remote --get-url origin
[   +5 ms] [        ] https://github.com/flutter/flutter.git
[   +1 ms] [ +142 ms] executing: [C:\flutterSdk\flutter/] git rev-parse --abbrev-ref HEAD
[   +1 ms] [  +49 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[   +1 ms] [        ] stable
[   +1 ms] [  +28 ms] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +3 ms] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +3 ms] [   +6 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +3 ms] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +2 ms] [  +18 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'AndroidMavenArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[   +4 ms] [        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[   +1 ms] [ +136 ms] Initializing file store
[   +1 ms] [  +33 ms] Done initializing file store
[+1770 ms] [+2352 ms] Skipping target: kernel_snapshot
[ +201 ms] [ +245 ms] debug_android_application: Starting due to {InvalidatedReason.outputMissing}
[ +199 ms] [ +182 ms] debug_android_application: Complete
[   +3 ms] [  +28 ms] Persisting file store
[   +8 ms] [  +28 ms] Done persisting file store
[  +85 ms] [   +9 ms] build succeeded.
[  +10 ms] [  +24 ms] "flutter assemble" took 3 153ms.
[ +102 ms] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
[  +15 ms] > Task :app:preBuild UP-TO-DATE
[   +4 ms] > Task :app:preDebugBuild UP-TO-DATE
[ +101 ms] > Task :app:compileDebugAidl NO-SOURCE
[   +3 ms] > Task :app:checkDebugManifest UP-TO-DATE
[   +2 ms] > Task :app:compileDebugRenderscript NO-SOURCE
[   +1 ms] > Task :app:generateDebugBuildConfig UP-TO-DATE
[  +27 ms] > Task :app:javaPreCompileDebug UP-TO-DATE
[  +73 ms] > Task :app:cleanMergeDebugAssets
[  +85 ms] > Task :app:mergeDebugShaders UP-TO-DATE
[  +15 ms] > Task :app:compileDebugShaders UP-TO-DATE
[  +19 ms] > Task :app:generateDebugAssets UP-TO-DATE
[  +10 ms] > Task :app:mergeDebugAssets
[ +337 ms] > Task :app:copyFlutterAssetsDebug
[ +125 ms] > Task :app:mainApkListPersistenceDebug UP-TO-DATE
[ +162 ms] > Task :app:generateDebugResValues UP-TO-DATE
[   +6 ms] > Task :app:generateDebugResources UP-TO-DATE
[   +1 ms] > Task :app:mergeDebugResources UP-TO-DATE
[  +37 ms] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
[   +5 ms] > Task :app:processDebugManifest UP-TO-DATE
[  +11 ms] > Task :app:processDebugResources UP-TO-DATE
[   +1 ms] > Task :app:compileDebugJavaWithJavac UP-TO-DATE
[   +1 ms] > Task :app:compileDebugSources UP-TO-DATE
[   +4 ms] > Task :app:processDebugJavaRes NO-SOURCE
[   +3 ms] > Task :app:mergeDebugJavaResource UP-TO-DATE
[   +1 ms] > Task :app:checkDebugDuplicateClasses UP-TO-DATE
[  +26 ms] > Task :app:desugarDebugFileDependencies UP-TO-DATE
[  +23 ms] > Task :app:mergeExtDexDebug UP-TO-DATE
[   +1 ms] > Task :app:transformClassesWithDexBuilderForDebug UP-TO-DATE
[   +1 ms] > Task :app:mergeDexDebug UP-TO-DATE
[   +3 ms] > Task :app:validateSigningDebug UP-TO-DATE
[   +8 ms] > Task :app:signingConfigWriterDebug UP-TO-DATE
[   +2 ms] > Task :app:mergeDebugJniLibFolders UP-TO-DATE
[   +3 ms] > Task :app:mergeDebugNativeLibs UP-TO-DATE
[   +1 ms] > Task :app:stripDebugDebugSymbols UP-TO-DATE
[   +7 ms] Compatible side by side NDK version was not found.
[  +44 ms] > Task :app:packageDebug UP-TO-DATE
[ +465 ms] > Task :app:assembleDebug
[   +3 ms] BUILD SUCCESSFUL in 9s
[   +1 ms] 30 actionable tasks: 5 executed, 25 up-to-date
[ +380 ms] Running Gradle task 'assembleDebug'... (completed in 10,6s)
[  +59 ms] calculateSha: LocalDirectory:
'C:\Users\Pavel\AndroidStudioProjects\test_sliver\build\app\outputs\apk'/app.apk
[  +79 ms] calculateSha: reading file took 74us
[ +629 ms] calculateSha: computing sha took 625us
[   +8 ms] √ Built build\app\outputs\apk\debug\app-debug.apk.
[   +6 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\build-tools\29.0.3\aapt dump xmltree
C:\Users\Pavel\AndroidStudioProjects\test_sliver\build\app\outputs\apk\app.apk AndroidManifest.xml
[ +492 ms] Exit code 0 from: C:\Users\Pavel\AppData\Local\Android\sdk\build-tools\29.0.3\aapt dump xmltree
C:\Users\Pavel\AndroidStudioProjects\test_sliver\build\app\outputs\apk\app.apk AndroidManifest.xml
[   +3 ms] N: android=http://schemas.android.com/apk/res/android
             E: manifest (line=2)
               A: android:versionCode(0x0101021b)=(type 0x10)0x1
               A: android:versionName(0x0101021c)="0.0.0" (Raw: "0.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1c
               A: android:compileSdkVersionCodename(0x01010573)="9" (Raw: "9")
               A: package="p.test_sliver" (Raw: "p.test_sliver")
               A: platformBuildVersionCode=(type 0x10)0x1c
               A: platformBuildVersionName=(type 0x10)0x9
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1c
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
               E: application (line=22)
                 A: android:label(0x01010001)="test_sliver" (Raw: "test_sliver")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:name(0x01010003)="io.flutter.app.FlutterApplication" (Raw:
                 "io.flutter.app.FlutterApplication")
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
                 "androidx.core.app.CoreComponentFactory")
                 E: activity (line=28)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="p.test_sliver.MainActivity" (Raw: "p.test_sliver.MainActivity")
                   A: android:launchMode(0x0101001d)=(type 0x10)0x1
                   A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
                   A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
                   A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
                   E: meta-data (line=42)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw:
                     "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=52)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw:
                     "io.flutter.embedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=56)
                     E: action (line=57)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
                     E: category (line=59)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
                       "android.intent.category.LAUNCHER")
                 E: meta-data (line=66)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
[  +13 ms] Stopping app 'app.apk' on Android SDK built for x86.
[   +2 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell am
force-stop p.test_sliver
[ +203 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell pm list
packages p.test_sliver
[ +540 ms] package:p.test_sliver
[  +10 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell cat
/data/local/tmp/sky.p.test_sliver.sha1
[ +213 ms] 7672636d07acb5467653497a3b5bc11533190f56
[   +3 ms] Latest build already installed.
[   +2 ms] Android SDK built for x86 startApp
[  +11 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell am start -a
android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez
enable-checked-mode true --ez verify-entry-points true p.test_sliver/p.test_sliver.MainActivity
[ +445 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=p.test_sliver/.MainActivity (has extras)
}
[  +36 ms] Waiting for observatory port to be available...
[+1389 ms] Observatory URL on device: http://127.0.0.1:40509/WL3Xm_I95Nc=/
[   +9 ms] executing: C:\Users\Pavel\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward tcp:0
tcp:40509
[  +44 ms] 58616
[   +3 ms] Forwarded host port 58616 to device port 40509 for Observatory
[  +23 ms] Connecting to service protocol: http://127.0.0.1:58616/WL3Xm_I95Nc=/
[ +790 ms] Successfully connected to service protocol: http://127.0.0.1:58616/WL3Xm_I95Nc=/
[   +9 ms] Sending to VM service: getVM({})
[  +15 ms] Result: {type: VM, name: vm, architectureBits: 32, hostCPU: Virtual CPU, operatingSystem: android, targetCPU:
ia32, version: 2.8.4 (stable) (Wed Jun 3 12:26:04 2020 +0200) on "android_ia32", _profilerMode: VM,
_nativeZoneMemoryUsage: 0, pid: 15157, startT...
[  +13 ms] Sending to VM service: getIsolate({isolateId: isolates/4395134753610787})
[   +6 ms] Sending to VM service: _flutter.listViews({})
[  +17 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0xe9932210, isolate: {type:
@Isolate, fixedId: true, id: isolates/4395134753610787, name: main.dart$main-4395134753610787, number:
4395134753610787}}]}
[  +15 ms] DevFS: Creating new filesystem on the device (null)
[   +2 ms] Sending to VM service: _createDevFS({fsName: test_sliver})
[  +42 ms] Result: {type: Isolate, id: isolates/4395134753610787, name: main, number: 4395134753610787, _originNumber:
4395134753610787, startTime: 1595615946312, _heaps: {new: {type: HeapSpace, name: new, vmName: Scavenger, collections:
3, avgCollectionPeriodMillis...
[  +28 ms] I/p.test_sliver(15157): Background concurrent copying GC freed 15033(6212KB) AllocSpace objects, 0(0B) LOS
objects, 57% free, 1127KB/2663KB, paused 1.048ms total 167.472ms
[   +3 ms] Result: {type: FileSystem, name: test_sliver, uri:
file:///data/user/0/p.test_sliver/code_cache/test_sliverIKNMWP/test_sliver/}
[   +1 ms] DevFS: Created new filesystem on the device
(file:///data/user/0/p.test_sliver/code_cache/test_sliverIKNMWP/test_sliver/)
[   +5 ms] Updating assets
[  +93 ms] Syncing files to device Android SDK built for x86...
[   +4 ms] Scanning asset files
[   +4 ms] <- reset
[   +3 ms] Compiling dart to kernel with 0 updated files
[   +3 ms] <- recompile package:test_sliver/main.dart 50ab72e6-a3f2-425f-a142-3b751a3d1d54
[   +1 ms] <- 50ab72e6-a3f2-425f-a142-3b751a3d1d54
[  +69 ms] D/EGL_emulation(15157): eglMakeCurrent: 0xd2ee7840: ver 2 0 (tinfo 0xd2efce20)
[  +71 ms] Updating files
[ +191 ms] DevFS: Sync finished
[   +3 ms] Syncing files to device Android SDK built for x86... (completed in 350ms)
[   +1 ms] Synced 0.8MB.
[   +2 ms] Sending to VM service: _flutter.listViews({})
[   +9 ms] Result: {type: FlutterViewList, views: [{type: FlutterView, id: _flutterView/0xe9932210, isolate: {type:
@Isolate, fixedId: true, id: isolates/4395134753610787, name: main.dart$main-4395134753610787, number:
4395134753610787}}]}
[   +3 ms] <- accept
[   +3 ms] Connected to _flutterView/0xe9932210.
[   +4 ms] Flutter run key commands.
[   +4 ms] r Hot reload.
[   +2 ms] R Hot restart.
[   +2 ms] h Repeat this help message.
[   +1 ms] d Detach (terminate "flutter run" but leave application running).
[   +2 ms] c Clear the screen
[   +2 ms] q Quit (terminate the application on the device).
[   +1 ms] An Observatory debugger and profiler on Android SDK built for x86 is available at:
http://127.0.0.1:58616/WL3Xm_I95Nc=/
[+17318 ms] I/flutter (15157): ══╡ EXCEPTION CAUGHT BY SCHEDULER LIBRARY
╞═════════════════════════════════════════════════════════
[   +7 ms] I/flutter (15157): The following assertion was thrown during a scheduler callback:
[   +1 ms] I/flutter (15157): 'package:flutter/src/rendering/viewport.dart': Failed assertion: line 1568 pos 12:
'center.parent ==
[   +3 ms] I/flutter (15157): this': is not true.
[   +4 ms] I/flutter (15157):
[   +1 ms] I/flutter (15157): Either the assertion indicates an error in the framework itself, or we should provide
substantially
[   +1 ms] I/flutter (15157): more information in this error message to help you determine and fix the underlying cause.
[   +1 ms] I/flutter (15157): In either case, please report this assertion by filing a bug on GitHub:
[   +1 ms] I/flutter (15157):   https://github.com/flutter/flutter/issues/new?template=BUG.md
[   +2 ms] I/flutter (15157):
[   +1 ms] I/flutter (15157): When the exception was thrown, this was the stack:
[   +1 ms] I/flutter (15157): #2      RenderViewport.indexOfFirstChild
(package:flutter/src/rendering/viewport.dart:1568:12)
[   +2 ms] I/flutter (15157): #3      RenderViewportBase.debugDescribeChildren
(package:flutter/src/rendering/viewport.dart:852:17)
[   +1 ms] I/flutter (15157): #4      DiagnosticableTreeNode.getChildren
(package:flutter/src/foundation/diagnostics.dart:2977:20)
[   +2 ms] I/flutter (15157): #5      TextTreeRenderer._debugRender
(package:flutter/src/foundation/diagnostics.dart:1181:43)
[   +1 ms] I/flutter (15157): #6      TextTreeRenderer.render (package:flutter/src/foundation/diagnostics.dart:1116:14)
[   +1 ms] I/flutter (15157): #7      TextTreeRenderer._debugRender
(package:flutter/src/foundation/diagnostics.dart:1307:39)
[   +1 ms] I/flutter (15157): #8      TextTreeRenderer.render (package:flutter/src/foundation/diagnostics.dart:1116:14)
[   +1 ms] I/flutter (15157): #9      FlutterError.dumpErrorToConsole
(package:flutter/src/foundation/assertions.dart:775:11)
[   +1 ms] I/flutter (15157): #10     FlutterError.reportError (package:flutter/src/foundation/assertions.dart:903:14)
[   +1 ms] I/flutter (15157): #11     RenderObject._debugReportException
(package:flutter/src/rendering/object.dart:1313:18)
[   +7 ms] I/flutter (15157): #12     RenderObject._layoutWithoutResize
(package:flutter/src/rendering/object.dart:1633:7)
[   +1 ms] I/flutter (15157): #13     PipelineOwner.flushLayout (package:flutter/src/rendering/object.dart:887:18)
[   +1 ms] I/flutter (15157): #14     RendererBinding.drawFrame (package:flutter/src/rendering/binding.dart:402:19)
[   +1 ms] I/flutter (15157): #15     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:884:13)
[   +2 ms] I/flutter (15157): #16     RendererBinding._handlePersistentFrameCallback
(package:flutter/src/rendering/binding.dart:284:5)
[   +1 ms] I/flutter (15157): #17     SchedulerBinding._invokeFrameCallback
(package:flutter/src/scheduler/binding.dart:1113:15)
[   +1 ms] I/flutter (15157): #18     SchedulerBinding.handleDrawFrame
(package:flutter/src/scheduler/binding.dart:1052:9)
[   +1 ms] I/flutter (15157): #19     SchedulerBinding._handleDrawFrame
(package:flutter/src/scheduler/binding.dart:968:5)
[   +1 ms] I/flutter (15157): #23     _invoke (dart:ui/hooks.dart:261:10)
[   +2 ms] I/flutter (15157): #24     _drawFrame (dart:ui/hooks.dart:219:3)
[   +3 ms] I/flutter (15157): (elided 5 frames from class _AssertionError and dart:async)
[   +1 ms] I/flutter (15157):
════════════════════════════════════════════════════════════════════════════════════════════════════
[   +1 ms] I/flutter (15157): Another exception was thrown: 'package:flutter/src/rendering/box.dart': Failed assertion:
line 1705 pos 18: 'debugDoingThisResize || debugDoingThisLayout ||

flutter analyze founds no issues.

flutter doctor -v
C:\Users\Pavel\AndroidStudioProjects\test_sliver>flutter doctor -v
[√] Flutter (Channel stable, v1.17.5, on Microsoft Windows [Version 10.0.18363.997], locale ru-RU)
    • Flutter version 1.17.5 at C:\flutterSdk\flutter
    • Framework revision 8af6b2f038 (3 weeks ago), 2020-06-30 12:53:55 -0700
    • Engine revision ee76268252
    • Dart version 2.8.4

[√] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
    • Android SDK at C:\Users\Pavel\AppData\Local\Android\sdk
    • Platform android-29, build-tools 29.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    • All Android licenses accepted.

[√] Android Studio (version 4.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 47.1.2
    • Dart plugin version 193.7361
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

[√] Connected device (1 available)
    • Android SDK built for x86 • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)

• No issues found!

Is reproduced on stable (v1.17.5) and master (1.21.0-6.0.pre.17)

If the sliver being replaced is not the first, all works fine. E.g. if we add
SliverToBoxAdapter(
  child: ListTile(
    title: Text('Header'),
  ),
),

before BodyContent() in the code above

Also if CustomScrollView is rebuilt, all works fine. E.g. if we lift up the state from BodyContent to MyHomePage and pass it to BodyContent through constructor.
But then, if we use some state management approach like redux or provider to optimize things and rebuild only the sliver instead of the whole CustomScrollView, the exception will be back. Example

Hi @PiN73
I see there's an open issue addressing the case you described. https://github.com/flutter/flutter/issues/55170
Please follow up on that issue, I'm closing the current one as a duplicate.
If you disagree, please write in the comments and I will reopen it.
Thank you


text:
string to Visual in Js

First of all thank you for such an awesome platform.
Good Day Fluttery-Fluttery Fans.
I have the dart code as a text string
Column(
children:[
Text('Hello DanTup')]
)
and I want to show this in a visual form and but in a javascript enviroment. Is there a way in which I could give this string as input and show the visual element to the user.

@Chetan11-dev , can you please elaborate on 'visual element'. Do you want to parse your code to create a widget dynamically?

Hi @Chetan11-dev,
This issue doesn't seem to describe a bug or a feature request. Please see https://flutter.dev/community for resources and asking questions like this.
You may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
Thank you

source: gharchive/issue

repo: flutter/flutter

license_type: permissive

license_source: github-api


text:
InteractiveViewer should support aligning sized content when 'constrained' is false

Use case
I have a large image that the user can drag around within a smaller box using the new InteractiveViewer widget. I have set constrained to false. I'm not seeing any way to set the initial alignment of the contents -- currently the image is always forced to the top-left. A requirement of this use case is that the image starts center-aligned. Using a Transform widget is insufficient because it won't place nicely with the boundary margin of the InteractiveViewer.
Proposal
I'm not sure what the API should look like, but we need some way to control how the contents of the InteractiveViewer are initially positioned when the child is larger than the parent.
This might be as simple as passing an Alignment into the InteractiveViewer which can be used on the inner OverflowBox.

CC @justinmc

This may be a duplicate of https://github.com/flutter/flutter/issues/58997, take a look at the discussion there.  I'm thinking we should add a BoxFit parameter to handle things like this.
Another thing to look at in the meantime is my flutter-go example.  It's not exactly what you want, but it might give you some ideas.
Last thing to try, it should definitely be possible to center the child by actually setting the translation of the matrix with TransformationController.  You'll have to know the size of the parent and child and do the math yourself.

You're right, this appears to be a duplicate. Thanks for the ideas in the meantime!

No problem, I'll try to follow up on https://github.com/flutter/flutter/issues/58997 soon.

authors: HansMuller doppio justinmc


text:
Migrate deploy_gallery to LUCI

Please migrate deploy_gallery for mac and linux to luci. This test requires many secrets which have been already added to gcp KMS.
This test should be implemented as a adhoc test.

Per discussion with @xster , we will stop deploying to play store for linux case in this test. FWIW: deployment of new gallery will be automated on LUCI.
Related issue: https://github.com/flutter/gallery/issues/337

@keyonghan  Can we close this bug?

@keyonghan Can we close this bug?

Yes. Closing.

authors: godofredoc keyonghan


text:
[file_selector_web] cannot read files larger than ~500MB

Steps to Reproduce

Use file_selector.openFile() and pick a file ~500-700MB on web.
Read it into memory using readAsBytes().

Expected results:
The file data can be loaded into memory.
Browsers can support buffer sizes of ~2GB so a ~500-700MB file should not fail. file_picker_cross is able to load files larger than file_selector_web.
Actual results:
A RangeError: Array buffer allocation failed will be thrown.

I can reproduce the issue.

code sample
import 'package:file_selector/file_selector.dart';
import 'package:flutter/material.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  //final sp = SharedPreferences();
  runApp(MaterialApp(home: OpenImagePage()));
}

/// Screen that shows an example of openFiles
class OpenImagePage extends StatelessWidget {
  void _openImageFile(BuildContext context) async {
    final XTypeGroup typeGroup = XTypeGroup(
      label: 'images',
      extensions: ['mp4'],
    );
    final XFile file = await openFile(acceptedTypeGroups: [typeGroup]);
    final bytes = await file.readAsBytes();
    final String fileName = file.name;
    final String filePath = file.path;
    print(fileName);
    print(filePath);
    print(bytes);
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Open an image"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              style: ElevatedButton.styleFrom(
                primary: Colors.blue,
                onPrimary: Colors.white,
              ),
              child: Text('Press to open an image file(png, jpg)'),
              onPressed: () => _openImageFile(context),
            ),
          ],
        ),
      ),
    );
  }
}

Performing hot restart...
[+37410 ms] Skipping target: gen_localizations
[   +1 ms] complete
[  +16 ms] Scanned through 519 files in 14ms
Waiting for connection from debug service on Chrome...
[   +2 ms] <- recompile org-dartlang-app:/web_entrypoint.dart efd71fae-174b-4819-8de6-fc2b5180bf91
[        ] package:flutter_example/main.dart
[        ] <- efd71fae-174b-4819-8de6-fc2b5180bf91
[ +394 ms] Synced 0.0MB.
[        ] <- accept
[        ] DwdsVmClient: Attempting a hot restart
[        ] DwdsVmClient: Attempting to disabling breakpoints and resume the isolate
[   +6 ms] DwdsVmClient: Successfully disabled breakpoints and resumed the isolate
[        ] DwdsVmClient: Attempting to get execution context ID.
[        ] DwdsVmClient: Got execution context ID.
[        ] DwdsVmClient: Issuing $dartHotRestart request.
[ +111 ms] ChromeProxyService: Initializing expression compiler for my/root/path/main_module.bootstrap.js with sound null safety: false
[  +65 ms] DwdsVmClient: $dartHotRestart request complete.
[        ] DwdsVmClient: Waiting for Isolate Start event.
[        ] DwdsVmClient: Successful hot restart
[   +1 ms] Restarted application in 605ms.
[+22216 ms] Ambient Study Music To Concentrate - 4 Hours of Music for Studying, Concentration and Memory.mp4
[   +1 ms] blob:http://localhost:51608/5bdbcdb7-a395-421c-b641-c6f9acd91dad
[        ] []
[  +11 ms] RangeError: Array buffer allocation failed
               at new ArrayBuffer (<anonymous>)
               at new Uint8Array (<anonymous>)
               at Function._create1 (http://localhost:51608/my/root/path/dart_sdk.js:31030:14)
               at Function.new (http://localhost:51608/my/root/path/dart_sdk.js:30997:49)
               at convert._ByteCallbackSink.new.add (http://localhost:51608/my/root/path/dart_sdk.js:46619:59)
               at _RootZone.runUnaryGuarded (http://localhost:51608/my/root/path/dart_sdk.js:38940:11)
               at _BufferingStreamSubscription.new.[_sendData] (http://localhost:51608/my/root/path/dart_sdk.js:32557:22)
               at _IterablePendingEvents.new.handleNext (http://localhost:51608/my/root/path/dart_sdk.js:35897:32)
               at async._AsyncCallbackEntry.new.callback (http://localhost:51608/my/root/path/dart_sdk.js:35834:16)
               at Object._microtaskLoop (http://localhost:51608/my/root/path/dart_sdk.js:39301:13)
               at _startMicrotaskLoop (http://localhost:51608/my/root/path/dart_sdk.js:39307:13)
               at http://localhost:51608/my/root/path/dart_sdk.js:34814:9

flutter doctor -v
[✓] Flutter (Channel master, 1.27.0-2.0.pre.101, on macOS 11.2 20D64 darwin-x64, locale en-AO)
    • Flutter version 1.27.0-2.0.pre.101 at /Users/pedromassango/Code/flutter_master
    • Framework revision c2ee916a5d (3 hours ago), 2021-02-14 23:01:04 -0500
    • Engine revision 1d537824d6
    • Dart version 2.13.0 (build 2.13.0-30.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
    • Android SDK at /Users/pedromassango/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[!] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.1, Build version 12A7403
    ! CocoaPods 1.9.3 out of date (1.10.0 is recommended).
        CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
        Without CocoaPods, plugins will not work on iOS or macOS.
        For more info, see https://flutter.dev/platform-plugins
      To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)

[✓] IntelliJ IDEA Community Edition (version 2020.3.2)
    • IntelliJ at /Applications/IntelliJ IDEA CE.app
    • Flutter plugin version 53.1.5
    • Dart plugin version 203.6912

[✓] VS Code (version 1.52.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.18.1

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-x64     • macOS 11.2 20D64 darwin-x64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 88.0.4324.150

! Doctor found issues in 1 category.

cc @ditman

This is probably a bug in the _bytes getter of cross_file, I'll take a look!

Any update on this? I have exactly the same issue with image_picker_for_web in version 2.0.0 when picking a video above 500mb.

After null-safety, my next bug has to do with HtmlElementView at the framework level, because it affects several plugins (and anybody using HtmlElementView to render an iframe, or their own content, pretty much).
This is definitely high in the rest of the priority list, but I still don't have an ETA of when I'll start working on it. I'll keep the thread posted, of course!

I'm taking a look at this, attempting to reproduce this with the current versions of the plugin (they're identical to the old ones, so this should reproduce now in the cross_file package)

I reproduced this in my linux machine with a 4GB file, I guess the maximum size depends on the system.

Just for kicks, I used my 4GB file with file_picker_cross, and I get a similar error, in a slightly different place (here):
Error: Expected a value of type 'Uint8List', but got one of type 'Null'
    at Object.throw_ [as throw] (http://localhost:44459/dart_sdk.js:5061:11)
    at Object.castError (http://localhost:44459/dart_sdk.js:5020:15)
    at Object.cast [as as] (http://localhost:44459/dart_sdk.js:5345:17)
    at Function.as_C [as as] (http://localhost:44459/dart_sdk.js:4966:19)
    at
    http://localhost:44459/packages/file_picker_cross/src/file_picker_web.dart.l
    ib.js:137:156
    at Object._checkAndCall (http://localhost:44459/dart_sdk.js:5268:16)
    at Object.dcall (http://localhost:44459/dart_sdk.js:5273:17)
    at FileReader.<anonymous> (http://localhost:44459/dart_sdk.js:101824:100)

For some file size, the browser is going to return "Null" instead of the read bytes. I'm going to try a little bit harder finding a file size that causes the exact error described in this issue.

I'm having trouble reproducing the issue, I cannot verify the following:

I cannot get the same error as @CDDelta reported. Can you please let me know what OS + Browser (with versions) are you using?
I cannot validate this claim: file_picker_cross is able to load files larger than file_selector_web. I couldn't find any file that does open using one plugin but not another.

I'm using Linux and Chrome Version 92.0.4515.131 (Official Build) (64-bit)
I'm opening a 1.6GB file. I cannot open a 2.1GB file (but in that case both plugins crash).

I have since moved on from the project that had this issue so I can't be of much help here, unfortunately.

@ditman you can find the OS information in my comment: https://github.com/flutter/flutter/issues/76036#issuecomment-779117508
I was using A MacBook pro (with probably a BigSur OS) and Chrome as the web browser

@kasyr can you provide more details? What OS + Browser combo were you using? Is this still happening to you?

@pedromassango I totally missed the doctor expansion right underneath the logs! Thanks!!
I see Chrome 88 in macos 11.2, I'll try to replicate there!
Thanks again!

I've attempted to reproduce the same crash with Chrome 88 (same version as reported by Pedro) and couldn't reproduce the issue neither in my Linux nor my Mac machines. I also couldn't find any file that did work in one plugin but not the other.
Here's the code I used when testing both plugins (a slightly modified version of @pedromassango's):

main.dart (file_selector)
import 'package:file_selector/file_selector.dart';
import 'package:flutter/material.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  //final sp = SharedPreferences();
  runApp(MaterialApp(home: OpenImagePage()));
}

/// Screen that shows an example of openFiles
class OpenImagePage extends StatelessWidget {
  void _openImageFile(BuildContext context) async {
    final Stopwatch stopwatch = Stopwatch()..start();
    final XTypeGroup typeGroup = XTypeGroup(
      label: 'Video files',
      extensions: ['mp4'],
    );
    final XFile file = (await openFile(acceptedTypeGroups: [typeGroup]))!;
    // Not very useful, this depends on the user selecting the file.
    print('Loaded in ${stopwatch.elapsedMilliseconds} ms');
    stopwatch.reset();
    print(file.name);
    print(file.path);
    final int length = await file.length();
    print('${length / 1024 / 1024} MB, in ${stopwatch.elapsedMicroseconds} μs');
    stopwatch.reset();
    final bytes = await file.readAsBytes(); // Returns an empty array for >2GB files.
    print('readAsBytes, in ${stopwatch.elapsedMilliseconds} ms');
    print('bytes length: ${bytes.length}');
    stopwatch.reset();
    print('First 10 bytes: ${bytes.sublist(0, 10)}, in ${stopwatch.elapsedMicroseconds} μs');
    stopwatch.reset();
    print('Last 10 bytes: ${bytes.sublist(length - 10)}, in ${stopwatch.elapsedMicroseconds} μs');
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Open video file_selector"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              style: ElevatedButton.styleFrom(
                primary: Colors.blue,
                onPrimary: Colors.white,
              ),
              child: const Text('Press to open a file'),
              onPressed: () => _openImageFile(context),
            ),
          ],
        ),
      ),
    );
  }
}

main.dart (file_picker_cross)
import 'package:file_picker_cross/file_picker_cross.dart';
import 'package:flutter/material.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  //final sp = SharedPreferences();
  runApp(MaterialApp(home: OpenImagePage()));
}

/// Screen that shows an example of openFiles
class OpenImagePage extends StatelessWidget {
  void _openImageFile(BuildContext context) async {
    final Stopwatch stopwatch = Stopwatch()..start();
    final FilePickerCross file = await FilePickerCross.importFromStorage(
      type: FileTypeCross.video,
    ); // Throws exception for >2GB files.
    print('Loaded in ${stopwatch.elapsedMilliseconds} ms');
    stopwatch.reset();
    print(file.fileName);
    print(file.path);
    final int length = file.length;
    print('${length / 1024 / 1024} MB, in ${stopwatch.elapsedMicroseconds} μs');
    stopwatch.reset();
    final bytes = file.toUint8List();
    print('readAsBytes, in ${stopwatch.elapsedMilliseconds} ms');
    print('bytes length: ${bytes.length}');
    stopwatch.reset();
    print('First 10 bytes: ${bytes.sublist(0, 10)}, in ${stopwatch.elapsedMicroseconds} μs');
    stopwatch.reset();
    print('Last 10 bytes: ${bytes.sublist(length - 10)}, in ${stopwatch.elapsedMicroseconds} μs');
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Open video file_picker_cross"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              style: ElevatedButton.styleFrom(
                primary: Colors.blue,
                onPrimary: Colors.white,
              ),
              child: const Text('Press to open a file'),
              onPressed: () => _openImageFile(context),
            ),
          ],
        ),
      ),
    );
  }
}

In my experience, files >2GB make both plugins misbehave. file_selector will return an empty array of bytes when calling readAsBytes (however browser-reported metadata will still be available), and file_picker_cross will throw an exception when calling importFromStorage (and nothing from the file will be available).
Smaller files seem to be handled correctly by both plugins.
Calling print(bytes) causes a big crash, I assume because of the toString conversion, but as seen in the example above, the bytes are loaded (you can access the first 10 and the last 10 bytes, and they seem to be consistent across both apps).
(This is most likely a change in the underlying dart behavior that probably got fixed between this bug was reported and now.)
I'm going to close this, but feel free to reopen if  this comes up again!

Hey, @ditman -- can you consider reopening this (or should I open a new issues?)
One would image that you should be able to stream even large files (2gb+), but unfortunately this does not work.
Snippet (complete code attached below):
    final fileSize = await file.length();
    final chunkStarts = List.generate((fileSize/chunkSize.toDouble()).ceil(), (i) => i * chunkSize);

    for (var chunkStart in chunkStarts){
      final bytes = await file.openRead(chunkStart, min(fileSize, chunkStart + chunkSize)).single;
      print("Streamed ${bytes.length} bytes");
    }

main.dart (file_selector w/ chunks)
import 'dart:math';

import 'package:file_selector/file_selector.dart';
import 'package:flutter/material.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();

  //final sp = SharedPreferences();
  runApp(MaterialApp(home: OpenImagePage()));
}

/// Screen that shows an example of openFiles
class OpenImagePage extends StatelessWidget {
  void _openImageFile(BuildContext context) async {
    final Stopwatch stopwatch = Stopwatch()..start();
    final XTypeGroup typeGroup = XTypeGroup(
      label: 'Video files',
      extensions: ['mp4'],
    );
    final XFile file = (await openFile(acceptedTypeGroups: [typeGroup]));
    // Not very useful, this depends on the user selecting the file.
    print('Loaded in ${stopwatch.elapsedMilliseconds} ms');
    stopwatch.reset();
    print(file.name);
    print(file.path);
    final int length = await file.length();
    print('${length / 1024 / 1024} MB, in ${stopwatch.elapsedMicroseconds} μs');
    stopwatch.reset();
    final bytes = await file.readAsBytes(); // Returns an empty array for >2GB files.
    print('readAsBytes, in ${stopwatch.elapsedMilliseconds} ms');
    print('bytes length: ${bytes.length}');
    stopwatch.reset();
    print('First 10 bytes: ${bytes.sublist(0, 10)}, in ${stopwatch.elapsedMicroseconds} μs');
    stopwatch.reset();
    print('Last 10 bytes: ${bytes.sublist(length - 10)}, in ${stopwatch.elapsedMicroseconds} μs');

    print('Will attempt to iterate through stream in chunks');
    final chunkSize = 5000000;
    final fileSize = await file.length();
    final chunkStarts = List.generate((fileSize/chunkSize.toDouble()).ceil(), (i) => i * chunkSize);

    var totalBytesStreamed = 0;
    for (var chunkStart in chunkStarts){
      final bytes = await file.openRead(chunkStart, min(fileSize, chunkStart + chunkSize)).single;
      print("Streamed ${bytes.length} bytes");
      totalBytesStreamed += bytes.length;
    }
    print("Total bytes streamed: $totalBytesStreamed");
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text("Open video file_selector"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
              style: ElevatedButton.styleFrom(
                primary: Colors.blue,
                onPrimary: Colors.white,
              ),
              child: const Text('Press to open a file'),
              onPressed: () => _openImageFile(context),
            ),
          ],
        ),
      ),
    );
  }
}

The code works on smaller files, but larger files produce the following "RangeError":
Uncaught (in promise) Error: RangeError (end): Invalid value: Only valid value is 0: 10
I would expect streaming through chunks of files to work regardless of size as the amount of data being read into memory is capped at a small finite size (20mb in my example code). Any ideas on how to make this work?

Hey, @ditman -- can you consider reopening this (or should I open a new issues?)
One would image that you should be able to stream even large files (2gb+), but unfortunately this does not work.
Snippet (complete code attached below):
    final fileSize = await file.length();
    final chunkStarts = List.generate((fileSize/chunkSize.toDouble()).ceil(), (i) => i * chunkSize);

    for (var chunkStart in chunkStarts){
      final bytes = await file.openRead(chunkStart, min(fileSize, chunkStart + chunkSize)).single;
      print("Streamed ${bytes.length} bytes");
    }

main.dart (file_selector w/ chunks)
The code works on smaller files, but larger files produce the following "RangeError":
Uncaught (in promise) Error: RangeError (end): Invalid value: Only valid value is 0: 10
I would expect streaming through chunks of files to work regardless of size as the amount of data being read into memory is capped at a small finite size (20mb in my example code). Any ideas on how to make this work?

I created #88465
@ditman

authors: CDDelta cyanglaz ditman kasyr nwparker pedromassango pedromassangocode


text:
Enable Windows plugin tests for stable branch

flutter/plugins runs most tests on both the master and stable branches of Flutter. That wasn't the case for Windows since it was only available on master, but now that it is available on stable we should be running the tests there too. I believe this involves modifying the recipe added here
(See for the first iteration of enabling these tests.)
For all other platforms we can do this within flutter/plugins since they use Cirrus, but AFAIK there's no way to do this in-repo with LUCI (which is used for the Windows tests).
/cc @godofredoc @cbracken

@yusufm any updates on this request?

@stuartmorgan I'm looking through the code and wanted to confirm a couple of items:

Do you want the new builder to be a try or prod builder?

Currently the recipe checks out the latest flutter and plugins repos. Is your request that we add another builder to checkout flutter stable and latest plugins repos? (since the plugins repo does not seem to have a stable version?)

Do you want the new builder to be a try or prod builder?

Whatever we need for running presubmit tests on every PR push, and post-submit on every landed PR.
Actually, looking now it appears the existing Windows tests aren't running post-submit, so if we could fix that at the same time that would be great.

Currently the recipe checks out the latest flutter and plugins repos. Is your request that we add another builder to checkout flutter stable and latest plugins repos? (since the plugins repo does not seem to have a stable version?)

Yes, the latest stable channel of Flutter.

Looks like this should be unblocked now that the bot solution didn't involve tool changes.

I think this is a very small change in the infra configs. I'll take a look during the day.

Builds are now up and running:

authors: godofredoc stuartmorgan yusufm


text:
On navigation back swipe, widgets not receiving touch events

Hello, I have a weird problem regarding screen/page navigation. Using push and pop methods (and the alternatives for named routes) are working as expected. Now to the issue, when I swipe back to the previous screen (I'm using an iPhone SE first-gen), the widgets are not responsive to a second, then they suddenly reactivate, and every touch event work as it should.
Steps to Reproduce
Start an app that has got any screen routing, like the Named Routes example:
void main() {
  runApp(MaterialApp(
    title: 'Named Routes Demo',
    // Start the app with the "/" named route. In this case, the app starts
    // on the FirstScreen widget.
    initialRoute: '/',
    routes: {
      // When navigating to the "/" route, build the FirstScreen widget.
      '/': (context) => FirstScreen(),
      // When navigating to the "/second" route, build the SecondScreen widget.
      '/second': (context) => SecondScreen(),
    },
  ));
}

class FirstScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('First Screen'),
      ),
      body: Center(
        child: ElevatedButton(
          child: Text('Launch screen'),
          onPressed: () {
            // Navigate to the second screen using a named route.
            Navigator.pushNamed(context, '/second');
          },
        ),
      ),
    );
  }
}

class SecondScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Second Screen"),
      ),
      body: Center(
        child: ElevatedButton(
          onPressed: () {
            // Navigate back to the first screen by popping the current route
            // off the stack.
            Navigator.pop(context);
          },
          child: Text('Go back!'),
        ),
      ),
    );
  }
}

Expected results:
When I swipe back, every widget on the previous screen should receive touch events instantly.
Actual results:
On an actual device, it is way easier to reproduce but harder to show when I tap the screen. As my MacBook sucks a bit, the animations on the sim ain't that fluid, but sometimes when I tap just right after the swipe, the button doesn't register the event.
https://user-images.githubusercontent.com/1648325/110320671-f26d1800-8010-11eb-8fb3-c41ec2557178.mov
Other
Browsing though the issues from flutter, I found this issue that seems to be somehow related: https://github.com/flutter/flutter/issues/73026

Logs

Analyzing test_app...
No issues found! (ran in 2.9s)

[✓] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H524 darwin-x64,
    locale pl-PL)
    • Flutter version 1.22.6 at /usr/local/Caskroom/flutter/1.22.6/flutter
    • Framework revision 9b2d32b605 (6 weeks ago), 2021-01-22 14:36:39 -0800
    • Engine revision 2f0af37152
    • Dart version 2.10.5

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from:
      https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK
      components.
      (or visit https://flutter.dev/docs/get-started/install/macos#android-setup
      for detailed instructions).
      If the Android SDK has been installed to a custom location, set
      ANDROID_SDK_ROOT to that location.
      You may also want to add it to your PATH environment variable.

[✓] Xcode - develop for iOS and macOS (Xcode 12.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.3, Build version 12C33
    • CocoaPods version 1.10.1

[!] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    ✗ Flutter plugin not installed; this adds Flutter specific functionality.
    ✗ Dart plugin not installed; this adds Dart specific functionality.
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.54.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.19.0

[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.

Hi @TomiCode
I can reproduce the issue on a physical , it's the same as https://github.com/flutter/flutter/issues/73026
Please follow up on that issue, I'm closing the current one as a duplicate.
If you disagree, please write in the comments and I will reopen it.
Thank you

authors: TahaTesser TomiCode


text:
[engine] Linux benchmarks is not using goma

It is taking more than 25 mins to build the engine release version used by the benchmarks when it should be taking less than 5 mins.

CL:
https://flutter-review.googlesource.com/c/recipes/+/11262

@godofredoc The linked PR seems to have landed. Can we close this?

Yes, just validated that the execution time is back to ~15 mins.

authors: chinmaygarde godofredoc


text:
Migrate android plugins from jcenter to mavenCentral

JCenter is being sunset and is readonly now https://jfrog.com/blog/into-the-sunset-bintray-jcenter-gocenter-and-chartcenter.
Migrate plugins build.gradle configs from jcenter() to mavenCentral() maven repository.
https://github.com/flutter/plugins/blob/e25698f7e4634c00a76f05dd618e303fc7ac4304/packages/url_launcher/url_launcher/android/build.gradle#L7
buildscript {
    repositories {
        google()
-       jcenter()
+       mavenCentral()
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
    }
}

allprojects {
    repositories {
        google()
-       jcenter()
+       mavenCentral()
    }
}

This was done in flutter/flutter app templates and example apps in https://github.com/flutter/flutter/issues/78338.

jcenter has been unreliable, this will also improve test flakes like:
flutter_gallery_win__compile] [STDOUT] stderr:       > Could not resolve org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.31.
[flutter_gallery_win__compile] [STDOUT] stderr:          > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.31/kotlin-stdlib-jdk8-1.3.31.pom'.
[flutter_gallery_win__compile] [STDOUT] stderr:             > Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib-jdk8/1.3.31/kotlin-stdlib-jdk8-1.3.31.pom'.
[flutter_gallery_win__compile] [STDOUT] stderr:                > Connect to jcenter.bintray.com:443 [jcenter.bintray.com/34.95.74.180] failed: Connection timed out: connect

https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket.appspot.com/8846877389070966368/+/u/run_flutter_gallery_win__compile/stdout

jcenter is no longer present in the plugins repo.  Closing as complete.


text:
Hero()s don't animate when routing using a GlobalKey<NavigatorState>()

Steps to Reproduce

Run flutter create bug.
Create a Material App and give it a GlobalKey<NavigatorState>()
Create a Widget that returns a Navigator() and give it a different Globalkey<NavigatorState>()
Create two pages with Hero() widgets and have a way to navigate between them.
Navigate with Navigator.of(context).pushReplacement()
Then Navigate with secondKeyName.currentState!.pushReplacement()

Expected results:
They both should look the same
Actual results:
The hero widgets don't animate when using the the key's current state.
https://user-images.githubusercontent.com/63734405/119223489-d1de3580-bb0a-11eb-9194-27478cb0ba32.mp4
https://user-images.githubusercontent.com/63734405/119223492-d4408f80-bb0a-11eb-9222-535afa3586ae.mp4

Logs

info • 'accentColor' is deprecated and shouldn't be used. Use
          colorScheme.secondary instead. This feature was deprecated after
          v2.3.0-0.1.pre. • lib/main.dart:31:15 • deprecated_member_use
   info • 'accentColor' is deprecated and shouldn't be used. Use
          colorScheme.secondary instead. This feature was deprecated after
          v2.3.0-0.1.pre. • lib/main.dart:154:15 • deprecated_member_use
   info • This class (or a class that this class inherits from) is marked as
          '@immutable', but one or more of its instance fields aren't final:
          ResetPassword.email • lib/screens/authentication/log_in.dart:464:7 •
          must_be_immutable
   info • The declaration '_getColor' isn't referenced •
          lib/screens/authentication/log_in.dart:489:9 • unused_element
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/log_in.dart:560:57 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/log_in.dart:567:55 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/log_in.dart:822:46 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/log_in.dart:830:44 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/log_in.dart:846:46 •
          deprecated_member_use
   info • Unused import: 'package:releaf/screens/authentication/veryify.dart'
          • lib/screens/authentication/register.dart:4:8 • unused_import
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/register.dart:151:46 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/register.dart:159:44 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/register.dart:175:46 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/veryify.dart:103:52 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/veryify.dart:112:54 •
          deprecated_member_use
   info • The value of the local variable '_ratio' isn't used •
          lib/screens/authentication/welcome.dart:18:11 •
          unused_local_variable
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/welcome.dart:81:58 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/authentication/welcome.dart:124:58 •
          deprecated_member_use
   info • Unused import: 'package:releaf/screens/home/settings.dart' •
          lib/screens/home/dashboard.dart:6:8 • unused_import
   info • Unused import: 'package:releaf/services/auth.dart' •
          lib/screens/home/dashboard.dart:8:8 • unused_import
   info • Unused import: 'package:releaf/services/database.dart' •
          lib/screens/home/dashboard.dart:9:8 • unused_import
   info • The value of the local variable 'theme' isn't used •
          lib/screens/home/dashboard.dart:41:11 • unused_local_variable
   info • 'accentColor' is deprecated and shouldn't be used. Use
          colorScheme.secondary instead. This feature was deprecated after
          v2.3.0-0.1.pre. • lib/screens/home/dashboard.dart:62:42 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/home/dashboard.dart:73:40 • deprecated_member_use
   info • Unused import: 'package:animations/animations.dart' •
          lib/screens/home/home.dart:1:8 • unused_import
   info • Unused import: 'package:firebase_storage/firebase_storage.dart' •
          lib/screens/home/home.dart:2:8 • unused_import
   info • Unused import: 'package:provider/provider.dart' •
          lib/screens/home/home.dart:4:8 • unused_import
   info • Unused import: 'package:releaf/services/auth.dart' •
          lib/screens/home/home.dart:6:8 • unused_import
   info • Unused import: 'package:releaf/services/database.dart' •
          lib/screens/home/home.dart:7:8 • unused_import
   info • Unused import: 'package:provider/provider.dart' •
          lib/screens/home/journal.dart:5:8 • unused_import
   info • Unused import: 'package:releaf/screens/home/dashboard.dart' •
          lib/screens/home/journal.dart:6:8 • unused_import
   info • Unused import: 'package:releaf/shared/const/app_theme.dart' •
          lib/screens/home/journal.dart:8:8 • unused_import
   info • Unused import: 'package:releaf/services/auth.dart' •
          lib/screens/home/journal.dart:9:8 • unused_import
   info • Unused import: 'package:releaf/services/database.dart' •
          lib/screens/home/journal.dart:10:8 • unused_import
   info • 'accentColor' is deprecated and shouldn't be used. Use
          colorScheme.secondary instead. This feature was deprecated after
          v2.3.0-0.1.pre. • lib/screens/home/journal.dart:60:38 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/home/journal.dart:143:52 • deprecated_member_use
   info • Unused import: 'package:releaf/screens/home/dashboard.dart' •
          lib/screens/home/meditation.dart:4:8 • unused_import
   info • Unused import: 'package:releaf/services/auth.dart' •
          lib/screens/home/meditation.dart:7:8 • unused_import
   info • Unused import: 'package:releaf/services/database.dart' •
          lib/screens/home/meditation.dart:8:8 • unused_import
   info • The value of the local variable 'theme' isn't used •
          lib/screens/home/meditation.dart:40:11 • unused_local_variable
   info • 'accentColor' is deprecated and shouldn't be used. Use
          colorScheme.secondary instead. This feature was deprecated after
          v2.3.0-0.1.pre. • lib/screens/home/meditation.dart:75:42 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/home/meditation.dart:86:40 • deprecated_member_use
   info • Unused import: 'dart:ui' • lib/screens/home/setting_popup.dart:1:8 •
          unused_import
   info • Unused import: 'package:email_validator/email_validator.dart' •
          lib/screens/home/setting_popup.dart:4:8 • unused_import
   info • Unused import: 'package:releaf/services/auth.dart' •
          lib/screens/home/setting_popup.dart:5:8 • unused_import
   info • Unused import: 'package:releaf/shared/assets/custom_form_field.dart'
          • lib/screens/home/setting_popup.dart:7:8 • unused_import
   info • The value of the local variable '_theme' isn't used •
          lib/screens/home/setting_popup.dart:16:11 • unused_local_variable
   info • Unused import: '../../wrapper.dart' •
          lib/screens/home/settings.dart:15:8 • unused_import
   info • 'accentColor' is deprecated and shouldn't be used. Use
          colorScheme.secondary instead. This feature was deprecated after
          v2.3.0-0.1.pre. • lib/screens/home/settings.dart:277:42 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/home/settings.dart:288:40 • deprecated_member_use
   info • The value of the local variable '_theme' isn't used •
          lib/screens/home/settings.dart:458:11 • unused_local_variable
   info • Unused import: 'package:releaf/screens/home/dashboard.dart' •
          lib/screens/home/tasks.dart:5:8 • unused_import
   info • Unused import: 'package:releaf/services/auth.dart' •
          lib/screens/home/tasks.dart:8:8 • unused_import
   info • Unused import: 'package:releaf/services/database.dart' •
          lib/screens/home/tasks.dart:9:8 • unused_import
   info • The value of the local variable 'theme' isn't used •
          lib/screens/home/tasks.dart:44:11 • unused_local_variable
   info • The value of the local variable 'width' isn't used •
          lib/screens/home/tasks.dart:45:11 • unused_local_variable
   info • 'accentColor' is deprecated and shouldn't be used. Use
          colorScheme.secondary instead. This feature was deprecated after
          v2.3.0-0.1.pre. • lib/screens/home/tasks.dart:75:40 •
          deprecated_member_use
   info • 'accentIconTheme' is deprecated and shouldn't be used. No longer
          used by the framework, please remove any reference to it. This
          feature was deprecated after v2.3.0-0.1.pre. •
          lib/screens/home/tasks.dart:86:38 • deprecated_member_use
   info • Unused import: 'package:releaf/services/database.dart' •
          lib/services/auth.dart:4:8 • unused_import
   info • 'accentColor' is deprecated and shouldn't be used. Use
          colorScheme.secondary instead. This feature was deprecated after
          v2.3.0-0.1.pre. • lib/shared/assets/themed_button.dart:94:55 •
          deprecated_member_use
   info • 'accentColor' is deprecated and shouldn't be used. Use
          colorScheme.secondary instead. This feature was deprecated after
          v2.3.0-0.1.pre. • lib/shared/assets/themed_button.dart:96:27 •
          deprecated_member_use
   info • 'accentColor' is deprecated and shouldn't be used. Use
          colorScheme.secondary instead. This feature was deprecated after
          v2.3.0-0.1.pre. • lib/shared/assets/themed_button.dart:240:55 •
          deprecated_member_use
   info • Unused import: 'package:releaf/screens/home/home.dart' •
          lib/wrapper.dart:7:8 • unused_import
   info • Unused import: 'package:releaf/screens/home/journal.dart' •
          lib/wrapper.dart:8:8 • unused_import
   info • Unused import: 'package:releaf/services/auth.dart' •
          lib/wrapper.dart:9:8 • unused_import

[✓] Flutter (Channel master, 2.3.0-13.0.pre.59, on macOS 11.3.1 20E241
    darwin-x64, locale en-AU)
    • Flutter version 2.3.0-13.0.pre.59 at
      /Users/hadymashhour/Developer/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 1e35f4c0c6 (2 days ago), 2021-05-20 03:14:01 -0400
    • Engine revision 67c537d41b
    • Dart version 2.14.0 (build 2.14.0-129.0.dev)

[✓] Android toolchain - develop for Android devices (Android SDK version
    30.0.2)
    • Android SDK at /Users/hadymashhour/Library/Android/sdk
    • Platform android-30, build-tools 30.0.2
    • Java binary at: /Applications/Android
      Studio.app/Contents/jre/jdk/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 12.5, Build version 12E262
    • CocoaPods version 1.10.1

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 4.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build
      1.8.0_242-release-1644-b3-6915495)

[✓] VS Code (version 1.56.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.22.0

[✓] Connected device (2 available)
    • iPhone 12 Pro Max (mobile) • BD55A391-EEF1-45D8-831D-3FC41EF96918 • ios
      • com.apple.CoreSimulator.SimRuntime.iOS-14-5 (simulator)
    • Chrome (web)               • chrome                               •
      web-javascript • Google Chrome 90.0.4430.212

• No issues found!

This solved it https://stackoverflow.com/questions/51760916/hero-animation-not-working-inside-nested-navigator
Just add a HeroController to the Navigator()'s observers and that should fix the problem.


text:
StreamedResponse with http/BrowserClient on flutter web

Use case
for web, I am using this class
https://pub.dev/documentation/http/latest/browser_client/BrowserClient-class.html
since I need secure cookies. however, it does not support StreamedResponse. I am doing docker builds on the server and want to stream the output to the client, however, it appears I can't do it.
from the webpage"
"It is also unable to stream requests or responses; a request will only be sent and a response will only be returned once all the data is available."
If there is a workaround, I would love to hear it. Thanks.

@matthewchung74
Please see below related issues and check if they are helpful.
https://github.com/flutter/flutter/issues/43343
https://github.com/dart-lang/http/issues/337

Thank you. I also would need the example of the HTTP cookie as well, since
I couldn’t find it.
But, I ended up doing a rewrite to use web sockets.
On Mon, Jul 12, 2021 at 3:14 AM darshankawar @.***>
wrote:

@matthewchung74 https://github.com/matthewchung74
Please see below related issues and check if they are helpful.
#43343 https://github.com/flutter/flutter/issues/43343
dart-lang/http#337 https://github.com/dart-lang/http/issues/337
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/flutter/flutter/issues/86199#issuecomment-878153337,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAM3RREI4PFMORG2QVQKLPDTXK575ANCNFSM5ADNK6ZQ
.

--
Regards,
Matt

@matthewchung74
Does that mean your issue is resolved and can this be closed ?

sure


text:
Provide a way to develop a system-wide input method

I searched a lot and i didn't find any way to develop a system-wide input method (e.g. a keyboard) using Flutter. I'm not talking about an In-App keyboard, but a global keyboard that you can set as the default keyboard of your device.
Please if there is a way to do this, create a tutorial for it, if it's hard to implement please develop a package or anything that helps to do it better, easier, and faster, and if there is no way to do this please create a way!
The ability to implement its both UI and logic only by using Flutter and Dart is important.

Hi @amir-msh
This issue doesn't seem to describe a bug or a feature request. Please see https://flutter.dev/community for resources and asking questions like this,
you may also get some help if you post it on Stack Overflow and if you need help with your code, please see https://www.reddit.com/r/flutterhelp/
Closing, as this isn't an issue with Flutter itself. If you disagree, please write in the comments and I will reopen it.
ps: You may look at some of these similar discussions on the internet that could guide you to build a system wide keyboard

https://www.androidauthority.com/lets-build-custom-keyboard-android-832362/
https://stackoverflow.com/q/49746413/8253662

Thank you

Hi @maheshmnj and thanks for your reply.
Actually, I checked out all of these links before and there was no certain solution to do that in Flutter anywhere.
this question has been asked before in reddit and the people's answers are not useful, the StackOverflow's link you sent is just like that, people answered but their answer doesn't provide a way to implement it in Flutter.
It seems something should be implemented on your side, that's why I count it as a feature request.

@amir-msh What you are requesting for (Creating a global system-wide keyboard) is a personal use case and unfortunately, these are not considered as proposal or feature request for the flutter framework.

@maheshmnj It's not a personal use case, it's kinda required! If it was just a personal use case, there was no implementation in the native languages.

authors: amir-msh maheshmnj