Skip to content

Latest commit

 

History

History
41 lines (27 loc) · 982 Bytes

README.md

File metadata and controls

41 lines (27 loc) · 982 Bytes

Language: English | 中文简体

float_elf

float_elf is a simple scheme for draggable floating ball in app, you can custom your own view of your elf and deploy it.

Getting Started

float_elf is easy to use. Just customize your view like this:

          ElfPanel elfContent = ElfPanel(
                      key: globalKey,
                      items: [
                        ElfItem.icon(Icons.add, '入口1', () {}),
                        ElfItem.icon(Icons.android, '入口2', () {}),
                        ElfItem.icon(Icons.close, '关闭悬浮球', () {
                          if (Elf.hasShow) {
                            Elf.hide();
                          }
                        }),
                      ],
                    )

And then to show your elf, just write one line:

Elf.show(context, Offset(25, 50), elfContent);

You can also hide your elf in one line:

Elf.hide()