login error update
This commit is contained in:
@ -100,14 +100,14 @@ class _LoginPageState extends State<LoginPage> {
|
|||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
Future.delayed(const Duration(seconds: 2), () {
|
Future.delayed(const Duration(milliseconds: 2001), () {
|
||||||
Navigator.of(context).pop(true);
|
Navigator.of(context).pop(true);
|
||||||
Navigator.pushAndRemoveUntil(
|
// Navigator.pushAndRemoveUntil(
|
||||||
context,
|
// context,
|
||||||
MaterialPageRoute(
|
// MaterialPageRoute(
|
||||||
builder: (context) => ScanQRCode(),
|
// builder: (context) => ScanQRCode(),
|
||||||
),
|
// ),
|
||||||
(route) => false);
|
// (route) => false);
|
||||||
});
|
});
|
||||||
return const AlertDialog(
|
return const AlertDialog(
|
||||||
title: Text("Sukses"),
|
title: Text("Sukses"),
|
||||||
@ -115,6 +115,16 @@ class _LoginPageState extends State<LoginPage> {
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Future.delayed(const Duration(seconds: 3), () {
|
||||||
|
// Navigator.of(context).pop(true);
|
||||||
|
Navigator.pushAndRemoveUntil(
|
||||||
|
context,
|
||||||
|
MaterialPageRoute(
|
||||||
|
builder: (context) => ScanQRCode(),
|
||||||
|
),
|
||||||
|
(route) => false);
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
ScaffoldMessenger.of(context)
|
ScaffoldMessenger.of(context)
|
||||||
.showSnackBar(SnackBar(content: Text(_returnString.toString())));
|
.showSnackBar(SnackBar(content: Text(_returnString.toString())));
|
||||||
|
|||||||
@ -31,7 +31,7 @@ class _PencarianState extends State<Pencarian> {
|
|||||||
|
|
||||||
Future<List<Note>> fetchNotes() async {
|
Future<List<Note>> fetchNotes() async {
|
||||||
const url =
|
const url =
|
||||||
'http://192.168.43.125/barcode_absensi_admin/api_server/list_karyawan';
|
'https://barcode-absensi.kicap-karan.com/api_server/list_karyawan';
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final response = await http.get(Uri.parse(url));
|
final response = await http.get(Uri.parse(url));
|
||||||
|
|||||||
@ -12,7 +12,7 @@ class StatePetugas extends ChangeNotifier {
|
|||||||
// ignore: prefer_final_locals
|
// ignore: prefer_final_locals
|
||||||
var uri = Uri.parse(
|
var uri = Uri.parse(
|
||||||
// ignore: prefer_interpolation_to_compose_strings
|
// ignore: prefer_interpolation_to_compose_strings
|
||||||
"http://192.168.43.125/barcode_absensi_admin/api_server/login_petugas?username=" +
|
"https://barcode-absensi.kicap-karan.com/api_server/login_petugas?username=" +
|
||||||
username +
|
username +
|
||||||
"&password=" +
|
"&password=" +
|
||||||
password);
|
password);
|
||||||
@ -46,7 +46,7 @@ class StatePetugas extends ChangeNotifier {
|
|||||||
try {
|
try {
|
||||||
final uri = Uri.parse(
|
final uri = Uri.parse(
|
||||||
// ignore: prefer_interpolation_to_compose_strings
|
// ignore: prefer_interpolation_to_compose_strings
|
||||||
"http://192.168.43.125/barcode_absensi_admin/api_server/cek_karyawan_by_qrcode?nik=" +
|
"https://barcode-absensi.kicap-karan.com/api_server/cek_karyawan_by_qrcode?nik=" +
|
||||||
qrcode);
|
qrcode);
|
||||||
final SharedPreferences sharedPreferences =
|
final SharedPreferences sharedPreferences =
|
||||||
await SharedPreferences.getInstance();
|
await SharedPreferences.getInstance();
|
||||||
@ -81,7 +81,7 @@ class StatePetugas extends ChangeNotifier {
|
|||||||
try {
|
try {
|
||||||
final uri = Uri.parse(
|
final uri = Uri.parse(
|
||||||
// ignore: prefer_interpolation_to_compose_strings
|
// ignore: prefer_interpolation_to_compose_strings
|
||||||
"http://192.168.43.125/barcode_absensi_admin/api_server/absensi_karyawan");
|
"https://barcode-absensi.kicap-karan.com/api_server/absensi_karyawan");
|
||||||
final response = await http.post(
|
final response = await http.post(
|
||||||
uri,
|
uri,
|
||||||
headers: <String, String>{
|
headers: <String, String>{
|
||||||
|
|||||||
Reference in New Issue
Block a user