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.
HMG_Patient_App/lib/pages/feedback/Status_feedback_page.dart

99 lines
3.8 KiB
Dart

import 'package:diplomaticquarterapp/core/enum/viewstate.dart';
import 'package:diplomaticquarterapp/core/viewModels/feedback/feedback_view_model.dart';
import 'package:diplomaticquarterapp/pages/base/base_view.dart';
import 'package:diplomaticquarterapp/widgets/buttons/button.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 StatusFeedbackPage extends StatefulWidget {
@override
_StatusFeedbackPageState createState() => _StatusFeedbackPageState();
}
class _StatusFeedbackPageState extends State<StatusFeedbackPage> {
@override
Widget build(BuildContext context) {
return BaseView<FeedbackViewModel>(
onModelReady: (model) => model.getCOC(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
body: Container(
5 years ago
margin: EdgeInsets.only(top: 8.0,left: 8.0,right: 8.0,bottom: MediaQuery.of(context).size.height * 0.1 ),
padding: EdgeInsets.all(15.0),
child: ListView.builder(
itemCount: model.cOCItemList.length,
itemBuilder: (context, index) => Container(
decoration: BoxDecoration(
shape: BoxShape.rectangle,
border: Border.all(color: Colors.white, width: 0.5),
borderRadius: BorderRadius.all(Radius.circular(5)),
color: Colors.white,
),
margin: EdgeInsets.all(4),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
SizedBox(height: 8,),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].cOCTitle}'),
Texts(
'Number :${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],
),
Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts('${model.cOCItemList[index].status}'),
Texts(
'${model.cOCItemList[index].date}',
variant: 'overline',
),
],
),
],
),
Texts('${model.cOCItemList[index].formType}'),
Divider(height: 4.5,color: Colors.grey[500],)
],
),
),
)),
),
bottomSheet: Container(
height: MediaQuery.of(context).size.height * 0.13,
width: double.infinity,
padding: EdgeInsets.all(8.0),
child: Center(
child: Container(
height: MediaQuery.of(context).size.height * 0.1,
width: MediaQuery.of(context).size.width * 0.8,
child: Button(
label: 'Search',
loading: model.state == ViewState.BusyLocal,
onTap: () {
//TODO When come back
},
),
),
),
),
),
);
}
}