Open aitsuki opened 1 week ago
What is your HtmlWidget
configuration? How did you set the nowrap
styling?
What is your
HtmlWidget
configuration? How did you set thenowrap
styling?
Please look at the second URL http//:www.example.com
, the colon appears after the slash, ant it works.
import 'package:flutter/material.dart';
import 'package:flutter_widget_from_html_core/flutter_widget_from_html_core.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({super.key});
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: const MyHomePage(),
);
}
}
class MyHomePage extends StatelessWidget {
const MyHomePage({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text("Html Widget Smaple")),
body: const Padding(
padding: EdgeInsets.all(16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"This is plain text. This is plain text. This is plain text. This is plain text. "),
HtmlWidget(
'''white-space:nowrap not work: <a href="#" style="white-space:nowrap">https://www.example.com</a>'''),
HtmlWidget(
'''white-space:nowrap xxx work: <a href="#" style="white-space:nowrap">https//:www.example.com</a>'''),
],
),
),
);
}
}
white-space: nowrap
not work on mobile if node content is URL, for example:flutter_widget_from_html_core: 0.15.2 flutter sdk version: 3.24.4
_Originally posted by @aitsuki in https://github.com/daohoangson/flutter_widget_from_html/issues/944#issuecomment-2465434072_