|
|
|
@ -106,7 +106,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex:4,
|
|
|
|
flex: 4,
|
|
|
|
child: FutureBuilder(
|
|
|
|
child: FutureBuilder(
|
|
|
|
future: getFamilyFiles(), // async work
|
|
|
|
future: getFamilyFiles(), // async work
|
|
|
|
builder: (BuildContext context,
|
|
|
|
builder: (BuildContext context,
|
|
|
|
@ -192,7 +192,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex:1,
|
|
|
|
flex: 1,
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
@ -269,15 +269,14 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
Column(children: [
|
|
|
|
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Row(children: [
|
|
|
|
Row(children: [
|
|
|
|
Expanded(flex:3,child:AppText('Name')),
|
|
|
|
Expanded(flex: 3, child: AppText('Name')),
|
|
|
|
Expanded(flex:1,child:AppText('Allow')),
|
|
|
|
Expanded(flex: 1, child: AppText('Allow')),
|
|
|
|
Expanded(flex:1,child:AppText('Reject')),
|
|
|
|
Expanded(flex: 1, child: AppText('Reject')),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
Column(children: snapshot
|
|
|
|
Column(
|
|
|
|
|
|
|
|
children: snapshot
|
|
|
|
.data['GetAllPendingRecordsList']
|
|
|
|
.data['GetAllPendingRecordsList']
|
|
|
|
.map<Widget>((result) {
|
|
|
|
.map<Widget>((result) {
|
|
|
|
return Padding(
|
|
|
|
return Padding(
|
|
|
|
@ -286,8 +285,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 3,
|
|
|
|
flex: 3,
|
|
|
|
child: Text(
|
|
|
|
child:
|
|
|
|
result.patientName)),
|
|
|
|
Text(result.patientName)),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: IconButton(
|
|
|
|
child: IconButton(
|
|
|
|
@ -314,10 +313,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
))
|
|
|
|
))
|
|
|
|
],
|
|
|
|
],
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
}).toList())
|
|
|
|
}).toList())
|
|
|
|
]
|
|
|
|
])
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -334,8 +331,9 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
FutureBuilder(
|
|
|
|
FutureBuilder(
|
|
|
|
future: getSentRequest(), // async work
|
|
|
|
future: getSentRequest(), // async work
|
|
|
|
builder:
|
|
|
|
builder: (BuildContext context,
|
|
|
|
(BuildContext context, AsyncSnapshot<GetAllSharedRecordsByStatusResponse> snapshot) {
|
|
|
|
AsyncSnapshot<GetAllSharedRecordsByStatusResponse>
|
|
|
|
|
|
|
|
snapshot) {
|
|
|
|
switch (snapshot.connectionState) {
|
|
|
|
switch (snapshot.connectionState) {
|
|
|
|
case ConnectionState.waiting:
|
|
|
|
case ConnectionState.waiting:
|
|
|
|
return Padding(
|
|
|
|
return Padding(
|
|
|
|
@ -345,11 +343,11 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
if (snapshot.hasError)
|
|
|
|
if (snapshot.hasError)
|
|
|
|
return Padding(
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
child: Text(snapshot.error));
|
|
|
|
child: Text('No data found..'));
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return SingleChildScrollView(
|
|
|
|
return SingleChildScrollView(
|
|
|
|
child: Container(
|
|
|
|
child: Container(
|
|
|
|
height: SizeConfig.screenHeight *.3,
|
|
|
|
height: SizeConfig.screenHeight * .3,
|
|
|
|
child: ListView(
|
|
|
|
child: ListView(
|
|
|
|
children: snapshot
|
|
|
|
children: snapshot
|
|
|
|
.data.getAllSharedRecordsByStatusList
|
|
|
|
.data.getAllSharedRecordsByStatusList
|
|
|
|
@ -360,15 +358,16 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 3,
|
|
|
|
flex: 3,
|
|
|
|
child: Text(
|
|
|
|
child:
|
|
|
|
result.patientName)),
|
|
|
|
Text(result.patientName)),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
flex: 2,
|
|
|
|
child: AppText(result.statusDescription, color: Colors.red,)),
|
|
|
|
child: AppText(
|
|
|
|
|
|
|
|
result.statusDescription,
|
|
|
|
|
|
|
|
color: Colors.red,
|
|
|
|
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
}).toList(),
|
|
|
|
}).toList(),
|
|
|
|
)));
|
|
|
|
)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -384,8 +383,8 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
FutureBuilder(
|
|
|
|
FutureBuilder(
|
|
|
|
future: getUserViewRequest(), // async work
|
|
|
|
future: getUserViewRequest(), // async work
|
|
|
|
builder: (BuildContext context,
|
|
|
|
builder:
|
|
|
|
AsyncSnapshot<dynamic> snapshot) {
|
|
|
|
(BuildContext context, AsyncSnapshot<dynamic> snapshot) {
|
|
|
|
switch (snapshot.connectionState) {
|
|
|
|
switch (snapshot.connectionState) {
|
|
|
|
case ConnectionState.waiting:
|
|
|
|
case ConnectionState.waiting:
|
|
|
|
return Padding(
|
|
|
|
return Padding(
|
|
|
|
@ -395,7 +394,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
if (snapshot.hasError)
|
|
|
|
if (snapshot.hasError)
|
|
|
|
return Padding(
|
|
|
|
return Padding(
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
padding: EdgeInsets.all(10),
|
|
|
|
child: Text(snapshot.error));
|
|
|
|
child: Text('No data found..'));
|
|
|
|
else
|
|
|
|
else
|
|
|
|
return Column(
|
|
|
|
return Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
@ -405,30 +404,27 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 3,
|
|
|
|
flex: 3,
|
|
|
|
child: Text(TranslationBase.of(context)
|
|
|
|
child: Text(
|
|
|
|
.request)),
|
|
|
|
TranslationBase.of(context).request)),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 2,
|
|
|
|
flex: 2,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context).switchUser,
|
|
|
|
.switchUser,
|
|
|
|
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
TranslationBase.of(context)
|
|
|
|
TranslationBase.of(context).deleteView,
|
|
|
|
.deleteView,
|
|
|
|
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Column(
|
|
|
|
Column(children: [
|
|
|
|
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Row(children: [
|
|
|
|
Row(children: [
|
|
|
|
Expanded(flex:3,child:AppText('Name')),
|
|
|
|
Expanded(flex: 3, child: AppText('Name')),
|
|
|
|
Expanded(flex:1,child:AppText('Delete')),
|
|
|
|
Expanded(flex: 1, child: AppText('Delete')),
|
|
|
|
]),
|
|
|
|
]),
|
|
|
|
Column(children: snapshot
|
|
|
|
Column(
|
|
|
|
|
|
|
|
children: snapshot
|
|
|
|
.data['GetAllPendingRecordsList']
|
|
|
|
.data['GetAllPendingRecordsList']
|
|
|
|
.map<Widget>((result) {
|
|
|
|
.map<Widget>((result) {
|
|
|
|
return Padding(
|
|
|
|
return Padding(
|
|
|
|
@ -437,8 +433,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
children: <Widget>[
|
|
|
|
children: <Widget>[
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 3,
|
|
|
|
flex: 3,
|
|
|
|
child: Text(
|
|
|
|
child: Text(result.patientName)),
|
|
|
|
result.patientName)),
|
|
|
|
|
|
|
|
Expanded(
|
|
|
|
Expanded(
|
|
|
|
flex: 1,
|
|
|
|
flex: 1,
|
|
|
|
child: IconButton(
|
|
|
|
child: IconButton(
|
|
|
|
@ -451,13 +446,10 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
result, context);
|
|
|
|
result, context);
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)),
|
|
|
|
)),
|
|
|
|
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
));
|
|
|
|
));
|
|
|
|
|
|
|
|
|
|
|
|
}).toList())
|
|
|
|
}).toList())
|
|
|
|
]
|
|
|
|
])
|
|
|
|
)
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -539,10 +531,7 @@ class _MyFamily extends State<MyFamily> with TickerProviderStateMixin {
|
|
|
|
HOME,
|
|
|
|
HOME,
|
|
|
|
);
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
deleteRequest(result, context){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
deleteRequest(result, context) {}
|
|
|
|
acceptRequest(result, context){
|
|
|
|
acceptRequest(result, context) {}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|