screen_protection

Creator: coderz1093

Last updated:

0 purchases

screen_protection Image
screen_protection Images
Add to Cart

Description:

screen protection

Protection screen #


The problem we identified is the need for enhanced security in our app. Many users store sensitive information within the app, making it crucial to protect their data from unauthorized access.
Our solution is to implement a protection screen that will act as a barrier to the app's content, requiring authentication before granting access.
Features #
This plugin provides you 3 different methods to add protection to your app

PIN
Pattern
Fingerprint

with high preferable customization
Demo #














































## How to Use
1- Go to `android/app/src/main/AndroidManifest.xml`
Add the following line to the AndroidManifest.xml file:
<uses-permission android:name="android.permission.USE_FINGERPRINT"/>
copied to clipboard

this tag is used to declare permissions that your Android application requires to access certain features or resources on the device

2- Go to android/app/src/main/kotlin/MainActivity.kt
replace the MainActivity.kt file with :
package com.example."the name of your project "
import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterFragmentActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterFragmentActivity() {
override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
GeneratedPluginRegistrant.registerWith(flutterEngine);
}
}
copied to clipboard


This setup allows you to create a hybrid app with both native Android components and Flutter UI seamlessly integrated.


make you main async (start the main with two line):


WidgetsFlutterBinding.ensureInitialized();
await initialize();
copied to clipboard
3- Go to android/app/bulid.gradle file
add to the defaultConfig this two lines
multiDexEnabled true
minSdkVersion 21
copied to clipboard


inside runApp call Protector and pass your Application entry point as a child to this class.


to clear the saved authentication data call


clear()
copied to clipboard
4- the usage :

pattern : to give the user the accessability to

choose pattern method (true by default) (bool)

pin : to give the user the accessability to choose

pin method (true by default) (bool)

fingerprint : to give the user the accessability to

choose fingerprint method (true by default) (bool)

appBar : pass your AppBar to override the default

one (AppBar)

backgroundColor : change the background color of the

main screen (black by default) (Color)

mainTitle : change the main title in the main screen

('Choose your security method' by default) (Text)

mainButtonStyle : change how the button in the main

screen looks like (no need to make it clickable) (Widget)

fingerprintBackgroundColor: change the background

color of the fingerprint screen (grey by default) (Color)

patternBackgroundColor: change the background color

of the pattern screen (black by default) (Color)

pinBackgroundColor: change the background color of

the pin screen (grey by default) (Color)

patternDimension: change the dimension of the pattern

in the pattern screen (3 by default) (int)
License #
This project is licensed under the MIT License - see the LICENSE file for details.
Authors :

Ammar Meslmani .
Saleem Asekrea .

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.

Related Products

More From This Creator