I want to create a icon from a text like currency symbol. Currency symbols are not available in material icons and i don't want to use any third party library. I want to convert the text string like '$' to Icons and use them.
CodePudding user response:
As per your requirement try below code hope its help to you:
Using \
character
Text(
'\$ Search',
),
Using Flutter Unicode character. You found Unicode character
You can add any Symbol in between text
Wrap(
crossAxisAlignment: WrapCrossAlignment.center,
children: [
Text('Your'),
Icon(Icons.add),
Text('Icon'),
],
),
Or in VS Code you can used Windows .
keys and add any symbol on your need
CodePudding user response:
Please try this one. 0024 is Unicode for $
Icon( IconData(0x0024, fontFamily: 'MaterialIcons'),size: 50, ))