flutter_tex 1.0.9

Flutter TeX #

A Flutter Package to render so many types of equations based on LaTeX, most commonly used are as followings:

  • Mathematics / Maths Equations (Algebra, Calculus, Geometry, Geometry etc...)

  • Physics Equations

  • Signal Processing Equations

  • Chemistry Equations

  • Statistics / Stats Equations

  • It also includes full HTML with JavaScript support.

Rendering of equations depends on mini-mathjax a simplified version of MathJax a JavaScript library.

This package mainly depends on webview_flutter plugin.

Only Tested on Android not on iOS because I don't own a Mac.

Use this package as a library in your flutter Application #

1: Add this to your package's pubspec.yaml file:

dependencies:
  flutter_tex: ^1.0.9

2: You can install packages from the command line:

$ flutter packages get

Alternatively, your editor might support flutter packages get. Check the docs for your editor to learn more.

3: Now in your Dart code, you can use:

import 'package:flutter_tex/flutter_tex.dart';

4: Make sure to add this line android:usesCleartextTraffic="true" in your <project-directory>/android/app/src/main/AndroidManifest.xml under application like this.

<application
       android:usesCleartextTraffic="true">
</application>

For iOS add following code in your <project-directory>/ios/Runner/Info.plist


<key>NSAppTransportSecurity</key>
  
  <dict>
    <key>NSAllowsArbitraryLoads</key> <true/>
  </dict>

<key>io.flutter.embedded_views_preview</key> <true/> 

Example #

Complete working application Example

Screenshots #

FlutterTeXMathsFlutterTeXMaths

Tweet Flutter_TeX

Change Logs #

[1.0.9]

  • Fonts size issue resolved.

[1.0.8]

  • Now you can refresh TeXView with new data on setState().

[1.0.5]

  • Performance improvements

[1.0.4]

  • Optimised performance by removing server.

[1.0.3]

  • TeXView can be used in ListView for multiple time on same page.

[1.0.2]

onRenderFinished callback added with calculated height of WebView.

[1.0.1]

onPageFinished callback added.

[1.0.0]

Stable Release

example/README.md

flutter_tex_example #

Complete working application Example

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  flutter_tex: ^1.0.9

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:flutter_tex/flutter_tex.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
76
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
88
Learn more about scoring.

We analyzed this package on Aug 21, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.4.0
  • pana: 0.12.19
  • Flutter: 1.7.8+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0-dev.68.0 <3.0.0
flutter 0.0.0
mime ^0.9.6+2 0.9.6+3
webview_flutter ^0.3.9+1 0.3.13
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.6 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test