Answers for "dart concatenate string and variable"

0

dart concat string and int

void main() {
  int num = 5;
  print("The number is $num");
}
Posted by: Guest on May-27-2021
0

concatenate in flutter

In dart there are many string options.

For concatenation, you can do :

    'hello $myVariable'
    "hello ${myVariable.myProperty}"
    'hello ' 'world' (only works with string literals)
    'hello' + myVariable

So in your case, you can do a print(" $str1 $str2")
Posted by: Guest on January-09-2021

Code answers related to "dart concatenate string and variable"

Code answers related to "Dart"

Browse Popular Code Answers by Language