jimbeeer
jimbeeer

Reputation: 1695

Append to String or var in 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.

Upvotes: 4

Views: 2821

Answers (1)

julemand101
julemand101

Reputation: 31219

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?

Upvotes: 7

Related Questions