dismiss_keyboard_on_tap 2.0.0 copy "dismiss_keyboard_on_tap: ^2.0.0" to clipboard
dismiss_keyboard_on_tap: ^2.0.0 copied to clipboard

Dismisses Keyboard by tapping outside text field on the screen.

example/lib/main.dart

import 'package:dismiss_keyboard_on_tap/dismiss_keyboard_on_tap.dart';
import 'package:flutter/material.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return DismissKeyboardOnTap(
      child: MaterialApp(
        home: Scaffold(
          body: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              const Text('Dismiss Keyboard Example'),
              Padding(
                padding: const EdgeInsets.all(20.0),
                child: TextField(
                  decoration: InputDecoration(
                    border: OutlineInputBorder(
                      borderRadius: BorderRadius.circular(10),
                    ),
                  ),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
11
likes
160
points
305
downloads

Publisher

verified publishercodingfries.com

Weekly Downloads

Dismisses Keyboard by tapping outside text field on the screen.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on dismiss_keyboard_on_tap