Flutter - How To Convert A String into a double/int (Dart Type Conversions)

Поделиться
HTML-код
  • Опубликовано: 20 окт 2024

Комментарии • 12

  • @teriyakiboyz9797
    @teriyakiboyz9797 2 года назад

    you save my life Broo..

  • @Roman10-6
    @Roman10-6 11 месяцев назад

    thank you,
    really usefull.

  • @raomuhammadusama9244
    @raomuhammadusama9244 2 года назад

    Thanks man. good job

  • @thazeroword646
    @thazeroword646 2 года назад

    Very nice useful video

  • @francescotagliavento8081
    @francescotagliavento8081 2 года назад

    are you going to make some tutorial (weather app etc.)?

    • @FlutterMentor
      @FlutterMentor  2 года назад +1

      Yeah I'll try to get that done in 2022

  • @gamingarcade2059
    @gamingarcade2059 2 года назад

    How can I convert any data type to string in flutter?

    • @FlutterMentor
      @FlutterMentor  2 года назад +1

      just add .toString() at the end of it

    • @gamingarcade2059
      @gamingarcade2059 2 года назад

      @@FlutterMentor Thanks for your response really appreciate it

  • @PCOPedro
    @PCOPedro Год назад

    tryParse didn´t work, only Parse did

  • @messiisthebest
    @messiisthebest Год назад

    Exception has occurred.
    FormatException (FormatException: Invalid double
    )

  • @أنشطةومهارات
    @أنشطةومهارات 2 года назад

    please need to under stand why using to int in this function
    class MyFunctions {
    static String convertNumber(String number, String lang) {
    print("*" * 50);
    print(number);
    String res = "";
    final arabicsNum = ['٠', '١', '٢', '٣', '٤', '٥', '٦', '٧', '٨', '٩'];
    if (lang == "ar") {
    number.split("").forEach((element) {
    print(element);//String number
    if (element == ".") {
    res += ".";
    } else {
    res += arabicsNum[int.parse(element).toInt()];
    }
    });
    } else {
    res = number;
    }
    return res;
    }