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.
diplomatic-quarter/lib/pages/feedback/status_feedback_page.dart

108 lines
4.9 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/uitl/translations_delegate_base.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>(
4 years ago
allowAny: true,
onModelReady: (model) => model.getCOC(),
builder: (_, model, widget) => AppScaffold(
baseViewModel: model,
4 years ago
isShowDecPage: false,
4 years ago
body: model.cOCItemList.isNotEmpty
? Container(
margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0),
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,
),
4 years ago
margin: EdgeInsets.all(4),
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
4 years ago
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
4 years ago
SizedBox(
height: 8,
),
4 years ago
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: <Widget>[
Expanded(
child: Column(
crossAxisAlignment:
CrossAxisAlignment.start,
children: <Widget>[
Texts(
'${model.cOCItemList[index].cOCTitle}'),
Texts(
TranslationBase.of(context).number +
' : ${model.cOCItemList[index].itemID}',
variant: 'overline',
),
],
),
),
Expanded(
child: 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],
)
],
),
),
4 years ago
)),
)
: Container(
child: Center(
child: Column(
children: [
SizedBox(height: MediaQuery.of(context).size.height*0.4,),
Image.asset('assets/images/comments.png',width: 80,height: 80,),
SizedBox(height: 15,),
Texts(TranslationBase.of(context).noSearchResult),
],
),
),
4 years ago
),
),
);
}
}