easy_latex 1.0.2 copy "easy_latex: ^1.0.2" to clipboard
easy_latex: ^1.0.2 copied to clipboard

This plugin enables dynamic LaTeX rendering of complex math expressions.

example/lib/main.dart

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

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
          appBarTheme: const AppBarTheme(color: Colors.white),
          scaffoldBackgroundColor: Colors.white),
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Easy Latex'),
        ),
        body: Column(
          children: [
            Container(),
            const Latex(
                r'x_{1,2} = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a} \\ \pi = 3.14159... '),
            LText(
                r'This is **bold text**, this is *italic text*, this is `code`. '
                r'The value of \(\pi\) is \(3.14159...\) and the value of \(\sqrt{2}\) is '
                r'\(1.41421...\)'),
          ],
        ),
      ),
    );
  }
}
1
likes
140
points
40
downloads

Publisher

verified publishermiranda.works

Weekly Downloads

This plugin enables dynamic LaTeX rendering of complex math expressions.

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, intl

More

Packages that depend on easy_latex