Flutter Passcode Lock Screen (passcode_screen)

Flutter Lock Screen


Flutter – Passcode Lock Screen

A Flutter package for iOS and Android for showing passcode input screen, similar to Native iOS.

Flutter Passcode Lock Screen


First add passcode_screen as a dependency in your pubspec.yaml file.

Then use import

import 'package:passcode_screen/passcode_screen.dart';

What can it do for you?

Flutter Passcode Lock Screen

1.Create a beautiful passcode lock view simply.

  title: title,
  passwordEnteredCallback: _onPasscodeEntered,
  cancelLocalizedText: 'Cancel',
  deleteLocalizedText: 'Delete',
  shouldTriggerVerification: _verificationNotifier.stream,  

2.Passcode input completed callback.

_onPasscodeEntered(String enteredPasscode) {

3.Notify passcode screen if passcode correct or not

final StreamController<bool> _verificationNotifier = StreamController<bool>.broadcast();
_onPasscodeEntered(String enteredPasscode) {
  bool isValid = '123456' == enteredPassword;

Don’t forget to close a stream

void dispose() {

4.Customize UI.

Customize circles

class CircleUIConfig {
  final Color borderColor;
  final Color fillColor;
  final double borderWidth;
  final double circleSize;
  double extraSize;

Customize keyboard

class KeyboardUIConfig {
  final double digitSize;
  final TextStyle digitTextStyle;
  final TextStyle deleteButtonTextStyle;
  final Color primaryColor;
  final Color digitFillColor;
  final EdgeInsetsGeometry keyboardRowMargin;
  final EdgeInsetsGeometry deleteButtonMargin;

Flutter Passcode Lock Screen

iOS & Android

Plugin is totally platform agnostic. No configuration required – the plugin should work out of the box.


Warmly welcome to submit a pull request!

Passcode Lock Screen

Passcode Lock Screen is owned and maintained by Redeyes Dev

Used in production

Passkeep – Passwords Keeper


Vladimir Hudnitsky

Relase notes:


Basic implementation of a widget.

  • You could show a widget, enter passcode and validate it.


  • Added isValidCallback to help you handle success scenario. isValidCallback will be invoked after passcode screen will pop.


  • Added configurable background and title color. (by @BeDaut)
  • Added cancelCallback to react when user cancelled widget (by @mix1009)

Source Code

Pelase Visit Flutter Passcode Lock Screen Source Code at Github