formwise_ml library

Optional ML-powered validation module for formwise.

Provides on-device TFLite model loading, text preprocessing, and a base class for building ML-backed validators.

Requires the tflite_flutter package and platform-specific setup. See https://pub.flutter-io.cn/packages/tflite_flutter for native library setup.

import 'package:formwise/formwise_ml.dart';

class MyValidator extends MlValidator {
  MyValidator() : super(modelAsset: 'models/my_model.tflite');
  // ...
}

Classes

EmailMlValidator
ML-powered email typo detector using an on-device TFLite model.
MlValidationResult
The result of an ML-powered validation.
MlValidator
Base class for ML-powered validators that run on-device TFLite models.
ModelInfo
Describes the input/output tensor shapes and types of a loaded model.
ModelLoader
Manages loading and caching of TFLite models for on-device inference.
OutputDecoder
Decodes model output probabilities into predictions.
TextPreprocessor
Converts text to numeric tensors for TFLite model input.