Description
Hello I have a problem with the table line is not visible please help here is my code
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_html/html_parser.dart';
import 'package:flutter_html/style.dart';
void main() => runApp(new MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@OverRide
Widget build(BuildContext context) {
return new MaterialApp(
title: 'Flutter Demo',
theme: new ThemeData(
primarySwatch: Colors.deepPurple,
),
home: new MyHomePage(title: 'flutter_html Example'),
);
}
}
class MyHomePage extends StatefulWidget {
MyHomePage({Key key, this.title}) : super(key: key);
final String title;
@OverRide
_MyHomePageState createState() => new _MyHomePageState();
}
const htmlData = """
“AGRODRIP” корхонаси ишлаб чиқараётган маҳсулотлар
Маҳсулот номи |
Ўлчов бирлиги |
Нархи,
|
""";
class _MyHomePageState extends State {
@OverRide
Widget build(BuildContext context) {
return new Scaffold(
appBar: AppBar(
title: Text('flutter_html Example'),
centerTitle: true,
),
body: SingleChildScrollView(
child: Html(
data: htmlData,
//Optional parameters:
style: {
"html": Style(
backgroundColor: Colors.black12,
// color: Colors.white,
),
// "h1": Style(
// textAlign: TextAlign.center,
// ),
"table": Style(
backgroundColor: Color.fromARGB(0x50, 0xee, 0xee, 0xee),
),
"tr": Style(
border: Border(bottom: BorderSide(color: Colors.grey)),
),
"th": Style(
padding: EdgeInsets.all(6),
backgroundColor: Colors.grey,
),
""
"td": Style(
padding: EdgeInsets.all(6),
),
"var": Style(fontFamily: 'serif'),
},
// customRender: {
// "flutter": (RenderContext context, Widget child, attributes, _) {
// return FlutterLogo(
// style: (attributes['horizontal'] != null)
// ? FlutterLogoStyle.horizontal
// : FlutterLogoStyle.markOnly,
// textColor: context.style.color,
// size: context.style.fontSize.size * 5,
// );
// },
// },
onLinkTap: (url) {
print("Opening $url...");
},
onImageTap: (src) {
print(src);
},
onImageError: (exception, stackTrace) {
print(exception);
},
),
),
);
}
}