https://github.com/feduke-nukem/flutter_captcha
https://github.com/feduke-nukem/flutter_captcha
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/feduke-nukem/flutter_captcha
- Owner: feduke-nukem
- License: mit
- Created: 2023-06-25T12:29:59.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-10-30T21:13:36.000Z (about 2 years ago)
- Last Synced: 2025-03-16T02:26:03.621Z (9 months ago)
- Language: Dart
- Size: 7.14 MB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
#### Flutter Captcha

## Features
Provide any widget, and it will be automatically divided into parts that can be rotated and positioned. At any point, you can check the solution status to confirm if the user has successfully passed the captcha test.
## Getting started
```dart
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State createState() => _MyAppState();
}
class _MyAppState extends State {
final _controller = FlutterCaptchaController(
random: Random.secure(),
)..init();
@override
void dispose() {
_controller.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
useMaterial3: true,
),
home: Scaffold(
body: Center(
child: FlutterCaptcha(
controller: _controller,
crossLine: (color: Colors.white, width: 10),
fit: BoxFit.cover,
draggingBuilder: (_, child) => Opacity(opacity: 0.5, child: child),
child: Image.network(
'https://upload.wikimedia.org/wikipedia/commons/4/4f/Dash%2C_the_mascot_of_the_Dart_programming_language.png',
),
),
),
),
);
}
}
```
Try it out by [link](https://feduke-nukem.github.io/flutter_captcha/)