layout-demo-flutter
layout-demo-flutter copied to clipboard
Hero page error
Hi Andrea,
I don't know what that actually means. I click on all the icons and everything works fine except for the Hero Icon when it suddenly crushes giving an assertion error.
Exception caught by widgets library ═══════════════════════════════════
'package:flutter/src/widgets/framework.dart': Failed assertion: line 4377 pos 14: 'owner!._debugCurrentBuildTarget == this': is not true.
The relevant error-causing widget was
MainPage
this should fix it:
diff --git a/lib/pages/hero_page.dart b/lib/pages/hero_page.dart
index 0c7639f..8b568a8 100644
--- a/lib/pages/hero_page.dart
+++ b/lib/pages/hero_page.dart
@@ -3,7 +3,7 @@ import 'package:layout_demo_flutter/layout_type.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/foundation.dart';
-class HeroHeader implements SliverPersistentHeaderDelegate {
+class HeroHeader extends SliverPersistentHeaderDelegate {
HeroHeader({
Hi! Thank you but it didn't work either like this...still crushing ^^''
hmm, i did a 'flutter pub upgrade' in the project's folder, ending up with several package upgrades and am also running the latest flutter:
sdks:
- dart: ">=2.8.0 <3.0.0"
+ dart: ">=2.12.0-0.0 <3.0.0"
the hero page works for me.
Should be fixed after #16.