form_widgets 1.0.1 copy "form_widgets: ^1.0.1" to clipboard
form_widgets: ^1.0.1 copied to clipboard

Additional form widgets for Flutter. Including checkbox form widget.

example/example.md

import 'package:form_widgets/checkbox_form_widget.dart';
import 'package:form_widgets/clickable_text_form_widget.dart';


CheckboxFormField(
  title: Text('Accept Terms'),
  onSaved: (value) {
    // Save value
  },
  validator: (value) {
    if (value == false) {
      return 'You must accept the terms';
    }
    return null;
  },
  onChanged: (value) {
    // Handle change
  },
),

ClickableTextFormWidget(
  labelText: 'Click me',
  controller: TextEditingController(),
  validator: (value) {
    if (value == null || value.isEmpty) {
      return 'This field cannot be empty';
    }
    return null;
  },
  onPressed: () {
    // Handle button press
  },
),
1
likes
160
points
18
downloads

Publisher

verified publisherflexxxlab.com

Weekly Downloads

Additional form widgets for Flutter. Including checkbox form widget.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on form_widgets