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.
122 lines
5.1 KiB
Dart
122 lines
5.1 KiB
Dart
|
1 month ago
|
import 'package:flutter/material.dart';
|
||
|
|
import 'package:flutter_svg/flutter_svg.dart';
|
||
|
|
import 'package:get/get.dart';
|
||
|
|
|
||
|
|
|
||
|
|
import '../../../core/constants/translation_keys.dart';
|
||
|
|
import '../../../custom_widgets/custom_app_bar.dart';
|
||
|
|
import '../../../res/app_colors.dart';
|
||
|
|
import '../../../routes/app_pages.dart';
|
||
|
|
import '../controllers/faqs_controller.dart';
|
||
|
|
|
||
|
|
class FaqsView extends GetView<FaqsController> {
|
||
|
|
FaqsView({Key? key, this.description, this.title, this.shortTitle}) : super(key: key);
|
||
|
|
String? title;
|
||
|
|
String? shortTitle;
|
||
|
|
String? description;
|
||
|
|
|
||
|
|
@override
|
||
|
|
Widget build(BuildContext context) {
|
||
|
|
var faqs = controller.faqsModel;
|
||
|
|
return Scaffold(
|
||
|
|
appBar: DashBoardAppBar(
|
||
|
|
title: TranslationKeys.makeTranslation(TranslationKeys.textFaqs),
|
||
|
|
onBackButtonPressed: () {
|
||
|
|
Get.back();
|
||
|
|
},
|
||
|
|
),
|
||
|
|
body: Padding(
|
||
|
|
padding: const EdgeInsets.symmetric(horizontal: 20.0, vertical: 20.0),
|
||
|
|
child: Column(
|
||
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||
|
|
children: [
|
||
|
|
Text(TranslationKeys.makeTranslation(TranslationKeys.textHowCanIHelpYou), style: Theme.of(context).textTheme.titleSmall?.copyWith(color: AppColors.black, fontSize: 20, fontWeight: FontWeight.w500)),
|
||
|
|
Column(children: [
|
||
|
|
Container(
|
||
|
|
margin: const EdgeInsets.only(left: 0, right: 0, bottom: 12, top: 17),
|
||
|
|
height: 40,
|
||
|
|
padding: const EdgeInsets.symmetric(horizontal: 12.0),
|
||
|
|
decoration: BoxDecoration(
|
||
|
|
color: Colors.white,
|
||
|
|
border: Border.all(color: Colors.grey),
|
||
|
|
borderRadius: BorderRadius.circular(20.0),
|
||
|
|
),
|
||
|
|
child: Row(
|
||
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||
|
|
children: [
|
||
|
|
Icon(
|
||
|
|
Icons.search,
|
||
|
|
size: 15.0,
|
||
|
|
color: Colors.grey[800],
|
||
|
|
),
|
||
|
|
const SizedBox(width: 5.0),
|
||
|
|
Expanded(
|
||
|
|
child: TextField(
|
||
|
|
style: Theme.of(context).textTheme.bodySmall?.copyWith(fontWeight: FontWeight.w400, fontSize: 12),
|
||
|
|
decoration: const InputDecoration(
|
||
|
|
enabledBorder: InputBorder.none,
|
||
|
|
border: InputBorder.none,
|
||
|
|
focusedBorder: InputBorder.none,
|
||
|
|
hintText: 'search your query',
|
||
|
|
),
|
||
|
|
onChanged: (value) => controller.searchText.value = value),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
]),
|
||
|
|
const SizedBox(height: 20),
|
||
|
|
Text(TranslationKeys.makeTranslation(TranslationKeys.textExploreAllArticles), style: Theme.of(context).textTheme.titleSmall?.copyWith(fontSize: 14, fontWeight: FontWeight.w400)),
|
||
|
|
const SizedBox(height: 20),
|
||
|
|
Container(
|
||
|
|
height: 1,
|
||
|
|
width: double.infinity,
|
||
|
|
color: AppColors.colorGrey350,
|
||
|
|
),
|
||
|
|
const SizedBox(height: 30),
|
||
|
|
Obx(() {
|
||
|
|
return Expanded(
|
||
|
|
child: ListView.builder(
|
||
|
|
itemCount: controller.filteredListSendingMoney.length,
|
||
|
|
itemBuilder: (context, index) {
|
||
|
|
return Padding(
|
||
|
|
padding: const EdgeInsets.only(bottom: 20.0),
|
||
|
|
child: InkWell(
|
||
|
|
onTap: () {
|
||
|
|
Get.toNamed(Routes.FAQS_FIRST_SCREEN, arguments: faqs.sendingMoney[index]);
|
||
|
|
},
|
||
|
|
child: Row(
|
||
|
|
children: [
|
||
|
|
SvgPicture.asset(faqs.sendingMoney[index].imageProvider, height: 40),
|
||
|
|
const SizedBox(width: 10),
|
||
|
|
Column(
|
||
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||
|
|
children: [
|
||
|
|
Text(
|
||
|
|
controller.filteredSendingMoney[index].title,
|
||
|
|
style: context.textTheme.bodyMedium!.copyWith(fontSize: 12, fontWeight: FontWeight.w400),
|
||
|
|
),
|
||
|
|
const SizedBox(height: 5),
|
||
|
|
Text(
|
||
|
|
controller.filteredSendingMoney[index].description,
|
||
|
|
style: context.textTheme.bodySmall!.copyWith(fontSize: 9, fontWeight: FontWeight.w400),
|
||
|
|
),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
const Spacer(),
|
||
|
|
const Padding(padding: EdgeInsets.all(0.0), child: Icon(Icons.arrow_forward_ios_outlined, size: 15, color: AppColors.colorGrey500)),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
);
|
||
|
|
},
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}),
|
||
|
|
],
|
||
|
|
),
|
||
|
|
),
|
||
|
|
);
|
||
|
|
}
|
||
|
|
}
|