Open PRQAE opened 1 year ago
hi, thank you for the plugin.
can you add classes, like to use conditions for the classes, ex:
import 'dart:io'; import 'package:htmltopdfwidgets/htmltopdfwidgets.dart';
void main() { createDocument(); }
boolean signedin = true; const htmlText = '''<p style=" signedin == true "green;" ? "red;" "> status
createDocument() async { var filePath = 'example.pdf'; var file = File(filePath); final newpdf = Document(); List widgets = await HTMLToPdf().convert(htmlText); newpdf.addPage(MultiPage( maxPages: 200, build: (context) { return widgets; })); await file.writeAsBytes(await newpdf.save()); }
@PRQAE sure i will work on that and will implement that feature if you have time and you can implement that feature and submit a pr
@alihassan143 You implement CSS class in this plugin
hi, thank you for the plugin.
can you add classes, like to use conditions for the classes, ex:
import 'dart:io'; import 'package:htmltopdfwidgets/htmltopdfwidgets.dart';
void main() { createDocument(); }
boolean signedin = true; const htmlText = '''<p style=" signedin == true "green;" ? "red;" "> status
"''';createDocument() async { var filePath = 'example.pdf'; var file = File(filePath); final newpdf = Document(); List widgets = await HTMLToPdf().convert(htmlText);
newpdf.addPage(MultiPage(
maxPages: 200,
build: (context) {
return widgets;
}));
await file.writeAsBytes(await newpdf.save());
}