Skip to content

Installation ​

The Form Kit ships as four packages. Add the ones you need: a server or tool that only reads and checks definitions needs vyuh_form_types alone; an app that fills forms adds vyuh_form_kit; an app that designs them adds vyuh_form_kit_editor; and an app that scans barcodes or picks files and photos adds vyuh_form_kit_capture.

Requirements ​

  • Dart SDK 3.13 or higher
  • Flutter 3.47 or higher (for vyuh_form_kit, vyuh_form_kit_editor and vyuh_form_kit_capture)
  • A token for pub.vyuh.tech

Add the dependencies ​

The Form Kit packages are hosted on pub.vyuh.tech, at the version of Blueprint:

yaml
dependencies:
  vyuh_form_types:
    hosted: https://pub.vyuh.tech
    version: ^0.20.0
  vyuh_form_kit:
    hosted: https://pub.vyuh.tech
    version: ^0.20.0
  vyuh_form_kit_editor:
    hosted: https://pub.vyuh.tech
    version: ^0.20.0
  vyuh_form_kit_capture:
    hosted: https://pub.vyuh.tech
    version: ^0.20.0

Then run flutter pub get (or dart pub get for vyuh_form_types alone).

Packages ​

PackagePurposeDepends on
vyuh_form_typesThe model and engines, pure Dartvyuh_expression
vyuh_form_kitFormView and field controlsvyuh_form_types, vyuh_cdx_ui
vyuh_form_kit_editorFormKitEditor and its controllervyuh_form_kit, vyuh_form_types, vyuh_expression_ui, vyuh_cdx_ui
vyuh_form_kit_captureThe camera barcode scanner and the file, gallery and camera attachment picker, behind FormView's hooks. See Host servicesvyuh_form_kit, mobile_scanner, file_picker, image_picker, crypto

No code generation and no feature registration are needed.

Formula fields ​

A FormulaFormField names its result type with ValueType (rational, boolean, text, date, time, instant), and a decimal number is a Rational. vyuh_form_types re-exports both, with LocalDate and LocalTime, so declaring formula fields in code needs no other package.

Imports ​

dart
// Model only (pure Dart).
import 'package:vyuh_form_types/vyuh_form_types.dart';

// Fill time. Re-exports vyuh_form_types.
import 'package:vyuh_form_kit/vyuh_form_kit.dart';

// Design time.
import 'package:vyuh_form_kit_editor/vyuh_form_kit_editor.dart';

Name clash with Flutter

vyuh_form_types defines TextFormField, which the Material library (material_ui) also defines. Hide Material's when you import both:

dart
import 'package:material_ui/material_ui.dart' hide TextFormField;

Theme ​

The controls draw with vyuh_cdx_ui. Build your theme with createCdxTheme so they pick up CDX tokens. See Styling for the classic and refined looks.

Next steps ​