Skip to content

I GOT ERROR The following assertion was thrown building: type 'String' is not a subtype of type 'int' of 'index' #56206

@toure5013

Description

@toure5013

Widget tacheUser(devoirs) {
print(devoirs);
Color color = Color(devoirs["color"] ?? 0xFF42A5F5);

return Row(
  mainAxisAlignment: MainAxisAlignment.spaceBetween,
  children: <Widget>[
    //SizedBox(width: 20,),
    //L'HEURE ICI
    ClipRRect(
      borderRadius: BorderRadius.circular(80.0),
      child: Text(
        "_debut",
        maxLines: 1,
        style: TextStyle(
            fontSize: 20.0, color: Colors.orange[100], letterSpacing: 5),
      ),
    ),
    ClipRRect(
      borderRadius: BorderRadius.circular(80.0),
      child: Padding(
        padding: const EdgeInsets.symmetric(vertical: 15.0),
        child: tacheInfo(devoirs["title"], devoirs["description"], color),
      ),
    ),
    ClipRRect(
      borderRadius: BorderRadius.circular(80.0),
      child: Text(
        "_fin",
        maxLines: 1,
        style: TextStyle(
            fontSize: 20.0, color: Colors.red[200], letterSpacing: 5),
      ),
    ),
  ],
);

}
}

Steps to Reproduce

  1. Run flutter create bug.
  2. Update the files as follows: ...
  3. ...

Expected results:

Actual results:

Logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions