flutter_persistent_keyboard_height 1.0.3 copy "flutter_persistent_keyboard_height: ^1.0.3" to clipboard
flutter_persistent_keyboard_height: ^1.0.3 copied to clipboard

outdated

Flutter package to get keyboard height. Can be used to display a sticker/emoji modal with correct height.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:flutter_persistent_keyboard_height/flutter_persistent_keyboard_height.dart';

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

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

  @override
  Widget build(BuildContext context) {
    return const PersistentKeyboardHeightProvider(
      child: MaterialApp(
        title: 'Flutter Persistent Keyboard Height Example',
        home: FlutterPersistentKeyboardHeightExample(),
      ),
    );
  }
}

class FlutterPersistentKeyboardHeightExample extends StatelessWidget {
  const FlutterPersistentKeyboardHeightExample({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final keyboardHeight = PersistentKeyboardHeight.of(context).keyboardHeight;

    return Scaffold(
      body: Column(
        mainAxisAlignment: MainAxisAlignment.center,
        children: [
          const Padding(
            padding: EdgeInsets.all(16.0),
            child: TextField(
              decoration: InputDecoration(
                labelText: 'Flutter Persistent Keyboard Size Example',
              ),
            ),
          ),
          const SizedBox(height: 8),
          Text('Keyboard height: $keyboardHeight'),
        ],
      ),
    );
  }
}
28
likes
0
pub points
83%
popularity

Publisher

verified publisherfperson.dev

Flutter package to get keyboard height. Can be used to display a sticker/emoji modal with correct height.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter, keyboard_utils, shared_preferences

More

Packages that depend on flutter_persistent_keyboard_height