Repository navigation
Tags
Tags
Make the decimal separator configurable (#92) * Make the decimal separator configurable The decimal separator was derived from the ambient locale with no way to override it, so an app that lets users choose between `.` and `,` had to override the whole `Localizations` locale to get one. Add a `DecimalSeparator` enum, settable on `MathKeyboardTheme` or as an argument to `MathField`, `MathFormField` and `MathKeyboard`. It resolves argument > theme > locale, matching how `style` and `semantics` already resolve. Defaults to `null`, which keeps the locale-based behaviour. The separator now also applies to the TeX reported by `onChanged` and `onSubmitted`, so rendering the reported value shows the same number the field shows, and to the screen reader's announcement of the field value, which previously said "1 . 5" while the key announced ",". `TeXParser` reads every `DecimalSeparator`, grouped (`1{,}5`) or plain, deriving the grammar from the enum so that emitting and parsing cannot drift apart. Fields in a dot locale report exactly what they reported before. Also fixes `decimalSeparator(BuildContext)` throwing an `ArgumentError` for locales intl does not know, instead of falling back to `.` as it documented. It becomes `DecimalSeparator.of`. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Address review: keep MathFormField's value in one format `didChangeDependencies` does not run when only the `decimalSeparator` argument changes, so the form value kept the old format while the child `MathField` already used the new one. Resolve in one place and call it from `didUpdateWidget` too. `_handleControllerChanged` compared the canonical value against the form value, which now carries the separator. For a comma field that comparison was always unequal, defeating the guard's purpose and notifying `Form.onChanged` with the canonical value before the field reported the localized one. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Announce numbers as numbers to screen readers The accessible value joined every leaf with a space, so "1.5" reached the screen reader as "1 , 5". At a default punctuation verbosity a lone separator is dropped and space separated digits are spelled out one by one, which is why it was heard as "1 5" (and "23" as "2 3"). Coalesce a run of adjacent numeric leaves into a single token instead, so the value carries "1,5" and "23". Inside a number the separator stays a glyph on purpose: the speech engine's own number formatting then reads it correctly and in the right language. A cursor sitting inside a number does not break the run. Standing on its own the separator needs a word, because punctuation embedded in a sentence is dropped: `tokenMappings` now maps `.` to "point" so the cursor announcement says "before point" rather than just "before". It is localized through the same seam as the rest of MathKeyboardSemantics. The decimal key keeps the bare glyph, which a screen reader names in the user's own language. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * ci: redeploy the web demo when the package changes The demo depends on math_keyboard by path, so the deployed page is built from the package sources, but the workflow only triggered on changes under math_keyboard_demo/ and on the package's pubspec. Changes to the package itself therefore never reached the live demo. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * Ignore the demo's ephemeral iOS build output flutter pub get regenerates ios/Flutter/ephemeral/ (the generated SwiftPM package and the LLDB helpers) on every run, and the demo's .gitignore was missing the rule for it. It is otherwise identical to the example's, which already has it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fixes --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Clean Flutter 3.0.x warnings (#33) * Clean Flutter 3.0.x warnings * Update url_launcher calls. * Replace retired dev flutter channel with master on checks.
Update flutter_math_fork (#30) * update packages * changelog * update flutter-action workflow in checks.yml * clean up imports * remove unnecessary import
Implicit times between parentheses (#28) * add times between closing and opening parenthesis * bump version * insert times * changelog
Added symbols icon and fraction key to second page (#26)
PreviousNext