password_strength_checker 1.2.4 copy "password_strength_checker: ^1.2.4" to clipboard
password_strength_checker: ^1.2.4 copied to clipboard

Generate secure passwords, check for exposed passwords, get visual feedback for strength or get form validation with a minimum password strength required.

example/password_strength_checker_example.dart

import 'package:flutter/material.dart';
import 'package:password_strength_checker/password_strength_checker.dart';

class HomePage extends StatelessWidget {
  const HomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    final passNotifier = ValueNotifier<PasswordStrength?>(null);

    return Scaffold(
      body: Padding(
        padding: const EdgeInsets.all(8.0),
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: [
            TextField(
              decoration: const InputDecoration(
                border: OutlineInputBorder(),
                labelText: 'Password',
              ),
              onChanged: (value) {
                passNotifier.value = PasswordStrength.calculate(text: value);
              },
            ),
            const SizedBox(height: 20),
            PasswordStrengthChecker(
              strength: passNotifier,
            ),
          ],
        ),
      ),
    );
  }
}
35
likes
160
pub points
92%
popularity

Publisher

unverified uploader

Generate secure passwords, check for exposed passwords, get visual feedback for strength or get form validation with a minimum password strength required.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on password_strength_checker