flutter_keyboard_size 1.0.0+2 copy "flutter_keyboard_size: ^1.0.0+2" to clipboard
flutter_keyboard_size: ^1.0.0+2 copied to clipboard

outdated

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),
      ),
    );
  }
}
63
likes
0
pub points
94%
popularity

Publisher

verified publisheragoradesk.com

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

License

unknown (license)

Dependencies

flutter, provider

More

Packages that depend on flutter_keyboard_size