Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
C
Crm Attendance
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dio Maulana
Crm Attendance
Commits
b9f8d1a9
Commit
b9f8d1a9
authored
Nov 13, 2023
by
Dio Maulana
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pembuatan class baru baseApi, message error exception dikeluarkan
parent
b336e561
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
336 additions
and
85 deletions
+336
-85
api.dart
lib/api/api.dart
+95
-73
base_api.dart
lib/api/base_api.dart
+213
-0
absent_camera.dart
lib/page/absent_camera/absent_camera.dart
+1
-0
onboarding.dart
lib/page/onboarding/onboarding.dart
+1
-0
strings.dart
lib/resource/strings.dart
+6
-0
pubspec.lock
pubspec.lock
+19
-11
pubspec.yaml
pubspec.yaml
+1
-1
No files found.
lib/api/api.dart
View file @
b9f8d1a9
import
'dart:convert'
;
import
'dart:convert'
;
import
'package:device_info_plus/device_info_plus.dart'
;
import
'package:device_info_plus/device_info_plus.dart'
;
import
'package:excelso_attendance/api/base_api.dart'
;
import
'package:excelso_attendance/helper/logger.dart'
;
import
'package:excelso_attendance/helper/logger.dart'
;
import
'package:excelso_attendance/helper/pref.dart'
;
import
'package:excelso_attendance/helper/pref.dart'
;
import
'package:excelso_attendance/main.dart'
;
import
'package:excelso_attendance/main.dart'
;
...
@@ -25,12 +26,16 @@ class Api {
...
@@ -25,12 +26,16 @@ class Api {
"user_long"
:
getLongitude
(),
"user_long"
:
getLongitude
(),
};
};
String
bodies
=
jsonEncode
(
data
);
String
bodies
=
jsonEncode
(
data
);
dynamic
jsonObject
=
await
httpRequest
(
// dynamic jsonObject = await httpRequest(
// typePost, apiUrl, "getNearestBranch",
// bodies: bodies);
HttpResponseApi
apiResult
=
await
ConstantApi
.
httpRequest
(
typePost
,
apiUrl
,
"getNearestBranch"
,
typePost
,
apiUrl
,
"getNearestBranch"
,
bodies:
bodies
);
bodies:
bodies
);
if
(
jsonObject
==
false
)
{
if
(
apiResult
.
succes
==
false
)
{
return
ApiResponse
(
error:
true
,
msg:
Strings
.
cantConnectToServer
)
;
return
apiResult
.
apiResponse
!
;
}
else
{
}
else
{
Map
<
String
,
dynamic
>
jsonObject
=
apiResult
.
jsonObject
!;
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
List
<
BranchModel
>
branchList
=
[];
List
<
BranchModel
>
branchList
=
[];
...
@@ -64,7 +69,10 @@ class Api {
...
@@ -64,7 +69,10 @@ class Api {
}
}
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
return
ApiResponse
(
error:
true
,
msg:
Strings
.
serverError
);
return
ApiResponse
(
error:
true
,
msg:
"Error:
$e
"
,
);
}
}
}
}
...
@@ -76,11 +84,13 @@ class Api {
...
@@ -76,11 +84,13 @@ class Api {
"brand_code"
:
brandCode
,
"brand_code"
:
brandCode
,
};
};
String
bodies
=
jsonEncode
(
data
);
String
bodies
=
jsonEncode
(
data
);
dynamic
jsonObject
=
// dynamic jsonObject =
await
httpRequest
(
typePost
,
apiUrl
,
"getShiftList"
,
bodies:
bodies
);
// await httpRequest(typePost, apiUrl, "getShiftList", bodies: bodies);
if
(
jsonObject
==
false
)
{
HttpResponseApi
apiResult
=
await
ConstantApi
.
httpRequest
(
typePost
,
apiUrl
,
"getShiftList"
,
bodies:
bodies
,);
return
ApiResponse
(
error:
true
,
msg:
Strings
.
cantConnectToServer
);
if
(
apiResult
.
succes
==
false
)
{
return
apiResult
.
apiResponse
!;
}
else
{
}
else
{
Map
<
String
,
dynamic
>
jsonObject
=
apiResult
.
jsonObject
!;
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
List
<
ShiftModel
>
shiftList
=
[];
List
<
ShiftModel
>
shiftList
=
[];
...
@@ -105,7 +115,7 @@ class Api {
...
@@ -105,7 +115,7 @@ class Api {
}
}
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
return
ApiResponse
(
error:
true
,
msg:
Strings
.
serverError
);
return
ApiResponse
(
error:
true
,
msg:
"Error:
$e
"
);
}
}
}
}
...
@@ -122,11 +132,14 @@ class Api {
...
@@ -122,11 +132,14 @@ class Api {
"brand_code"
:
brandCode
,
"brand_code"
:
brandCode
,
};
};
String
bodies
=
jsonEncode
(
data
);
String
bodies
=
jsonEncode
(
data
);
dynamic
jsonObject
=
// dynamic jsonObject =
await
httpRequest
(
typePost
,
apiUrl
,
"getUserProfile"
,
bodies:
bodies
);
// await httpRequest(typePost, apiUrl, "getUserProfile", bodies: bodies);
if
(
jsonObject
==
false
)
{
return
ApiResponse
(
error:
true
,
msg:
Strings
.
cantConnectToServer
);
HttpResponseApi
apiResult
=
await
ConstantApi
.
httpRequest
(
typePost
,
apiUrl
,
"getUserProfile"
,
bodies:
bodies
,);
if
(
apiResult
.
succes
==
false
)
{
return
apiResult
.
apiResponse
!;
}
else
{
}
else
{
Map
<
String
,
dynamic
>
jsonObject
=
apiResult
.
jsonObject
!;
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
Map
<
String
,
dynamic
>
user
=
jsonObject
[
'data'
][
'user'
];
Map
<
String
,
dynamic
>
user
=
jsonObject
[
'data'
][
'user'
];
return
ApiResponse
(
return
ApiResponse
(
...
@@ -142,7 +155,7 @@ class Api {
...
@@ -142,7 +155,7 @@ class Api {
}
}
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
return
ApiResponse
(
error:
true
,
msg:
Strings
.
serverError
);
return
ApiResponse
(
error:
true
,
msg:
"Error:
$e
"
);
}
}
}
}
...
@@ -173,11 +186,14 @@ class Api {
...
@@ -173,11 +186,14 @@ class Api {
"forced_submit"
:
forceSubmit
,
"forced_submit"
:
forceSubmit
,
};
};
String
bodies
=
jsonEncode
(
data
);
String
bodies
=
jsonEncode
(
data
);
dynamic
jsonObject
=
// dynamic jsonObject =
await
httpRequest
(
typePost
,
apiUrl
,
"shiftIn"
,
bodies:
bodies
);
// await httpRequest(typePost, apiUrl, "shiftIn", bodies: bodies);
if
(
jsonObject
==
false
)
{
return
ApiResponse
(
error:
true
,
msg:
Strings
.
cantConnectToServer
);
HttpResponseApi
apiResult
=
await
ConstantApi
.
httpRequest
(
typePost
,
apiUrl
,
"shiftIn"
,
bodies:
bodies
,);
if
(
apiResult
.
succes
==
false
)
{
return
apiResult
.
apiResponse
!;
}
else
{
}
else
{
Map
<
String
,
dynamic
>
jsonObject
=
apiResult
.
jsonObject
!;
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
// simpan NIK user
// simpan NIK user
List
<
String
>
listAbsentUser
=
getListAbsentUser
();
List
<
String
>
listAbsentUser
=
getListAbsentUser
();
...
@@ -208,7 +224,7 @@ class Api {
...
@@ -208,7 +224,7 @@ class Api {
}
}
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
return
ApiResponse
(
error:
true
,
msg:
Strings
.
serverError
);
return
ApiResponse
(
error:
true
,
msg:
"Error:
$e
"
);
}
}
}
}
...
@@ -239,11 +255,15 @@ class Api {
...
@@ -239,11 +255,15 @@ class Api {
"forced_submit"
:
forceSubmit
,
"forced_submit"
:
forceSubmit
,
};
};
String
bodies
=
jsonEncode
(
data
);
String
bodies
=
jsonEncode
(
data
);
dynamic
jsonObject
=
// dynamic jsonObject =
await
httpRequest
(
typePost
,
apiUrl
,
"shiftOut"
,
bodies:
bodies
);
// await httpRequest(typePost, apiUrl, "shiftOut", bodies: bodies);
if
(
jsonObject
==
false
)
{
HttpResponseApi
apiResult
=
await
ConstantApi
.
httpRequest
(
typePost
,
apiUrl
,
"shiftIn"
,
bodies:
bodies
,);
if
(
apiResult
.
succes
==
false
)
{
return
ApiResponse
(
error:
true
,
msg:
Strings
.
cantConnectToServer
);
return
ApiResponse
(
error:
true
,
msg:
Strings
.
cantConnectToServer
);
}
else
{
}
else
{
Map
<
String
,
dynamic
>
jsonObject
=
apiResult
.
jsonObject
!;
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
if
(
jsonObject
[
'status'
]
==
"ok"
)
{
// simpan NIK user
// simpan NIK user
List
<
String
>
listAbsentUser
=
getListAbsentUser
();
List
<
String
>
listAbsentUser
=
getListAbsentUser
();
...
@@ -269,7 +289,7 @@ class Api {
...
@@ -269,7 +289,7 @@ class Api {
}
}
}
}
}
catch
(
e
)
{
}
catch
(
e
)
{
return
ApiResponse
(
error:
true
,
msg:
Strings
.
serverError
);
return
ApiResponse
(
error:
true
,
msg:
"Error:
$e
"
);
}
}
}
}
}
}
...
@@ -277,56 +297,58 @@ class Api {
...
@@ -277,56 +297,58 @@ class Api {
int
typeGet
=
1
;
int
typeGet
=
1
;
int
typePost
=
2
;
int
typePost
=
2
;
Future
<
dynamic
>
httpRequest
(
int
typeRequest
,
String
apiUrl
,
String
namaFungsi
,
//
Future<dynamic> httpRequest(int typeRequest, String apiUrl, String namaFungsi,
{
String
?
bodies
=
''
})
async
{
//
{String? bodies = ''}) async {
int
timeOut
=
10
;
//
int timeOut = 10;
dynamic
apiResult
;
//
dynamic apiResult;
if
(
typeRequest
==
typePost
)
{
//
if (typeRequest == typePost) {
apiResult
=
await
http
//
apiResult = await http
.
post
(
Uri
.
parse
(
apiUrl
),
//
.post(Uri.parse(apiUrl),
headers:
{
"Content-Type"
:
"application/json"
},
body:
bodies
)
//
headers: {"Content-Type": "application/json"}, body: bodies)
.
timeout
(
Duration
(
seconds:
timeOut
));
//
.timeout(Duration(seconds: timeOut));
}
else
if
(
typeRequest
==
typeGet
)
{
//
} else if (typeRequest == typeGet) {
apiResult
=
await
http
.
get
(
//
apiResult = await http.get(
Uri
.
parse
(
apiUrl
),
//
Uri.parse(apiUrl),
headers:
{
"Content-Type"
:
"application/json"
},
//
headers: {"Content-Type": "application/json"},
).
timeout
(
Duration
(
seconds:
timeOut
));
//
).timeout(Duration(seconds: timeOut));
}
else
{
//
} else {
if
(
debug
)
{
//
if (debug) {
logd
(
'HTTP REQUEST'
,
'TIPE REQUEST TIDAK VALID'
);
//
logd('HTTP REQUEST', 'TIPE REQUEST TIDAK VALID');
}
//
}
return
false
;
//
return false;
}
//
}
if
(
apiResult
.
statusCode
==
200
||
apiResult
.
statusCode
==
401
)
{
//
if (apiResult.statusCode == 200 || apiResult.statusCode == 401) {
var
jsonObject
=
jsonDecode
(
apiResult
.
body
);
//
var jsonObject = jsonDecode(apiResult.body);
return
jsonObject
;
//
return jsonObject;
}
else
{
//
} else {
if
(
debug
)
{
//
if (debug) {
logd
(
'API CLASS ON API.DART, FUNGSI:
$namaFungsi
, URL :
$apiUrl
'
,
//
logd('API CLASS ON API.DART, FUNGSI: $namaFungsi, URL : $apiUrl',
'ERROR CONNECT TO SERVER, RESPONSE CODE :
${apiResult.statusCode}
, result:
${apiResult.body}
'
);
//
'ERROR CONNECT TO SERVER, RESPONSE CODE : ${apiResult.statusCode}, result: ${apiResult.body}');
}
//
}
return
false
;
//
return false;
}
//
}
}
//
}
Future
<
void
>
sendTotelegram
(
String
teks
)
async
{
// Future<void> sendTotelegram(String teks) async {
String
token
=
''
;
// String token = '';
String
chatId
=
''
;
// String chatId = '';
String
apiUrl
=
// String apiUrl =
'https://api.telegram.org/bot
$token
/sendmessage?chat_id=
$chatId
&text=
$teks
&parse_mode=HTML&disable_web_page_preview=true'
;
// 'https://api.telegram.org/bot$token/sendmessage?chat_id=$chatId&text=$teks&parse_mode=HTML&disable_web_page_preview=true';
httpRequest
(
typeGet
,
apiUrl
,
"sendTotelegram"
);
// httpRequest(typeGet, apiUrl, "sendTotelegram");
}
// }
// class ApiResponse {
// bool error;
// String msg;
// dynamic data;
// String code;
// ApiResponse({
// required this.error,
// required this.msg,
// this.data,
// this.code = "",
// });
// }
class
ApiResponse
{
bool
error
;
String
msg
;
dynamic
data
;
String
code
;
ApiResponse
({
required
this
.
error
,
required
this
.
msg
,
this
.
data
,
this
.
code
=
""
,
});
}
lib/api/base_api.dart
0 → 100644
View file @
b9f8d1a9
import
'dart:async'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'package:excelso_attendance/main.dart'
;
import
'package:excelso_attendance/resource/strings.dart'
;
import
'package:http/http.dart'
as
http
;
int
typeGet
=
1
;
int
typePost
=
2
;
class
ConstantApi
{
static
int
timeOutInSecond
=
20
;
static
Future
<
HttpResponseApi
>
httpRequest
(
int
typeRequest
,
String
apiUrl
,
String
namaFungsi
,
{
String
?
bodies
=
''
})
async
{
http
.
Response
apiResult
;
try
{
if
(
typeRequest
==
typePost
)
{
apiResult
=
await
http
.
post
(
Uri
.
parse
(
apiUrl
),
headers:
{
"Content-Type"
:
"application/json"
},
body:
bodies
)
.
timeout
(
Duration
(
seconds:
timeOutInSecond
));
}
else
if
(
typeRequest
==
typeGet
)
{
apiResult
=
await
http
.
get
(
Uri
.
parse
(
apiUrl
),
headers:
{
"Content-Type"
:
"application/json"
},
).
timeout
(
Duration
(
seconds:
timeOutInSecond
));
}
else
{
if
(
debug
)
{
// ignore: avoid_print
print
(
'HTTP REQUEST => TIPE REQUEST TIDAK VALID'
);
}
return
HttpResponseApi
(
succes:
false
,
msg:
Strings
.
wrongMethod
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
Strings
.
wrongMethod
,
),
);
}
if
(
apiResult
.
statusCode
.
toString
().
startsWith
(
"2"
))
{
try
{
final
jsonObject
=
jsonDecode
(
apiResult
.
body
);
// kalau codenya 2xx, jangan isi api response, biar nanti di kelola di viewmodel response dari server
return
HttpResponseApi
(
succes:
true
,
code:
apiResult
.
statusCode
,
msg:
Strings
.
success
,
jsonObject:
jsonObject
,
);
}
catch
(
e
)
{
return
HttpResponseApi
(
succes:
false
,
msg:
"
${Strings.serverError}
, statusCode:
${apiResult.statusCode}
, msg: body can`t decode "
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
"
${Strings.serverError}
, statusCode:
${apiResult.statusCode}
, msg: body can`t decode "
,
),
);
}
}
else
if
(
apiResult
.
statusCode
.
toString
().
startsWith
(
"4"
))
{
try
{
final
jsonObject
=
jsonDecode
(
apiResult
.
body
);
return
HttpResponseApi
(
succes:
false
,
code:
apiResult
.
statusCode
,
msg:
Strings
.
success
,
jsonObject:
jsonObject
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
jsonObject
[
'msg'
]
??
Strings
.
noMessageFromServer
,
data:
jsonObject
[
'code'
]
??
"UNKNOWN CODE"
),
);
}
catch
(
e
)
{
return
HttpResponseApi
(
succes:
false
,
msg:
"
${Strings.serverError}
, statusCode:
${apiResult.statusCode}
, msg: body can`t decode "
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
"
${Strings.serverError}
, statusCode:
${apiResult.statusCode}
, msg: body can`t decode "
,
),
);
}
}
else
if
(
apiResult
.
statusCode
.
toString
().
startsWith
(
"5"
))
{
// return HttpResponseApi(
// succes: false,
// code: apiResult.statusCode,
// msg: "${Strings.serverError}, statusCode: ${apiResult.statusCode}",
// );
try
{
final
jsonObject
=
jsonDecode
(
apiResult
.
body
);
return
HttpResponseApi
(
succes:
false
,
code:
apiResult
.
statusCode
,
msg:
Strings
.
success
,
jsonObject:
jsonObject
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
jsonObject
[
'msg'
]
??
Strings
.
noMessageFromServer
,
data:
jsonObject
[
'code'
]
??
"UNKNOWN CODE"
,
),
);
}
catch
(
e
)
{
return
HttpResponseApi
(
succes:
false
,
code:
apiResult
.
statusCode
,
msg:
"
${Strings.serverError}
, statusCode:
${apiResult.statusCode}
"
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
"
${Strings.serverError}
, statusCode:
${apiResult.statusCode}
"
,
),
);
}
}
else
{
return
HttpResponseApi
(
succes:
false
,
code:
apiResult
.
statusCode
,
msg:
"
${Strings.serverError}
, statusCode:
${apiResult.statusCode}
, msg:
${Strings.uknownError}
"
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
"
${Strings.serverError}
, statusCode:
${apiResult.statusCode}
, msg:
${Strings.uknownError}
"
,
),
);
}
}
on
TimeoutException
catch
(
_
)
{
return
HttpResponseApi
(
succes:
false
,
msg:
Strings
.
timeoutException
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
Strings
.
timeoutException
,
),
);
}
on
SocketException
catch
(
e
)
{
return
HttpResponseApi
(
succes:
false
,
msg:
"
${Strings.cantConnectToServer}
,
$e
"
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
"
${Strings.cantConnectToServer}
,
$e
"
,
),
);
}
on
HttpException
catch
(
e
)
{
return
HttpResponseApi
(
succes:
false
,
msg:
"
${Strings.clientError}
, Terjadi kendala pada koneksi http, silakan cek kembali koneksi internet anda. Err:
${e.message}
"
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
"
${Strings.clientError}
, Terjadi kendala pada koneksi http, silakan cek kembali koneksi internet anda. Err:
${e.message}
"
,
),
);
}
on
http
.
ClientException
catch
(
e
)
{
return
HttpResponseApi
(
succes:
false
,
msg:
"
${Strings.clientError}
, Terjadi kendala pada koneksi, silakan cek kembali koneksi internet anda. Err:
${e.message}
"
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
"
${Strings.clientError}
, Terjadi kendala pada koneksi, silakan cek kembali koneksi internet anda. Err:
${e.message}
"
,
),
);
}
catch
(
e
)
{
return
HttpResponseApi
(
succes:
false
,
msg:
"
${Strings.serverError}
,
$e
"
,
apiResponse:
ApiResponse
(
error:
true
,
msg:
"
${Strings.serverError}
,
$e
"
,
),
);
}
}
}
class
HttpResponseApi
{
bool
succes
;
String
msg
;
int
?
code
;
dynamic
jsonObject
;
ApiResponse
?
apiResponse
;
// ini untuk yang gagal saja agar tidak redundant ketika terjadi error
HttpResponseApi
({
required
this
.
succes
,
required
this
.
msg
,
this
.
code
,
this
.
jsonObject
,
this
.
apiResponse
,
});
}
class
ApiResponse
{
bool
error
;
String
msg
;
dynamic
data
;
String
code
;
ApiResponse
({
required
this
.
error
,
required
this
.
msg
,
this
.
data
,
this
.
code
=
""
,
});
}
\ No newline at end of file
lib/page/absent_camera/absent_camera.dart
View file @
b9f8d1a9
...
@@ -4,6 +4,7 @@ import 'dart:async';
...
@@ -4,6 +4,7 @@ import 'dart:async';
import
'dart:convert'
;
import
'dart:convert'
;
import
'dart:io'
;
import
'dart:io'
;
import
'package:excelso_attendance/api/api.dart'
;
import
'package:excelso_attendance/api/api.dart'
;
import
'package:excelso_attendance/api/base_api.dart'
;
import
'package:excelso_attendance/helper/arguments/error_args.dart'
;
import
'package:excelso_attendance/helper/arguments/error_args.dart'
;
import
'package:excelso_attendance/helper/arguments/route_args.dart'
;
import
'package:excelso_attendance/helper/arguments/route_args.dart'
;
import
'package:excelso_attendance/helper/modal_dialog.dart'
;
import
'package:excelso_attendance/helper/modal_dialog.dart'
;
...
...
lib/page/onboarding/onboarding.dart
View file @
b9f8d1a9
import
'package:excelso_attendance/api/api.dart'
;
import
'package:excelso_attendance/api/api.dart'
;
import
'package:excelso_attendance/api/base_api.dart'
;
import
'package:excelso_attendance/helper/arguments/error_args.dart'
;
import
'package:excelso_attendance/helper/arguments/error_args.dart'
;
import
'package:excelso_attendance/helper/arguments/route_args.dart'
;
import
'package:excelso_attendance/helper/arguments/route_args.dart'
;
import
'package:excelso_attendance/helper/pref.dart'
;
import
'package:excelso_attendance/helper/pref.dart'
;
...
...
lib/resource/strings.dart
View file @
b9f8d1a9
...
@@ -13,12 +13,18 @@ class Strings {
...
@@ -13,12 +13,18 @@ class Strings {
static
String
serverError
=
"Something wrong with our server, refresh page"
;
static
String
serverError
=
"Something wrong with our server, refresh page"
;
static
String
succesGetData
=
"Success get data"
;
static
String
succesGetData
=
"Success get data"
;
static
String
pleaseWait
=
"Please wait..."
;
static
String
pleaseWait
=
"Please wait..."
;
static
String
wrongMethod
=
"Metode request salah"
;
static
String
uknownError
=
"Error tidak diketahui"
;
static
String
timeoutException
=
"Request timeout"
;
static
String
success
=
"Success"
;
static
String
cameraNotMounted
=
"Kamera tidak berhasil di load"
;
static
String
cameraNotMounted
=
"Kamera tidak berhasil di load"
;
static
String
clientError
=
"Client error"
;
static
String
alreadyIn
=
static
String
alreadyIn
=
"Anda sudah melakukan absen masuk hari ini, yakin ingin absen ulang ?"
;
"Anda sudah melakukan absen masuk hari ini, yakin ingin absen ulang ?"
;
static
String
alreadyOut
=
static
String
alreadyOut
=
"Anda sudah melakukan absen keluar hari ini, yakin ingin absen ulang ?"
;
"Anda sudah melakukan absen keluar hari ini, yakin ingin absen ulang ?"
;
static
String
noMessageFromServer
=
"Server tidak mengembalikan pesan error"
;
static
String
outButNotIn
=
"Anda belum melakukan absen masuk"
;
static
String
outButNotIn
=
"Anda belum melakukan absen masuk"
;
static
String
cameraDescriptionNull
(
String
camerCount
)
{
static
String
cameraDescriptionNull
(
String
camerCount
)
{
return
"Eror loading kamera, {camera description null, camera count:
$camerCount
}"
;
return
"Eror loading kamera, {camera description null, camera count:
$camerCount
}"
;
...
...
pubspec.lock
View file @
b9f8d1a9
...
@@ -117,10 +117,10 @@ packages:
...
@@ -117,10 +117,10 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: collection
name: collection
sha256:
"4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256:
f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.17.
1
"
version: "1.17.
2
"
convert:
convert:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -388,18 +388,18 @@ packages:
...
@@ -388,18 +388,18 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: matcher
name: matcher
sha256: "
6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb
"
sha256: "
1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e
"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.12.1
5
"
version: "0.12.1
6
"
material_color_utilities:
material_color_utilities:
dependency: transitive
dependency: transitive
description:
description:
name: material_color_utilities
name: material_color_utilities
sha256:
d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256:
"9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.
2
.0"
version: "0.
5
.0"
meta:
meta:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -553,10 +553,10 @@ packages:
...
@@ -553,10 +553,10 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: source_span
name: source_span
sha256:
dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256:
"53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "1.
9.1
"
version: "1.
10.0
"
stack_trace:
stack_trace:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -601,10 +601,10 @@ packages:
...
@@ -601,10 +601,10 @@ packages:
dependency: transitive
dependency: transitive
description:
description:
name: test_api
name: test_api
sha256:
eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256:
"75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "0.
5.1
"
version: "0.
6.0
"
typed_data:
typed_data:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -637,6 +637,14 @@ packages:
...
@@ -637,6 +637,14 @@ packages:
url: "https://pub.dev"
url: "https://pub.dev"
source: hosted
source: hosted
version: "2.1.4"
version: "2.1.4"
web:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
win32:
win32:
dependency: transitive
dependency: transitive
description:
description:
...
@@ -678,5 +686,5 @@ packages:
...
@@ -678,5 +686,5 @@ packages:
source: hosted
source: hosted
version: "3.1.2"
version: "3.1.2"
sdks:
sdks:
dart: ">=3.
0.0
<4.0.0"
dart: ">=3.
1.0-185.0.dev
<4.0.0"
flutter: ">=3.3.0"
flutter: ">=3.3.0"
pubspec.yaml
View file @
b9f8d1a9
...
@@ -17,7 +17,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
...
@@ -17,7 +17,7 @@ publish_to: "none" # Remove this line if you wish to publish to pub.dev
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
# In Windows, build-name is used as the major, minor, and patch parts
# In Windows, build-name is used as the major, minor, and patch parts
# of the product and file versions while build-number is used as the build suffix.
# of the product and file versions while build-number is used as the build suffix.
version
:
1.0.
0+1
version
:
1.0.
1+2
environment
:
environment
:
sdk
:
"
>=3.0.0
<4.0.0"
sdk
:
"
>=3.0.0
<4.0.0"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment