Skip to content
pubscout

math_keyboard

0.4.0, released 2 months ago by simpleclub.com

Math expression editing with an on-screen software keyboard or physical keyboard input in Flutter.

WASM-ready
$ flutter pub add math_keyboard
Source repository

What it does

Provides a typeset input field and custom integrated math keyboard for editing mathematical expressions in Flutter without relying on plugins or web views. It supports converting between TeX and math expressions, custom themes, and accessibility features.

AI-written summary of version 0.4.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need users to input mathematical expressions, formulas, or numbers within a Flutter app.
  • You require a custom on-screen math keyboard alongside physical keyboard support.
  • You want form field support or integration with standard InputDecoration.

Skip it when

  • You only need standard text inputs without advanced mathematical typesetting or symbols.

Strengths

  • Fully integrated software keyboard for math without web views or plugins.
  • Supports both expression and number-only modes with custom variables.
  • Comprehensive accessibility features, localizable strings, and theme configuration.
  • Built-in TeX conversion utilities for math expressions.

Weaknesses

  • Physical keyboard input on mobile can cause unexpected behavior due to existing Flutter issues.
  • Requires specific Flutter/Dart SDK versions.

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
7
import 'package:flutter/material.dart';
import 'package:math_keyboard/math_keyboard.dart';

Widget build(BuildContext context) {
  return MathField(
    keyboardType: MathKeyboardType.expression,
    variables: const ['x', 'y', 'z'],
    decoration: const InputDecoration(),
    onChanged: (String value) {},
    onSubmitted: (String value) {},
    autofocus: true,
  );
}

Alternatives

Packages that do the same job and could replace math_keyboard.

Works with

Packages commonly used together with math_keyboard: ones it builds on, ones built on it, and its own family.