Skip to content

Conversation

@TahaTesser
Copy link
Member

fixes #94042

Before After
import 'package:flutter/material.dart';

void main() => runApp(const MyApp());

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    const TextStyle textStyle =
        TextStyle(fontSize: 12.0, color: Color(0xff00ff00));

    return const MaterialApp(
      home: SelectableText.rich(
        TextSpan(
          text: 'Abcd',
          style: textStyle,
        ),
      ),
    );
  }
}

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Apr 14, 2022
@HansMuller HansMuller requested a review from justinmc April 15, 2022 21:52
Copy link
Contributor

@justinmc justinmc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks! 👍

@TahaTesser TahaTesser force-pushed the fix_selectable_span_style branch from aba8add to caf3159 Compare June 8, 2022 07:32
@TahaTesser
Copy link
Member Author

Google testing failed. Please contact a Google developer to investigate.

Trying again.

@TahaTesser TahaTesser force-pushed the fix_selectable_span_style branch 2 times, most recently from 1410dd8 to 3cabf7f Compare June 9, 2022 13:57
@TahaTesser
Copy link
Member Author

cc: @HansMuller

Another PR with failed Google testing, similar to the MaterialStateProperty.lerp PR.
Rebased this couple of times, I'm unable to find the cause.

@TahaTesser TahaTesser force-pushed the fix_selectable_span_style branch from 3cabf7f to deeda49 Compare June 14, 2022 14:02
@TahaTesser TahaTesser force-pushed the fix_selectable_span_style branch from deeda49 to d9bc9f6 Compare July 6, 2022 07:18
@justinmc
Copy link
Contributor

justinmc commented Jul 6, 2022

It looks like this broke a few Scubas by changing line height or something like that. Some text has moved vertically by <20px. It looks acceptable to me, so I'm setting the Google tests to passing and merging this.

Sorry for the delay @TahaTesser!

@justinmc justinmc merged commit 680a7bc into flutter:master Jul 6, 2022
@TahaTesser TahaTesser deleted the fix_selectable_span_style branch July 6, 2022 20:24
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Jul 7, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Jul 7, 2022
camsim99 pushed a commit to camsim99/flutter that referenced this pull request Aug 10, 2022
…ext style (flutter#101911)

Properly merges the TextSpan.style of SelectableText.rich.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 30, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/plugins that referenced this pull request Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: text input Entering text in a text field or keyboard related problems f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SelectableText.rich doesn't correctly apply the TextStyle in the TextSpan

2 participants