-
-
Notifications
You must be signed in to change notification settings - Fork 134
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
TextOverflowWidget的align:TextOverflowAlign.left属性没有效果 #108
Labels
enhancement
New feature or request
Comments
as design |
有办法让TextOverflowWidget紧挨着文字显示么? |
你看看官方的...怎么显示的 |
|
https://medium.com/@VasyaFromRussia/expanding-text-in-flutter-92736226ace5 |
如果 3333 后面还有一行,比如后面是回车,那么全文跟在 3333 后面,是不是就有点误导用户了? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如题:期望能显示在最后的文字旁边,即333的旁边
class BackgroundTextDemo extends StatelessWidget {
@OverRide
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('nick background for text'),
),
body: SingleChildScrollView(
child: Container(
color: Colors.green,
width: 400,
padding: const EdgeInsets.all(20.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ExtendedText.rich(
TextSpan(
text:
'11111111111111111111111111111111\n',
),
TextSpan(
text:
'222222212222222222222222222222222222222\n',
),
TextSpan(
text:
'3333\n',
),
TextSpan(
text:
'444444\n',
),
]),
maxLines: 3,
overflow: TextOverflow.visible,
overflowWidget: TextOverflowWidget(
align:TextOverflowAlign.left,
position: TextOverflowPosition.end,
debugOverflowRectColor: Colors.red.withOpacity(0.1),
child: Row(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment:MainAxisAlignment.end,
children: const [
Text(
'...',
),
Text(
'全文',
style: TextStyle(
height: 1,
fontSize: 16,
color: Colors.amber),
),
],
),
),
),
],
)),
),
);
}
}
The text was updated successfully, but these errors were encountered: