|
|
|
|
@ -1,5 +1,10 @@
|
|
|
|
|
import 'package:diplomaticquarterapp/core/service/insurance_service.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/locator.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/pages/insurance/insurance_details.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/gif_loader_dialog_utils.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
|
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.dart';
|
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
|
import '../base/base_view.dart';
|
|
|
|
|
@ -15,6 +20,7 @@ class InsuranceUpdate extends StatefulWidget {
|
|
|
|
|
class _InsuranceUpdateState extends State<InsuranceUpdate>
|
|
|
|
|
with SingleTickerProviderStateMixin {
|
|
|
|
|
TabController _tabController;
|
|
|
|
|
InsuranceCardService _insuranceCardService = locator<InsuranceCardService>();
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
void initState() {
|
|
|
|
|
@ -103,94 +109,109 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
|
|
|
|
|
itemCount: model.getAllSharedRecordsByStatusResponse
|
|
|
|
|
.getAllSharedRecordsByStatusList.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
return Container(
|
|
|
|
|
margin: EdgeInsets.all(10.0),
|
|
|
|
|
child: Card(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.fromLTRB(8.0, 16.0, 8.0, 8.0),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius: BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
width: MediaQuery.of(context).size.width,
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
top: 2.0,
|
|
|
|
|
left: 10.0,
|
|
|
|
|
right: 20.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Texts(
|
|
|
|
|
model
|
|
|
|
|
.getAllSharedRecordsByStatusResponse
|
|
|
|
|
.getAllSharedRecordsByStatusList[
|
|
|
|
|
index]
|
|
|
|
|
.patientName,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
return model
|
|
|
|
|
.getAllSharedRecordsByStatusResponse
|
|
|
|
|
.getAllSharedRecordsByStatusList[
|
|
|
|
|
index]
|
|
|
|
|
.status ==
|
|
|
|
|
3
|
|
|
|
|
? Container(
|
|
|
|
|
margin: EdgeInsets.all(10.0),
|
|
|
|
|
child: Card(
|
|
|
|
|
margin: EdgeInsets.fromLTRB(
|
|
|
|
|
8.0, 16.0, 8.0, 8.0),
|
|
|
|
|
color: Colors.white,
|
|
|
|
|
shape: RoundedRectangleBorder(
|
|
|
|
|
borderRadius:
|
|
|
|
|
BorderRadius.circular(10),
|
|
|
|
|
),
|
|
|
|
|
child: Container(
|
|
|
|
|
width:
|
|
|
|
|
MediaQuery.of(context).size.width,
|
|
|
|
|
padding: EdgeInsets.all(10.0),
|
|
|
|
|
child: Row(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment.start,
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 3,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
|
top: 2.0,
|
|
|
|
|
left: 10.0,
|
|
|
|
|
right: 20.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
crossAxisAlignment:
|
|
|
|
|
CrossAxisAlignment
|
|
|
|
|
.start,
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Texts(
|
|
|
|
|
model
|
|
|
|
|
.getAllSharedRecordsByStatusResponse
|
|
|
|
|
.getAllSharedRecordsByStatusList[
|
|
|
|
|
index]
|
|
|
|
|
.patientName,
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w500,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.fileno +
|
|
|
|
|
": " +
|
|
|
|
|
model
|
|
|
|
|
.getAllSharedRecordsByStatusResponse
|
|
|
|
|
.getAllSharedRecordsByStatusList[
|
|
|
|
|
index]
|
|
|
|
|
.patientID
|
|
|
|
|
.toString(),
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight:
|
|
|
|
|
FontWeight.w500,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 8,
|
|
|
|
|
),
|
|
|
|
|
if (false)
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
child: Container(
|
|
|
|
|
margin:
|
|
|
|
|
EdgeInsets.only(top: 2.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
|
label: TranslationBase
|
|
|
|
|
.of(context)
|
|
|
|
|
.fetchData,
|
|
|
|
|
small: true,
|
|
|
|
|
textColor:
|
|
|
|
|
Colors.white,
|
|
|
|
|
onTap: () {
|
|
|
|
|
getDetails(
|
|
|
|
|
model);
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
Texts(
|
|
|
|
|
TranslationBase.of(context)
|
|
|
|
|
.fileno +
|
|
|
|
|
": " +
|
|
|
|
|
model
|
|
|
|
|
.getAllSharedRecordsByStatusResponse
|
|
|
|
|
.getAllSharedRecordsByStatusList[
|
|
|
|
|
index]
|
|
|
|
|
.patientID
|
|
|
|
|
.toString(),
|
|
|
|
|
fontSize: 14,
|
|
|
|
|
color: Colors.black,
|
|
|
|
|
fontWeight: FontWeight.w500,
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
if (false)
|
|
|
|
|
Expanded(
|
|
|
|
|
flex: 2,
|
|
|
|
|
child: Container(
|
|
|
|
|
// height: MediaQuery.of(context).size.height * 0.12,
|
|
|
|
|
margin: EdgeInsets.only(top: 2.0),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: <Widget>[
|
|
|
|
|
Container(
|
|
|
|
|
child: SecondaryButton(
|
|
|
|
|
label: TranslationBase.of(
|
|
|
|
|
context)
|
|
|
|
|
.updateInsurance,
|
|
|
|
|
small: true,
|
|
|
|
|
textColor: Colors.white,
|
|
|
|
|
// color: Colors.grey,
|
|
|
|
|
),
|
|
|
|
|
//height: 45,
|
|
|
|
|
// width:90
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
: Container();
|
|
|
|
|
})
|
|
|
|
|
: Container(),
|
|
|
|
|
),
|
|
|
|
|
@ -309,4 +330,13 @@ class _InsuranceUpdateState extends State<InsuranceUpdate>
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getDetails(data) {
|
|
|
|
|
GifLoaderDialogUtils.showMyDialog(context);
|
|
|
|
|
_insuranceCardService.getInsuranceDetails(data).then((value) => {
|
|
|
|
|
GifLoaderDialogUtils.hideDialog(context),
|
|
|
|
|
Navigator.push(context,
|
|
|
|
|
FadePage(page: InsuranceCardDetails(data: value[0]['CheckList'])))
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|