any_field library

any_field

A small Flutter package that provides AnyField (a flexible, read-only input-looking widget for rendering arbitrary content) and utilities like AnyValueController and AnyFormField. Use this package to build picker-style fields that keep TextField chrome while rendering custom widgets inside.

Example:

import 'package:any_field/any_field.dart';

final controller = AnyValueController<DateTime?>(null);
AnyField<DateTime?>(
  displayBuilder: (c, v) => Text(v?.toIso8601String() ?? 'Pick a date'),
  controller: controller,
  onTap: (current) async {
    final picked = await showDatePicker(...);
    if (picked != null) controller.value = picked;
  },
);

Classes

AnyField<T>
A flexible input field widget that can display arbitrary content of type T.
AnyValueController<T>
Controller for managing values in AnyField widgets.