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.
141 lines
6.6 KiB
Dart
141 lines
6.6 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/pages/feedback/feedback-detail.dart';
|
|
import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart';
|
|
import 'package:diplomaticquarterapp/widgets/buttons/button.dart';
|
|
import 'package:diplomaticquarterapp/widgets/buttons/defaultButton.dart';
|
|
import 'package:diplomaticquarterapp/widgets/buttons/secondary_button.dart';
|
|
import 'package:diplomaticquarterapp/widgets/data_display/text.dart';
|
|
import 'package:diplomaticquarterapp/widgets/others/app_scaffold_widget.dart';
|
|
import 'package:diplomaticquarterapp/widgets/transitions/fade_page.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,
|
|
isShowDecPage: false,
|
|
body: Column(
|
|
children: [
|
|
Expanded(
|
|
child: model.cOCItemList.isNotEmpty
|
|
? Container(
|
|
margin: EdgeInsets.only(top: 8.0, left: 8.0, right: 8.0, bottom: 80),
|
|
padding: EdgeInsets.all(15.0),
|
|
child: ListView.builder(
|
|
itemCount: model.cOCItemList.length,
|
|
itemBuilder: (context, index) => InkWell(
|
|
onTap: () {
|
|
gotodetails(model.cOCItemList[index]);
|
|
},
|
|
child: 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>[
|
|
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],
|
|
)
|
|
],
|
|
),
|
|
),
|
|
))),
|
|
)
|
|
: 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,
|
|
),
|
|
Text(
|
|
TranslationBase.of(context).noSearchResult,
|
|
style: TextStyle(
|
|
fontSize: 16,
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: -0.48,
|
|
color: Color(0xff2B353E),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
Container(
|
|
color: Colors.white,
|
|
padding: EdgeInsets.only(top: 16, bottom: 16, right: 21, left: 21),
|
|
child: DefaultButton(
|
|
TranslationBase.of(context).search,
|
|
() => {},
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
|
|
gotodetails(item) {
|
|
Navigator.pushReplacement(context, FadePage(page: FeedbackDetails(items: item)));
|
|
}
|
|
}
|