Skip to content

A simple way to show overlay widgets when keyboard rises, without changing widget three from your current project

License

Notifications You must be signed in to change notification settings

ExzaSolutions/keyboard_overlay

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

keyboard_overlay

A simple way to show overlay widgets when keyboard rises, without changing widget three from your current project.

It shows a custom widget when TextFields get focused, and everything is disposed automatically on StatefulWidget dispose.

preview_1

Add dependency

dependencies:
    keyboard_overlay: ^0.1.0
//use mixin on State<StatefulWidget>: HandleFocusNodesOverlayMixin

Init FocusNodeOverlay

@override
void initState() {
    _nodePassword = GetFocusNodeOverlay(
        child: SpecialDismissable(
            onOkButton: () => print(_nodePassword.controller.text),
            title: 'SPECIAL',
        ),
        controller: TextEditingController()
    )    
}

Use it on TextFields

TextFormField(
    focusNode: _nodePassword,
    controller: _nodePassword.controller
)
@override
void dispose() {
    // Don't need to dispose FocusNodeOverlay and TextEditingController, it will be disposed automatically
    super.dispose();
}

About

A simple way to show overlay widgets when keyboard rises, without changing widget three from your current project

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Dart 83.0%
  • Ruby 13.7%
  • Kotlin 1.6%
  • Swift 1.6%
  • Objective-C 0.1%