Skip to content

ListTile Hero animation throws No Material widget found #89550

@adnanjpg

Description

@adnanjpg
Here is a piece of code to reproduce the problem
import 'package:flutter/material.dart';

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primaryColor: Colors.orange,
      ),
      home: MyHome(),
    );
  }
}

class MyHome extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: PreferredSize(
        preferredSize: Size.zero,
        child: Container(),
      ),
      body: MaterialButton(
        onPressed: () {
          Navigator.of(context).push(
            MaterialPageRoute(
              builder: (context) => NextScreen(),
            ),
          );
        },
        child: MyTile(),
      ),
    );
  }
}

class NextScreen extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(),
      body: MyTile(),
    );
  }
}

class MyTile extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Hero(
      tag: 'hero',
      child: ListTile(
        key: Key('hero'),
        leading: Icon(Icons.ac_unit),
      ),
    );
  }
}

Actual results:
when wrapping Listtile Widget with a Hero Widget, after the navigation, for a second a red widget with an error appears instead of animation.

here is the error message
The following assertion was thrown building ListTile-[<'hero'>](dirty):
No Material widget found.

ListTile widgets require a Material widget ancestor.
In material design, most widgets are conceptually "printed" on a sheet of material. In Flutter's material library, that material is represented by the Material widget. It is the Material widget that renders ink splashes, for instance. Because of this, many material library widgets require that there be a Material widget in the tree above them.

To introduce a Material widget, you can either directly include one, or use a widget that contains Material itself, such as a Card, Dialog, Drawer, or Scaffold.

The specific widget that could not find a Material ancestor was: ListTile-[<'hero'>]

Logs
[  +86 ms] executing: [C:\Users\adnan\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[  +65 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] f4abaa0735eba4dfd8f33f73363911d63931fe03
[   +1 ms] executing: [C:\Users\adnan\flutter/] git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03       
[  +49 ms] Exit code 0 from: git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[        ] 2.2.3
[   +6 ms] executing: [C:\Users\adnan\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[  +40 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [C:\Users\adnan\flutter/] git ls-remote --get-url origin
[  +33 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[ +115 ms] executing: [C:\Users\adnan\flutter/] git rev-parse --abbrev-ref HEAD
[  +38 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +72 ms] 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.
[   +9 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.
[  +59 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
[  +48 ms] List of devices attached
           emulator-5554          device product:sdk_gphone_x86 model:sdk_gphone_x86 device:generic_x86_arm        
           transport_id:1
[   +9 ms] C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell getprop
[  +56 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' 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.
[  +86 ms] Skipping pub get: version match.
[ +117 ms] Generating
C:\Users\adnan\bug\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
[  +55 ms] ro.hardware = ranchu
[  +16 ms] Using hardware rendering with device sdk gphone x86. If you notice graphics artifacts, consider enablingsoftware
           rendering with "--enable-software-rendering".
[  +33 ms] Initializing file store
[  +11 ms] Skipping target: gen_localizations
[   +7 ms] complete
[   +4 ms] Launching lib\main.dart on sdk gphone x86 in debug mode...
[   +7 ms] C:\Users\adnan\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\Users\adnan\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Users\adnan\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter       
--debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill
C:\Users\adnan\AppData\Local\Temp\flutter_tools.db054ad8\flutter_tool.89f83d39\app.dill --packages
C:\Users\adnan\bug\.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts 
--track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill
build\3c113a45063dc6628e68a4111abcacad.cache.dill.track.dill --enable-experiment=alternative-invalidation-strategy 
[  +11 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree
C:\Users\adnan\bug\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[  +26 ms] Exit code 0 from: C:\Users\adnan\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree
C:\Users\adnan\bug\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[   +1 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)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
               A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
               A: package="com.example.bug" (Raw: "com.example.bug")
               A: platformBuildVersionCode=(type 0x10)0x1e
               A: platformBuildVersionName=(type 0x10)0xb
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x13
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")    
               E: application (line=16)
                 A: android:label(0x01010001)="bug" (Raw: "bug")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
                 "androidx.core.app.CoreComponentFactory")
                 E: activity (line=21)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.bug.MainActivity" (Raw: "com.example.bug.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=35)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw:
                     "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=45)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw:
                     "io.flutter.embedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=49)
                     E: action (line=50)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")                     E: category (line=52)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
                       "android.intent.category.LAUNCHER")
                 E: meta-data (line=59)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
[  +14 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell -x    
logcat -v time -t 1
[  +15 ms] <- compile package:bug/main.dart
[  +56 ms] --------- beginning of main
           09-06 15:45:53.513 W/adbd    (  392): timeout expired while flushing socket, closing
[  +15 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe version
[  +71 ms] Android Debug Bridge version 1.0.41
           Version 31.0.2-7242960
           Installed as C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe
[   +3 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe start-server
[  +22 ms] Building APK
[  +22 ms] Running Gradle task 'assembleDebug'...
[   +9 ms] Using gradle from C:\Users\adnan\bug\android\gradlew.bat.
[  +16 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
[ +136 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
[        ] 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)
[   +2 ms] executing: [C:\Users\adnan\bug\android/] C:\Users\adnan\bug\android\gradlew.bat -Pverbose=true
-Ptarget-platform=android-x86 -Ptarget=C:\Users\adnan\bug\lib\main.dart
-Pdart-defines=RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== -Pdart-obfuscation=false -Ptrack-widget-creation=true      
-Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleDebug
[+14201 ms] > Task :app:compileFlutterBuildDebug
[   +1 ms] [  +72 ms] executing: [C:\Users\adnan\flutter/] git -c log.showSignature=false log -n 1
--pretty=format:%H
[        ] [  +76 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] [        ] f4abaa0735eba4dfd8f33f73363911d63931fe03
[        ] [        ] executing: [C:\Users\adnan\flutter/] git tag --points-at
f4abaa0735eba4dfd8f33f73363911d63931fe03
[        ] [  +46 ms] Exit code 0 from: git tag --points-at f4abaa0735eba4dfd8f33f73363911d63931fe03
[        ] [        ] 2.2.3
[        ] [   +6 ms] executing: [C:\Users\adnan\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[        ] [  +34 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] [        ] origin/stable
[        ] [        ] executing: [C:\Users\adnan\flutter/] git ls-remote --get-url origin
[        ] [  +31 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] [        ] https://github.com/flutter/flutter.git
[        ] [  +55 ms] executing: [C:\Users\adnan\flutter/] git rev-parse --abbrev-ref HEAD
[        ] [  +32 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] [        ] stable
[        ] [  +50 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.       
[   +1 ms] [        ] 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.
[   +1 ms] [        ] 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.
[        ] [ +105 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[   +1 ms] [   +1 ms] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[   +1 ms] [   +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.
[        ] [        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] [        ] 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.
[   +1 ms] [        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[   +1 ms] [        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[   +2 ms] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] [        ] 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.
[        ] [        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[        ] [  +35 ms] Initializing file store
[        ] [  +20 ms] Skipping target: gen_localizations
[        ] [   +7 ms] kernel_snapshot: Starting due to {}
[   +1 ms] [  +12 ms] C:\Users\adnan\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev
C:\Users\adnan\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root
C:\Users\adnan\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter
--no-print-incremental-dependencies -DFLUTTER_WEB_AUTO_DETECT=true -Ddart.vm.profile=false -Ddart.vm.product=false 
--enable-asserts --track-widget-creation --no-link-platform --packages
C:\Users\adnan\bug\.dart_tool\package_config.json --output-dill
C:\Users\adnan\bug\.dart_tool\flutter_build\8de401047fed185c7bc1890f1df56ad0\app.dill --depfile
C:\Users\adnan\bug\.dart_tool\flutter_build\8de401047fed185c7bc1890f1df56ad0\kernel_snapshot.d
package:bug/main.dart
[   +3 ms] [+9960 ms] kernel_snapshot: Complete
[        ] [ +479 ms] debug_android_application: Starting due to {}
[        ] [ +145 ms] debug_android_application: Complete
[        ] [ +553 ms] Persisting file store
[        ] [   +9 ms] Done persisting file store
[        ] [   +7 ms] build succeeded.
[        ] [  +14 ms] "flutter assemble" took 11,368ms.
[        ] [ +128 ms] ensureAnalyticsSent: 124ms
[        ] [   +2 ms] Running shutdown hooks
[        ] [        ] Shutdown hooks complete
[        ] [        ] exiting with code 0
[        ] > Task :app:packLibsflutterBuildDebug UP-TO-DATE
[        ] > Task :app:preBuild UP-TO-DATE
[        ] > Task :app:preDebugBuild UP-TO-DATE
[        ] > Task :app:compileDebugAidl NO-SOURCE
[        ] > Task :app:compileDebugRenderscript NO-SOURCE
[        ] > Task :app:generateDebugBuildConfig UP-TO-DATE
[        ] > Task :app:checkDebugAarMetadata UP-TO-DATE
[        ] > Task :app:cleanMergeDebugAssets
[   +2 ms] > Task :app:mergeDebugShaders UP-TO-DATE
[        ] > Task :app:compileDebugShaders NO-SOURCE
[   +1 ms] > Task :app:generateDebugAssets UP-TO-DATE
[        ] > Task :app:mergeDebugAssets
[ +219 ms] > Task :app:copyFlutterAssetsDebug
[   +1 ms] > Task :app:generateDebugResValues UP-TO-DATE
[   +1 ms] > Task :app:generateDebugResources UP-TO-DATE
[        ] > Task :app:mergeDebugResources UP-TO-DATE
[        ] > Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
[        ] > Task :app:extractDeepLinksDebug UP-TO-DATE
[        ] > Task :app:processDebugMainManifest UP-TO-DATE
[   +1 ms] > Task :app:processDebugManifest UP-TO-DATE
[        ] > Task :app:processDebugManifestForPackage UP-TO-DATE
[  +87 ms] > Task :app:processDebugResources UP-TO-DATE
[   +3 ms] > Task :app:compileDebugKotlin UP-TO-DATE
[   +2 ms] > Task :app:javaPreCompileDebug UP-TO-DATE
[        ] > Task :app:compileDebugJavaWithJavac UP-TO-DATE
[        ] > Task :app:compileDebugSources UP-TO-DATE
[        ] > Task :app:mergeDebugNativeDebugMetadata NO-SOURCE
[   +1 ms] > Task :app:processDebugJavaRes NO-SOURCE
[   +2 ms] > Task :app:mergeDebugJavaResource UP-TO-DATE
[   +6 ms] > Task :app:checkDebugDuplicateClasses UP-TO-DATE
[  +73 ms] > Task :app:dexBuilderDebug UP-TO-DATE
[   +1 ms] > Task :app:desugarDebugFileDependencies UP-TO-DATE
[        ] > Task :app:mergeExtDexDebug UP-TO-DATE
[        ] > Task :app:mergeDexDebug UP-TO-DATE
[   +2 ms] > Task :app:mergeDebugJniLibFolders UP-TO-DATE
[        ] > Task :app:mergeDebugNativeLibs UP-TO-DATE
[        ] > Task :app:stripDebugDebugSymbols UP-TO-DATE
[   +1 ms] > Task :app:validateSigningDebug UP-TO-DATE
[ +603 ms] > Task :app:compressDebugAssets
[+1198 ms] > Task :app:packageDebug
[ +190 ms] > Task :app:assembleDebug
[  +23 ms] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
[        ] Use '--warning-mode all' to show the individual deprecation warnings.
[        ] See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
[        ] BUILD SUCCESSFUL in 3h 55m 3s
[        ] 32 actionable tasks: 7 executed, 25 up-to-date
[ +575 ms] Running Gradle task 'assembleDebug'... (completed in 17.4s)
[ +161 ms] calculateSha: LocalDirectory: 'C:\Users\adnan\bug\build\app\outputs\flutter-apk'/app.apk
[ +590 ms] √  Built build\app\outputs\flutter-apk\app-debug.apk.
[  +68 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree
C:\Users\adnan\bug\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[  +39 ms] Exit code 0 from: C:\Users\adnan\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree
C:\Users\adnan\bug\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
[   +1 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)="1.0.0" (Raw: "1.0.0")
               A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
               A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
               A: package="com.example.bug" (Raw: "com.example.bug")
               A: platformBuildVersionCode=(type 0x10)0x1e
               A: platformBuildVersionName=(type 0x10)0xb
               E: uses-sdk (line=7)
                 A: android:minSdkVersion(0x0101020c)=(type 0x10)0x13
                 A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
               E: uses-permission (line=14)
                 A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")    
               E: application (line=16)
                 A: android:label(0x01010001)="bug" (Raw: "bug")
                 A: android:icon(0x01010002)=@0x7f080000
                 A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
                 A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw:
                 "androidx.core.app.CoreComponentFactory")
                 E: activity (line=21)
                   A: android:theme(0x01010000)=@0x7f0a0000
                   A: android:name(0x01010003)="com.example.bug.MainActivity" (Raw: "com.example.bug.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=35)
                     A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw:
                     "io.flutter.embedding.android.NormalTheme")
                     A: android:resource(0x01010025)=@0x7f0a0001
                   E: meta-data (line=45)
                     A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw:
                     "io.flutter.embedding.android.SplashScreenDrawable")
                     A: android:resource(0x01010025)=@0x7f040000
                   E: intent-filter (line=49)
                     E: action (line=50)
                       A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")                     E: category (line=52)
                       A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw:
                       "android.intent.category.LAUNCHER")
                 E: meta-data (line=59)
                   A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
                   A: android:value(0x01010024)=(type 0x10)0x2
[   +8 ms] Stopping app 'app.apk' on sdk gphone x86.
[   +1 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell am    
force-stop com.example.bug
[  +75 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell pm
list packages com.example.bug
[  +70 ms] package:com.example.bug
[   +2 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell cat
/data/local/tmp/sky.com.example.bug.sha1
[  +44 ms] 4cc611024f3af10dd402ca290b8f8b2854ab1b14
[   +1 ms] Installing APK.
[   +1 ms] Installing build\app\outputs\flutter-apk\app.apk...
[        ] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 install -t  
-r C:\Users\adnan\bug\build\app\outputs\flutter-apk\app.apk
[+1179 ms] Performing Streamed Install
                    Success
[   +2 ms] Installing build\app\outputs\flutter-apk\app.apk... (completed in 1,180ms)
[   +1 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell echo  
-n 6db27baf6d4a72604f22094db101ca4267eba722 > /data/local/tmp/sky.com.example.bug.sha1
[  +58 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 shell -x
logcat -v time -t 1
[  +86 ms] --------- beginning of main
           09-06 15:46:19.024 D/Zygote  (  287): Forked child process 17488
[  +12 ms] executing: C:\Users\adnan\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-profilingtrue --ez enable-checked-mode true --ez verify-entry-points true com.example.bug/com.example.bug.MainActivity      
[ +132 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.bug/.MainActivity (has
extras) }
[   +1 ms] Waiting for observatory port to be available...
[+2925 ms] Observatory URL on device: http://127.0.0.1:36639/DBL0mpIPc-8=/
[   +2 ms] executing: C:\Users\adnan\AppData\Local\Android\sdk\platform-tools\adb.exe -s emulator-5554 forward
tcp:0 tcp:36639
[  +31 ms] 50166
[        ] Forwarded host port 50166 to device port 36639 for Observatory
[   +7 ms] Caching compiled dill
[  +37 ms] Connecting to service protocol: http://127.0.0.1:50166/DBL0mpIPc-8=/
[ +649 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0, connecting to VM service at
http://127.0.0.1:50166/DBL0mpIPc-8=/.
[ +311 ms] DDS is listening at http://127.0.0.1:50174/0OkoBv-wM1Y=/.
[  +65 ms] Successfully connected to service protocol: http://127.0.0.1:50166/DBL0mpIPc-8=/
[  +25 ms] DevFS: Creating new filesystem on the device (null)
[ +111 ms] DevFS: Created new filesystem on the device
(file:///data/user/0/com.example.bug/code_cache/adnLJGHNP/bug/)
[   +3 ms] Updating assets
[  +70 ms] Syncing files to device sdk gphone x86...
[   +2 ms] <- reset
[        ] Compiling dart to kernel with 0 updated files
[   +2 ms] <- recompile package:bug/main.dart b7d8c605-e25c-4a9e-9f85-f17c437277c1
[        ] <- b7d8c605-e25c-4a9e-9f85-f17c437277c1
[ +106 ms] Updating files.
[        ] DevFS: Sync finished
[   +1 ms] Syncing files to device sdk gphone x86... (completed in 113ms)
[   +1 ms] Synced 0.0MB.
[   +1 ms] <- accept
[  +15 ms] Connected to _flutterView/0xf3588820.
[   +2 ms] Flutter run key commands.
[   +1 ms] r Hot reload. 
[        ] R Hot restart.
[        ] h Repeat this help message.
[        ] d Detach (terminate "flutter run" but leave application running).
[        ] c Clear the screen
[        ] q Quit (terminate the application on the device).
[        ] Running with unsound null safety
[        ] For more information see https://dart.dev/null-safety/unsound-null-safety
[   +1 ms] An Observatory debugger and profiler on sdk gphone x86 is available at:
http://127.0.0.1:50174/0OkoBv-wM1Y=/
[ +280 ms] Activating Dart DevTools...
[+4918 ms] Activating Dart DevTools... (completed in 4.9s)
[ +693 ms] The Flutter DevTools debugger and profiler on sdk gphone x86 is available at:
                    http://127.0.0.1:9102?uri=http%3A%2F%2F127.0.0.1%3A50174%2F0OkoBv-wM1Y%3D%2F
[+23896 ms] 
                     ══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY
╞═══════════════════════════════════════════════════════════
                     The following assertion was thrown building ListTile-[<'hero'>](dirty):
                     No Material widget found.
                     ListTile widgets require a Material widget ancestor.
                     In material design, most widgets are conceptually "printed" on a sheet of material. In        
Flutter's
                     material library, that material is represented by the Material widget. It is the Material     
widget
                     that renders ink splashes, for instance. Because of this, many material library widgets       
require that
                     there be a Material widget in the tree above them.
                     To introduce a Material widget, you can either directly include one, or use a widget that     
contains
                     Material itself, such as a Card, Dialog, Drawer, or Scaffold.
                     The specific widget that could not find a Material ancestor was:
                       ListTile-[<'hero'>]
                     The ancestors of this widget were:
                       ...
                       Opacity
                       RepaintBoundary
                       IgnorePointer
                       Positioned
                       AnimatedBuilder
                       ...

                     The relevant error-causing widget was:
                       ListTile-[<'hero'>] file:///C:/Users/adnan/bug/lib/main.dart:56:14

                     When the exception was thrown, this was the stack:
                     #0      debugCheckHasMaterial.<anonymous closure>
(package:flutter/src/material/debug.dart:27:7)
                     #1      debugCheckHasMaterial (package:flutter/src/material/debug.dart:48:4)
                     #2      ListTile.build (package:flutter/src/material/list_tile.dart:1100:12)
                     #3      StatelessElement.build (package:flutter/src/widgets/framework.dart:4648:28)
                     #4      ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4574:15)  
                     #5      Element.rebuild (package:flutter/src/widgets/framework.dart:4267:5)
                     #6      ComponentElement._firstBuild (package:flutter/src/widgets/framework.dart:4553:5)      
                     #7      ComponentElement.mount (package:flutter/src/widgets/framework.dart:4548:5)
                     ...     Normal element mounting (44 frames)
                     #51     Element.inflateWidget (package:flutter/src/widgets/framework.dart:3611:14)
                     #52     MultiChildRenderObjectElement.inflateWidget
(package:flutter/src/widgets/framework.dart:6221:36)
                     #53     Element.updateChild (package:flutter/src/widgets/framework.dart:3363:18)
                     #54     RenderObjectElement.updateChildren
(package:flutter/src/widgets/framework.dart:5654:32)
                     #55     MultiChildRenderObjectElement.update
(package:flutter/src/widgets/framework.dart:6243:17)
                     #56     Element.updateChild (package:flutter/src/widgets/framework.dart:3350:15)
                     #57     ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4599:16)  
                     #58     StatefulElement.performRebuild (package:flutter/src/widgets/framework.dart:4746:11)   
                     #59     Element.rebuild (package:flutter/src/widgets/framework.dart:4267:5)
                     #60     BuildOwner.buildScope (package:flutter/src/widgets/framework.dart:2582:33)
                     #61     WidgetsBinding.drawFrame (package:flutter/src/widgets/binding.dart:875:21)
                     #62     RendererBinding._handlePersistentFrameCallback
(package:flutter/src/rendering/binding.dart:328:5)
                     #63     SchedulerBinding._invokeFrameCallback
(package:flutter/src/scheduler/binding.dart:1144:15)
                     #64     SchedulerBinding.handleDrawFrame (package:flutter/src/scheduler/binding.dart:1082:9)  
                     #65     SchedulerBinding._handleDrawFrame (package:flutter/src/scheduler/binding.dart:998:5)  
                     #69     _invoke (dart:ui/hooks.dart:163:10)
                     #70     PlatformDispatcher._drawFrame (dart:ui/platform_dispatcher.dart:259:5)
                     #71     _drawFrame (dart:ui/hooks.dart:126:31)
                     (elided 3 frames from dart:async)


════════════════════════════════════════════════════════════════════════════════════════════════════
[+1197 ms]
                    Another exception was thrown: No Material widget found.
[+1091 ms]
                    Another exception was thrown: No Material widget found.
Analyzing bug...                                                        
No issues found! (ran in 4.1s)

[√] Flutter (Channel stable, 2.2.3, on Microsoft Windows [Version 10.0.19041.1165], locale en-US)
    • Flutter version 2.2.3 at C:\Users\adnan\flutter
    • Framework revision f4abaa0735 (10 weeks ago), 2021-07-01 12:46:11 -0700
    • Engine revision 241c87ad80
    • Dart version 2.13.4
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.3) 
    • Android SDK at C:\Users\adnan\AppData\Local\Android\sdk
    • Platform android-30, build-tools 30.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.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[√] Android Studio (version 4.1.0)
    • Android Studio at C:\Program Files\Android\Android Studio
    • 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-b01)

[√] VS Code (version 1.60.0)
    • VS Code at C:\Users\adnan\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.26.0

[√] Connected device (3 available)
    • sdk gphone x86 (mobile) • emulator-5554 • android-x86    • Android 11 (API 30) (emulator)
    • Chrome (web)            • chrome        • web-javascript • Google Chrome 93.0.4577.63
    • Edge (web)              • edge          • web-javascript • Microsoft Edge 93.0.961.38

• No issues found!

Metadata

Metadata

Assignees

Labels

a: animationAnimation APIsf: material designflutter/packages/flutter/material repository.f: routesNavigator, Router, and related APIs.frameworkflutter/packages/flutter repository. See also f: labels.r: fixedIssue is closed as already fixed in a newer version

Type

No type

Projects

Status

Done (PR merged)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions