Search packages, repositories and app categories

GitHub repositorypeiffer-innovations/form_floating_action_button

form_floating_action_button

peiffer-innovations/form_floating_action_button open-source repository details.

form_floating_action_button project cover
Stars
3
Forks
0
Last push (UTC)
Feb 16, 2026
Project status
Archived

Original README

English project snapshot. Visit GitHub for the latest content.

I'm done

Table of Contents

form_floating_action_button

Flutter Publisher

A plugin to add some basic form functionality to the Floating Action Button.

Demo

Live Web Example

Example

Installation

Add to pubspec.yaml

dependencies:
  ...
  form_floating_action_button: any

Usage Example

Import form_floating_action_button.dart

import 'package:form_floating_action_button/form_floating_action_button.dart';
Usage within a Form
Widget build(BuildContext context) {
  return Form(
    child: Scaffold(
      appBar: AppBar(
        title: Text('Form Validate'),
      ),
      body: Material(
        child: ListView(
          children: <Widget>[
            Padding(
              padding: EdgeInsets.symmetric(horizontal: 16.0),
              child: TextFormField(
                decoration: InputDecoration(
                  labelText: 'Email',
                ),
                onFieldSubmitted: (_) {
                  _controller.firePressed();
                },
                validator: (value) {
                  String error;
                  if (value?.isNotEmpty != true) {
                    error = 'Email is required';
                  } else if (value.contains('@') != true ||
                      value.contains('.') != true) {
                    error = 'Email is not valid';
                  }

                  return error;
                },
              ),
            ),
          ],
        ),
      ),
      floatingActionButton: FormFloatingActionButton(
        controller: _controller,
        loading: _loading,
        onSubmit: () {
          setState(() => _loading = true);
          Future.delayed(Duration(seconds: 5)).then((_) {
            if (mounted) {
              setState(() {
                _loading = false;
              });
            }
          });
        },
      ),
    ),
  );
}
Custom On Validate
@override
Widget build(BuildContext context) {
  return Scaffold(
    appBar: AppBar(
      title: Text('On Validate'),
    ),
    body: Material(
      child: ListView(
        children: <Widget>[
          ListTile(
            onTap: () {
              setState(() => _validateSuccess = !_validateSuccess);
            },
            title: Text('Validation Successful'),
            trailing: IgnorePointer(
              child: Switch(
                value: _validateSuccess,
                onChanged: (_) {},
              ),
            ),
          )
        ],
      ),
    ),
    floatingActionButton: FormFloatingActionButton(
      loading: _loading,
      onSubmit: () {
        setState(() => _loading = true);
        Future.delayed(Duration(seconds: 5)).then((_) {
          if (mounted) {
            setState(() {
              _loading = false;
            });
          }
        });
      },
      onValidate: () {
        return Future.value(_validateSuccess);
      },
    ),
  );
}
peiffer-innovations GitHub avatar
GitHub author

peiffer-innovations ↗

LanguagesDartHTMLSwiftObjective-CKotlin

Dependencies used

Dependency list 4 items

How do I choose a repository?

Start with your use case, compare repository activity, and check the original project before adopting it.

  1. Search by repository name, owner or description, then narrow the results by topic.
  2. Compare stars, forks and recent pushes. Stars show community interest, not a guarantee of quality.
  3. Read the README, license and issues on GitHub before using a project.

Sources and maintenance

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗