Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emanuel-braz/keyboard_overlay
A simple way to show overlay widgets when keyboard rises, without changing widget three from your current project
https://github.com/emanuel-braz/keyboard_overlay
Last synced: 8 days ago
JSON representation
A simple way to show overlay widgets when keyboard rises, without changing widget three from your current project
- Host: GitHub
- URL: https://github.com/emanuel-braz/keyboard_overlay
- Owner: emanuel-braz
- License: bsd-3-clause
- Created: 2020-04-20T03:57:45.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-03-16T01:31:20.000Z (over 2 years ago)
- Last Synced: 2023-08-20T22:29:11.038Z (about 1 year ago)
- Language: Dart
- Size: 69.3 KB
- Stars: 4
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# 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](https://user-images.githubusercontent.com/3827308/79713672-dc455480-82a4-11ea-96c6-a51971db6034.gif)
#### Add dependency
```dart
dependencies:
keyboard_overlay: ^1.0.0
``````dart
//use mixin on State: HandleFocusNodesOverlayMixin
```### Init FocusNodeOverlay
```dart
@override
void initState() {
_nodePassword = GetFocusNodeOverlay(
child: SpecialDismissable(
onOkButton: () => print(_nodePassword.controller.text),
title: 'SPECIAL',
),
controller: TextEditingController()
)
}
```### Use it on TextFields
```dart
TextFormField(
focusNode: _nodePassword,
controller: _nodePassword.controller
)
``````dart
@override
void dispose() {
// Don't need to dispose FocusNodeOverlay and TextEditingController, it will be disposed automatically
super.dispose();
}
```