Skip to content

lotrofans/latex-flutter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

latex

Simply perfom following steps

Import it

import 'package:latex/latex.dart';

Load the Widget async

  Widget latexWidget;

  void loadWidget() async{
    if(latexWidget == null){
      latexWidget = await Latex.getLaTeXWidget("x = \\frac{-b \\pm \\sqrt{b^2-4ac}}{2a}");
      setState(() {
        
      });
    }
  }

  @override
  Widget build(BuildContext context) {
    loadWidget();
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: latexWidget == null? CupertinoActivityIndicator() : latexWidget

        ),
      ),
    );
  }

important hint

This plugin uses the following libraries. Special thanks to the developers:

iOS: https://github.com/kostub/iosMath Android: https://github.com/noties/jlatexmath-android

About

Show a LaTeX-Widget in Flutter

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published