Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Append to String or var in Dart

Tags:

dart

When I want to append to a string or var in PHP I use:

value = "this one";
value .= " and that one";

How do I do this in Dart? I can't find the correct documentation to tell me this.

I'm literally just after knowing the correct operator.

like image 942
jimbeeer Avatar asked Oct 27 '25 07:10

jimbeeer


1 Answers

Well, there are multiple ways to do that. If you want code which looks like PHP you can do this:

var value = "this one";
value += " and that one";

Else, you can use some of the recommendations from: How to concatenate two string in Dart?

like image 135
julemand101 Avatar answered Oct 28 '25 23:10

julemand101