flutter_linkify icon indicating copy to clipboard operation
flutter_linkify copied to clipboard

Linkify Long Text with multiples links Overrlapping

Open michael-chiu opened this issue 3 years ago • 2 comments

Long text with multiple links in ScrollView overlapping. iOS Version: 15.1 (iPhone X). Does anyone have the same issue? Any help would be appreciated, thank you.

IMG_4097

Flutter Doctor:

Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 2.5.3, on macOS 11.4 20F71 darwin-x64, locale en-HK) [!] Android toolchain - develop for Android devices (Android SDK version 30.0.2) ✗ cmdline-tools component is missing Run path/to/sdkmanager --install "cmdline-tools;latest" See https://developer.android.com/studio/command-line for more details. ✗ Android license status unknown. Run flutter doctor --android-licenses to accept the SDK licenses. See https://flutter.dev/docs/get-started/install/macos#android-setup for more details. [✓] Xcode - develop for iOS and macOS [✓] Chrome - develop for the web [✓] Android Studio (version 2020.3) [✓] IntelliJ IDEA Ultimate Edition (version 2019.2.4) [✓] Connected device (2 available)

Sample Code to reproduce the issue:

class SplashScreen extends StatelessWidget {

  const SplashScreen({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {

    final widgets = <Widget>[
      Linkify(
        onOpen: (link) {},
        text: 'ABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n\nABCDEFG\$7580\n\nABCDEFG\n\$7580\nhttps://bit.ly/39R8Bj6\n',
        style: const TextStyle(fontSize: 18, color: Colors.black87),
        linkStyle: const TextStyle(color: Colors.blue),
      ),
    ];

    return Scaffold(
      backgroundColor: Colors.white,
      body: SingleChildScrollView(
        child: Padding(
          padding: const EdgeInsets.all(12.0),
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: widgets,),
        )
      )
    );
  }
}

michael-chiu avatar Nov 22 '21 09:11 michael-chiu

Tested if style is not specified in LInkify, there is no overlapping in text.

michael-chiu avatar Nov 22 '21 12:11 michael-chiu

same issue

madara134 avatar Jan 13 '22 04:01 madara134