We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import 'package:flutter/material.dart'; import 'package:keyboard_actions/keyboard_actions.dart'; void main() => runApp(const MyApp()); class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return const MaterialApp( title: 'Material App', home: TestWidget(), ); } } class TestWidget extends StatelessWidget { const TestWidget({super.key}); @override Widget build(BuildContext context) { return Scaffold( body: Column( children: [ Expanded( child: ListView.builder( itemCount: 100, itemBuilder: (BuildContext context, int index) { return Text("data $index"); }, ), ), Container( padding: const EdgeInsets.all(20), height: 80, width: double.infinity, color: Colors.redAccent, child: GestureDetector( onTap: () => showWriteComment2(context), child: const Text("touch me. Why do I move ?"), ), ), ], ), ); } } Future showWriteComment2(BuildContext context) async { var focusNode = FocusNode(); focusNode.requestFocus(); var controller = TextEditingController(); return showDialog( context: context, builder: (context) { return GestureDetector( onTap: () => Navigator.pop(context), child: KeyboardActions( // isDialog: true, config: KeyboardActionsConfig( keyboardActionsPlatform: KeyboardActionsPlatform.ALL, actions: [ KeyboardActionsItem( focusNode: focusNode, displayActionBar: false, ), ]), child: Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.end, children: [ Container( padding: const EdgeInsets.all(8), color: Colors.white, child: TextField( controller: controller, cursorColor: Colors.black, decoration: const InputDecoration( hintText: "Can you remove the delay in my popping up?", ), focusNode: focusNode, maxLines: 7, ), ), GestureDetector( onTap: () { Navigator.pop(context); }, child: Container( padding: const EdgeInsets.all(8), color: Colors.amber, width: double.infinity, height: 40, child: const Text("send"), ), ) ], ), )); }); }
The text was updated successfully, but these errors were encountered:
Can you add a gif/screenshot and give us more explanation?
Sorry, something went wrong.
Thank you for your reply!
Why is the red widget at the end of the column moving? It shouldn't be moving, right?
The Dialog moves very slowly when the keyboard pops up, can this be changed?
I wanted to achieve an effect like this
⬇️
https://files.catbox.moe/jid539.gif
No branches or pull requests
The text was updated successfully, but these errors were encountered: