mre_fields 0.1.0
mre_fields: ^0.1.0 copied to clipboard
Form fields for Flutter: text that follows the language typed (RTL and LTR), clear button, suggestions and image paste. Themeable and localizable.
Changelog #
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[Unreleased] #
0.1.0 - 2026-10-01 #
Added #
MREFieldsThemetheme extension: field border radius, content padding (compact and expanded), window-size breakpoints, andMREWindowSizeclassification. Works without registration throughMREFieldsTheme.defaults.MREFieldsStrings: one immutable set of user-visible texts with English defaults, so every field text can be localized.- Text direction:
detectTextDirectionanddetectStrongTextDirection(first word with a letter decides, constant cost),StringgetterstextDirection,isRtl,directionOr,autoTextAlign, theMREAutoTextwidget (everyTextparameter, plusautoAlign; alsoMREAutoText.rich),Text.autoDirection()andText.autoAlign(),Widget.withTextDirection, andsafeDisplayTextfor unpaired surrogates. MRETextField: a form text field with live direction, clear button, select on focus, suggestions, and the parameters ofTextFormField. Radius and padding come from the parameter, thenMREFieldsTheme, then yourInputDecorationTheme.MRESuggestionBar,mreFilterSuggestions,MREFieldClearButtonandMRESafeTextEditingController, usable without the field.- Image paste for
MRETextFieldthroughimagePaste:MRENoImagePaste(default),MREImageCallbackPasteandMREImageAttachmentPaste, with limits, rejection reasons, andonImagePasted/onImagesChanged. Images arrive through the paste shortcut (desktop), the browserpasteevent (web), the selection menu and the Android keyboard. MREAttachmentStrip(thumbnails with open, remove and replace),MREImageViewer,MREAttachmentsController,MREImagePasteScopefor any text field,MREClipboardImageReader, andmreSniffImageMimeType.- New
MREFieldsStringstexts:pasteImageLabelandattachedImageLabel. - Depends on
pasteboardto read images from the clipboard, and onwebfor the browser paste event. - An example app for every platform (
example/), with a page for each feature, a light and dark switch, an English and Arabic switch, and a live radius slider. @MREPreview()annotation to preview any widget in light, dark, right to left, large text, narrow and wide layouts.