Ambulance Service second step
parent
3d6eafe473
commit
1ce55e687f
@ -0,0 +1,27 @@
|
|||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
|
enum Ambulate { Wheelchair, Walker, Stretcher, None }
|
||||||
|
|
||||||
|
extension SelectedAmbulate on Ambulate {
|
||||||
|
String getAmbulateTitle(BuildContext context) {
|
||||||
|
switch (this) {
|
||||||
|
case Ambulate.Wheelchair:
|
||||||
|
// TODO: Handle this case.
|
||||||
|
return 'Wheelchair';
|
||||||
|
break;
|
||||||
|
case Ambulate.Walker:
|
||||||
|
// TODO: Handle this case.
|
||||||
|
return 'Walker';
|
||||||
|
break;
|
||||||
|
case Ambulate.Stretcher:
|
||||||
|
// TODO: Handle this case.
|
||||||
|
return 'Stretcher';
|
||||||
|
break;
|
||||||
|
case Ambulate.None:
|
||||||
|
// TODO: Handle this case.
|
||||||
|
return 'None';
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
return 'None';
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,45 @@
|
|||||||
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||||
|
import 'package:diplomaticquarterapp/pages/ErService/widgets/AppointmentCard.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AvailableAppointmentsPage extends StatelessWidget {
|
||||||
|
final List<AppoitmentAllHistoryResultList> appointmentsAllHistoryList;
|
||||||
|
|
||||||
|
const AvailableAppointmentsPage({Key key, this.appointmentsAllHistoryList})
|
||||||
|
: super(key: key);
|
||||||
|
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return AppScaffold(
|
||||||
|
isShowAppBar: true,
|
||||||
|
appBarTitle: 'Available Appointments',
|
||||||
|
body: SingleChildScrollView(
|
||||||
|
child: Container(
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
|
children: [
|
||||||
|
Texts('Available Appointments'),
|
||||||
|
SizedBox(
|
||||||
|
height: 12,
|
||||||
|
),
|
||||||
|
...List.generate(
|
||||||
|
appointmentsAllHistoryList.length,
|
||||||
|
(index) => InkWell(
|
||||||
|
onTap: (){
|
||||||
|
Navigator.pop(context, appointmentsAllHistoryList[index]);
|
||||||
|
},
|
||||||
|
child: AppointmentCard(appointment: appointmentsAllHistoryList[index],),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -0,0 +1,47 @@
|
|||||||
|
import 'package:diplomaticquarterapp/models/Appointments/AppoimentAllHistoryResultList.dart';
|
||||||
|
import 'package:diplomaticquarterapp/uitl/date_uitl.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/avatar/large_avatar.dart';
|
||||||
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
||||||
|
import 'package:flutter/cupertino.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class AppointmentCard extends StatelessWidget {
|
||||||
|
final AppoitmentAllHistoryResultList appointment;
|
||||||
|
|
||||||
|
const AppointmentCard({Key key, this.appointment}) : super(key: key);
|
||||||
|
@override
|
||||||
|
Widget build(BuildContext context) {
|
||||||
|
return Container(
|
||||||
|
width: double.infinity,
|
||||||
|
margin: EdgeInsets.all(8),
|
||||||
|
padding: EdgeInsets.all(10),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Colors.white,
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
),
|
||||||
|
child: Row(
|
||||||
|
children: [
|
||||||
|
LargeAvatar(
|
||||||
|
url: appointment.doctorImageURL,
|
||||||
|
name: appointment.doctorNameObj,
|
||||||
|
),
|
||||||
|
Expanded(
|
||||||
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: Column(
|
||||||
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
|
children: [
|
||||||
|
Texts(appointment.doctorNameObj,bold: true,),
|
||||||
|
SizedBox(height: 4,),
|
||||||
|
Texts(appointment.projectName),
|
||||||
|
Texts(appointment.clinicName),
|
||||||
|
Texts(DateUtil.getMonthDayYearDateFormatted(DateUtil.convertStringToDate(appointment.bookDate))),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,12 @@
|
|||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
class ProgressDialogUtil{
|
||||||
|
|
||||||
|
static AlertDialog alert = AlertDialog(
|
||||||
|
content: new Row(
|
||||||
|
children: [
|
||||||
|
CircularProgressIndicator(),
|
||||||
|
Container(margin: EdgeInsets.only(left: 7),child:Text("Loading..." )),
|
||||||
|
],),
|
||||||
|
);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue