You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
68 lines
2.9 KiB
Dart
68 lines
2.9 KiB
Dart
import 'package:doctor_app_flutter/providers/referred_patient_provider.dart';
|
|
import 'package:doctor_app_flutter/providers/schedule_provider.dart';
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
import 'package:doctor_app_flutter/widgets/doctor/my_referred_patient_widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/doctor/my_schedule_widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/app_texts_widget.dart';
|
|
import 'package:doctor_app_flutter/widgets/shared/dr_app_circular_progress_Indeicator.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
import '../../widgets/shared/app_scaffold_widget.dart';
|
|
import 'package:doctor_app_flutter/util/translations_delegate_base.dart';
|
|
|
|
class MyReferredPatient extends StatelessWidget {
|
|
MyReferredPatientProvider referredPatientProvider;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
referredPatientProvider = Provider.of(context);
|
|
return AppScaffold(
|
|
appBarTitle: TranslationBase.of(context).myReferredPatient,
|
|
body: referredPatientProvider.isLoading
|
|
? DrAppCircularProgressIndeicator()
|
|
: referredPatientProvider.isError
|
|
? Center(
|
|
child: AppText(
|
|
referredPatientProvider.error,
|
|
color: Theme.of(context).errorColor,
|
|
),
|
|
)
|
|
: referredPatientProvider.listMyReferredPatientModel.length == 0
|
|
? Center(
|
|
child: AppText(
|
|
TranslationBase.of(context).errorNoSchedule,
|
|
color: Theme.of(context).errorColor,
|
|
),
|
|
)
|
|
: Container(
|
|
padding: EdgeInsetsDirectional.fromSTEB(20, 0, 20, 0),
|
|
child: ListView(
|
|
children: <Widget>[
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: <Widget>[
|
|
SizedBox(
|
|
height: 10,
|
|
),
|
|
Container(
|
|
child: Column(
|
|
//children: referredPatientProvider.listMyReferralPatientModel.map((item) {
|
|
children: referredPatientProvider
|
|
.listMyReferredPatientModel
|
|
.map((item) {
|
|
return MyReferredPatientWidget(
|
|
myReferredPatientModel: item,
|
|
);
|
|
}).toList(),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|