Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yubo725/flutter-gesture-password
A simple flutter gesture password widget.
https://github.com/yubo725/flutter-gesture-password
Last synced: about 1 month ago
JSON representation
A simple flutter gesture password widget.
- Host: GitHub
- URL: https://github.com/yubo725/flutter-gesture-password
- Owner: yubo725
- License: mit
- Created: 2021-08-12T10:01:10.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-08-16T01:37:27.000Z (over 3 years ago)
- Last Synced: 2024-08-23T10:15:01.382Z (4 months ago)
- Language: Dart
- Size: 831 KB
- Stars: 3
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# flutter_gesture_password
A flutter gesture password widget.
## Preview
![](./preview.gif)
## Install
run this command:
```
flutter pub add flutter_gesture_password
```This will add a line like this to your package's pubspec.yaml:
```
dependencies:
flutter_gesture_password: ^0.0.2
```## Usage
```dart
import 'package:flutter/material.dart';
import 'package:flutter_gesture_password/gesture_view.dart';void main() {
runApp(MyApp());
}class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Gesture password',
home: _Home(),
);
}
}class _Home extends StatefulWidget {
@override
State createState() => _HomeState();
}class _HomeState extends State<_Home> {
List? pathArr;@override
Widget build(BuildContext context) {
final screenWidth = MediaQuery.of(context).size.width;
return Scaffold(
appBar: AppBar(
title: Text('Gesture password'),
),
body: Column(
children: [
GestureView(
width: screenWidth,
height: screenWidth,
listener: (arr) {
setState(() {
pathArr = arr;
});
},
),
Text("${pathArr == null ? '' : pathArr}")
],
),
);
}
}```