katana_form library

Package to provide FormController to define the use of forms and FormStyle to unify the look and feel of forms.

To use, import package:katana_form/katana_form.dart.

Classes

Api
Provides static methods for making HTTP requests.
DateDuration
A class that represents a date period.
DateFormat
DateFormat is for formatting and parsing dates in a locale-sensitive manner.
FormAffixStyle
Class for defining prefix and suffix of text form.
FormBuilder<T, TValue>
A builder that can freely change the UI within a form.
FormBuilderRef<T, TValue>
Controller class for FormBuilder.
FormButton
Create buttons for forms.
FormCheckbox<TValue>
This widget is used to display a check box and save the check or not.
FormChipsField<TValue>
Form to allow text to be entered and saved separately as Chip.
FormChipsInputRef<T>
Class for adding and removing Chip.
FormController<TValue>
Context for using the form.
FormDateField<TValue>
A form to have the date (month and day) selected.
FormDateFieldPicker
Class that defines a picker style for selecting dates.
FormDateTimeField<TValue>
A form to have the date and time selected.
FormDateTimeFieldDateDelegate
Let the user select only dates FormDateTimeFieldDelegate.
FormDateTimeFieldDateTimeDelegate
Let the date and time be selected together FormDateTimeFieldDelegate.
FormDateTimeFieldDelegate
A delegate where the form picker and formatter are defined.
FormDateTimeRangeField<TValue>
Form to have a range of dates selected.
FormDateTimeRangeFieldCustomDelegate
FormDateTimeRangeFieldDelegate that allows specifying pickers that can be selected by pickerBuilder.
FormDateTimeRangeFieldDateDelegate
Let the user select only dates FormDateTimeRangeFieldDelegate.
FormDateTimeRangeFieldDelegate
A delegate where the form picker and formatter are defined.
FormDurationField<TValue>
Form to have the duration selected.
FormDurationFieldPicker
Class that defines the picker style for selecting spacing.
FormEditableToggleBuilder
Combined with FormTextField, it can be used to control whether or not editing is allowed.
FormEnumDropdownField<TEnum extends Enum, TValue>
Drop-down form to select from all elements in TEnum.
FormEnumDropdownFieldPicker<TEnum extends Enum>
Class that defines the picker style for selecting TEnum.
FormEnumField<TEnum extends Enum, TValue>
Form to select from all elements in TEnum.
FormEnumFieldPicker<TEnum extends Enum>
Class that defines the picker style for selecting TEnum.
FormFocusNodeBuilder
Builder to hold and provide FocusNode.
FormFutureField<T extends Object, TValue>
A form that waits for another process to complete and updates the value of the form based on that value.
FormFutureFieldRef<T extends Object, TValue>
You can perform various operations used in FormFutureField.builder.
FormLabel
Displays the label for each item on the form.
FormListBuilder<T, TValue>
A builder that can add and delete forms.
FormListBuilderRef<T, TValue>
Controller class for FormListBuilder.
FormMapDropdownField<TValue>
Drop down form to select from there with Map as an option.
FormMapDropdownFieldPicker
Class that defines the picker style for selection from Map.
FormMapField<TValue>
Form to select from there with Map as an option.
FormMapFieldPicker
Class that defines the picker style for selection from Map.
FormMapTagDropdownField<TValue>
Drop down form to select from there with Map as an option.
FormMapTagDropdownFieldPicker
Class that defines a picker style to select from Map for tags.
FormMapTagDropdownFieldRef<T>
Class that defines the reference for FormMapTagDropdownField.
FormMedia<TValue>
Form for submitting images and videos. Single media can be submitted.
FormMediaRef<TValue>
Class for controlling FormMedia.
FormMediaValue
Class for values when handling media in forms.
FormMonthField<TValue>
A form to have the date (year and month) selected.
FormMonthFieldPicker
Class that defines a picker style for selecting dates.
FormMultiMedia<TValue>
Form for submitting images and videos. Multiple media can be submitted.
FormMultiMediaDelegate
A delegate to determine the design of FormMultiMedia.
FormMultiMediaInlineDelegate
A delegate to build FormMultiMedia with a type design that fits inline with the form.
FormMultiMediaListTileDelegate
A delegate to build a FormMultiMedia with a design of the type arranged in a list.
FormMultiMediaRef<TValue>
Class for controlling FormMultiMedia.
FormNumField<TValue>
A form to let you select a numerical value.
FormNumFieldPicker
Class that defines a picker style for selecting numbers.
FormPasswordBuilder
Combined with FormTextField, it can be used to control the visibility of passwords.
FormPinField<TValue>
Widget for Pin text field for forms.
FormRatingBar<TValue>
Widget to display & edit by number of stars by passing double.
FormStyle
Class for defining styles for Form.
FormStyleContainer
Provides a container with FormStyle applied.
FormStyleScope
Scope for FormStyle.
FormSwitch<TValue>
This widget is used to display switches and save ON/OFF of switches.
FormTextEditingControllerBuilder
Builder to hold and provide TextEditingController.
FormTextField<TValue>
Widgets for text fields for forms.
Immutable
Used to annotate a class.
NumRange<TNum extends num>
A class that represents a range of numbers.
PickerDateTimeType
RectRange<TNum extends num>
A class that represents a range of numbers.
Required
Used to annotate a named parameter p in a method or function f.
SuggestionStyle
Class that defines the design for suggestions.

Enums

ApiMethod
An HTTP method.
DayOfWeek
Day of the week.
FormInputBorderStyle
Defines the style of the outer border of InputBorder.
FormMediaType
The type of media handled by the form.
FormTextFieldSelectionOnFocus
Specifies the behavior when focused.

Extensions

BooleanExtensions on bool
Provides extended methods for bool.
DateTimeExtensions on DateTime
Provides extended methods for DateTime.
DateTimeIterableExtensions on Iterable<DateTime>
Provides extended methods for DateTime arrays.
DoubleExtensions on double
Provides extended methods for double.
DoubleIterableExtensions on Iterable<double>
Provides extended methods for double arrays.
DurationExtensions on Duration
Provides extended methods for Duration.
DynamicMapExtensions on Map<String, dynamic>
Provides extended methods for DynamicMap.
InterableOfIterableExtensions on Iterable<Iterable<T>>
Provides extended methods for Iterable arrays.
IntExtensions on int
Provides extended methods for int.
IntIterableExtensions on Iterable<int>
Provides extended methods for int arrays.
IterableExtensions on Iterable<T>
Provides extended methods for T arrays.
JsonDynamicListExtensions on DynamicList
Provides Json extension methods for DynamicList.
JsonDynamicMapExtensions on DynamicMap
Provides Json extension methods for DynamicMap.
ListExtensions on List<T>
Provides extended methods for List in T.
MapExtensions on Map<K, V>
Provides extended methods for Map.
NullableDoubleExtensions on double?
Provides an extension method for double that is nullable.
NullableFormMeidaValueExtension on FormMediaValue?
Provides an extension method for FormMediaValue that is nullable.
NullableIntExtensions on int?
Provides an extension method for int that is nullable.
NullableIterableExtensions on Iterable<T>?
Provides an extension method for Iterable that is nullable.
NullableListExtensions on List<T>?
Provides an extension method for List that is nullable.
NullableMapExtensions on Map<K, V>?
Provides an extension method for Map that is nullable.
NullableNumExtensions on num?
Provides an extension method for num that is nullable.
NullableObjectExtensions on Object?
Provides an extension method for List that is nullable.
NullableSetExtensions on Set<T>?
Provides an extension method for Set that is nullable.
NullableStringExtensions on String?
Provides an extension method for String that is nullable.
NullableUriExtensions on Uri?
Provides an extension method for Uri that is nullable.
NullableValueIterableExtensions on Iterable<T?>
Provides an extension method for Iterable whose value is nullable.
RandomExtensions on Random
Provides extended methods for Random.
SetExtensions on Set<T>
Provides extended methods for Set.
StringExtensions on String
Provides extended methods for String.
UriExtensions on Uri
Provides extended methods for Uri.

Constants

kDefaultCheckboxBorderWidth → const double
Width of the border outside the default checkbox.
kFormMultiMediaInlineHeight → const double
Default height of the form when using FormMultiMediaInlineDelegate.
kPinLength → const int
Default maximum pin length.
nullOfBool → const bool?
A null object with a defined type of bool?
nullOfDouble → const double?
A null object with a defined type of double?
nullOfDynamicList → const DynamicList?
A null object with a defined type of DynamicList?
nullOfDynamicMap → const DynamicMap?
A null object with a defined type of DynamicMap?
nullOfInt → const int?
A null object with a defined type of int?
nullOfNum → const num?
A null object with a defined type of num?
nullOfString → const String?
A null object with a defined type of String?
zeroOfNum → const num
A 0 object with a defined type of num?

Properties

sprintf ↔ PrintFormat
getter/setter pair

Functions

generateCode(int length, {int seed = 0, String charSet = "23456789abcdefghjkmnpqrstuvwxy"}) String
Generates and returns a random string with the number of characters given by length.
initializeDateFormatting([String? locale, String? ignored]) Future<void>
This should be called for at least one locale before any date formatting methods are called. It sets up the lookup for date symbols. Both the locale and ignored parameter are ignored, as the data for all locales is directly available.
jsonDecodeAsList<T extends Object?>(String json, [List<T> defaultValue = const []]) List<T>
Converts json to a Json-decoded List
jsonDecodeAsMap<T extends Object?>(String json, [Map<String, T> defaultValue = const {}]) Map<String, T>
Converts json to a Json-decoded Map<String, dynamic> object.
jsonEncodable(Object? o) bool
If this object is Json encodable, true is returned.
nullOfList<T>() List<T>?
A null object with a defined type of List<T>?
nullOfMap<K, V>() Map<K, V>?
A null object with a defined type of Map<K, V>?
nullOfSet<T>() Set<T>?
A null object with a defined type of Set<T>?
uuid({DateTime? baseTime, bool reverse = false}) String
Generate and retrieve the UUID for Version 7.
wait(Iterable futures) Future<void>
Wait until all Futures given in futures are completed.

Typedefs

ApiResponse = Response
An HTTP response where the entire response body is known in advance.
ApiResquest = Request
An HTTP request where the entire request body is known in advance.
ChipBuilder<T> = Widget Function(BuildContext context, FormChipsInputRef<T> ref, T item)
Builder for use with FormChipsField.
DynamicList = List
Represents the type of List<dynamic>.
DynamicMap = Map<String, dynamic>
Represents the type of Map<String, dynamic>.
PickerItemBuilder = Widget? Function(BuildContext context, String? text, Widget? child, bool selected, int col, int index)