Skip to content

Set different color or thickness for linethrough and underline #171565

@taosimple

Description

@taosimple

Use case

Text(
  'Hello World !!!',
  style: TextStyle(
    decoration: TextDecoration.combine([
      TextDecoration.lineThrough,
      TextDecoration.underline,
    ]),
    decorationColor: Colors.red,
    decorationStyle: TextDecorationStyle.dashed,
    decorationThickness: 2,
  ),
)

Set linethrough, underline at same time, can only set one color or thickness.

Proposal

    Text(
      'Hello World !!!',
      style: TextStyle(
        decoration: TextDecoration.combine([
          TextDecoration(
            type: TextDecoration.underline,
            decorationColor: Colors.red,
            decorationStyle: TextDecorationStyle.dashed,
            decorationThickness: 2,    
          ),
          TextDecoration(
            type: TextDecoration.lineThrough,
            decorationColor: Colors.green,
            decorationStyle: TextDecorationStyle.solid,
            decorationThickness: 1,
          ),
        ]),
      ),
    );

May change like this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilityc: proposalA detailed proposal for a change to Flutterframeworkflutter/packages/flutter repository. See also f: labels.fyi-text-inputFor the attention of Text Input teamteam-frameworkOwned by Framework teamtriaged-frameworkTriaged by Framework team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy