Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feature] Add trailing option #7

Closed
wcoder opened this issue May 13, 2021 · 1 comment
Closed

[feature] Add trailing option #7

wcoder opened this issue May 13, 2021 · 1 comment

Comments

@wcoder
Copy link

wcoder commented May 13, 2021

Add leading/trailing options to RichText.

Use case:

  • Display required string should display with an asterisk, example: Name*

Solution:

Add:

		
final TextSpan trailing;

// ...

		if (trailing != null) {
          children.add(trailing);
        }

		// end
        return Text.rich(TextSpan(children: children));

Usage:

RichText(
  text: 'Name',
  trailing: TextSpan(
  	text: '*',
  	//style: can be red color
  ),
),
@remoteportal
Copy link
Owner

released in version 2.0.47 (2021-05-22)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants