dartrosa_flutter 0.2.1 copy "dartrosa_flutter: ^0.2.1" to clipboard
dartrosa_flutter: ^0.2.1 copied to clipboard

Flutter renderer for DartRosa: shows ODK XForms as Material widgets, in a Collect-like pager or a single scrolling page.

0.2.1 #

  • Read-only text and number questions with a value (a calculation, a default) show the value as text in place of the field, as ODK Collect does (new ReadOnlyAnswer); a read-only text was treated as a note and showed only its label. Notes (read-only text without a value) stay label only; read-only numbers without a value show —; secrets stay masked.
  • Scroll mode creates the instances of jr:count repeats (on start and whenever a count goes up), as the pager does when it moves into them; it showed none and an add button. jr:count and jr:noAddRemove repeats never show the add button. New XFormController.createCountedRepeatInstances().
  • Blocked Next and failed Finalize show the whole question in error (label, hint, field and error) before focusing it; the focused text field used to stop the scrolling with the label above the screen.

0.2.0 #

  • Adaptive layout by window size class (new XFormWindowSize): full width on phones; from 600dp a centered column, now capped by default at XFormTheme.defaultMaxContentWidth (720dp) when maxContentWidth is null (double.infinity fills the width).
  • Form outline (groups, questions, answered / required / error state, current screen) to jump to any question: a side panel from 840dp, a bottom sheet elsewhere. New XFormView.outline (XFormOutlineMode.adaptive, onRequest, none), public XFormViewState with showOutline(), hideOutline(), jumpTo(FormIndex) and isOutlinePanelVisible; XFormTheme.outlinePanelWidth.
  • Pager bottom bar: progress bar and position ("3 of 12", opening the outline), Back disabled on the first screen, Next with a trailing chevron, 48dp buttons on phones, icon buttons when labels don't fit; the end page sums up the answers.
  • Keyboard: Page Down / Page Up and Alt+arrows move between pager screens, Enter in a one-line field moves to the next field or screen, Tab follows form order also for controls built later (image maps, lazy lists); image-map areas are focusable and selected with Enter / Space; rank questions get move up / down buttons.
  • Errors: blocked Next and failed Finalize scroll to and focus the first question in error (a failed Finalize shows its whole field-list screen); text fields in error get a red outline; messages have an error icon.
  • Desktop and web: visible scroll bars, selectable text (SelectionArea), time picker in input mode.
  • Material 3 look: filled group cards (no shadow) unless the app's CardTheme or XFormTheme says otherwise, nested groups as sections, hints in bodyMedium / onSurfaceVariant, table-list row dividers, short choices in columns on wide forms (XFormTheme.adaptiveChoiceColumns).
  • Removing a repeat instance asks for confirmation.
  • Non-Gregorian date dialog: the month gets its own line on narrow screens with large text, and the content scrolls.
  • XFormController.formChanges: notified on every change, for form-wide summaries.
  • Allows xml 7.x (was 6.x only).
  • Docs: an illustrated widget catalog (docs/widgets/ in the repository) with a page per control family (XLSForm and XForm for every appearance, states, keyboard and accessibility notes, the XFormDelegates each needs, theming), 137 screenshots and 8 GIFs rendered by widget tests from purpose-built forms (test/screenshots/); a pub.flutter-io.cn screenshot gallery and a visual tour in the README.

0.1.0 #

  • Initial release: Flutter renderer for DartRosa.
  • XFormView in pager (Collect-like) and scroll modes, widgets for every ODK control type and the Collect appearances listed in the README.
  • Platform features through XFormDelegates; widgetOverrides, XFormTheme, XFormLocalizations, accessibility and RTL support.
  • Image-map areas are selectable by screen readers (SvgImageMap.areaBounds); the minimal dropdown is named after its question.
  • Answer rows move their buttons below the answer when the row doesn't fit (narrow screens, large text); pager pages scroll.
  • Error text uses XFormTheme.errorColor everywhere.
  • Non-Gregorian date dialog: day and year spinners sized to their values, so the year isn't cut off on phones.
  • XFormTheme.maxContentWidth (default null, full width): caps the form's content and centers it on wide screens, in pager and scroll modes.
  • Answering a question rebuilds only that question and the nodes whose relevance, read-only or required state it changes (previously every visible question rebuilt on any relevance or constraint check); scroll mode keeps the other questions when one is shown or hidden.
  • Image maps reuse the highlighted SVG while the selection is unchanged.
  • Tests run with Flutter's leak tracker; the example app disposes its workspace.
0
likes
160
points
407
downloads
screenshot

Documentation

API reference

Publisher

verified publishersudhi.in

Weekly Downloads

Flutter renderer for DartRosa: shows ODK XForms as Material widgets, in a Collect-like pager or a single scrolling page.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#odk #xforms #form #data-collection #widget

License

Apache-2.0 (license)

Dependencies

dartrosa, dartrosa_calendars, dartrosa_external_data, flutter, flutter_svg, intl, path_parsing, xml

More

Packages that depend on dartrosa_flutter