flutter_keyboard_size 0.1.2+2
flutter_keyboard_size: ^0.1.2+2

Flutter Android iOS web

A straightforward and convenient provider that helps get info about - keyboard height, is it open or not, set bool value is screen small or not.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_keyboard_size/flutter_keyboard_size.dart';
import 'body_of_main_screen.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return KeyboardSizeProvider(
      smallSize: 500.0,
      child: Scaffold(
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: BodyOfMainScreen(counter: _counter),
      ),
    );
  }
}
11
likes
100
pub points
85%
popularity

Publisher

awaik.pro

A straightforward and convenient provider that helps get info about - keyboard height, is it open or not, set bool value is screen small or not.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, provider

More

Packages that depend on flutter_keyboard_size