搜尋套件、儲存庫與 APP 分類

math_keyboard 封面
套件詳情v0.4.0

math_keyboard

在 Flutter 中使用螢幕軟體鍵盤或實體鍵盤輸入,在排版輸入欄位中編輯數學表達式。

AndroidiOSWebmacOSWindowsLinux
近 30 天下載
1.1萬
喜歡數
148
Pub 分數
140

安裝套件

flutter pub add math_keyboard

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

math_keyboard 套件透過螢幕軟體鍵盤或實體鍵盤,讓 Flutter 應用程式中的數學表達式輸入更直覺。它支援排版呈現,確保輸入欄位內的數學符號清晰且視覺上準確。專為教育與科學應用設計,可在多個平台無縫整合至 Flutter 的 UI 架構中。該套件能處理複雜的表示式並正確格式化,非常適合互動式學習工具與數學導向介面。

適用情境

  • 數學教育應用
  • 科學計算器
  • 互動式問題求解器
  • 在線數學輔導平台
  • 基於表單的數學輸入表單

主要特色

  • 排版數學表達式渲染
  • 螢幕與實體鍵盤支援
  • 跨平台相容性
  • 即時表達式編輯
  • 可自訂的鍵盤佈局

適合對象

  • 教育類應用開發者
  • STEM學習工具創作者
  • 專注於數學的表單輸入
  • Flutter 開發者建構互動式數學介面

使用建議

  • 需要仔細處理表達式解析
  • 可能需要對複雜表達式進行額外驗證
  • 僅限數學特定輸入模式
  • 不適用於一般文字輸入
  • 性能取決於表達式的複雜性

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

math_keyboard logo

math_keyboard Flutter web demo math_keyboard on Pub

math_keyboard is a Flutter package that allows editing math expressions using a typeset input field (so-called "math field") and a custom-made fully integrated math keyboard in Flutter only - no plugins, no web views.

About math_keyboard

The math_keyboard package provides a widget that behaves like a Flutter TextField with the same full integration, i.e. focus tree support, input decoration support, and both an on-screen software keyboard as well as physical keyboard input support. On top of that, the math field typesetting uses TeX and the package supports converting to math expressions (that e.g. can be used for calculation).

math_keyboard is an open source project with the aim of providing a way to edit math expression providing the best user experience in terms of input and UI as well as allowing accurate evaluation of the mathematical expressions entered by the user. This is used by the simpleclub app, hence, the association. It is also maintained by simpleclub (see the LICENSE file).

Features & usage

See the package README for features and usage information.

You can also try the demo app or view the package on Pub → math_keyboard Flutter web demo math_keyboard on Pub

Implementation

In the following, some high-level information regarding the implementation of the package is described. This is useful in case you are curious or intend to contribute.

For information on implementing math_keyboard into your own app, please see the package README.

Math expressions

Notice how the math_keyboard package includes a major feature that allows working with the input expressions in a mathematical matter, i.e. by converting them into "math expressions" (this is how we refer to the format in the context of this project).

We achieve this by essentially working with two formats:

  • The typeset display format, powered by TeX (see below).
  • A data format, i.e. math expressions.

This "data format" depends on the math_expressions package. Handling the expressions in this format allows you to e.g. evaluate the expressions.

TeX typesetting

Both the math field content, i.e. the expressions typed by the user, as well as some symbols on the keyboard itself are typeset using TeX. For TeX typesetting in Flutter, we created our own proof of concept renderer in early 2020, called CaTeX. This project is on-hold for now and in the meantime, we collaborated on the flutter_math package that aims to achieve something similar.
Due to lack of maintenance on that repo, we are currently using our forked version, flutter_math_fork. Note that our ultimate goal is fully integrating the math_keyboard package with the catex package, which would give us maximum control over the rendering of the typeset math.

Contributing

Our mission with open source repositories like math_keyboard in particular is creating an ecosystem of science and education related packages for Flutter, allowing users on all platforms to use the optimal tools for learning.

This is also why we want to share and collaborate on this software as a way to give back to the community. Any contributions are more than welcome!

See our contributing guide for more information.

Missing features

You might notice that some features that you would expect from the math_keyboard package are missing or something is not working as expected. In that case, please file an issue.

In general, we can of course never fully solve every use case, however, especially in this case we are aware of a few shortcomings. For example the customization options of the keyboard are currently limited because this has simply not yet been a requirement in our internal usage. In that case, please consider contributing pull requests to this repo in order to allow as many use cases to be covered as possible :) Please refer to the contributing guide for that.

Repo structure

The math_keyboard repository is divided into multiple packages. These packages are the following:

Package Content
math_keyboard Main package implementation
math_keyboard_demo Demo app

Num++ inspiration

During the research phase of this project, we came across the Num++ app, which served as an inspiration for the math expression parsing part of the package.
The main difference between that app and this package (apart from one being a calculator app and the other being a generalized usable package) is the fact that Num++ uses a web view and MathQuill for editing the expression while we built the input field and editing ourselves.

所屬分類

依賴

依賴清單 6 項

原始碼儲存庫

使用此套件的專案

暫無相關資料。