Skip to content

Codelab Friendly Chat: Step 7 is broken #3684

Closed
@PaulTR

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:

Screen Shot 2020-02-10 at 9 43 23 AM

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.

Metadata

Assignees

No one assigned

    Labels

    a.tut.codelab-googleRelates to codelabs hosted on codelabs.developers.google.come2-daysEffort: < 5 daysp2-mediumNecessary but not urgent concern. Resolve when possible.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions