Skip to content

🚨 Can't assign animations to GridView elements, FlutterFlow throws exception #802

@HeikoKanzler

Description

@HeikoKanzler

Has your issue been reported?

  • I have searched the existing issues and confirm it has not been reported.
  • I give permission for members of the FlutterFlow team to access and test my project for the sole purpose of investigating this issue.

Current Behavior

I have a dynamic GridView with nine elements, where each element contains a stack with two containers.

On click on the container, I want to animate (flip) the containers to swap them (like the FlippableCards, but controlled from an action, as we can't reset / animate the FlippableCards from actions)

But as soon as I add a simple animation to one of the containers inside the GridView widget, the code crashes:

The following assertion was thrown building Expanded(flex: 1):
An adapter was assigned twice.
'package:flutter_animate/src/adapters/adapter.dart':
Failed assertion: line 53 pos 12: '_controller == null'

Any ideas on how to mitigate this?

Expected Behavior

I should be able to add animations to GridView elements.

Steps to Reproduce

  1. Create a List of any data type, e.g. String
  2. Add some elements
  3. Create page
  4. Add GridWidget
  5. Generate Dynamic Childred, choose the created list
  6. Add a container to the Grid
  7. Add any animation to the container
  8. Test: the GridView is not rendering, throwing error messages in the console.

Reproducible from Blank

  • The steps to reproduce above start from a blank project.

Bug Report Code (Required)

IT4sz/Hqx89PvsdG1ZDuc8dB/WYWNVt8RL8ascp8RQEYGIjJP4kQPPXsUxZCUsfiYFFLe0SmmXIC08LRjvOTUMcpPTOWQJhTzZNqSAnMYGK5e5OBO7WoPHZCL9xMIXag0MKRoSNAHPtaSC093XGINt+sVgPXJ72xIndISq/LZO4=

Context

I want to add animations to a simple board game.

Visual documentation

CleanShot 2023-04-22 at 11 47 24

Additional Info

No response

Environment

Affects all versions of web and desktop

Metadata

Metadata

Labels

type: bugSomething isn't working.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions