soft_keyboard_dismisser 0.0.3 copy "soft_keyboard_dismisser: ^0.0.3" to clipboard
soft_keyboard_dismisser: ^0.0.3 copied to clipboard

A simple Flutter package to dismiss the keyboard when click outside the input field..

example/lib/main.dart

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

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

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  var value = "";
  @override
  void initState() {
    super.initState();
  }

  onTextChange(val) {
    print(val);
    setState(() {
      value = val;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Keyboard Dismisser'),
        ),
        body: Padding(
          padding: const EdgeInsets.all(8.0),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            crossAxisAlignment: CrossAxisAlignment.start,
            mainAxisSize: MainAxisSize.max,
            children: [
              SizedBox(
                height: 20,
              ),
              Text(value),
              SoftKeyboardDismisser(false, "Type here..", 10.0, onTextChange),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
115
points
1
downloads

Publisher

unverified uploader

Weekly Downloads

A simple Flutter package to dismiss the keyboard when click outside the input field..

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on soft_keyboard_dismisser

Packages that implement soft_keyboard_dismisser