1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Flutter] converting string to map in dart

Discussão em 'Mobile' iniciado por Stack, Outubro 7, 2024 às 10:32.

  1. Stack

    Stack Membro Participativo

    I wanted to convert a string to map.

    String value = "{first_name : fname,last_name : lname,gender : male, location : { state : state, country : country, place : place} }"


    into

    Map = {
    first_name : fname,
    last_name : lname,
    gender : male,
    location = {
    state : state,
    country : country,
    place : place
    }
    }


    How do I convert the string into a map<String, dynamic> where the value consists of string, int, object, and boolean?

    I wanted to save the string to a file and obtain the data from the file.

    Continue reading...

Compartilhe esta Página