unfocuser 1.0.0 copy "unfocuser: ^1.0.0" to clipboard
unfocuser: ^1.0.0 copied to clipboard

A Widget to pop the keyboard when removing focus from inputs.

Features #

Unfocuser pops the keyboard when tapping outside of a text input.

Getting started #

  • Add unfocuser: ^1.0.0 to your pubspec.yaml.
  • Wrap your parent widget with Unfocuser
    • This often works well when wrapping your MaterialApp

Usage #

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

  @override
  Widget build(BuildContext context) {
    return Unfocuser(
      child: MaterialApp(
        home: TextFormField(),
      ),
    );
  }
}

Additional information #

Original code by Serov Konstantin. All credit goes to them.

0
likes
160
points
253
downloads

Publisher

verified publisherflutterperfect.dev

Weekly Downloads

A Widget to pop the keyboard when removing focus from inputs.

Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on unfocuser