Hello friends, As we all know $ Dollar sign is so much important because its a currency sign. If we are making a application for U.S then there are Dollar currency is used. So we have to write all the items prices in $ format. So in flutter we cannot write $ Dollar sing directly it does not work that way. To write Dollar $ sign in flutter application we have to write it with Backslash like \$ then it will print on the screen. So in this tutorial we would learn about Example of Write $ Dollar Sign in Text in Flutter.
Contents in this project Example of Write $ Dollar Sign in Text in Flutter :-
Complete source code for main.dart file :-
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { String tempData = 'Write \$ Sign in Flutter App - 9.99\$ Only'; @override Widget build(BuildContext context) { return MaterialApp( home: Scaffold( body: SafeArea( child: Center( child: Text( tempData, style: const TextStyle(fontSize: 28), textAlign: TextAlign.center, ), ))), ); } } |
Screenshot :-
Also Read:
Join Merge Combine Two List in Flutter Dart
List of All Assignment Operators in Dart Flutter with Example
Example of Get Remote HTTP Image Width Height in Flutter
Flutter Dart Create Function With Default Optional Arguments Example Tutorial
Flutter Solve A splash screen was provided to Flutter, but this is deprecated Error