Reputation: 108
I'll give a very simple example of my problem:
int myNumber = 1;
Text(
"This is my number: ($myNumber)",
),
Expected behaviour from Text:
This is my number: (1)
But I get:
This is my number: ①
What causes this and what's the best way to avoid it?
Upvotes: 2
Views: 259
Reputation: 1
Disabling contextual alternatives via the text style worked for my use case:
int myNumber = 1;
Text("This is my number ($myNumber)",
style: TextStyle(
fontFeatures: [
// Disable contextual alternatives (1) => ①
const FontFeature.disable('calt'),
],
),
),
Upvotes: 0
Reputation: 2786
int myNumber = 1;
Text(
"This is my number: ($myNumber)",
),
its working fine check your code .
output
Upvotes: 0
Reputation: 2117
You should remove '( )' wrapped over myNumber
check this,
int myNumber = 1;
Text(
"This is my number: $myNumber",
),
Upvotes: 2