0 purchases
chemical structural formula viewer
chemical_structure_formula_viewer #
A flutter package to display chemical structure formulas.
Features #
It supports CDXML, CML.
Now, it's not beautiful, just a simple display.
Getting started #
Just add the package to your pubspec.yaml file:
dependencies:
chemical_structure_formula_viewer: ^0.0.1
copied to clipboard
Then run flutter pub get to install the package.
Usage #
class StructureViewer extends StatelessWidget {
StructurePage? page;
void load() {
var xml = '';// load your xml here
page = parseCml(xml);
// or
// page = parseCdxml(xml);
setState(() {});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text('Chemical Structural Formula Viewer'),
),
body: StructureViewer(
page: page,
),
floatingActionButton: FloatingActionButton(onPressed: load),
);
}
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.