Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

Add Underline Text in Flutter

Widget build(BuildContext context) 
    return Scaffold(
      appBar: AppBar(
        title: const Text("Text Underline"),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.spaceAround,
          children: const [
            Text("Hello World"),
            Text(
              "Hello World",
              style: TextStyle(
                decoration: TextDecoration.underline,
              ),
            ),
            Text.rich(
              TextSpan(
                text: 'Hello ',
                style: TextStyle(fontSize: 50),
                children: <textspan>[
                  TextSpan(
                      text: 'world',
                      style: TextStyle(
                        decoration: TextDecoration.underline,
                      )),
                ],
              ),
            ),
            Text(
              'Hello world',
              style: TextStyle(
                decoration: TextDecoration.underline,
                decorationStyle: TextDecorationStyle.dashed,
              ),
            ),
            Text(
              'Hello world',
              style: TextStyle(
                decoration: TextDecoration.underline,
                decorationStyle: TextDecorationStyle.dotted,
              ),
            ),
            Text(
              'Hello world',
              style: TextStyle(
                decoration: TextDecoration.underline,
                decorationStyle: TextDecorationStyle.double,
              ),
            ),
            Text(
              'Hello world',
              style: TextStyle(
                decoration: TextDecoration.underline,
                decorationStyle: TextDecorationStyle.wavy,
              ),
            ),
          ],
        ),
      ),
    );
  }
Source by www.linkedin.com #
 
PREVIOUS NEXT
Tagged: #Add #Underline #Text #Flutter
ADD COMMENT
Topic
Name
6+1 =