@@ -228,7 +306,7 @@ class _BodyWidgetState extends State<BodyWidget> {
...
@@ -228,7 +306,7 @@ class _BodyWidgetState extends State<BodyWidget> {
child:CustomButton(
child:CustomButton(
text:"Masuk",
text:"Masuk",
onTap:(){
onTap:(){
if(nikController.text.isEmpty){
if(nikUser.isEmpty){
EasyLoading.showToast(
EasyLoading.showToast(
"Silakan isi NIK terlebih dahulu",
"Silakan isi NIK terlebih dahulu",
);
);
...
@@ -242,12 +320,13 @@ class _BodyWidgetState extends State<BodyWidget> {
...
@@ -242,12 +320,13 @@ class _BodyWidgetState extends State<BodyWidget> {
shiftList:widget.shiftList,
shiftList:widget.shiftList,
branchModel:
branchModel:
widget.nearestBranch[selectedOutlet],
widget.nearestBranch[selectedOutlet],
nik:nikController.text,
nik:nikUser,
);
);
});
});
}
}
},
},
)),
),
),
SizedBox(
SizedBox(
width:AppMargin.m20,
width:AppMargin.m20,
),
),
...
@@ -255,7 +334,7 @@ class _BodyWidgetState extends State<BodyWidget> {
...
@@ -255,7 +334,7 @@ class _BodyWidgetState extends State<BodyWidget> {
child:CustomButton(
child:CustomButton(
text:"Keluar",
text:"Keluar",
onTap:()async{
onTap:()async{
if(nikController.text.isEmpty){
if(nikUser.isEmpty){
EasyLoading.showToast(
EasyLoading.showToast(
"Silakan isi NIK terlebih dahulu",
"Silakan isi NIK terlebih dahulu",
);
);
...
@@ -266,7 +345,7 @@ class _BodyWidgetState extends State<BodyWidget> {
...
@@ -266,7 +345,7 @@ class _BodyWidgetState extends State<BodyWidget> {
);
);
Api.getUserProfile(
Api.getUserProfile(
widget.nearestBranch[selectedOutlet].id,
widget.nearestBranch[selectedOutlet].id,
nikController.text,
nikUser,
).then((apiResponse){
).then((apiResponse){
EasyLoading.dismiss();
EasyLoading.dismiss();
if(apiResponse.error){
if(apiResponse.error){
...
@@ -279,7 +358,7 @@ class _BodyWidgetState extends State<BodyWidget> {
...
@@ -279,7 +358,7 @@ class _BodyWidgetState extends State<BodyWidget> {
isIn:false,
isIn:false,
branchModel:
branchModel:
widget.nearestBranch[selectedOutlet],
widget.nearestBranch[selectedOutlet],
nik:nikController.text,
nik:nikUser,
),
),
);
);
}
}
...
@@ -353,70 +432,180 @@ class _SelectOutletState extends State<SelectOutlet> {
...
@@ -353,70 +432,180 @@ class _SelectOutletState extends State<SelectOutlet> {
fontSize:16,
fontSize:16,
),
),
),
),
GestureDetector(
constSizedBox(
onTap:(){
height:10,
showModalBottomSheet(
backgroundColor:ColorManager.backgroundColor,
isScrollControlled:true,
context:context,
builder:(c){
returnWidgetSelectOutlet(
nearestBranch:widget.nearestBranch,
selectedOutlet:selectedBranchFromList,
onSelected:((intval){
setState((){
selectedBranchFromList=val;
widget.onSelected!(val);
});
}),
);
});
},
child:Container(
margin:constEdgeInsets.only(
top:10,
),
),
width:double.infinity,
DropdownButtonFormField2(
decoration:BoxDecoration(
decoration:InputDecoration(
border:Border.all(width:0.2,color:Colors.grey),
// hintText: "NIK",
//Add isDense true and zero Padding.
//Add Horizontal padding using buttonPadding and Vertical padding by increasing buttonHeight instead of add Padding here so that The whole TextField Button become clickable, and also the dropdown menu open under The whole TextField Button.