flutter_keyboard_aware_dialog 1.0.0 copy "flutter_keyboard_aware_dialog: ^1.0.0" to clipboard
flutter_keyboard_aware_dialog: ^1.0.0 copied to clipboard

outdated

Keyboard aware dialog

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Demo',
      home: HomePage(),
    );
  }
}

class HomePage extends StatefulWidget {
  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<HomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text("Keyboard Aware Dialog"),
      ),
      body: Center(
        child: RaisedButton(
          child: Text("Show Dialog!"),
          onPressed: () {
            showDialog(
              context: context,
              builder: (context) => KeyboardAwareDialog(
                // This line
                child: Padding(
                  padding: const EdgeInsets.only(top: 16, left: 16, right: 16),
                  child: Column(
                    mainAxisSize: MainAxisSize.min,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: <Widget>[
                      Text(
                        "Title",
                        style: Theme.of(context).textTheme.headline6,
                      ),
                      TextField(),
                      ButtonBar(
                        children: <Widget>[
                          FlatButton(
                            child: Text("Nice!"),
                            onPressed: () => Navigator.pop(context),
                          ),
                        ],
                      ),
                    ],
                  ),
                ),
              ),
            );
          },
        ),
      ),
    );
  }
}
8
likes
0
pub points
49%
popularity

Publisher

unverified uploader

Keyboard aware dialog

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on flutter_keyboard_aware_dialog