auto_form_plus 0.3.0 copy "auto_form_plus: ^0.3.0" to clipboard
auto_form_plus: ^0.3.0 copied to clipboard

AutoForm build simple forms.

example/main.dart

import 'package:flutter/material.dart';

import 'example_home_page.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Auto Form Examples',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),

      home: const ExampleHomePage(),

      // home: Scaffold(
      //   body: AutoForm(
      //     onSubmit: (data) {
      //       // ignore: avoid_print
      //       print(data);
      //     },
      //     children: [
      //       const Text("Hello World"),
      //       AutoFileField(
      //         id: "file",
      //         label: "Image",
      //         fileSource: const [FileSource.gallery],
      //         settings: const FilePickSettings(maxHeight: 100, maxWidth: 100),
      //       ),
      //       AutoDropdownField(
      //         id: "genders",
      //         label: "Gendres",
      //         items: [
      //           DropdownItem(label: "Male", value: "male"),
      //           DropdownItem(label: "Female", value: "female"),
      //         ],
      //         triggers: const [
      //           FieldTrigger.other(
      //               fieldId: "full_name",
      //               value: "male",
      //               condition: EqualsCondition(),
      //               event: ShowEvent())
      //         ],
      //       ),

      //       AutoGroupField.row(
      //         id: "full_name",
      //         label: "User name",
      //         hidden: true,
      //         children: [
      //           Expanded(
      //             child: AutoTextField(
      //               id: "first_name",
      //               label: "First Name",
      //               validations: const [
      //                 RequiredValidation(),
      //               ],
      //             ),
      //           ),
      //           Expanded(
      //             child: AutoTimeField(
      //               id: "time",
      //               label: "Time",
      //             ),
      //           ),
      //         ],
      //       ),
      // AutoCheckboxField(id: "accept", label: "Accept terms and services"),
      // AutoDateField(
      //   id: "birth",
      //   label: "Birth Date",
      //   minimumDate: DateTime(1900),
      //   maximumDate: DateTime.now(),
      //   initValue: DateTime.now().toString(),
      // ),
      // AutoTimeField(
      //   id: "worthTime",
      //   label: "Time to go to work",
      //   minimumTime: DateTime(1900),
      //   maximumTime: DateTime.now(),
      // ),
      // AutoComputedField(
      //   id: "sum",
      //   label: "Sum",
      //   hidden: false,
      //   fields: const [
      //     "@first_name",
      //     "10:00",
      //     "@last_name",
      //   ],
      //   operation: AddOperation(),
      // ),
      // AutoComputedField(
      //   id: "sum2",
      //   label: "Another sum",
      //   hidden: false,
      //   fields: const [
      //     "The selected duration is: ",
      //     "@sum",
      //   ],
      //   operation: AddOperation(),
      // ),
      // ],
      // ),
      // ),
    );
  }
}
2
likes
120
points
20
downloads

Publisher

unverified uploader

Weekly Downloads

AutoForm build simple forms.

Repository
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

file_picker, flutter, image_picker, syncfusion_flutter_pdfviewer

More

Packages that depend on auto_form_plus