keyboard_safe_wrapper 0.0.1 copy "keyboard_safe_wrapper: ^0.0.1" to clipboard
keyboard_safe_wrapper: ^0.0.1 copied to clipboard

A Flutter widget to prevent text fields from being hidden behind the iOS web keyboard.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: SafeArea(
        top: false,
        bottom: true,
        left: false,
        right: false,
        child: Scaffold(
          body: KeyboardSafeWrapper(
            child: Column(
              mainAxisAlignment: MainAxisAlignment.end,
              children: [
                Padding(
                  padding: const EdgeInsets.all(20.0),
                  child: TextField(
                    decoration: InputDecoration(
                      labelText: 'Enter your text',
                      border: OutlineInputBorder(
                        borderRadius: BorderRadius.circular(8.0),
                        borderSide: BorderSide(color: Colors.blue, width: 2.0),
                      ),
                      enabledBorder: OutlineInputBorder(
                        borderRadius: BorderRadius.circular(8.0),
                        borderSide: BorderSide(color: Colors.grey, width: 1.5),
                      ),
                      focusedBorder: OutlineInputBorder(
                        borderRadius: BorderRadius.circular(8.0),
                        borderSide: BorderSide(color: Colors.blue, width: 2.0),
                      ),
                      contentPadding: EdgeInsets.symmetric(
                        horizontal: 12,
                        vertical: 16,
                      ),
                    ),
                  ),
                )
              ],
            ),
          ),
        ),
      ),
    );
  }
}
2
likes
150
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter widget to prevent text fields from being hidden behind the iOS web keyboard.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, web

More

Packages that depend on keyboard_safe_wrapper