step 19 : icon aplikasi, setting build apk

This commit is contained in:
sindhu
2024-01-29 11:09:58 +07:00
parent 0bdc5df67f
commit 46d04f5aff
45 changed files with 34 additions and 3 deletions

View File

@@ -65,6 +65,36 @@ abstract class BaseRepository {
}
}
// with handling
Future<Map<String, dynamic>> postGraphQlQueryX(
String query, Map<String, dynamic> inpVariables) async {
try {
final options =
QueryOptions(document: gql(query), variables: inpVariables);
final QueryResult result = await graphql.query(options);
if (result.hasException) {
if (result.exception != null) {
if (result.exception!.graphqlErrors.isNotEmpty
is BaseRepositoryException) {
final error = result.exception!.graphqlErrors[0];
BaseRepositoryException exception =
result.exception!.linkException as BaseRepositoryException;
var errorMessage = exception.message;
print(errorMessage);
throw BaseRepositoryException(
message: errorMessage,
);
}
}
}
return result.data!;
} catch (e) {
throw BaseRepositoryException(message: e.toString());
}
}
// NATIVE POST PAKE DIO
Future<Map<String, dynamic>> post({
required Map<String, dynamic> param,

View File

@@ -152,15 +152,16 @@ class PresensiRepository extends BaseRepository {
// Map<String, dynamic> inpVariables = paramInpVariables;
// Map<String, dynamic> inpVariables = {
// Map<String, dynamic> X = {
// "M_StaffID": M_StaffID,
// "M_CompanyID": M_CompanyID,
// "token": token,
// "token": token+"1",
// };
print(paramInpVariables);
final resp = await postGraphQlQuery(query, paramInpVariables);
// final resp = await postGraphQlQueryX(query, X);
// print(inpVariables);