Closed
Description
https://codelabs.developers.google.com/codelabs/flutter/index.html?index=..%2F..index#6
Step 7 (animate) of friendly chat
When following the steps to add animations, this error is thrown:
Performing hot reload...
Syncing files to device Android SDK built for x86...
════════ Exception caught by widgets library ═══════════════════════════════════════════════════════
The following assertion was thrown building ChatMessage(dirty):
'package:flutter/src/animation/animations.dart': Failed assertion: line 376 pos 15: 'parent != null': is not true.
The relevant error-causing widget was:
ChatMessage file:///Users/ptruiz/Documents/code/friendly_chat/lib/main.dart:90:31
When the exception was thrown, this was the stack:
#2 new CurvedAnimation (package:flutter/src/animation/animations.dart:376:15)
#3 ChatMessage.build (package:friendly_chat/main.dart:122:25)
#4 StatelessElement.build (package:flutter/src/widgets/framework.dart:4397:28)
#5 ComponentElement.performRebuild (package:flutter/src/widgets/framework.dart:4329:15)
#6 Element.rebuild (package:flutter/src/widgets/framework.dart:4053:5)
...
════════════════════════════════════════════════════════════════════════════════════════════════════
Reloaded 1 of 483 libraries in 453ms.
The screen then looks like this:
I found the completed code example on GitHub for the code lab, so just copied the contents from there into main.dart in my project, but it causes the same issue.