xputnikx / flutter-passcode Goto Github PK
View Code? Open in Web Editor NEWFlutter - Passcode Lock Screen
License: Apache License 2.0
Flutter - Passcode Lock Screen
License: Apache License 2.0
Unable to set length of pin code. There is no option when construction Passcode
Launching lib/main.dart on Android SDK built for x86 in debug mode...
[!] Your app isn't using AndroidX.
To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.
Running Gradle task 'assembleDebug'...
FAILURE: Build failed with an exception.
Android resource linking failed
Output: /Users/marcmathys/AndroidStudioProjects/example/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:186: error: resource android:attr/fontVariationSettings not found.
/Users/marcmathys/AndroidStudioProjects/example/build/app/intermediates/incremental/mergeDebugResources/merged.dir/values/values.xml:187: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: /Users/marcmathys/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/18bf3ef7ae11aba806cb141a66e9d4af/aapt2-3.2.1-4818971-osx/aapt2 link -I
/Users/marcmathys/Library/Android/sdk/platforms/android-27/android.jar
--manifest
/Users/marcmathys/AndroidStudioProjects/example/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml
-o
/Users/marcmathys/AndroidStudioProjects/example/build/app/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_
-R
@/Users/marcmathys/AndroidStudioProjects/example/build/app/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
/Users/marcmathys/AndroidStudioProjects/example/build/app/generated/not_namespaced_r_class_sources/debug/processDebugResources/r
--custom-package
com.redeyes.passcodescreen.example
-0
apk
--output-text-symbols
/Users/marcmathys/AndroidStudioProjects/example/build/app/intermediates/symbols/debug/R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
Output: /Users/marcmathys/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0.aar/9c79557a07b349133747795d92e9553b/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/fontVariationSettings not found.
/Users/marcmathys/.gradle/caches/transforms-1/files-1.1/support-compat-28.0.0.aar/9c79557a07b349133747795d92e9553b/res/values/values.xml:89:5-125:25: AAPT: error: resource android:attr/ttcIndex not found.
error: failed linking references.
Command: /Users/marcmathys/.gradle/caches/transforms-1/files-1.1/aapt2-3.2.1-4818971-osx.jar/18bf3ef7ae11aba806cb141a66e9d4af/aapt2-3.2.1-4818971-osx/aapt2 link -I
/Users/marcmathys/Library/Android/sdk/platforms/android-27/android.jar
--manifest
/Users/marcmathys/AndroidStudioProjects/example/build/app/intermediates/merged_manifests/debug/processDebugManifest/merged/AndroidManifest.xml
-o
/Users/marcmathys/AndroidStudioProjects/example/build/app/intermediates/processed_res/debug/processDebugResources/out/resources-debug.ap_
-R
@/Users/marcmathys/AndroidStudioProjects/example/build/app/intermediates/incremental/processDebugResources/resources-list-for-resources-debug.ap_.txt
--auto-add-overlay
--java
/Users/marcmathys/AndroidStudioProjects/example/build/app/generated/not_namespaced_r_class_sources/debug/processDebugResources/r
--custom-package
com.redeyes.passcodescreen.example
-0
apk
--output-text-symbols
/Users/marcmathys/AndroidStudioProjects/example/build/app/intermediates/symbols/debug/R.txt
--no-version-vectors
Daemon: AAPT2 aapt2-3.2.1-4818971-osx Daemon #0
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 9s
Finished with error: Gradle task assembleDebug failed with exit code 1
Because example depends on passcode_screen from path which doesn't exist (could not find package passcode_screen at "....\passcode_screen"), version solving failed.
pub get failed (66)
to clear programmatically. i am doing a change pin feature using this. currently, i dont see any function in passcode_screen.dart
so a property like
changePin: true
would be nice. so if the user incorrectly enters both pin, a restart button will appear . just a suggestion.
Invalid curve endpoint at 1.0
Curves must map 0.0 to near zero and 1.0 to near one but ShakeCurve mapped 1.0 to 3.6739403974420594e-16, which is near 0.0.
@OverRide
initState() {
super.initState();
streamSubscription = widget.shouldTriggerVerification.listen((isValid) => _showValidation(isValid));
controller = AnimationController(duration: const Duration(milliseconds: 500), vsync: this);
final Animation curve = CurvedAnimation(parent: controller, curve: ShakeCurve());
animation = Tween(begin: 0.0, end: ### 10.0).animate(curve)
..addStatusListener((status) {
if (status == AnimationStatus.completed) {
setState(() {
enteredPasscode = '';
controller.value = 0;
});
}
})
..addListener(() {
setState(() {
// the animation object’s value is the changed state
});
});
}
Example as "passcode screen" as first route/screen ?
I think there was digitSize
property in the KeyboardUIConfig
. It seems not available anymore. Now the KeyboardUIConfig
constructors are:
const KeyboardUIConfig({
this.digitBorderWidth = 1,
this.keyboardRowMargin = const EdgeInsets.only(top: 15, left: 4, right: 4),
this.digitInnerMargin = const EdgeInsets.all(24),
this.primaryColor = Colors.white,
this.digitFillColor = Colors.transparent,
this.digitTextStyle = const TextStyle(fontSize: 30, color: Colors.white),
this.deleteButtonTextStyle = const TextStyle(fontSize: 16, color: Colors.white),
this.keyboardSize,
});
What's the equal replacement for digitSize
? Is it keyboardSize
or digitTextStyle
?
When I use a visible (not transparent) fill color for the keyboard circles, the filled circles are drawn at wrong positions. The circle borders are not at the edges of the circle fills and some of the filled circles (different digits depending on the keyboard size) are cut off on the tops.
I use the widget as a child in a SimpleDialog and it looks like this:
Container(
height: 400,
width: 300,
child: PasscodeScreen(
title: Container(),
backgroundColor: Colors.white,
circleUIConfig: CircleUIConfig(
borderColor: Colors.grey[800],
fillColor: Colors.grey[800],
),
keyboardUIConfig: KeyboardUIConfig(
digitTextStyle: const TextStyle(
color: Colors.black,
fontSize: 25,
),
primaryColor: Colors.white,
digitFillColor: Colors.grey,
keyboardSize: Size(220, 320),
),
cancelButton: Container(height: 0, width: 0,),
deleteButton: Icon(Icons.backspace),
passwordDigits: 4,
passwordEnteredCallback: _onPinEntered,
shouldTriggerVerification: _pinVerificationNotifier.stream,
),
),
I suggest using the digitFillColor as the color of the BoxDecoration rather than the color of the Material.
When using in a flutter web app, the passcode should be enterable using keyboard. Please add keyboard shortcuts (0-9 + backspace).
When pressing and dragging on the passcode screen I got 'A RenderFlex overflowed by 180 pixels on the right.'.
This seems to be fixed when surrounding the rows in passcode_screen.dart with an Expanded widget.
Great package, thank you. Perfect for what I needed.
I have a suggestion and that's to bring back the shake animation on a wrong password. It seemed to exist before everything got condensed into on main.dart file, but now nothing happens when the wrong passcode is entered.
Also related to this, maybe set a maximum number of tries before a lockout?
Thanks.
Can we add null safety to the project?
If someone want to pop the page, he could define a cancelCallback function, do it by himself.
Thanks for this work, it saves lots of my time.
reset and empty all input number fields
If we increase the font size via accessibility - the plugin will display spanned text :
First off thanks for this awesome library!
I feel the API is not flexible enough for me to customize. I would suggest just provide a widget for the header, it's up to the implementer to provide either a "Text('Enter your point') with different styles" or something more creative.
The same goes to the face of the buttons. You can open up to 9 digits and 1 for the cancel button to either provide just Text or something else. For example, I would like to have an Icon instead of "Cancel" text. Also, the face text can be customized say for non-arabic numerals.
Because example depends on passcode_screen from path which doesn't exist (could not find package passcode_screen at "....\passcode_screen"), version solving failed.
pub get failed (66; Because example depends on passcode_screen from path which doesn't exist (could not find package passcode_screen at "....\passcode_screen"), version solving failed.)
cancelLocalizedText has been replaced with cancelButton, same for delete
The documentation as it is does not compile
I'm trying to implement a lockscreen and I'm not sure what bottomwidget does. I tried adding a button but the ontap event simply triggers the delete/cancel button. Looked through the source code and I'm not entirely sure. Thanks in advance!
People forget passcodes sometimes and and therefore there should be a child widget that could be positioned at the bottom of the screen for ('Forgot the password?') kind of Widget.
It would make this aesthatically beautiful Widget more pragmatic.
How can i make the title to appear on top of the keypad in the landscape mode?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.