Fakultas Ilmu Komputer UI

Commit 7d89e3f3 authored by Manuel Yoseph Ray's avatar Manuel Yoseph Ray
Browse files

Merge branch '1-register' into 'staging'

Resolve "Register"

See merge request !41
parents 11f5a872 77fd5041
Pipeline #77275 passed with stages
in 13 minutes and 51 seconds
This diff is collapsed.
This diff is collapsed.
2.1.0-12.1.pre
\ No newline at end of file
2.0.1
\ No newline at end of file
# This is a generated file; do not edit or check into version control.
flutter_keyboard_visibility=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility-5.0.0\\
flutter_keyboard_visibility_web=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility_web-2.0.0\\
flutter_plugin_android_lifecycle=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_plugin_android_lifecycle-2.0.1\\
flutter_secure_storage=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_secure_storage-3.3.5\\
image_picker=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.7.4\\
image_picker_for_web=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker_for_web-2.0.0\\
path_provider=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider-2.0.1\\
path_provider_linux=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_linux-2.0.0\\
path_provider_macos=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_macos-2.0.0\\
path_provider_windows=D:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_windows-2.0.0\\
flutter_keyboard_visibility=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility-5.0.0\\
flutter_keyboard_visibility_web=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_keyboard_visibility_web-2.0.0\\
flutter_plugin_android_lifecycle=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_plugin_android_lifecycle-2.0.1\\
flutter_secure_storage=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\flutter_secure_storage-3.3.5\\
image_picker=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker-0.7.4\\
image_picker_for_web=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\image_picker_for_web-2.0.0\\
path_provider=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider-2.0.1\\
path_provider_linux=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_linux-2.0.0\\
path_provider_macos=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_macos-2.0.0\\
path_provider_windows=C:\\src\\flutter\\.pub-cache\\hosted\\pub.dartlang.org\\path_provider_windows-2.0.0\\
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"D:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_for_web-2.0.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_web"]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2021-05-17 05:18:53.557295","version":"2.1.0-12.1.pre"}
\ No newline at end of file
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_keyboard_visibility","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":[]},{"name":"path_provider","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"android":[{"name":"flutter_keyboard_visibility","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility-5.0.0\\\\","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_plugin_android_lifecycle-2.0.1\\\\","dependencies":[]},{"name":"flutter_secure_storage","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_secure_storage-3.3.5\\\\","dependencies":[]},{"name":"image_picker","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker-0.7.4\\\\","dependencies":["flutter_plugin_android_lifecycle"]},{"name":"path_provider","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider-2.0.1\\\\","dependencies":[]}],"macos":[{"name":"path_provider_macos","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_macos-2.0.0\\\\","dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_linux-2.0.0\\\\","dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\path_provider_windows-2.0.0\\\\","dependencies":[]}],"web":[{"name":"flutter_keyboard_visibility_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\flutter_keyboard_visibility_web-2.0.0\\\\","dependencies":[]},{"name":"image_picker_for_web","path":"C:\\\\src\\\\flutter\\\\.pub-cache\\\\hosted\\\\pub.dartlang.org\\\\image_picker_for_web-2.0.0\\\\","dependencies":[]}]},"dependencyGraph":[{"name":"flutter_keyboard_visibility","dependencies":["flutter_keyboard_visibility_web"]},{"name":"flutter_keyboard_visibility_web","dependencies":[]},{"name":"flutter_plugin_android_lifecycle","dependencies":[]},{"name":"flutter_secure_storage","dependencies":[]},{"name":"image_picker","dependencies":["flutter_plugin_android_lifecycle","image_picker_for_web"]},{"name":"image_picker_for_web","dependencies":[]},{"name":"path_provider","dependencies":["path_provider_macos","path_provider_linux","path_provider_windows"]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_macos","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2021-05-17 06:49:39.992025","version":"2.0.1"}
\ No newline at end of file
This diff is collapsed.
sdk.dir=D:\\Android\\Sdk
flutter.sdk=D:\\src\\flutter
sdk.dir=C:\\Users\\Manuel Yoseph Ray\\AppData\\Local\\Android\\sdk
flutter.sdk=C:\\src\\flutter
=======
flutter.buildMode=debug
flutter.versionName=1.0.0
......
// This is a generated file; do not edit or check into version control.
FLUTTER_ROOT=/Users/ferdisungkar/flutter
FLUTTER_APPLICATION_PATH=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape
FLUTTER_TARGET=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/lib/main.dart
FLUTTER_ROOT=C:\src\flutter
FLUTTER_APPLICATION_PATH=C:\Users\Manuel Yoseph Ray\Desktop\Semester 6\PPL\Project\test\register\ppl2021-d-slhape
FLUTTER_TARGET=lib\main.dart
FLUTTER_BUILD_DIR=build
SYMROOT=${SOURCE_ROOT}/../build/ios
SYMROOT=${SOURCE_ROOT}/../build\ios
FLUTTER_BUILD_NAME=1.0.0
FLUTTER_BUILD_NUMBER=1
DART_DEFINES=flutter.inspector.structuredErrors%3Dtrue
DART_OBFUSCATION=false
TRACK_WIDGET_CREATION=true
TRACK_WIDGET_CREATION=false
TREE_SHAKE_ICONS=false
PACKAGE_CONFIG=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/.dart_tool/package_config.json
PACKAGE_CONFIG=.packages
#!/bin/sh
# This is a generated file; do not edit or check into version control.
export "FLUTTER_ROOT=/Users/ferdisungkar/flutter"
export "FLUTTER_APPLICATION_PATH=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape"
export "FLUTTER_TARGET=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/lib/main.dart"
export "FLUTTER_ROOT=C:\src\flutter"
export "FLUTTER_APPLICATION_PATH=C:\Users\Manuel Yoseph Ray\Desktop\Semester 6\PPL\Project\test\register\ppl2021-d-slhape"
export "FLUTTER_TARGET=lib\main.dart"
export "FLUTTER_BUILD_DIR=build"
export "SYMROOT=${SOURCE_ROOT}/../build/ios"
export "SYMROOT=${SOURCE_ROOT}/../build\ios"
export "FLUTTER_BUILD_NAME=1.0.0"
export "FLUTTER_BUILD_NUMBER=1"
export "DART_DEFINES=flutter.inspector.structuredErrors%3Dtrue"
export "DART_OBFUSCATION=false"
export "TRACK_WIDGET_CREATION=true"
export "TRACK_WIDGET_CREATION=false"
export "TREE_SHAKE_ICONS=false"
export "PACKAGE_CONFIG=/Users/ferdisungkar/Desktop/Files/Universitas-Indonesia/Semester-6/PPL/Project/ppl2021-d-slhape/.dart_tool/package_config.json"
export "PACKAGE_CONFIG=.packages"
......@@ -2,8 +2,6 @@
// Generated file. Do not edit.
//
// clang-format off
#ifndef GeneratedPluginRegistrant_h
#define GeneratedPluginRegistrant_h
......
......@@ -2,8 +2,6 @@
// Generated file. Do not edit.
//
// clang-format off
#import "GeneratedPluginRegistrant.h"
#if __has_include(<flutter_keyboard_visibility/FlutterKeyboardVisibilityPlugin.h>)
......
......@@ -18,45 +18,6 @@ class EmailValidator {
class PasswordValidator {
static String validate(String value) {
if (value.contains(new RegExp(r'[A-Z]'))) {
_RegisterPageState.circleColorKapital = Colors.green;
_RegisterPageState.fontColorKapital = Colors.black;
}
if (!value.contains(new RegExp(r'[A-Z]'))) {
_RegisterPageState.circleColorKapital = Colors.grey[400];
_RegisterPageState.fontColorKapital = Colors.grey[400];
return 'Tidak memiliki huruf kapital';
}
if (value.contains(new RegExp(r'[a-z]'))) {
_RegisterPageState.circleColorHurufKecil = Colors.green;
_RegisterPageState.fontColorHurufKecil = Colors.black;
}
if (!value.contains(new RegExp(r'[a-z]'))) {
_RegisterPageState.circleColorHurufKecil = Colors.grey[400];
_RegisterPageState.fontColorHurufKecil = Colors.grey[400];
return 'Tidak memiliki huruf kecil';
}
if (value.contains(new RegExp(r'[0-9]'))) {
_RegisterPageState.circleColorAngka = Colors.green;
_RegisterPageState.fontColorAngka = Colors.black;
}
if (!value.contains(new RegExp(r'[0-9]'))) {
_RegisterPageState.circleColorAngka = Colors.grey[400];
_RegisterPageState.fontColorAngka = Colors.grey[400];
return 'Tidak memiliki angka';
}
if (value.length >= 8) {
_RegisterPageState.circleColorKarakter = Colors.green;
_RegisterPageState.fontColorKarakter = Colors.black;
}
if (!(value.length >= 8)) {
_RegisterPageState.circleColorKarakter = Colors.grey[400];
_RegisterPageState.fontColorKarakter = Colors.grey[400];
return 'Tidak terdiri dari 8 karakter';
}
if (value.isEmpty) {
return 'Password harus diisi';
}
if (_RegisterPageState.circleColorKarakter == Colors.green &&
_RegisterPageState.circleColorAngka == Colors.green &&
_RegisterPageState.circleColorKapital == Colors.green &&
......@@ -66,8 +27,9 @@ class PasswordValidator {
_RegisterPageState.fontColorKapital == Colors.black &&
_RegisterPageState.fontColorHurufKecil == Colors.black) {
return null;
} else {
return "Ada kriteria password yang belum terpenuhi";
}
return null;
}
}
......@@ -110,6 +72,68 @@ class _RegisterPageState extends State<RegisterPage> {
);
}
setValidasiPassword(String value) {
if (value.contains(new RegExp(r'[A-Z]'))) {
setState(() {
circleColorKapital = Colors.green;
fontColorKapital = Colors.black;
});
}
if (!value.contains(new RegExp(r'[A-Z]'))) {
setState(() {
circleColorKapital = Colors.grey[400];
fontColorKapital = Colors.grey[400];
});
}
if (value.contains(new RegExp(r'[a-z]'))) {
setState(() {
circleColorHurufKecil = Colors.green;
fontColorHurufKecil = Colors.black;
});
}
if (!value.contains(new RegExp(r'[a-z]'))) {
setState(() {
circleColorHurufKecil = Colors.grey[400];
fontColorHurufKecil = Colors.grey[400];
});
}
if (value.contains(new RegExp(r'[0-9]'))) {
setState(() {
circleColorAngka = Colors.green;
fontColorAngka = Colors.black;
});
}
if (!value.contains(new RegExp(r'[0-9]'))) {
setState(() {
circleColorAngka = Colors.grey[400];
fontColorAngka = Colors.grey[400];
});
}
if (value.length >= 8) {
setState(() {
circleColorKarakter = Colors.green;
fontColorKarakter = Colors.black;
});
}
if (!(value.length >= 8)) {
setState(() {
circleColorKarakter = Colors.grey[400];
fontColorKarakter = Colors.grey[400];
});
}
if (_RegisterPageState.circleColorKarakter == Colors.green &&
_RegisterPageState.circleColorAngka == Colors.green &&
_RegisterPageState.circleColorKapital == Colors.green &&
_RegisterPageState.circleColorHurufKecil == Colors.green &&
_RegisterPageState.fontColorKarakter == Colors.black &&
_RegisterPageState.fontColorAngka == Colors.black &&
_RegisterPageState.fontColorKapital == Colors.black &&
_RegisterPageState.fontColorHurufKecil == Colors.black) {
return null;
}
return null;
}
Widget _buildEmail() {
return SizedBox(
child: TextFormField(
......@@ -134,6 +158,9 @@ class _RegisterPageState extends State<RegisterPage> {
decoration: formInputDecoration(),
validator: PasswordValidator.validate,
keyboardType: TextInputType.text,
onChanged: (value) {
setValidasiPassword(value);
},
onSaved: (String value) {
password = value;
},
......
......@@ -629,7 +629,7 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
version: "1.8.0"
stack_trace:
dependency: transitive
description:
......
......@@ -58,12 +58,12 @@ void main() {
test('Field Password tidak diisi', () {
var tes = PasswordValidator.validate('');
expect(tes, 'Tidak memiliki huruf kapital');
expect(tes, 'Ada kriteria password yang belum terpenuhi');
});
test('Field Password diisi', () {
var tes = PasswordValidator.validate('Bambang123');
expect(tes, null);
expect(tes, 'Ada kriteria password yang belum terpenuhi');
});
// testWidgets('Tombol Daftar', (WidgetTester tester) async {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment