Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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();
}
```