Skip to content

🐛 Bug Report: Row.fromMap works incorrect if there is a column named "data" #281

@ugurcany

Description

@ugurcany

👟 Reproduction steps

  • Have a table with a column name "data" & type "String"
  • Use getRow from tables_db api (v20.2.2) on the table
  • Row.fromMap function tries to map data with the following code: data: map["data"] ?? map
  • That line throws the following error: TypeError: ... type 'String' is not a subtype of type 'Map<String, dynamic>'

👍 Expected behavior

In Row.fromMap function, the data should be mapped simply as follows:

data: map

👎 Actual Behavior

data mapping line throws the following error: TypeError: ... type 'String' is not a subtype of type 'Map<String, dynamic>'

🎲 Appwrite version

Version 2.0.x

💻 Operating system

MacOS

🧱 Your Environment

Flutter v3.32.0 & Appwrite cloud

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions