hb_check_code 0.0.2 copy "hb_check_code: ^0.0.2" to clipboard
hb_check_code: ^0.0.2 copied to clipboard

A graphic captcha generator. You can specify the drawing size, or it can be adaptive according to the length of the string.

example/README.md

import 'dart:math';
import 'package:HBLineChart/hb_check_code/hb_check_code.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'HBLineChart Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: HBChcekCodePage(),
    );
  }
}

class HBChcekCodePage extends StatefulWidget {
  @override
  _HBChcekCodePageState createState() => _HBChcekCodePageState();
}

class _HBChcekCodePageState extends State<HBChcekCodePage> {
  @override
  Widget build(BuildContext context) {
    String code = "";
    for (var i = 0; i < 6; i++) {
      code = code + Random().nextInt(9).toString();
    }
    return Scaffold(
      appBar: AppBar(
        title: Text("HBCheckCode Demo"),
      ),
      body: Container(
        alignment: Alignment.center,
        child: GestureDetector(
            behavior: HitTestBehavior.opaque,
            onTap: () => setState(() {}),
            child: HBCheckCode(
              code: code,
            )),
      ),
    );
  }
}
9
likes
40
pub points
81%
popularity

Publisher

unverified uploader

A graphic captcha generator. You can specify the drawing size, or it can be adaptive according to the length of the string.

Homepage

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on hb_check_code