You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.12.13+hotfix.7, on Mac OS X 10.15.3 19D76, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.3.1)
[✓] Android Studio (version 3.5)
[!] IntelliJ IDEA Ultimate Edition (version 2019.3.1)
✗ Flutter plugin not installed; this adds Flutter specific functionality.
✗ Dart plugin not installed; this adds Dart specific functionality.
[✓] Connected device (2 available)
Code:
/// The message contents/// First message data: 'short message'/// Second message data: 'message include images, line 1'/// '<img src="http://via.placeholder.com/350x350/d89cf6">'/// '<div>line 2</div>'/// '<img src="http://via.placeholder.com/350x350/d89cf6">'/// Third message data: 'multiple lines<br/>line 1\nline 2'final screen =MediaQuery.of(context).size;
Container(
padding:EdgeInsets.only(left:5, right:5, top:8, bottom:8),
constraints:BoxConstraints(maxWidth: screen.width *0.6),
decoration:BoxDecoration(
color:Color.blue,
),
child:Html(
imageProperties:ImageProperties(
width:200,
fit:BoxFit.fitWidth,
),
data: message.message,
useRichText:true,
shrinkToFit:true,
defaultTextStyle:TextStyle(color:Colors.white),
renderNewlines:true,
customTextAlign: (e) =>TextAlign.left,
),
);
The first issue:
When the 'useRichText' and 'shrinkToFit' properties both set true,
The "line 2" is centered even if I set customTextAlign: (e) => TextAlign.left
How to set the column(belongs to the HtmlRichTextParser) crossAxisAlignment to CrossAxisAlignment.start?
The second issue:
When I set the 'useRichText' property to false, the 'line 2' was align to left, well done.
But the multiple line bubble was filled with max width.
It looks like the 'shrinkToFit' property is invalid.
The text was updated successfully, but these errors were encountered:
flutter_html version: 0.11.1
flutter doctor:
Code:
The first issue:
When the 'useRichText' and 'shrinkToFit' properties both set true,
The "line 2" is centered even if I set
customTextAlign: (e) => TextAlign.left
How to set the column(belongs to the HtmlRichTextParser) crossAxisAlignment to CrossAxisAlignment.start?
The second issue:
When I set the 'useRichText' property to false, the 'line 2' was align to left, well done.
But the multiple line bubble was filled with max width.
It looks like the 'shrinkToFit' property is invalid.
The text was updated successfully, but these errors were encountered: