Commit 462b1b21 authored by Dio Maulana's avatar Dio Maulana

final desiign

parent ba68464a
...@@ -30,6 +30,7 @@ class Api { ...@@ -30,6 +30,7 @@ class Api {
return ApiResponse(error: true, msg: Strings.cantConnectToServer); return ApiResponse(error: true, msg: Strings.cantConnectToServer);
} else { } else {
if (jsonObject['status'] == "ok") { if (jsonObject['status'] == "ok") {
print(jsonObject);
List<BranchModel> branchList = []; List<BranchModel> branchList = [];
List<dynamic> branchs = jsonObject['data']['branch_list']; List<dynamic> branchs = jsonObject['data']['branch_list'];
...@@ -42,6 +43,10 @@ class Api { ...@@ -42,6 +43,10 @@ class Api {
} }
ConstantString.outletDistance = ConstantString.outletDistance =
jsonObject['data']['max_distance'].toString(); jsonObject['data']['max_distance'].toString();
ConstantString.logoUrlHome =
jsonObject['data']['logo_attendance_home'];
ConstantString.logoUrlCamera =
jsonObject['data']['logo_attendance_camera'];
return ApiResponse( return ApiResponse(
error: false, error: false,
msg: Strings.succesGetData, msg: Strings.succesGetData,
...@@ -110,6 +115,7 @@ class Api { ...@@ -110,6 +115,7 @@ class Api {
Map<String, dynamic> data = { Map<String, dynamic> data = {
"branch_id": branchId, "branch_id": branchId,
"nik": nik, "nik": nik,
"brand_code": brandCode,
}; };
String bodies = jsonEncode(data); String bodies = jsonEncode(data);
dynamic jsonObject = dynamic jsonObject =
...@@ -118,6 +124,7 @@ class Api { ...@@ -118,6 +124,7 @@ class Api {
return ApiResponse(error: true, msg: Strings.cantConnectToServer); return ApiResponse(error: true, msg: Strings.cantConnectToServer);
} else { } else {
if (jsonObject['status'] == "ok") { if (jsonObject['status'] == "ok") {
print(jsonObject);
Map<String, dynamic> user = jsonObject['data']['user']; Map<String, dynamic> user = jsonObject['data']['user'];
return ApiResponse( return ApiResponse(
error: false, error: false,
...@@ -143,6 +150,7 @@ class Api { ...@@ -143,6 +150,7 @@ class Api {
try { try {
Map<String, dynamic> data = { Map<String, dynamic> data = {
"branch_id": branchId, "branch_id": branchId,
"brand_code": brandCode,
"nik": nik, "nik": nik,
"shift_id": shiftId, "shift_id": shiftId,
"user_lat": position.latitude, "user_lat": position.latitude,
...@@ -196,6 +204,7 @@ class Api { ...@@ -196,6 +204,7 @@ class Api {
try { try {
Map<String, dynamic> data = { Map<String, dynamic> data = {
"branch_id": branchId, "branch_id": branchId,
"brand_code": brandCode,
"nik": nik, "nik": nik,
"user_lat": position.latitude, "user_lat": position.latitude,
"user_long": position.longitude, "user_long": position.longitude,
......
...@@ -9,13 +9,19 @@ class AbsentCameraArguments { ...@@ -9,13 +9,19 @@ class AbsentCameraArguments {
final ShiftModel? shiftModel; final ShiftModel? shiftModel;
final ProfileModel profile; final ProfileModel profile;
final String nik; final String nik;
final String shiftNameSelected;
final String shiftStartTime;
final String shiftEndTime;
AbsentCameraArguments({ AbsentCameraArguments({
required this.isIn, required this.isIn,
required this.branchModel, required this.branchModel,
required this.nik, required this.nik,
required this.profile, required this.profile,
required this.shiftStartTime,
required this.shiftEndTime,
this.shiftModel, this.shiftModel,
required this.shiftNameSelected,
}); });
} }
...@@ -34,11 +40,17 @@ class AbsentSuccessArguments { ...@@ -34,11 +40,17 @@ class AbsentSuccessArguments {
final ProfileModel profil; final ProfileModel profil;
final String nik; final String nik;
final bool isIn; final bool isIn;
final String shiftStart;
final String shiftEnd;
final String shiftName;
AbsentSuccessArguments({ AbsentSuccessArguments({
required this.absentSuccess, required this.absentSuccess,
required this.profil, required this.profil,
required this.nik, required this.nik,
required this.isIn, required this.isIn,
required this.shiftStart,
required this.shiftEnd,
required this.shiftName,
}); });
} }
...@@ -3,6 +3,7 @@ import 'package:excelso_attendance/main.dart'; ...@@ -3,6 +3,7 @@ import 'package:excelso_attendance/main.dart';
const String _latitude = 'laU'; const String _latitude = 'laU';
const String _longitude = 'loU'; const String _longitude = 'loU';
const String _listAbsent = 'listAbsent'; const String _listAbsent = 'listAbsent';
const String _outletLogo = '_logo';
String? getLatitude() { String? getLatitude() {
return prefs.getString(_latitude); return prefs.getString(_latitude);
...@@ -29,3 +30,11 @@ Future<void> setListAbsentUser(List<String> value) async { ...@@ -29,3 +30,11 @@ Future<void> setListAbsentUser(List<String> value) async {
List<String> getListAbsentUser() { List<String> getListAbsentUser() {
return prefs.getStringList(_listAbsent) ?? []; return prefs.getStringList(_listAbsent) ?? [];
} }
Future<void> setLogo(String value) async {
await prefs.setString(_outletLogo, value);
}
String getLogo() {
return prefs.getString(_outletLogo) ?? "";
}
...@@ -4,6 +4,9 @@ class ProfileModel { ...@@ -4,6 +4,9 @@ class ProfileModel {
String name; String name;
bool attendanceIn; bool attendanceIn;
bool attendanceOut; bool attendanceOut;
String shiftSelectedName;
String shiftStart;
String shiftEnd;
ProfileModel({ ProfileModel({
required this.id, required this.id,
...@@ -11,6 +14,9 @@ class ProfileModel { ...@@ -11,6 +14,9 @@ class ProfileModel {
required this.name, required this.name,
required this.attendanceIn, required this.attendanceIn,
required this.attendanceOut, required this.attendanceOut,
required this.shiftSelectedName,
required this.shiftStart,
required this.shiftEnd,
}); });
factory ProfileModel.json(Map<String, dynamic> json) { factory ProfileModel.json(Map<String, dynamic> json) {
...@@ -20,6 +26,9 @@ class ProfileModel { ...@@ -20,6 +26,9 @@ class ProfileModel {
name: json['name'], name: json['name'],
attendanceIn: json['today_attendance_in'], attendanceIn: json['today_attendance_in'],
attendanceOut: json['today_attendance_out'], attendanceOut: json['today_attendance_out'],
shiftSelectedName: json['shift_name'] ?? "",
shiftStart: json['shift_start'] ?? "",
shiftEnd: json['shift_end'] ?? "",
); );
} }
} }
...@@ -13,6 +13,7 @@ import 'package:excelso_attendance/models/absent.dart'; ...@@ -13,6 +13,7 @@ import 'package:excelso_attendance/models/absent.dart';
import 'package:excelso_attendance/models/branch.dart'; import 'package:excelso_attendance/models/branch.dart';
import 'package:excelso_attendance/models/profile.dart'; import 'package:excelso_attendance/models/profile.dart';
import 'package:excelso_attendance/models/shift.dart'; import 'package:excelso_attendance/models/shift.dart';
import 'package:excelso_attendance/resource/constanta_string.dart';
import 'package:excelso_attendance/resource/routes.dart'; import 'package:excelso_attendance/resource/routes.dart';
import 'package:excelso_attendance/resource/strings.dart'; import 'package:excelso_attendance/resource/strings.dart';
import 'package:flutter/foundation.dart' show kIsWeb; import 'package:flutter/foundation.dart' show kIsWeb;
...@@ -20,7 +21,6 @@ import 'dart:typed_data'; ...@@ -20,7 +21,6 @@ import 'dart:typed_data';
import 'package:camera/camera.dart'; import 'package:camera/camera.dart';
import 'package:excelso_attendance/helper/component/button.dart'; import 'package:excelso_attendance/helper/component/button.dart';
import 'package:excelso_attendance/helper/global_function/date_time.dart';
import 'package:excelso_attendance/resource/assets.dart'; import 'package:excelso_attendance/resource/assets.dart';
import 'package:excelso_attendance/resource/colors.dart'; import 'package:excelso_attendance/resource/colors.dart';
import 'package:excelso_attendance/resource/font.dart'; import 'package:excelso_attendance/resource/font.dart';
...@@ -38,6 +38,9 @@ class AbsentCameraView extends StatefulWidget { ...@@ -38,6 +38,9 @@ class AbsentCameraView extends StatefulWidget {
required this.nik, required this.nik,
required this.profile, required this.profile,
this.shiftModel, this.shiftModel,
required this.shiftNameSelected,
required this.shiftStartTime,
required this.shiftEndTime,
}); });
final bool isIn; final bool isIn;
...@@ -45,6 +48,9 @@ class AbsentCameraView extends StatefulWidget { ...@@ -45,6 +48,9 @@ class AbsentCameraView extends StatefulWidget {
final ShiftModel? shiftModel; final ShiftModel? shiftModel;
final ProfileModel profile; final ProfileModel profile;
final String nik; final String nik;
final String shiftNameSelected;
final String shiftStartTime;
final String shiftEndTime;
@override @override
State<AbsentCameraView> createState() => _AbsentCameraViewState(); State<AbsentCameraView> createState() => _AbsentCameraViewState();
...@@ -422,9 +428,19 @@ class _AbsentCameraViewState extends State<AbsentCameraView> { ...@@ -422,9 +428,19 @@ class _AbsentCameraViewState extends State<AbsentCameraView> {
const SizedBox( const SizedBox(
height: 15, height: 15,
), ),
WidgetAbsentAndTime( // Expanded(
isIn: widget.isIn, // child: WidgetAbsentAndTime(
outletName: widget.branchModel.name, // isIn: widget.isIn,
// outletName: widget.branchModel.name,
// profile: widget.profile,
// nik: widget.nik,
// ),
// ),
InfoUserAttendance(
widget: widget,
shift: widget.shiftNameSelected,
shiftStart: widget.shiftStartTime,
shiftEnd: widget.shiftEndTime,
), ),
const Spacer(), const Spacer(),
(pictureIsTaken) (pictureIsTaken)
...@@ -475,11 +491,15 @@ class _AbsentCameraViewState extends State<AbsentCameraView> { ...@@ -475,11 +491,15 @@ class _AbsentCameraViewState extends State<AbsentCameraView> {
Routes.absentSuccess, Routes.absentSuccess,
(route) => false, (route) => false,
arguments: AbsentSuccessArguments( arguments: AbsentSuccessArguments(
absentSuccess: absentSuccess, absentSuccess: absentSuccess,
profil: widget.profile, profil: widget.profile,
nik: widget.nik, nik: widget.nik,
isIn: true, isIn: true,
), shiftName:
widget.shiftNameSelected,
shiftEnd: widget.shiftEndTime,
shiftStart:
widget.shiftStartTime),
); );
}); });
} else { } else {
...@@ -513,11 +533,15 @@ class _AbsentCameraViewState extends State<AbsentCameraView> { ...@@ -513,11 +533,15 @@ class _AbsentCameraViewState extends State<AbsentCameraView> {
Routes.absentSuccess, Routes.absentSuccess,
(route) => false, (route) => false,
arguments: AbsentSuccessArguments( arguments: AbsentSuccessArguments(
absentSuccess: absentSuccess, absentSuccess: absentSuccess,
profil: widget.profile, profil: widget.profile,
nik: widget.nik, nik: widget.nik,
isIn: false, isIn: false,
), shiftName:
widget.shiftNameSelected,
shiftEnd: widget.shiftEndTime,
shiftStart:
widget.shiftStartTime),
); );
}); });
} }
...@@ -1167,21 +1191,25 @@ class _AbsentCameraViewState extends State<AbsentCameraView> { ...@@ -1167,21 +1191,25 @@ class _AbsentCameraViewState extends State<AbsentCameraView> {
} }
} }
class WidgetAbsentAndTime extends StatefulWidget { class InfoUserAttendance extends StatefulWidget {
const WidgetAbsentAndTime({ const InfoUserAttendance({
Key? key, super.key,
required this.outletName, required this.widget,
required this.isIn, required this.shift,
}) : super(key: key); required this.shiftStart,
required this.shiftEnd,
});
final String outletName; final AbsentCameraView widget;
final bool isIn; final String shift;
final String shiftStart;
final String shiftEnd;
@override @override
State<WidgetAbsentAndTime> createState() => _WidgetAbsentAndTimeState(); State<InfoUserAttendance> createState() => _InfoUserAttendanceState();
} }
class _WidgetAbsentAndTimeState extends State<WidgetAbsentAndTime> { class _InfoUserAttendanceState extends State<InfoUserAttendance> {
Timer? _timer; Timer? _timer;
@override @override
...@@ -1206,46 +1234,165 @@ class _WidgetAbsentAndTimeState extends State<WidgetAbsentAndTime> { ...@@ -1206,46 +1234,165 @@ class _WidgetAbsentAndTimeState extends State<WidgetAbsentAndTime> {
margin: EdgeInsets.symmetric( margin: EdgeInsets.symmetric(
horizontal: AppMargin.m20, horizontal: AppMargin.m20,
), ),
padding: EdgeInsets.symmetric(
horizontal: AppPadding.p15,
vertical: AppPadding.p12,
),
width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(10),
color: Colors.white, color: Colors.white,
), ),
padding: EdgeInsets.symmetric(
horizontal: AppPadding.p20, vertical: AppPadding.p12),
width: double.infinity,
height: 138,
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
mainAxisSize: MainAxisSize.min,
children: [ children: [
Image( Container(
image: AssetImage( padding: const EdgeInsets.symmetric(
Assets.excelsoLogoGreen, vertical: 5,
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.8,
color: ColorManager.grey.withOpacity(0.2),
),
),
),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
(ConstantString.logoUrlCamera == "")
? const Image(
width: 111,
height: 43,
image: AssetImage(
"",
),
)
: Image(
width: 111,
height: 43,
image: NetworkImage(
ConstantString.logoUrlCamera,
),
),
const SizedBox(
width: 40,
),
Expanded(
child: Text(
widget.widget.branchModel.name,
style: getSemiBoldStyle(
color: Colors.black,
fontSize: FontSize.s16,
),
textAlign: TextAlign.end,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
)
],
),
),
Container(
padding: EdgeInsets.only(
top: AppPadding.p12,
bottom: AppPadding.p16,
),
decoration: BoxDecoration(
border: Border(
bottom: BorderSide(
width: 0.8,
color: ColorManager.grey.withOpacity(0.2),
),
),
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
widget.widget.profile.name,
style: getSemiBoldStyle(
color: Colors.black,
fontSize: FontSize.s14,
fontFamily: FontConstants.k2d,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
const SizedBox(
width: 30,
),
const Spacer(),
Expanded(
child: Text(
widget.widget.nik,
style: getSemiBoldStyle(
color: ColorManager.green2,
fontSize: FontSize.s14,
fontFamily: FontConstants.k2d,
),
textAlign: TextAlign.end,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
],
),
SizedBox(
height: AppMargin.m8,
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
widget.shift,
style: getSemiBoldStyle(
color: Colors.black,
fontSize: FontSize.s14,
fontFamily: FontConstants.k2d,
),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
const SizedBox(
width: 20,
),
Expanded(
child: Text(
"${widget.shiftStart} - ${widget.shiftEnd}",
style: getRegularStyle(
color: Colors.black,
fontSize: FontSize.s12,
fontFamily: FontConstants.k2d,
),
textAlign: TextAlign.end,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
],
),
],
), ),
width: 111,
height: 42,
), ),
Expanded( Container(
margin: EdgeInsets.only(
top: AppMargin.m10,
),
child: Text( child: Text(
"${widget.outletName} - ${DateFormatCustom.getLocalTime( (widget.widget.isIn) ? "Absen Masuk" : "Absen Keluar",
timeZoneActive: true, style: getMediumStyle(
)}",
style: getSemiBoldStyle(
color: Colors.black, color: Colors.black,
fontSize: FontSize.s16, fontSize: FontSize.s16,
fontFamily: FontConstants.poppins,
), ),
maxLines: 3,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
),
),
Text(
(widget.isIn) ? "Absen Masuk" : "Absen Keluar",
style: getSemiBoldStyle(
color: Colors.black,
fontSize: FontSize.s16,
fontFamily: FontConstants.poppins,
), ),
), ),
], ],
...@@ -1253,3 +1400,121 @@ class _WidgetAbsentAndTimeState extends State<WidgetAbsentAndTime> { ...@@ -1253,3 +1400,121 @@ class _WidgetAbsentAndTimeState extends State<WidgetAbsentAndTime> {
); );
} }
} }
// class WidgetAbsentAndTime extends StatefulWidget {
// const WidgetAbsentAndTime({
// Key? key,
// required this.outletName,
// required this.isIn,
// required this.nik,
// required this.profile,
// }) : super(key: key);
// final String outletName;
// final bool isIn;
// final String nik;
// final ProfileModel profile;
// @override
// State<WidgetAbsentAndTime> createState() => _WidgetAbsentAndTimeState();
// }
// class _WidgetAbsentAndTimeState extends State<WidgetAbsentAndTime> {
// Timer? _timer;
// @override
// void initState() {
// super.initState();
// Timer.periodic(const Duration(seconds: 1), (timer) {
// _timer = timer;
// setState(() {});
// });
// }
// @override
// void dispose() {
// super.dispose();
// _timer?.cancel();
// }
// @override
// Widget build(BuildContext context) {
// return Container(
// margin: EdgeInsets.symmetric(
// horizontal: AppMargin.m20,
// ),
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(12),
// color: Colors.white,
// ),
// padding: EdgeInsets.symmetric(
// horizontal: AppPadding.p20,
// vertical: AppPadding.p12,
// ),
// width: double.infinity,
// height: 160,
// child: Column(
// crossAxisAlignment: CrossAxisAlignment.center,
// mainAxisAlignment: MainAxisAlignment.spaceBetween,
// mainAxisSize: MainAxisSize.min,
// children: [
// Image(
// image: AssetImage(
// Assets.excelsoLogoGreen,
// ),
// width: 100,
// height: 30,
// ),
// const SizedBox(
// height: 10,
// ),
// Text(
// "${widget.outletName} - ${DateFormatCustom.getLocalTime(
// timeZoneActive: true,
// )}",
// style: getSemiBoldStyle(
// color: Colors.black,
// fontSize: FontSize.s16,
// ),
// maxLines: 2,
// overflow: TextOverflow.ellipsis,
// textAlign: TextAlign.center,
// ),
// Text(
// "[${widget.nik}] ${widget.profile.name}",
// style: getSemiBoldStyle(
// color: Colors.black,
// fontSize: FontSize.s14,
// fontFamily: FontConstants.poppins,
// ),
// maxLines: 1,
// overflow: TextOverflow.ellipsis,
// textAlign: TextAlign.center,
// ),
// // Expanded(
// // child: Text(
// // widget.nik,
// // style: getSemiBoldStyle(
// // color: Colors.black,
// // fontSize: FontSize.s16,
// // fontFamily: FontConstants.poppins,
// // ),
// // maxLines: 2,
// // overflow: TextOverflow.ellipsis,
// // textAlign: TextAlign.center,
// // ),
// // ),
// Text(
// (widget.isIn) ? "Absen Masuk" : "Absen Keluar",
// style: getSemiBoldStyle(
// color: Colors.black,
// fontSize: FontSize.s14,
// fontFamily: FontConstants.poppins,
// ),
// ),
// ],
// ),
// );
// }
// }
...@@ -12,17 +12,24 @@ import 'package:excelso_attendance/resource/style.dart'; ...@@ -12,17 +12,24 @@ import 'package:excelso_attendance/resource/style.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
class AbsentSuccessView extends StatelessWidget { class AbsentSuccessView extends StatelessWidget {
const AbsentSuccessView( const AbsentSuccessView({
{super.key, super.key,
required this.absentSuccess, required this.absentSuccess,
required this.isIn, required this.isIn,
required this.nik, required this.nik,
required this.profil}); required this.profil,
required this.shiftStart,
required this.shiftEnd,
required this.shiftName,
});
final AbsentSuccessModel absentSuccess; final AbsentSuccessModel absentSuccess;
final ProfileModel profil; final ProfileModel profil;
final String nik; final String nik;
final bool isIn; final bool isIn;
final String shiftStart;
final String shiftEnd;
final String shiftName;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -30,7 +37,14 @@ class AbsentSuccessView extends StatelessWidget { ...@@ -30,7 +37,14 @@ class AbsentSuccessView extends StatelessWidget {
backgroundColor: ColorManager.backgroundColor, backgroundColor: ColorManager.backgroundColor,
body: ScreenResponsive( body: ScreenResponsive(
widget: BodyWidget( widget: BodyWidget(
isIn: isIn, profil: profil, nik: nik, absentSuccess: absentSuccess), isIn: isIn,
profil: profil,
nik: nik,
absentSuccess: absentSuccess,
shiftEnd: shiftEnd,
shiftName: shiftName,
shiftStart: shiftStart,
),
widthScreen: MediaQuery.of(context).size.width, widthScreen: MediaQuery.of(context).size.width,
), ),
); );
...@@ -44,12 +58,18 @@ class BodyWidget extends StatelessWidget { ...@@ -44,12 +58,18 @@ class BodyWidget extends StatelessWidget {
required this.profil, required this.profil,
required this.nik, required this.nik,
required this.absentSuccess, required this.absentSuccess,
required this.shiftStart,
required this.shiftEnd,
required this.shiftName,
}); });
final bool isIn; final bool isIn;
final ProfileModel profil; final ProfileModel profil;
final String nik; final String nik;
final AbsentSuccessModel absentSuccess; final AbsentSuccessModel absentSuccess;
final String shiftStart;
final String shiftEnd;
final String shiftName;
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
...@@ -144,174 +164,193 @@ Sukses''', ...@@ -144,174 +164,193 @@ Sukses''',
), ),
), ),
Container( Container(
margin: EdgeInsets.only(
top: AppMargin.m20,
left: AppMargin.m20,
right: AppMargin.m20,
),
padding: EdgeInsets.all(AppPadding.p20),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
width: 0.2,
color: ColorManager.grey.withOpacity(
0.3,
),
),
color: ColorManager.backgroundColor,
// boxShadow: [
// BoxShadow(
// color: Colors.grey.withOpacity(0.3),
// blurRadius: 1,
// offset: const Offset(0.1, 0.1),
// ),
// ],
),
child: Center(
child: Text(
absentSuccess.branchName,
style: getSemiBoldStyle(
color: ColorManager.fontBlack,
fontSize: FontSize.s16,
),
),
),
),
Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
top: 38, top: AppMargin.m8,
left: AppMargin.m20, left: AppMargin.m20,
right: AppMargin.m20, right: AppMargin.m20,
), ),
padding: EdgeInsets.all(AppPadding.p20),
width: double.infinity,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(12),
border: Border.all(
width: 0.2,
color: ColorManager.grey.withOpacity(
0.3,
),
),
color: ColorManager.backgroundColor,
// boxShadow: [
// BoxShadow(
// color: Colors.grey.withOpacity(0.3),
// blurRadius: 1,
// offset: const Offset(0.1, 0.1),
// ),
// ],
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
DateFormatCustom.getDateLocal(
fromApi: true,
apiDate: absentSuccess.date,
),
style: getRegularStyle(
color: ColorManager.fontBlack,
fontSize: FontSize.s14,
fontFamily: FontConstants.k2d,
),
),
Text(
"${absentSuccess.time} ${absentSuccess.timeZone}",
style: getRegularStyle(
color: ColorManager.fontBlack,
fontSize: FontSize.s14,
fontFamily: FontConstants.k2d,
),
)
],
),
),
SizedBox(
height: AppMargin.m8,
),
Container(
margin: EdgeInsets.symmetric(
horizontal: AppMargin.m20,
),
padding: EdgeInsets.symmetric( padding: EdgeInsets.symmetric(
horizontal: AppPadding.p12,
vertical: AppPadding.p20, vertical: AppPadding.p20,
horizontal: 25,
), ),
width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.circular(16), borderRadius: BorderRadius.circular(12),
border: Border.all( border: Border.all(
width: 0.2, width: 0.2,
color: Colors.grey, color: ColorManager.grey.withOpacity(
), 0.3,
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.grey.withOpacity(0.3),
blurRadius: 5,
offset: const Offset(0.8, 0.8),
), ),
], ),
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [ children: [
// Text(
// absentSuccess.branchCode,
// style: getSemiBoldStyle(
// color: ColorManager.fontBlack,
// fontSize: FontSize.s20,
// fontFamily: FontConstants.montserrat,
// ),
// ),
// SizedBox(
// height: AppMargin.m10,
// ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
child: Text(
profil.name,
style: getMediumStyle(
color: ColorManager.fontBlack,
fontSize: FontSize.s16,
fontFamily: FontConstants.montserrat,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.start,
),
),
Expanded(
child: Text(
nik,
style: getMediumStyle(
color: ColorManager.fontBlack,
fontSize: FontSize.s16,
fontFamily: FontConstants.montserrat,
),
maxLines: 2,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.end,
),
)
],
),
Container( Container(
margin: EdgeInsets.only( padding: EdgeInsets.only(
top: AppMargin.m10, bottom: AppPadding.p12,
),
padding: EdgeInsets.symmetric(
horizontal: AppPadding.p20,
vertical: AppPadding.p12,
), ),
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(
color: const Color(0xffE7E7E7).withOpacity(0.5), border: Border(
border: Border.all( bottom: BorderSide(
width: 0.2, width: 1,
color: ColorManager.grey.withOpacity(0.8), color: ColorManager.grey.withOpacity(
0.3,
),
),
), ),
borderRadius: BorderRadius.circular(9),
), ),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [ children: [
Text( Text(
absentSuccess.branchName, profil.name,
style: getSemiBoldStyle( style: getSemiBoldStyle(
color: ColorManager.fontBlack, color: Colors.black,
fontSize: FontSize.s16, fontSize: FontSize.s16,
fontFamily: FontConstants.k2d,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
maxLines: 2, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
const SizedBox( SizedBox(
height: 4, height: AppMargin.m8,
), ),
Text( Text(
"${absentSuccess.time} ${absentSuccess.timeZone}", nik,
style: getMediumStyle( style: getMediumStyle(
color: ColorManager.fontBlack, color: ColorManager.green2,
fontSize: FontSize.s20, fontSize: FontSize.s16,
fontFamily: FontConstants.k2d,
), ),
textAlign: TextAlign.center, textAlign: TextAlign.center,
maxLines: 2, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),
const SizedBox( ],
height: 4, ),
), ),
Text( Container(
DateFormatCustom.getDateLocal( padding: EdgeInsets.only(
fromApi: true, top: AppPadding.p12,
apiDate: absentSuccess.date, bottom: AppPadding.p20,
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
shiftName,
style: getRegularStyle(
color: ColorManager.fontBlack,
fontSize: FontSize.s12,
fontFamily: FontConstants.k2d,
),
), ),
style: getRegularStyle( ),
color: ColorManager.fontBlack, SizedBox(
fontSize: FontSize.s16, width: AppMargin.m10,
),
Expanded(
child: Text(
"$shiftStart - $shiftEnd",
style: getRegularStyle(
color: ColorManager.fontBlack,
fontSize: FontSize.s12,
fontFamily: FontConstants.k2d,
),
textAlign: TextAlign.end,
), ),
textAlign: TextAlign.center,
maxLines: 2,
overflow: TextOverflow.ellipsis,
), ),
], ],
), ),
// child: Row( )
// children: [
// const Spacer(),
// Text(
// DateFormatCustom.getDateLocal(
// fromApi: true,
// apiDate: absentSuccess.date,
// ),
// style: getRegularStyle(
// color: ColorManager.fontBlack,
// fontSize: 16,
// fontFamily: FontConstants.montserrat,
// ),
// )
// ],
// ),
),
// Container(
// margin: EdgeInsets.only(
// top: AppMargin.m16,
// left: AppMargin.m16,
// right: AppMargin.m16,
// ),
// child: CustomButton(
// text: "Kembali ke Beranda",
// onTap: () {
// Navigator.pushNamedAndRemoveUntil(
// context,
// Routes.onBoarding,
// (route) => false,
// );
// },
// ),
// )
], ],
), ),
), ),
......
...@@ -4,6 +4,7 @@ import 'dart:async'; ...@@ -4,6 +4,7 @@ import 'dart:async';
import 'package:excelso_attendance/api/api.dart'; import 'package:excelso_attendance/api/api.dart';
import 'package:excelso_attendance/helper/arguments/route_args.dart'; import 'package:excelso_attendance/helper/arguments/route_args.dart';
import 'package:excelso_attendance/helper/component/button.dart'; import 'package:excelso_attendance/helper/component/button.dart';
import 'package:excelso_attendance/helper/component/text_field.dart';
// import 'package:excelso_attendance/helper/component/text_field.dart'; // import 'package:excelso_attendance/helper/component/text_field.dart';
import 'package:excelso_attendance/helper/global_function/date_time.dart'; import 'package:excelso_attendance/helper/global_function/date_time.dart';
import 'package:excelso_attendance/helper/modal_dialog.dart'; import 'package:excelso_attendance/helper/modal_dialog.dart';
...@@ -60,11 +61,12 @@ class BodyWidget extends StatefulWidget { ...@@ -60,11 +61,12 @@ class BodyWidget extends StatefulWidget {
} }
class _BodyWidgetState extends State<BodyWidget> { class _BodyWidgetState extends State<BodyWidget> {
// final TextEditingController nikController = TextEditingController(); final TextEditingController nikController = TextEditingController();
int selectedOutlet = 0; int selectedOutlet = 0;
String nikUser = // String nikUser =
(getListAbsentUser().isEmpty) ? "" : getListAbsentUser().last; // (getListAbsentUser().isEmpty) ? "" : getListAbsentUser().last;
String nikUser = "";
TextEditingController? textEditingController; TextEditingController? textEditingController;
List<String> dataUserAbsent = getListAbsentUser(); List<String> dataUserAbsent = getListAbsentUser();
...@@ -89,13 +91,21 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -89,13 +91,21 @@ class _BodyWidgetState extends State<BodyWidget> {
), ),
), ),
child: Center( child: Center(
child: Image( child: (ConstantString.logoUrlHome == "")
width: 36, ? const Image(
height: 36, width: 36,
image: AssetImage( height: 36,
Assets.excelsoLogo, image: AssetImage(
), "",
), ),
)
: Image(
width: 36,
height: 36,
image: NetworkImage(
ConstantString.logoUrlHome,
),
),
), ),
) )
], ],
...@@ -178,159 +188,167 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -178,159 +188,167 @@ class _BodyWidgetState extends State<BodyWidget> {
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( // Container(
margin: EdgeInsets.only( // margin: EdgeInsets.only(
bottom: AppMargin.m12, // bottom: AppMargin.m12,
), // ),
child: Text( // child: Text(
"NIK", // "NIK",
style: getSemiBoldStyle( // style: getSemiBoldStyle(
color: Colors.black, // color: Colors.black,
fontSize: 16, // fontSize: 16,
), // ),
), // ),
), // ),
Autocomplete( InputTextField(
optionsBuilder: (TextEditingValue textEditingValue) { controller: nikController,
if (textEditingValue.text.isEmpty) { labelText: "NIK",
return const Iterable<String>.empty(); borderSideActive: true,
} else { hintText: "NIK",
return dataUserAbsent.where( )
(data) => data.toLowerCase().contains( // Autocomplete(
textEditingValue.text.toLowerCase()), // optionsBuilder: (TextEditingValue textEditingValue) {
); // if (textEditingValue.text.isEmpty) {
} // return const Iterable<String>.empty();
}, // } else {
onSelected: ((selected) { // return dataUserAbsent.where(
setState(() { // (data) => data.toLowerCase().contains(
nikUser = selected; // textEditingValue.text.toLowerCase()),
}); // );
}), // }
initialValue: TextEditingValue( // },
text: (getListAbsentUser().isEmpty) // onSelected: ((selected) {
? "" // setState(() {
: getListAbsentUser().last), // nikUser = selected;
optionsViewBuilder: (c, onSelected, options) { // });
List<String> listNik = options.toList(); // }),
// // initialValue: TextEditingValue(
// // text: (getListAbsentUser().isEmpty)
// // ? ""
// // : getListAbsentUser().last,
// // ),
// optionsViewBuilder: (c, onSelected, options) {
// List<String> listNik = options.toList();
return Container( // return Container(
margin: const EdgeInsets.only( // margin: const EdgeInsets.only(
right: 70, // right: 70,
), // ),
decoration: BoxDecoration( // decoration: BoxDecoration(
borderRadius: BorderRadius.circular(5), // borderRadius: BorderRadius.circular(5),
color: ColorManager.backgroundColor, // color: ColorManager.backgroundColor,
border: Border.all( // border: Border.all(
width: 0.2, // width: 0.2,
color: Colors.grey, // color: Colors.grey,
), // ),
boxShadow: [ // boxShadow: [
BoxShadow( // BoxShadow(
color: Colors.grey.withOpacity(0.3), // color: Colors.grey.withOpacity(0.3),
blurRadius: 2, // blurRadius: 2,
offset: const Offset(5, 5), // offset: const Offset(5, 5),
), // ),
]), // ]),
child: ListView.builder( // child: ListView.builder(
padding: EdgeInsets.zero, // padding: EdgeInsets.zero,
itemCount: listNik.length, // itemCount: listNik.length,
itemBuilder: ((context, index) { // itemBuilder: ((context, index) {
return GestureDetector( // return GestureDetector(
onTap: () { // onTap: () {
onSelected(listNik[index]); // onSelected(listNik[index]);
}, // },
child: Container( // child: Container(
margin: const EdgeInsets.symmetric( // margin: const EdgeInsets.symmetric(
horizontal: 6, vertical: 3), // horizontal: 6, vertical: 3),
padding: EdgeInsets.symmetric( // padding: EdgeInsets.symmetric(
horizontal: AppPadding.p10, // horizontal: AppPadding.p10,
vertical: AppPadding.p14, // vertical: AppPadding.p14,
), // ),
decoration: BoxDecoration( // decoration: BoxDecoration(
border: (index + 1 != listNik.length) // border: (index + 1 != listNik.length)
? Border( // ? Border(
bottom: BorderSide( // bottom: BorderSide(
width: 0.5, // width: 0.5,
color: ColorManager.grey // color: ColorManager.grey
.withOpacity(0.8), // .withOpacity(0.8),
), // ),
) // )
: null, // : null,
), // ),
child: Text( // child: Text(
listNik[index], // listNik[index],
style: getRegularStyle( // style: getRegularStyle(
color: Colors.black, // color: Colors.black,
fontSize: 20, // fontSize: 20,
fontFamily: FontConstants.poppins, // fontFamily: FontConstants.poppins,
), // ),
maxLines: 2, // maxLines: 2,
overflow: TextOverflow.ellipsis, // overflow: TextOverflow.ellipsis,
), // ),
), // ),
); // );
}), // }),
), // ),
); // );
}, // },
fieldViewBuilder: // fieldViewBuilder:
(c, controller, focusNode, onEditingComplete) { // (c, controller, focusNode, onEditingComplete) {
textEditingController = controller; // textEditingController = controller;
return TextField( // return TextField(
onChanged: (teks) { // onChanged: (teks) {
setState(() { // setState(() {
nikUser = teks; // nikUser = teks;
}); // });
}, // },
controller: textEditingController, // controller: textEditingController,
focusNode: focusNode, // focusNode: focusNode,
onEditingComplete: () { // onEditingComplete: () {
setState(() { // setState(() {
if (focusNode.hasFocus) { // if (focusNode.hasFocus) {
focusNode.unfocus(); // focusNode.unfocus();
} // }
}); // });
}, // },
decoration: InputDecoration( // decoration: InputDecoration(
hintText: "NIK", // hintText: "NIK",
hintStyle: getRegularStyle( // hintStyle: getRegularStyle(
color: Colors.grey, // color: Colors.grey,
), // ),
enabledBorder: OutlineInputBorder( // enabledBorder: OutlineInputBorder(
borderSide: BorderSide( // borderSide: BorderSide(
width: 0.4, // width: 0.4,
color: ColorManager.grey, // color: ColorManager.grey,
), // ),
borderRadius: BorderRadius.circular(5), // borderRadius: BorderRadius.circular(5),
), // ),
focusedBorder: OutlineInputBorder( // focusedBorder: OutlineInputBorder(
borderSide: BorderSide( // borderSide: BorderSide(
width: 0.4, color: ColorManager.grey), // width: 0.4, color: ColorManager.grey),
borderRadius: BorderRadius.circular(5), // borderRadius: BorderRadius.circular(5),
), // ),
disabledBorder: OutlineInputBorder( // disabledBorder: OutlineInputBorder(
borderSide: BorderSide( // borderSide: BorderSide(
width: 0.4, color: ColorManager.grey), // width: 0.4, color: ColorManager.grey),
borderRadius: BorderRadius.circular(5), // borderRadius: BorderRadius.circular(5),
), // ),
suffixIcon: // suffixIcon:
(textEditingController!.text.isNotEmpty) // (textEditingController!.text.isNotEmpty)
? IconButton( // ? IconButton(
onPressed: () { // onPressed: () {
setState(() { // setState(() {
textEditingController!.clear(); // textEditingController!.clear();
}); // nikUser = "";
}, // });
icon: const Icon( // },
Icons.dangerous, // icon: const Icon(
color: Colors.grey, // Icons.dangerous,
), // color: Colors.grey,
) // ),
: null, // )
), // : null,
); // ),
}, // );
), // },
// ),
], ],
), ),
), ),
...@@ -346,7 +364,7 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -346,7 +364,7 @@ class _BodyWidgetState extends State<BodyWidget> {
child: CustomButton( child: CustomButton(
text: "Masuk", text: "Masuk",
onTap: () { onTap: () {
if (nikUser.isEmpty) { if (nikController.text.isEmpty) {
EasyLoading.showToast( EasyLoading.showToast(
"Silakan isi NIK terlebih dahulu", "Silakan isi NIK terlebih dahulu",
); );
...@@ -360,7 +378,7 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -360,7 +378,7 @@ class _BodyWidgetState extends State<BodyWidget> {
shiftList: widget.shiftList, shiftList: widget.shiftList,
branchModel: branchModel:
widget.nearestBranch[selectedOutlet], widget.nearestBranch[selectedOutlet],
nik: nikUser, nik: nikController.text,
); );
}); });
} }
...@@ -374,7 +392,7 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -374,7 +392,7 @@ class _BodyWidgetState extends State<BodyWidget> {
child: CustomButton( child: CustomButton(
text: "Keluar", text: "Keluar",
onTap: () async { onTap: () async {
if (nikUser.isEmpty) { if (nikController.text.isEmpty) {
EasyLoading.showToast( EasyLoading.showToast(
"Silakan isi NIK terlebih dahulu", "Silakan isi NIK terlebih dahulu",
); );
...@@ -385,7 +403,7 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -385,7 +403,7 @@ class _BodyWidgetState extends State<BodyWidget> {
); );
Api.getUserProfile( Api.getUserProfile(
widget.nearestBranch[selectedOutlet].id, widget.nearestBranch[selectedOutlet].id,
nikUser, nikController.text,
).then((apiResponse) { ).then((apiResponse) {
EasyLoading.dismiss(); EasyLoading.dismiss();
if (apiResponse.error) { if (apiResponse.error) {
...@@ -430,7 +448,12 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -430,7 +448,12 @@ class _BodyWidgetState extends State<BodyWidget> {
branchModel: widget branchModel: widget
.nearestBranch[selectedOutlet], .nearestBranch[selectedOutlet],
profile: profileUser, profile: profileUser,
nik: nikUser, nik: nikController.text,
shiftNameSelected:
profileUser.shiftSelectedName,
shiftStartTime:
profileUser.shiftStart,
shiftEndTime: profileUser.shiftEnd,
), ),
); );
}, },
...@@ -449,7 +472,11 @@ class _BodyWidgetState extends State<BodyWidget> { ...@@ -449,7 +472,11 @@ class _BodyWidgetState extends State<BodyWidget> {
branchModel: branchModel:
widget.nearestBranch[selectedOutlet], widget.nearestBranch[selectedOutlet],
profile: profileUser, profile: profileUser,
nik: nikUser, nik: nikController.text,
shiftNameSelected:
profileUser.shiftSelectedName,
shiftStartTime: profileUser.shiftStart,
shiftEndTime: profileUser.shiftEnd,
), ),
); );
} }
...@@ -1092,6 +1119,12 @@ class _WidgetSelectShiftState extends State<WidgetSelectShift> { ...@@ -1092,6 +1119,12 @@ class _WidgetSelectShiftState extends State<WidgetSelectShift> {
shiftModel: widget.shiftList[selectedShift!], shiftModel: widget.shiftList[selectedShift!],
profile: profileUser, profile: profileUser,
nik: widget.nik, nik: widget.nik,
shiftNameSelected:
widget.shiftList[selectedShift!].name,
shiftStartTime:
widget.shiftList[selectedShift!].startTime,
shiftEndTime:
widget.shiftList[selectedShift!].endTime,
), ),
); );
}, },
...@@ -1112,6 +1145,11 @@ class _WidgetSelectShiftState extends State<WidgetSelectShift> { ...@@ -1112,6 +1145,11 @@ class _WidgetSelectShiftState extends State<WidgetSelectShift> {
shiftModel: widget.shiftList[selectedShift!], shiftModel: widget.shiftList[selectedShift!],
profile: profileUser, profile: profileUser,
nik: widget.nik, nik: widget.nik,
shiftNameSelected:
widget.shiftList[selectedShift!].name,
shiftStartTime:
widget.shiftList[selectedShift!].startTime,
shiftEndTime: widget.shiftList[selectedShift!].endTime,
), ),
); );
} }
......
...@@ -8,5 +8,6 @@ class ColorManager { ...@@ -8,5 +8,6 @@ class ColorManager {
static Color grey = const Color(0xff595959); static Color grey = const Color(0xff595959);
static Color softGreen = const Color(0xffA4D8C8); static Color softGreen = const Color(0xffA4D8C8);
static Color green = const Color(0xff3CA786); static Color green = const Color(0xff3CA786);
static Color green2 = const Color(0xff219653);
static Color fontBlack = const Color(0xff444444); static Color fontBlack = const Color(0xff444444);
} }
class ConstantString { class ConstantString {
static String outletDistance = ''; static String outletDistance = '';
static String logoUrlHome = '';
static String logoUrlCamera = '';
} }
...@@ -4,6 +4,7 @@ class FontConstants { ...@@ -4,6 +4,7 @@ class FontConstants {
static const String openSans = "Open Sans"; static const String openSans = "Open Sans";
static const String montserrat = "Montserrat"; static const String montserrat = "Montserrat";
static const String poppins = "Poppins"; static const String poppins = "Poppins";
static const String k2d = "K2D";
} }
class FontWeightManager { class FontWeightManager {
......
...@@ -46,6 +46,9 @@ class RouteGenerator { ...@@ -46,6 +46,9 @@ class RouteGenerator {
shiftModel: args.shiftModel, shiftModel: args.shiftModel,
profile: args.profile, profile: args.profile,
nik: args.nik, nik: args.nik,
shiftNameSelected: args.shiftNameSelected,
shiftStartTime: args.shiftStartTime,
shiftEndTime: args.shiftEndTime,
), ),
nameRoute: Routes.absentCamera, nameRoute: Routes.absentCamera,
routeSettings: routeSettings, routeSettings: routeSettings,
...@@ -59,6 +62,9 @@ class RouteGenerator { ...@@ -59,6 +62,9 @@ class RouteGenerator {
profil: args.profil, profil: args.profil,
nik: args.nik, nik: args.nik,
isIn: args.isIn, isIn: args.isIn,
shiftEnd: args.shiftEnd,
shiftStart: args.shiftStart,
shiftName: args.shiftName,
), ),
nameRoute: Routes.absentSuccess, nameRoute: Routes.absentSuccess,
routeSettings: routeSettings, routeSettings: routeSettings,
...@@ -107,6 +113,9 @@ class RouteGenerator { ...@@ -107,6 +113,9 @@ class RouteGenerator {
shiftModel: args.shiftModel, shiftModel: args.shiftModel,
profile: args.profile, profile: args.profile,
nik: args.nik, nik: args.nik,
shiftNameSelected: args.shiftNameSelected,
shiftStartTime: args.shiftStartTime,
shiftEndTime: args.shiftEndTime,
), ),
transitionDuration: Duration.zero, transitionDuration: Duration.zero,
reverseTransitionDuration: Duration.zero, reverseTransitionDuration: Duration.zero,
...@@ -146,22 +155,15 @@ class RouteGenerator { ...@@ -146,22 +155,15 @@ class RouteGenerator {
profil: args.profil, profil: args.profil,
nik: args.nik, nik: args.nik,
isIn: args.isIn, isIn: args.isIn,
shiftEnd: args.shiftEnd,
shiftStart: args.shiftStart,
shiftName: args.shiftName,
), ),
transitionDuration: Duration.zero, transitionDuration: Duration.zero,
reverseTransitionDuration: Duration.zero, reverseTransitionDuration: Duration.zero,
// settings: RouteSettings( // settings: RouteSettings(
// name: nameRoute.replaceFirst("/", ""), arguments: args), // name: nameRoute.replaceFirst("/", ""), arguments: args),
); );
} else if (nameRoute == Routes.notFoundPage) {
ErrorWidgetArguments args =
routeSettings!.arguments as ErrorWidgetArguments;
return PageRouteBuilder(
pageBuilder: (context, a, b) => ErrorWidgetView(
messageError: args.errorMessage,
),
transitionDuration: Duration.zero,
reverseTransitionDuration: Duration.zero,
);
} else { } else {
return PageRouteBuilder( return PageRouteBuilder(
pageBuilder: (context, a, b) => target, pageBuilder: (context, a, b) => target,
......
...@@ -15,6 +15,7 @@ class AppPadding { ...@@ -15,6 +15,7 @@ class AppPadding {
static double p12 = 12; static double p12 = 12;
static double p14 = 14; static double p14 = 14;
static double p15 = 15; static double p15 = 15;
static double p16 = 16;
static double p20 = 20; static double p20 = 20;
} }
......
...@@ -93,6 +93,18 @@ flutter: ...@@ -93,6 +93,18 @@ flutter:
weight: 600 weight: 600
- asset: assets/fonts/poppins/Poppins-Bold.ttf - asset: assets/fonts/poppins/Poppins-Bold.ttf
weight: 700 weight: 700
- family: K2D
fonts:
- asset: assets/fonts/k2d/K2D-Light.ttf
weight: 300
- asset: assets/fonts/k2d/K2D-Regular.ttf
weight: 400
- asset: assets/fonts/k2d/K2D-Medium.ttf
weight: 500
- asset: assets/fonts/k2d/K2D-SemiBold.ttf
weight: 600
- asset: assets/fonts/k2d/K2D-Bold.ttf
weight: 700
# The following line ensures that the Material Icons font is # The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in # included with your application, so that you can use the icons in
......
Markdown is supported
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