Skip to content
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

table line not showing #339

Closed
TMuhammed opened this issue Jun 26, 2020 · 0 comments
Closed

table line not showing #339

TMuhammed opened this issue Jun 26, 2020 · 0 comments

Comments

@TMuhammed
Copy link

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”  корхонаси ишлаб чиқараётган маҳсулотлар

 

Маҳсулот номи

Ўлчов бирлиги

Нархи,

		<p style="margin-left:0cm; margin-right:0cm; text-align:center"><span style="font-size:11pt"><span style="font-family:Calibri,sans-serif"><span style="font-size:14.0pt">сўм</span></span></span></p>
		</td>
	</tr>
</thead>

""";

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);
},
),
),
);
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant