flutter_tex 1.0.3 copy "flutter_tex: ^1.0.3" to clipboard
flutter_tex: ^1.0.3 copied to clipboard

outdated

A Flutter Package to render Mathematics / Maths, Physics and Chemistry, Statistics / Stats Equations based on LaTeX with full HTML and JavaScript support.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_tex/flutter_tex.dart';

import 'teXHTML.dart';

main() async {
  runApp(FlutterTeX());
}

class FlutterTeX extends StatefulWidget {
  @override
  _FlutterTeXState createState() => _FlutterTeXState();
}

class _FlutterTeXState extends State<FlutterTeX> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: Text("Flutter TeX Example"),
          actions: <Widget>[
            IconButton(
                icon: Icon(Icons.refresh),
                onPressed: () {
                  setState(() {});
                })
          ],
        ),

        body: ListView(
          children: <Widget>[


            TeXView(
              // any random unique index (0-9) is mandatory if you are using multiple TeXView in a List view on same page.
            index: 0,
              teXHTML: teXHTML,
              onRenderFinished: (height) {
                print("Height is : $height");
              },
              onPageFinished: (string){
                print("Page Loading finished");

              },
            ),
            TeXView(
              // any random unique index (0-9) is mandatory if you are using multiple TeXView in a List view on a same page.
              index: 1,
              teXHTML: teXHTML,
            ),            TeXView(
              // any random unique index (0-9) is mandatory if you are using multiple TeXView in a List view on a same page.
              index: 2,
              teXHTML: teXHTML,
            )
          ],
        ),
      ),
    );
  }
}
276
likes
0
pub points
96%
popularity

Publisher

verified publishershahxad.com

A Flutter Package to render Mathematics / Maths, Physics and Chemistry, Statistics / Stats Equations based on LaTeX with full HTML and JavaScript support.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, mime, webview_flutter

More

Packages that depend on flutter_tex