12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- import 'package:flutter/material.dart';
- import 'package:flutter/cupertino.dart';
- import 'package:cool_ui/cool_ui.dart';
- class CustomKeyboardDemo extends StatefulWidget{
- @override
- State<StatefulWidget> createState() {
- // TODO: implement createState
- return CustomKeyboardDemoState();
- }
- }
- class CustomKeyboardDemoState extends State<CustomKeyboardDemo>{
- @override
- Widget build(BuildContext context) {
- // TODO: implement build
- return KeyboardMediaQuery(
- child: Builder(builder: (ctx) {
- CoolKeyboard.init(ctx);
- return Scaffold(
- appBar: AppBar(
- title: Text("Custom Keyboard Demo"),
- ),
- body: ListView(
- children: <Widget>[
- TextField(
- keyboardType: TextInputType.text,
- ),
- Container(
- height: 300.0,
- ),
- TextField(
- decoration: InputDecoration(labelText: '演示键盘弹出后滚动'),
- keyboardType: NumberKeyboard.inputType,
- )
- ],
- )
- );
- })
- );
- }
- }
|