Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/g123k/flutter_flip_devices
Develop easily on devices like the Samsung Galaxy Z Flip / Z Flip 3
https://github.com/g123k/flutter_flip_devices
Last synced: about 1 month ago
JSON representation
Develop easily on devices like the Samsung Galaxy Z Flip / Z Flip 3
- Host: GitHub
- URL: https://github.com/g123k/flutter_flip_devices
- Owner: g123k
- License: apache-2.0
- Created: 2021-08-21T06:03:56.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-08-21T06:22:16.000Z (about 3 years ago)
- Last Synced: 2024-04-20T15:18:50.891Z (7 months ago)
- Language: C++
- Size: 180 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Helper for "Flip" devices
[![Pub](https://img.shields.io/pub/v/flutter_flip_devices.svg)](https://pub.dartlang.org/packages/flutter_flip_devices)
A plugin to easily develop Flutter applications for Flip devices like Samsung Galaxy Z Flip or Samsung Galaxy Z Flip 3.
It will notify when the device is either fully-opened, semi-opened and closed. On non-"flip" devices, it will always considered the screen as fully-opened.## FlutterFlipListener
A Flutter Widget to be notified when the hinge state changed.
```dart
FlutterFlipListener(
onDeviceClosed: () {},
onDeviceSemiOpened: () {},
onDeviceFullyOpened: () {},
child: YourWidget(),
);
```## FlutterFlipBuilder
A Flutter Widget to provide a Widget dependeing on the hinge state.
```dart
FlutterFlipBuilder(
onDeviceClosed: (BuildContext context) {
return Text('Closed');
},
onDeviceSemiOpened: (BuildContext context) {
return Text('Semi-opened');
},
onDeviceFullyOpened: (BuildContext context) {
return Text('Fully opened');
},
);
```