Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

96
Views
how to convert the double qoute to backtick

I'm trying to create a message string with a dynamic variable.

var name="venkat";
var message ="hello ${name}"

but this does not works, so i use backtick to achieve this

var name="venkat";
var message =`hello ${name}`

My question is there is any way to covert "" => ``

about 4 years ago · Juan Pablo Isaza
2 answers
Answer question

0

When not accessing object properties, you should simply use the dollar sign, without the brackets:

String name = "venkat";
String message = "Hello $name";

For accessing an object property:

Person newPerson = Person(name: "venkat");
String message = "Hello ${newPerson.name}";

Or do you have other reasons why you want to programmatically swap double quotes for backticks?


https://dart-lang.github.io/linter/lints/unnecessary_string_interpolations.html

String interpolation

about 4 years ago · Juan Pablo Isaza Report

0

Try escape \ will works.

var message ="\`hello ${name}\`"
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!