126 lines
3.8 KiB
Dart
126 lines
3.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
|
import 'package:get/get.dart';
|
|
import 'package:regroup/Common/CommonWidget.dart';
|
|
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
|
import 'package:regroup/Utils/Common/blureffect.dart';
|
|
import 'package:regroup/Utils/Common/sized_box.dart';
|
|
import 'package:regroup/Utils/texts.dart';
|
|
import 'package:regroup/resources/routes/route_name.dart';
|
|
import 'package:shared_preferences/shared_preferences.dart';
|
|
|
|
class HelpAndSupport extends StatefulWidget {
|
|
const HelpAndSupport({super.key});
|
|
|
|
@override
|
|
State<HelpAndSupport> createState() => _HelpAndSupportState();
|
|
}
|
|
|
|
class _HelpAndSupportState extends State<HelpAndSupport> {
|
|
String? accountTypeValue;
|
|
String? accounTypeLogin;
|
|
|
|
@override
|
|
void initState() {
|
|
setValues();
|
|
super.initState();
|
|
}
|
|
|
|
setValues() async {
|
|
SharedPreferences prefs = await SharedPreferences.getInstance();
|
|
// Update state variables and trigger UI update with setState
|
|
setState(() {
|
|
accounTypeLogin = prefs.getString('accountTypefromLogin');
|
|
print('account type login is $accounTypeLogin');
|
|
// accountTypeValue = prefs.getString('accountTypeValue');
|
|
// print('account type value is $accountTypeValue');
|
|
});
|
|
}
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
// key: _scaffoldKey1,
|
|
resizeToAvoidBottomInset: false,
|
|
backgroundColor: Color(0xFF222935),
|
|
extendBody: true,
|
|
appBar: CommonAppbar(
|
|
titleTxt: "Help & Support",
|
|
),
|
|
body: Stack(children: [
|
|
Container(
|
|
decoration: const BoxDecoration(
|
|
image: DecorationImage(
|
|
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
|
fit: BoxFit.fill)),
|
|
),
|
|
SingleChildScrollView(
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
sizedBoxHeight(20.h),
|
|
GestureDetector(
|
|
onTap: () {
|
|
Get.toNamed(RouteName.faqscreen);
|
|
},
|
|
child: rowTile(
|
|
imagePath: "assets/images/png/Vectorftt.png",
|
|
text: "FAQ",
|
|
),
|
|
),
|
|
commonDivider(),
|
|
GestureDetector(
|
|
onTap: () {
|
|
Get.toNamed(RouteName.contactUs);
|
|
},
|
|
child: rowTile(
|
|
imagePath:
|
|
"assets/images/png/fluent_person-support-20-regular.png",
|
|
text: "Contact us",
|
|
),
|
|
),
|
|
accounTypeLogin == '1'
|
|
? Column(
|
|
children: [
|
|
commonDivider(),
|
|
GestureDetector(
|
|
onTap: () {
|
|
Get.toNamed(RouteName.reportabug);
|
|
},
|
|
child: rowTile(
|
|
imagePath: "assets/images/png/codicon_bug.png",
|
|
text: "Report a bug",
|
|
),
|
|
),
|
|
])
|
|
: SizedBox(),
|
|
],
|
|
))
|
|
]));
|
|
}
|
|
|
|
Widget rowTile({
|
|
required String imagePath,
|
|
required String text,
|
|
}) {
|
|
return Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
|
child: Row(children: [
|
|
Image.asset(
|
|
imagePath,
|
|
height: 21.h,
|
|
width: 21.w,
|
|
),
|
|
sizedBoxWidth(12.w),
|
|
text16w400_FCFCFC(text),
|
|
Spacer(),
|
|
Icon(
|
|
Icons.arrow_forward_ios,
|
|
color: Colors.white,
|
|
size: 20,
|
|
)
|
|
]),
|
|
);
|
|
}
|
|
}
|