Skip to content

[BUG] type '_Map<String, dynamic>' is not a subtype of type 'String?' in type cast #43

@weldonsouza

Description

@weldonsouza

ℹ️ Info

Flutter (Channel stable, 3.24.3, on macOS 14.7 23H124 darwin-arm64, locale pt-BR)

Version: figma2flutter: ^0.3.0-alpha

💬 Description

After executing the command this error occurs figma2flutter --input ./tokens --output ./lib/tokens/

Loading $metadata, $themes and design token files from ./tokens

Unhandled exception:
type '_Map<String, dynamic>' is not a subtype of type 'String?' in type cast
#0 TokenParser.findTokens (package:figma2flutter/token_parser.dart:106:59)
#1 TokenParser.findTokens (package:figma2flutter/token_parser.dart:106:11)
#2 TokenParser.parse (package:figma2flutter/token_parser.dart:41:22)
#3 _parseInputJson (file:///Users/weldonsouza/.pub-cache/hosted/pub.dev/figma2flutter-0.3.0-alpha/bin/figma2flutter.dart:165:49)
#4 _parseFromFileSet (file:///Users/weldonsouza/.pub-cache/hosted/pub.dev/figma2flutter-0.3.0-alpha/bin/figma2flutter.dart:144:18)
#5 main (file:///Users/weldonsouza/.pub-cache/hosted/pub.dev/figma2flutter-0.3.0-alpha/bin/figma2flutter.dart:83:16)

**Enter a description of your problem here.

Any logs, error and assets you have that can help to find this bug.

$metadata.json
$themes.json

📜 tokens file you tried to import

It may be that a certain way of exporting or new options are not supported. When providing a json file we can hunt down problems more quickly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions