This commit is contained in:
Hamza-Ayed
2024-05-29 16:09:37 +03:00
parent 058fb67a41
commit 4af52f4392
44 changed files with 9509 additions and 2044 deletions

View File

@@ -1,4 +1,5 @@
import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';
import 'package:get/get.dart';
import 'package:SEFER/constant/colors.dart';
import 'package:SEFER/constant/style.dart';
@@ -20,14 +21,17 @@ class HelpCaptain extends StatelessWidget {
body: [
Column(
children: [
Card(
color: AppColor.yellowColor,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'If you need any help or have question this is right site to do that and your welcome'
.tr,
style: AppStyle.title,
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: AppStyle.boxDecoration1,
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
'If you need any help or have question this is right site to do that and your welcome'
.tr,
style: AppStyle.title,
),
),
),
),
@@ -80,70 +84,84 @@ class HelpCaptain extends StatelessWidget {
),
)),
GetBuilder<HelpController>(
builder: (helpController) => Container(
height: 400,
decoration: AppStyle.boxDecoration,
child: ListView.builder(
itemCount: helpController.helpQuestionDate['message'] !=
null
? helpController.helpQuestionDate['message'].length
: 0,
itemBuilder: (BuildContext context, int index) {
// if (helpController.helpQuestionDate['message'] ==
// null) {
// return const CircularProgressIndicator();
// }
var list =
helpController.helpQuestionDate['message'][index];
return Padding(
padding: const EdgeInsets.all(3),
child: Container(
decoration: BoxDecoration(
border: Border.all(
color: AppColor.greenColor,
width: 3,
),
borderRadius: BorderRadius.circular(11)),
// elevation: 3,
// color: AppColor.greenColor,
child: GestureDetector(
onTap: () {
print(list['id']);
helpController.getindex(
list['id'], list['helpQuestion']);
helpController
.getHelpRepley(list['id'].toString());
Get.to(
() => const HelpDetailsReplayPage(),
builder: (helpController) => Padding(
padding: const EdgeInsets.all(10),
child: Container(
height: Get.height * .45,
decoration: AppStyle.boxDecoration,
child: ListView.builder(
itemCount:
helpController.helpQuestionDate['message'] != null
? helpController
.helpQuestionDate['message'].length
: 0,
itemBuilder: (BuildContext context, int index) {
// if (helpController.helpQuestionDate['message'] ==
// null) {
// return const CircularProgressIndicator();
// }
var list = helpController
.helpQuestionDate['message'][index];
return helpController
.helpQuestionDate['message'].length ==
0
? Center(
child: Text(
'text',
style: AppStyle.title,
),
)
: Padding(
padding: const EdgeInsets.all(3),
child: Container(
decoration: BoxDecoration(
border: Border.all(
color: AppColor.greenColor,
width: 3,
),
borderRadius:
BorderRadius.circular(11)),
// elevation: 3,
// color: AppColor.greenColor,
child: GestureDetector(
onTap: () {
print(list['id']);
helpController.getindex(
list['id'], list['helpQuestion']);
helpController.getHelpRepley(
list['id'].toString());
Get.to(
() => const HelpDetailsReplayPage(),
);
},
child: Padding(
padding: const EdgeInsets.all(2),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
SizedBox(
width: Get.width * .6,
child: Text(
list['helpQuestion'],
style: AppStyle.title,
),
),
SizedBox(
width: Get.width * .3,
child: Text(
list['datecreated'],
style: AppStyle.subtitle,
),
),
],
),
),
),
),
);
},
child: Padding(
padding: const EdgeInsets.all(2),
child: Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
SizedBox(
width: Get.width * .6,
child: Text(
list['helpQuestion'],
style: AppStyle.title,
),
),
SizedBox(
width: Get.width * .3,
child: Text(
list['datecreated'],
style: AppStyle.subtitle,
),
),
],
),
),
),
),
);
},
},
),
),
)),
],