chemical_structural_formula_viewer 0.0.1 copy "chemical_structural_formula_viewer: ^0.0.1" to clipboard
chemical_structural_formula_viewer: ^0.0.1 copied to clipboard

Chemical Structure Viewer for flutter.

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.

UI Image

Getting started #

Just add the package to your pubspec.yaml file:

dependencies:
  chemical_structure_formula_viewer: ^0.0.1

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),
        );
    }
}
0
likes
120
pub points
0%
popularity

Publisher

unverified uploader

Chemical Structure Viewer for flutter.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

flutter, vector_math, xml

More

Packages that depend on chemical_structural_formula_viewer