Updated pages
This commit is contained in:
parent
58a104b772
commit
ea51af0eb9
4 changed files with 168 additions and 212 deletions
|
|
@ -1,12 +1,11 @@
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hashlib/hashlib.dart';
|
||||
import 'package:ocbo_esign_mobile/blocs/user/functions/bloc_setuser.dart';
|
||||
import 'package:ocbo_esign_mobile/functions/get_api.dart';
|
||||
import 'package:ocbo_esign_mobile/functions/modal.dart';
|
||||
import 'package:ocbo_esign_mobile/widgets/box_widget.dart';
|
||||
// import 'package:go_router/go_router.dart';
|
||||
// import 'package:hashlib/hashlib.dart';
|
||||
// import 'package:ocbo_esign_mobile/blocs/user/functions/bloc_setuser.dart';
|
||||
// import 'package:ocbo_esign_mobile/functions/get_api.dart';
|
||||
// import 'package:ocbo_esign_mobile/functions/modal.dart';
|
||||
import 'package:ocbo_esign_mobile/widgets/button_widget.dart';
|
||||
import 'package:ocbo_esign_mobile/widgets/image_widget.dart';
|
||||
import 'package:ocbo_esign_mobile/widgets/input_widget.dart';
|
||||
|
|
@ -23,7 +22,7 @@ class LoginPage extends StatefulWidget {
|
|||
class _LoginPageState extends State<LoginPage> {
|
||||
final _passwordController = TextEditingController();
|
||||
final _approver = dotenv.env['HEAD']!;
|
||||
final _approverId = dotenv.env['HEADID']!;
|
||||
// final _approverId = dotenv.env['HEADID']!;
|
||||
late ValueNotifier<String> passwordNotifier;
|
||||
|
||||
@override
|
||||
|
|
@ -53,13 +52,13 @@ class _LoginPageState extends State<LoginPage> {
|
|||
// }
|
||||
// }
|
||||
|
||||
Future<String> _securePassword(String password) async {
|
||||
final firstHash = sha1.string(password);
|
||||
final secondHash = sha384.string(firstHash.toString());
|
||||
final thirdHash = sha1.string(secondHash.toString());
|
||||
// Future<String> _securePassword(String password) async {
|
||||
// final firstHash = sha1.string(password);
|
||||
// final secondHash = sha384.string(firstHash.toString());
|
||||
// final thirdHash = sha1.string(secondHash.toString());
|
||||
|
||||
return thirdHash.toString();
|
||||
}
|
||||
// return thirdHash.toString();
|
||||
// }
|
||||
|
||||
// void _login() async {
|
||||
// final connected = await _checkConnection();
|
||||
|
|
@ -79,14 +78,14 @@ class _LoginPageState extends State<LoginPage> {
|
|||
// }
|
||||
// }
|
||||
|
||||
void _setLogin() {
|
||||
blocSetUser(context, _approver);
|
||||
context.push('/approval');
|
||||
}
|
||||
// void _setLogin() {
|
||||
// blocSetUser(context, _approver);
|
||||
// context.push('/approval');
|
||||
// }
|
||||
|
||||
void _showDialog() {
|
||||
showModal(context, 'Error', 'Invalid password, try again.', true);
|
||||
}
|
||||
// void _showDialog() {
|
||||
// showModal(context, 'Error', 'Invalid password, try again.', true);
|
||||
// }
|
||||
|
||||
void _ignoreButton() {}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue