|
|
|
@ -48,15 +48,19 @@ class MedicalProfilePage extends StatefulWidget {
|
|
|
|
|
|
|
|
|
|
class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
var authProvider = new AuthProvider();
|
|
|
|
|
List<Medical> medical=List();
|
|
|
|
|
List<Medical> medical = List();
|
|
|
|
|
ProjectViewModel projectViewModel;
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
projectViewModel = Provider.of(context);
|
|
|
|
|
var appoCountProvider = Provider.of<ToDoCountProviderModel>(context);
|
|
|
|
|
|
|
|
|
|
List<Widget> myMedicalList = Utils.myMedicalList(projectViewModel: projectViewModel,context: context,count: appoCountProvider.count,isLogin: projectViewModel.isLogin);
|
|
|
|
|
return BaseView<MedicalViewModel>(
|
|
|
|
|
List<Widget> myMedicalList = Utils.myMedicalList(
|
|
|
|
|
projectViewModel: projectViewModel,
|
|
|
|
|
context: context,
|
|
|
|
|
count: appoCountProvider.count,
|
|
|
|
|
isLogin: projectViewModel.isLogin);
|
|
|
|
|
return BaseView<MedicalViewModel>(
|
|
|
|
|
onModelReady: (model) => model.getAppointmentHistory(),
|
|
|
|
|
builder: (_, model, widget) => AppScaffold(
|
|
|
|
|
isShowDecPage: false,
|
|
|
|
@ -96,20 +100,25 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 50,),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height: 50,
|
|
|
|
|
),
|
|
|
|
|
Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 5.0),
|
|
|
|
|
child: GridView.builder(
|
|
|
|
|
shrinkWrap: true,
|
|
|
|
|
primary: false,
|
|
|
|
|
physics: NeverScrollableScrollPhysics(),
|
|
|
|
|
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
|
gridDelegate:
|
|
|
|
|
SliverGridDelegateWithFixedCrossAxisCount(
|
|
|
|
|
crossAxisCount: 3,
|
|
|
|
|
childAspectRatio: MediaQuery.of(context).size.width / (MediaQuery.of(context).size.height / 2.40),
|
|
|
|
|
childAspectRatio: MediaQuery.of(context)
|
|
|
|
|
.size
|
|
|
|
|
.width /
|
|
|
|
|
(MediaQuery.of(context).size.height / 2.40),
|
|
|
|
|
),
|
|
|
|
|
itemCount: myMedicalList.length,
|
|
|
|
|
itemBuilder: (BuildContext context, int index) {
|
|
|
|
|
|
|
|
|
|
return myMedicalList[index];
|
|
|
|
|
},
|
|
|
|
|
),
|
|
|
|
@ -117,8 +126,7 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
SizedBox(
|
|
|
|
|
height:
|
|
|
|
|
MediaQuery.of(context).size.height * 0.12,
|
|
|
|
|
height: MediaQuery.of(context).size.height * 0.12,
|
|
|
|
|
),
|
|
|
|
|
if (model.user != null && model.isLogin)
|
|
|
|
|
Positioned(
|
|
|
|
@ -182,19 +190,16 @@ class _MedicalProfilePageState extends State<MedicalProfilePage> {
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fullMedicalData(){
|
|
|
|
|
if(projectViewModel.havePrivilege(5))
|
|
|
|
|
{}
|
|
|
|
|
fullMedicalData() {
|
|
|
|
|
if (projectViewModel.havePrivilege(5)) {}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
class Medical{
|
|
|
|
|
|
|
|
|
|
final String title;
|
|
|
|
|
final String imagePath;
|
|
|
|
|
final String subTitle;
|
|
|
|
|
final Widget page;
|
|
|
|
|
|
|
|
|
|
Medical({this.title, this.imagePath, this.subTitle, this.page});
|
|
|
|
|
class Medical {
|
|
|
|
|
final String title;
|
|
|
|
|
final String imagePath;
|
|
|
|
|
final String subTitle;
|
|
|
|
|
final Widget page;
|
|
|
|
|
|
|
|
|
|
Medical({this.title, this.imagePath, this.subTitle, this.page});
|
|
|
|
|
}
|
|
|
|
|