This repository has been archived on 2024-10-18. You can view files and clone it, but cannot push or open issues or pull requests.
ftc_patient_app/lib/view/screens/rota/your_rota_screen.dart

93 lines
2.3 KiB
Dart

import 'package:flutter/material.dart';
import 'package:ftc_mobile_app/ftc_mobile_app.dart';
import 'package:ftc_mobile_app/models/rota/WeekArrayData.dart';
import 'package:get/get.dart';
import 'new_rota_list_widget.dart';
class YourRotaScreen extends StatefulWidget {
const YourRotaScreen({Key? key}) : super(key: key);
@override
State<YourRotaScreen> createState() => _YourRotaScreenState();
}
class _YourRotaScreenState extends State<YourRotaScreen> {
final controller = Get.put(YourRotaScreenController());
@override
Widget build(BuildContext context) {
return CustomScaffold(
backgroundColor: CustomAppColors.kPrimaryColor,
screenKey: controller.screenKey,
onScreenTap: controller.removeFocus,
showAppBar: true,
appBar: CustomAppBar(
showBoxShadow: false,
leadingButton: Container(),
titleWidget: Row(
children: [
InkWell(
onTap: () {
Navigator.pop(context);
},
child: CustomImageWidget(
imagePath: AssetsManager.kBackIcon,
height: 11.53.h,
width: 8.66.w,
),
),
SizedBox(
width: 15.w,
),
CustomTextWidget(
text: "Your Rota",
isExpanded: false,
fontSize: 16.sp,
fontWeight: FontWeight.w700),
],
),
),
body: _getBody(),
);
}
Widget _getBody() {
return Obx(
() => controller.loadingShifts()
? const Center(child: CircularProgressIndicator())
: NewRotaListWidget(
shifts: controller.myShiftsList(),
onCancelShiftTap: (int index, DaysArrayData data) {},
),
);
}
@override
void dispose() {
controller.dispose();
super.dispose();
}
}
// class UpperTextWidget extends StatelessWidget {
// const UpperTextWidget({
// super.key,
// required this.text,
// });
//
// final String text;
//
// @override
// Widget build(BuildContext context) {
// return Container(
// padding: const EdgeInsets.only(left: 20),
// child: Text(
// text,
// style: const TextStyle(
// color: CustomAppColors.kLightTextColor, fontSize: 12),
// ),
// );
// }
// }