Files
Regroup/lib/Main_Screens/ProfileTab/Settings/PrivacyPolicy.dart
2024-07-31 16:08:23 +05:30

129 lines
5.0 KiB
Dart
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Main_Screens/ProfileTab/view_model/profileGetmethod.dart';
import 'package:regroup/Utils/Common/CommonAppbar.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class PrivacyPolicy extends StatefulWidget {
const PrivacyPolicy({super.key});
@override
State<PrivacyPolicy> createState() => _PrivacyPolicyState();
}
class _PrivacyPolicyState extends State<PrivacyPolicy> {
@override
Widget build(BuildContext context) {
return Scaffold(
// key: _scaffoldKey1,
backgroundColor: Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
appBar: CommonAppbar(
titleTxt: "Privacy policy",
),
body: FutureBuilder(
future: Profilegetmethod().getPrivacypolicy(),
builder: (ctx, snapshot) {
if (snapshot.data == null) {
return Center(child: CircularProgressIndicator());
}
if (snapshot.connectionState == ConnectionState.done) {
if (snapshot.hasError) {
return Center(
child: Text(
'${snapshot.error} occured',
style: TextStyle(fontSize: 18.spMin),
),
);
}
}
return privacyobj!.data!.isBlank!
? _buildNoDataBody(context)
: _buildBody(context);
},
),
);
}
Widget _buildNoDataBody(context) {
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
"No Data Found",
style: TextStyle(
color: Colors.white,
fontSize: 16.sp,
fontWeight: FontWeight.w600),
)
],
),
);
}
Widget _buildBody(context) {
return Stack(children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: SingleChildScrollView(
child: Column(children: [
sizedBoxHeight(20.h),
Html(
data: privacyobj!.data!.content,
// style: {
// "html": Style(
// color: Colors.white,
// fontFamily: "Poppins",
// fontSize: FontSize(18.sp),
// fontWeight: FontWeight.w700,
// ),
// },
style: {
"html": Style(
color: Colors.white, // Text color
fontFamily: "Poppins", // Font family
fontSize: FontSize(18), // Font size
fontWeight: FontWeight.w700, // Font weight
),
"p": Style(
color: Colors.white,
fontSize: FontSize(18.sp),
fontWeight: FontWeight.w500),
"a": Style(
color: Colors.white,
fontSize: FontSize(18.sp),
fontWeight: FontWeight.w500
// Link color
),
},
)
// text18w700white(
// "Regroup is a community where everyone can belong"),
// sizedBoxHeight(20.h),
// text16400whiteblur(
// "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum."),
// sizedBoxHeight(20.h),
// text16400whiteblur(
// "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.")
]),
),
)
]);
}
}