패키지, 저장소 및 앱 카테고리 검색

패키지 상세v2.0.1

flutter_lock_screen

Flutter 패스코드 페이지 화면! 프로젝트에서 사용할 수 있습니다!

30일 다운로드
113
좋아요
49
Pub 점수
70

패키지 설치

flutter pub add flutter_lock_screen

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

앱 접근을 보호하기 위한 사용자 정의 가능한 패스코드 화면을 제공하는 플러터 패키지입니다. 개발자가 깔끔하고 직관적인 인터페이스를 통해 PIN 기반 인증을 구현할 수 있도록 지원합니다. 입력 검증, 시각적 피드백, 기존 프로젝트에의 간편한 통합을 지원합니다. 단순함과 보안을 고려해 설계되었으며, 앱 내 민감한 영역을 보호하는 데 이상적입니다. 소스 코드는 투명성과 커스터마이징을 위해 GitHub에서 공개되어 있습니다.

사용 사례

  • 앱 잠금 화면
  • 보안 로그인 흐름
  • PIN 기반 인증
  • 민감한 데이터 보호
  • 사용자 세션 보호

주요 기능

  • 사용자 정의 가능한 비밀번호 입력
  • 입력에 대한 시각적 피드백
  • Flutter와의 간편한 통합
  • PIN 입력을 지원합니다
  • 오픈소스이자 투명함

적합한 대상

  • 안전한 앱을 개발하는 개발자
  • 사용자 인증이 필요한 앱
  • 간단한 PIN 보호가 필요한 프로젝트
  • Flutter 초보자가 인증 UI 탐색 중
  • 개인정보에 민감한 기능을 가진 앱

고려 사항

  • 내장된 생체 인식 지원 없음
  • 제한된 플랫폼 고유의 사용자 지정
  • 오류 상태를 수동으로 처리해야 합니다
  • 복잡한 인증 워크플로우를 위한 것이 아님
  • PIN에 대한 오프라인 저장 없음

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

Flutter Pass Code Page or Pin Code Page Package

This package gives you beautiful pass code page for using both android and ios.

flutter platform pub package License: MIT

Demo

Screen Shoot Screen Shoot

Finger Print Usage

First, be sure you should ensure that you add the local_auth package as a dependency. And Please read local_auth all integration details. https://pub.dartlang.org/packages/local_auth

iOS Integration Note that this plugin works with both TouchID and FaceID. However, to use the latter, you need to also add:

<key>NSFaceIDUsageDescription</key>
<string>Why is my app authenticating using face id?</string>

to your Info.plist file. Failure to do so results in a dialog that tells the user your app has not been updated to use TouchID.

Android Integration Note that local_auth plugin requires the use of a FragmentActivity as opposed to Activity. This can be easily done by switching to use FlutterFragmentActivity as opposed to FlutterActivity in your manifest (or your own Activity class if you are extending the base class).

Update your project's AndroidManifest.xml file to include the USE_FINGERPRINT permissions:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.example.app">
  <uses-permission android:name="android.permission.USE_FINGERPRINT"/>
<manifest>

Usage

It is really easy to use! You should ensure that you add the flutter_lock_screen as a dependency in your flutter project.

dependencies:
  flutter_lock_screen: '^2.0.1'

Than you can use it with below example.

import 'package:flutter/material.dart';
import 'package:local_auth/local_auth.dart';
import 'package:testapp/empty_page.dart';
import 'package:flutter/services.dart';

class PassCodeScreen extends StatefulWidget {
  PassCodeScreen({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _PassCodeScreenState createState() => new _PassCodeScreenState();
}

class _PassCodeScreenState extends State<PassCodeScreen> {
  bool isFingerprint = false;

  Future<Null> biometrics() async {
    final LocalAuthentication auth = new LocalAuthentication();
    bool authenticated = false;

    try {
      authenticated = await auth.authenticateWithBiometrics(
          localizedReason: 'Scan your fingerprint to authenticate',
          useErrorDialogs: true,
          stickyAuth: false);
    } on PlatformException catch (e) {
      print(e);
    }
    if (!mounted) return;
    if (authenticated) {
      setState(() {
        isFingerprint = true;
      });
    }
  }

  @override
  Widget build(BuildContext context) {
    var myPass = [1, 2, 3, 4];
    return LockScreen(
        title: "This is Screet ",
        passLength: myPass.length,
        bgImage: "images/pass_code_bg.jpg",
        fingerPrintImage: "images/fingerprint.png",
        showFingerPass: true,
        fingerFunction: biometrics,
        fingerVerify: isFingerprint,
        borderColor: Colors.white,
        showWrongPassDialog: true,
        wrongPassContent: "Wrong pass please try again.",
        wrongPassTitle: "Opps!",
        wrongPassCancelButtonText: "Cancel",
        passCodeVerify: (passcode) async {
          for (int i = 0; i < myPass.length; i++) {
            if (passcode[i] != myPass[i]) {
              return false;
            }
          }

          return true;
        },
        onSuccess: () {
          Navigator.of(context).pushReplacement(
              new MaterialPageRoute(builder: (BuildContext context) {
            return EmptyPage();
          }));
        });
  }
}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.