Flutter テキストの下線を破線にするサンプル

環境
Windows11 pro 64bit
Flutter 3.3.7

構文
decorationStyle: TextDecorationStyle.dashed,
Textの下線を破線にするには、TextStyleの引数「decorationStyle」を使います。

使用例

Plain text
Copy to clipboard
Open code in new window
EnlighterJS 3 Syntax Highlighter
Text(
'Study Flutter Test1234',
style: TextStyle(
decoration: TextDecoration.underline,
decorationStyle: TextDecorationStyle.dashed,
),
),
Text( 'Study Flutter Test1234', style: TextStyle( decoration: TextDecoration.underline, decorationStyle: TextDecorationStyle.dashed, ), ),
Text(
  'Study Flutter Test1234',
  style: TextStyle(
    decoration: TextDecoration.underline,
    decorationStyle: TextDecorationStyle.dashed,
  ),
),

 

Flutter

Posted by arkgame