@@ -33,4 +33,11 @@ class ApiUrls {
|
||||
static const storeDetailsOfOAuth = "${baseUrl}update-user-account-type";
|
||||
|
||||
static const getuserdetails = "${baseUrl}get-auth-user-data";
|
||||
|
||||
//profile
|
||||
|
||||
static const postnotification = "${baseUrl}update-notification-settings";
|
||||
static const getnotification = "${baseUrl}fetch-notification-settings";
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,59 @@
|
||||
class FetchNotification {
|
||||
String? status;
|
||||
int? statusCode;
|
||||
String? message;
|
||||
Data? data;
|
||||
|
||||
FetchNotification({this.status, this.statusCode, this.message, this.data});
|
||||
|
||||
FetchNotification.fromJson(Map<String, dynamic> json) {
|
||||
status = json['status'];
|
||||
statusCode = json['status_code'];
|
||||
message = json['message'];
|
||||
data = json['data'] != null ? new Data.fromJson(json['data']) : null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['status'] = this.status;
|
||||
data['status_code'] = this.statusCode;
|
||||
data['message'] = this.message;
|
||||
if (this.data != null) {
|
||||
data['data'] = this.data!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class Data {
|
||||
int? groupNotification;
|
||||
int? communityNotification;
|
||||
int? followerNotification;
|
||||
int? newFollowerNotification;
|
||||
int? directMessageNotification;
|
||||
|
||||
Data(
|
||||
{this.groupNotification,
|
||||
this.communityNotification,
|
||||
this.followerNotification,
|
||||
this.newFollowerNotification,
|
||||
this.directMessageNotification});
|
||||
|
||||
Data.fromJson(Map<String, dynamic> json) {
|
||||
groupNotification = json['group_notification'];
|
||||
communityNotification = json['community_notification'];
|
||||
followerNotification = json['follower_notification'];
|
||||
newFollowerNotification = json['new_follower_notification'];
|
||||
directMessageNotification = json['direct_message_notification'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['group_notification'] = this.groupNotification;
|
||||
data['community_notification'] = this.communityNotification;
|
||||
data['follower_notification'] = this.followerNotification;
|
||||
data['new_follower_notification'] = this.newFollowerNotification;
|
||||
data['direct_message_notification'] = this.directMessageNotification;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.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';
|
||||
|
||||
class NotificationScreen extends StatefulWidget {
|
||||
const NotificationScreen({super.key});
|
||||
|
||||
@override
|
||||
State<NotificationScreen> createState() => _NotificationScreenState();
|
||||
}
|
||||
|
||||
class _NotificationScreenState extends State<NotificationScreen> {
|
||||
List<bool> switchValues = List.generate(5, (index) => false);
|
||||
bool swichvalue = false;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Notifications",
|
||||
),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"), fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(20.h),
|
||||
rowTile(text: "Group notification", index: 0),
|
||||
commonDivider(),
|
||||
rowTile(text: "Community notification", index: 1),
|
||||
commonDivider(),
|
||||
rowTile(text: "Follower notification", index: 2),
|
||||
commonDivider(),
|
||||
rowTile(text: "New follower notification", index: 3),
|
||||
commonDivider(),
|
||||
rowTile(text: "Direct message notification", index: 4),
|
||||
]))
|
||||
]));
|
||||
}
|
||||
|
||||
Widget rowTile({required String text, required int index}) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
||||
child: Row(
|
||||
children: [
|
||||
text16w400_FCFCFC(text),
|
||||
Spacer(),
|
||||
Transform.scale(
|
||||
scaleY: 1,
|
||||
child: CupertinoSwitch(
|
||||
value: switchValues[index],
|
||||
trackColor: Colors.white.withOpacity(0.4),
|
||||
activeColor: Color(0xFF34C759),
|
||||
onChanged: (bool? value) {
|
||||
setState(() {
|
||||
switchValues[index] = value ?? false;
|
||||
});
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,172 @@
|
||||
import 'package:flutter/cupertino.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/Common/base_manager.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/ViewModel/NotificationApi.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/dialogs.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
|
||||
class NotificationScreen extends StatefulWidget {
|
||||
const NotificationScreen({super.key});
|
||||
|
||||
@override
|
||||
State<NotificationScreen> createState() => _NotificationScreenState();
|
||||
}
|
||||
|
||||
class _NotificationScreenState extends State<NotificationScreen> {
|
||||
var switchValues = List<bool>.generate(5, (index) => false).obs;
|
||||
|
||||
void toggleSwitch(int index, bool value) {
|
||||
switchValues[index] = value;
|
||||
}
|
||||
|
||||
String switchValueFinal(int index) {
|
||||
return switchValues[index] ? '1' : '0';
|
||||
}
|
||||
|
||||
void switchValueBool() {
|
||||
final notifications = [
|
||||
fetchNoti!.data!.groupNotification,
|
||||
fetchNoti!.data!.communityNotification,
|
||||
fetchNoti!.data!.followerNotification,
|
||||
fetchNoti!.data!.newFollowerNotification,
|
||||
fetchNoti!.data!.directMessageNotification,
|
||||
];
|
||||
|
||||
for (int i = 0; i < notifications.length; i++) {
|
||||
toggleSwitch(i, notifications[i] == 1);
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> updateNotification() async {
|
||||
Map<String, String> updata = {
|
||||
"group_notification": switchValueFinal(0),
|
||||
"community_notification": switchValueFinal(1),
|
||||
"follower_notification": switchValueFinal(2),
|
||||
"new_follower_notification": switchValueFinal(3),
|
||||
"direct_message_notification": switchValueFinal(4),
|
||||
};
|
||||
final data = await NotificationAPI().notificationPostApi(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
utils.showToast('Notification updated');
|
||||
} else {
|
||||
Get.snackbar(
|
||||
"Error!",
|
||||
data.data['message'],
|
||||
duration: Duration(seconds: 2),
|
||||
colorText: Colors.white,
|
||||
backgroundColor: Colors.red,
|
||||
margin: EdgeInsets.all(8),
|
||||
snackStyle: SnackStyle.FLOATING,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
late Future myfuture;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
myfuture = NotificationAPI().getNotification();
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
resizeToAvoidBottomInset: false,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Notifications",
|
||||
),
|
||||
body: FutureBuilder(
|
||||
future: myfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.blue,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: TextStyle(fontSize: 18.spMin),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
switchValueBool();
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill,
|
||||
),
|
||||
),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Column(
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
rowTile(text: "Group notification", index: 0),
|
||||
commonDivider(),
|
||||
rowTile(text: "Community notification", index: 1),
|
||||
commonDivider(),
|
||||
rowTile(text: "Follower notification", index: 2),
|
||||
commonDivider(),
|
||||
rowTile(text: "New follower notification", index: 3),
|
||||
commonDivider(),
|
||||
rowTile(text: "Direct message notification", index: 4),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
return Container();
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Widget rowTile({required String text, required int index}) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 20.h),
|
||||
child: Row(
|
||||
children: [
|
||||
text16w400_FCFCFC(text),
|
||||
Spacer(),
|
||||
Obx(
|
||||
() => Transform.scale(
|
||||
scaleY: 1,
|
||||
child: CupertinoSwitch(
|
||||
value: switchValues[index],
|
||||
trackColor: Colors.white.withOpacity(0.4),
|
||||
activeColor: Color(0xFF34C759),
|
||||
onChanged: (bool? value) {
|
||||
toggleSwitch(index, value ?? false);
|
||||
updateNotification();
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import 'package:regroup/Common/api_urls.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/Model/FetchNotification.dart';
|
||||
|
||||
FetchNotification? fetchNoti;
|
||||
|
||||
class NotificationAPI {
|
||||
NotificationAPI();
|
||||
// class otpAPI {
|
||||
// otpAPI(this.data);
|
||||
// var data;
|
||||
Future<ResponseData<dynamic>> notificationPostApi(var data) async {
|
||||
final response = await NetworkApiServices().postApi(
|
||||
data,
|
||||
ApiUrls.postnotification,
|
||||
// "https://regroup.betadelivery.com/api/v1/forgot-password",
|
||||
);
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
//Map<String, dynamic> responseData = jsonDecode(response.data);
|
||||
if (response.data['status'] == "success") {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.SUCCESS,
|
||||
// data: response.data
|
||||
);
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> getNotification() async {
|
||||
final response = await NetworkApiServices().getApi(
|
||||
ApiUrls.getnotification,
|
||||
);
|
||||
fetchNoti = FetchNotification.fromJson(response.data);
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
if (response.data['success'] == true) {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.SUCCESS,
|
||||
data: response.data);
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.FAILED);
|
||||
}
|
||||
}
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
@@ -50,46 +50,48 @@ class _AnnouncementsState extends State<Announcements> {
|
||||
titleTxt: "Announcements",
|
||||
),
|
||||
body: Stack(children: [
|
||||
const CommonBlurLeftRed(),
|
||||
const CommonBlurRightRed(),
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
Positioned.fill(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.announcementrequest);
|
||||
},
|
||||
child: text16w700_FCFCFCUnderline(
|
||||
"View announcement requests"),
|
||||
),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
Column(
|
||||
children: List.generate(announcement.length, (index) {
|
||||
return Column(
|
||||
children: [
|
||||
announcementWidget(
|
||||
imagepath: announcement[index]["imagepath"],
|
||||
title: announcement[index]["title"],
|
||||
date: announcement[index]["date"],
|
||||
subtitle: announcement[index]["subtitle"]),
|
||||
sizedBoxHeight(16.h)
|
||||
],
|
||||
);
|
||||
}),
|
||||
)
|
||||
]))))
|
||||
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(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.announcementrequest);
|
||||
},
|
||||
child: text16w700_FCFCFCUnderline(
|
||||
"View announcement requests"),
|
||||
),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
Column(
|
||||
children: List.generate(announcement.length, (index) {
|
||||
return Column(
|
||||
children: [
|
||||
announcementWidget(
|
||||
imagepath: announcement[index]["imagepath"],
|
||||
title: announcement[index]["title"],
|
||||
date: announcement[index]["date"],
|
||||
subtitle: announcement[index]["subtitle"]),
|
||||
sizedBoxHeight(16.h)
|
||||
],
|
||||
);
|
||||
}),
|
||||
)
|
||||
])),
|
||||
),
|
||||
]),
|
||||
floatingActionButton: Container(
|
||||
height: 55.h,
|
||||
|
||||
@@ -47,16 +47,16 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
|
||||
_loginWithGoogle() {
|
||||
googleSigninController.handleGoogleSignIn().then((value) async {
|
||||
final resp = await LoginAPI().storeGoogleSignin(
|
||||
{"google_access_token": value, "one_signal_player_id": "ABCD"});
|
||||
if (value != 'Google Sign-In canceled') {
|
||||
final resp = await LoginAPI().storeGoogleSignin(
|
||||
{"google_access_token": value, "one_signal_player_id": "ABCD"});
|
||||
if (resp.message == "go-to-signin-via-oauth") {
|
||||
Get.toNamed(RouteName.verifygoogleapplepage,
|
||||
arguments: {"email": resp.data});
|
||||
} else if (value == null) {
|
||||
Get.snackbar(
|
||||
'Error',
|
||||
'Google Sign-In canceled',
|
||||
resp.data["message"][0],
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: Colors.red,
|
||||
colorText: Colors.white,
|
||||
@@ -78,7 +78,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
} else {
|
||||
Get.snackbar(
|
||||
'Error',
|
||||
'Google Sign-In canceled',
|
||||
resp.data["message"][0],
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: Colors.red,
|
||||
colorText: Colors.white,
|
||||
|
||||
@@ -492,6 +492,8 @@ class _CustomDropDownTagState extends State<CustomDropDownTag> {
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
///
|
||||
class CustomDropDownRadio extends StatefulWidget {
|
||||
const CustomDropDownRadio({
|
||||
Key? key,
|
||||
@@ -664,7 +666,9 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
|
||||
width: double.infinity,
|
||||
height: 50.h,
|
||||
padding: EdgeInsets.only(
|
||||
top: 14.0, bottom: 14.0, right: 22.w, left: 12.w),
|
||||
right: 22.w,
|
||||
left: 12.w,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: const Color(0xFFFFFFFF).withOpacity(0.10),
|
||||
borderRadius: onDropTap.value
|
||||
|
||||
@@ -128,10 +128,8 @@ class _TellusaboutBusinessState extends State<TellusaboutBusiness> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return WillPopScope(
|
||||
onWillPop: () {
|
||||
return Future.value(false);
|
||||
},
|
||||
return GestureDetector(
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
child: Scaffold(
|
||||
backgroundColor: const Color.fromARGB(255, 18, 32, 47),
|
||||
body: Stack(children: [
|
||||
@@ -236,7 +234,7 @@ class _TellusaboutBusinessState extends State<TellusaboutBusiness> {
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white('Type of business'),
|
||||
sizedBoxHeight(10.h),
|
||||
CustomDropDownWidgetSignup(
|
||||
CustomDropDownRadio(
|
||||
header: 'Select type of business',
|
||||
title: '',
|
||||
listData: _businesslist,
|
||||
|
||||
@@ -153,281 +153,254 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
|
||||
return Stack(
|
||||
children: [
|
||||
const Positioned(
|
||||
top: 220, left: -30, child: CommonBlurLeftSecond()),
|
||||
const Positioned(
|
||||
top: 450, right: -30, child: CommonBlurRightSecond()),
|
||||
const Positioned(
|
||||
top: 530, left: -30, child: CommonBlurLeftBlue()),
|
||||
GlassmorphicContainer(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height: MediaQuery.of(context).size.height,
|
||||
borderRadius: 2,
|
||||
blur: 6,
|
||||
alignment: Alignment.bottomLeft,
|
||||
border: 2,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
const Color(0XFF222935).withOpacity(0.60),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 16.w, vertical: 0.h),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.communitycommitscreen);
|
||||
},
|
||||
child: Text(
|
||||
'Skip',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: Colors.white),
|
||||
),
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
"assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 16.w, vertical: 0.h),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.communitycommitscreen);
|
||||
},
|
||||
child: Text(
|
||||
'Skip',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: Colors.white),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: text16400white('Step 1 of 3')),
|
||||
sizedBoxHeight(20.h),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 25.h,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(
|
||||
width: 1, color: Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: text16400white('Step 1 of 3')),
|
||||
sizedBoxHeight(20.h),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 25.h,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: const BorderSide(
|
||||
width: 1, color: Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.w, vertical: 2.h),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 120.w,
|
||||
height: 15.h,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Color(0xA5D90B2E),
|
||||
Color(0x42D90B2E)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: 15,
|
||||
height: 15,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Color(0xFFD90B2E),
|
||||
Color(0x60D90B2E)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.w, vertical: 2.h),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 120.w,
|
||||
height: 15.h,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Color(0xA5D90B2E),
|
||||
Color(0x42D90B2E)
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: 15,
|
||||
height: 15,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: const LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Color(0xFFD90B2E),
|
||||
Color(0x60D90B2E)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(40.h),
|
||||
indiactivityobj!.data == null ||
|
||||
indiactivityobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
Center(
|
||||
child: _selectedIndices.isEmpty
|
||||
? text20400white(
|
||||
'What is your main activity ?')
|
||||
: text20400white(
|
||||
'What else do you do?')),
|
||||
sizedBoxHeight(10.w),
|
||||
Center(
|
||||
child: Container(
|
||||
width: 154.w,
|
||||
decoration: const ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
strokeAlign: BorderSide
|
||||
.strokeAlignCenter,
|
||||
color: Color(0xFF858585),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(40.h),
|
||||
indiactivityobj!.data == null ||
|
||||
indiactivityobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Center(
|
||||
child: _selectedIndices.isEmpty
|
||||
? text20400white(
|
||||
'What is your main activity ?')
|
||||
: text20400white(
|
||||
'What else do you do?')),
|
||||
sizedBoxHeight(10.w),
|
||||
Center(
|
||||
child: Container(
|
||||
width: 154.w,
|
||||
decoration: const ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
strokeAlign:
|
||||
BorderSide.strokeAlignCenter,
|
||||
color: Color(0xFF858585),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
GridView.builder(
|
||||
physics: const ScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount:
|
||||
3, // Number of items in each row
|
||||
crossAxisSpacing: 12
|
||||
.w, // Horizontal spacing between items
|
||||
mainAxisSpacing: 12
|
||||
.h, // Vertical spacing between items
|
||||
),
|
||||
itemCount:
|
||||
indiactivityobj!.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
return ActivityContainer(
|
||||
index: indiactivityobj!
|
||||
.data![index].id!,
|
||||
titleString: indiactivityobj!
|
||||
.data![index].name!,
|
||||
image: indiactivityobj!
|
||||
.data![index].image,
|
||||
// 'assets/images/svg/individualact7.svg',
|
||||
isSelected: _selectedIndices
|
||||
.contains(indiactivityobj!
|
||||
.data![index].id!),
|
||||
gradientColor: _getGradientColor(
|
||||
indiactivityobj!
|
||||
.data![index].id!),
|
||||
onTap: _onContainerTap,
|
||||
);
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
GridView.builder(
|
||||
physics: const ScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount:
|
||||
3, // Number of items in each row
|
||||
crossAxisSpacing: 12
|
||||
.w, // Horizontal spacing between items
|
||||
mainAxisSpacing: 12
|
||||
.h, // Vertical spacing between items
|
||||
),
|
||||
itemCount: indiactivityobj!.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
return ActivityContainer(
|
||||
index:
|
||||
indiactivityobj!.data![index].id!,
|
||||
titleString: indiactivityobj!
|
||||
.data![index].name!,
|
||||
image: indiactivityobj!
|
||||
.data![index].image,
|
||||
// 'assets/images/svg/individualact7.svg',
|
||||
isSelected: _selectedIndices.contains(
|
||||
indiactivityobj!
|
||||
.data![index].id!),
|
||||
gradientColor: _getGradientColor(
|
||||
indiactivityobj!
|
||||
.data![index].id!),
|
||||
onTap: _onContainerTap,
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
sizedBoxHeight(30.h),
|
||||
text20400FCFCFC("Add other activity"),
|
||||
sizedBoxHeight(25.h),
|
||||
CustomTextFormField(
|
||||
textEditingController:
|
||||
otheractivitycontroller,
|
||||
texttype: TextInputType.text,
|
||||
hintText: "Enter other activity",
|
||||
// leadingIcon:
|
||||
// // const Icon(Icons.mail_outline),
|
||||
// Image.asset(
|
||||
// width: 22.w,
|
||||
// height: 17.h,
|
||||
// 'assets/images/png/user.png',
|
||||
// ),
|
||||
// validatorText: "Enter your full name",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your full name ';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter(),
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[a-zA-Z ]'))
|
||||
],
|
||||
),
|
||||
// CustomDropDownRadio(
|
||||
// header: "",
|
||||
// title: "",
|
||||
// listData: [
|
||||
// "American football",
|
||||
// "Archery",
|
||||
// "Athletics",
|
||||
// "Baseball",
|
||||
// "Basketball",
|
||||
// "Boxing",
|
||||
// "Canoeing",
|
||||
// "Clay pigeon shooting",
|
||||
// "Climbing",
|
||||
// "Combat sports",
|
||||
// "Cricket",
|
||||
// "Dodgeball",
|
||||
// "Equestrian",
|
||||
// "Fencing",
|
||||
// "Gaelic football",
|
||||
// "Golf",
|
||||
// "Gymnastics",
|
||||
// "Handball",
|
||||
// "Hockey",
|
||||
// "Lacrosse",
|
||||
// "Modern biathlon and pentathlon",
|
||||
// "Netball",
|
||||
// "Orienteering",
|
||||
// "Pool and snooker",
|
||||
// "Powerlifting",
|
||||
// "Rifle",
|
||||
// "Rugby league",
|
||||
// "Rugby union",
|
||||
// "Sailing",
|
||||
// "Snowsports",
|
||||
// "Squash",
|
||||
// "Surfing",
|
||||
// "Swimming",
|
||||
// "Softball",
|
||||
// "Table tennis",
|
||||
// "Tennis",
|
||||
// "Touch rugby",
|
||||
// "Trampoline",
|
||||
// "Triathlon",
|
||||
// "Ultimate frisbee",
|
||||
// "Volleyball",
|
||||
// "Water polo",
|
||||
// "Windsurfing"
|
||||
// ],
|
||||
// onItemSelected: (p0) {},
|
||||
// leadingImage: SizedBox()),
|
||||
// // Spacer(flex: 1),
|
||||
sizedBoxHeight(30.h),
|
||||
text20400FCFCFC("Add other activity"),
|
||||
sizedBoxHeight(25.h),
|
||||
CustomTextFormField(
|
||||
textEditingController:
|
||||
otheractivitycontroller,
|
||||
texttype: TextInputType.text,
|
||||
hintText: "Enter other activity",
|
||||
// leadingIcon:
|
||||
// // const Icon(Icons.mail_outline),
|
||||
// Image.asset(
|
||||
// width: 22.w,
|
||||
// height: 17.h,
|
||||
// 'assets/images/png/user.png',
|
||||
// ),
|
||||
// validatorText: "Enter your full name",
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return 'Enter your full name ';
|
||||
}
|
||||
return null;
|
||||
},
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter(),
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[a-zA-Z ]'))
|
||||
],
|
||||
),
|
||||
// CustomDropDownRadio(
|
||||
// header: "",
|
||||
// title: "",
|
||||
// listData: [
|
||||
// "American football",
|
||||
// "Archery",
|
||||
// "Athletics",
|
||||
// "Baseball",
|
||||
// "Basketball",
|
||||
// "Boxing",
|
||||
// "Canoeing",
|
||||
// "Clay pigeon shooting",
|
||||
// "Climbing",
|
||||
// "Combat sports",
|
||||
// "Cricket",
|
||||
// "Dodgeball",
|
||||
// "Equestrian",
|
||||
// "Fencing",
|
||||
// "Gaelic football",
|
||||
// "Golf",
|
||||
// "Gymnastics",
|
||||
// "Handball",
|
||||
// "Hockey",
|
||||
// "Lacrosse",
|
||||
// "Modern biathlon and pentathlon",
|
||||
// "Netball",
|
||||
// "Orienteering",
|
||||
// "Pool and snooker",
|
||||
// "Powerlifting",
|
||||
// "Rifle",
|
||||
// "Rugby league",
|
||||
// "Rugby union",
|
||||
// "Sailing",
|
||||
// "Snowsports",
|
||||
// "Squash",
|
||||
// "Surfing",
|
||||
// "Swimming",
|
||||
// "Softball",
|
||||
// "Table tennis",
|
||||
// "Tennis",
|
||||
// "Touch rugby",
|
||||
// "Trampoline",
|
||||
// "Triathlon",
|
||||
// "Ultimate frisbee",
|
||||
// "Volleyball",
|
||||
// "Water polo",
|
||||
// "Windsurfing"
|
||||
// ],
|
||||
// onItemSelected: (p0) {},
|
||||
// leadingImage: SizedBox()),
|
||||
// // Spacer(flex: 1),
|
||||
|
||||
sizedBoxHeight(35.h),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(35.h),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
)
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
|
||||
@@ -83,121 +83,85 @@ class _SelectIndividualGroupState extends State<SelectIndividualGroup> {
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
child: Scaffold(
|
||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||
bottomNavigationBar: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10, left: 16, right: 16),
|
||||
child: CustomButton(
|
||||
text: "Continue",
|
||||
onPressed: () {
|
||||
// Get.toNamed(RouteName.individualcommunitystep4);
|
||||
if (_selectedIndices.isEmpty) {
|
||||
utils.showToast('Please select activity');
|
||||
} else {
|
||||
print(_selectedIndices.toString());
|
||||
// String selectedIndicesString =
|
||||
// _selectedIndices.join(',');
|
||||
// print(
|
||||
// 'Selected Indices: [$selectedIndicesString]');
|
||||
Uploadata();
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
Positioned(top: 70, left: -30, child: CommonBlurLeftSecond()),
|
||||
Positioned(top: 400, right: -30, child: CommonBlurRightSecond()),
|
||||
Positioned(top: 630, left: -30, child: CommonBlurLeftBlue()),
|
||||
SingleChildScrollView(
|
||||
child: GlassmorphicContainer(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height:
|
||||
// 500.h,
|
||||
MediaQuery.of(context).size.height,
|
||||
borderRadius: 2,
|
||||
blur: 6,
|
||||
alignment: Alignment.bottomLeft,
|
||||
border: 2,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
],
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 40.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.communitycommitscreen);
|
||||
},
|
||||
child: Text(
|
||||
'Skip',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
],
|
||||
),
|
||||
child:
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.w, vertical: 50.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.communitycommitscreen);
|
||||
},
|
||||
child: Text(
|
||||
'Skip',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: text16400white('Step 2 of 3')),
|
||||
sizedBoxHeight(20.h),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 25.h,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1, color: Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.w, vertical: 2.h),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 216.w,
|
||||
height: 15.h,
|
||||
sizedBoxHeight(30.h),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: text16400white('Step 2 of 3')),
|
||||
sizedBoxHeight(20.h),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 25.h,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 1, color: Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.w, vertical: 2.h),
|
||||
child: Row(
|
||||
children: [
|
||||
Container(
|
||||
width: 216.w,
|
||||
height: 15.h,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Color(0xA5D90B2E),
|
||||
Color(0x42D90B2E)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: 15,
|
||||
height: 15,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Color(0xA5D90B2E),
|
||||
Color(0x42D90B2E)
|
||||
Color(0xFFD90B2E),
|
||||
Color(0x60D90B2E)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
@@ -205,152 +169,142 @@ class _SelectIndividualGroupState extends State<SelectIndividualGroup> {
|
||||
BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: 15,
|
||||
height: 15,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Color(0xFFD90B2E),
|
||||
Color(0x60D90B2E)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(40.h),
|
||||
Center(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
text20400white('Find your group'),
|
||||
sizedBoxWidth(5.w),
|
||||
Image.asset('assets/images/png/informationicon.png')
|
||||
],
|
||||
)),
|
||||
sizedBoxHeight(10.w),
|
||||
Center(
|
||||
child: Container(
|
||||
width: 108.w,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
strokeAlign: BorderSide.strokeAlignCenter,
|
||||
color: Color(0xFF858585),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(40.h),
|
||||
Center(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
text20400white('Find your group'),
|
||||
sizedBoxWidth(5.w),
|
||||
Image.asset(
|
||||
'assets/images/png/informationicon.png')
|
||||
],
|
||||
)),
|
||||
sizedBoxHeight(10.w),
|
||||
Center(
|
||||
child: Container(
|
||||
width: 108.w,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
strokeAlign: BorderSide.strokeAlignCenter,
|
||||
color: Color(0xFF858585),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
CustomTextFormField(
|
||||
// textEditingController: searchcontroller,
|
||||
texttype: TextInputType.text,
|
||||
hintText: "Search groups",
|
||||
leadingIcon:
|
||||
// const Icon(Icons.mail_outline),
|
||||
// SvgPicture.asset(
|
||||
// // width: 23.w,
|
||||
// // height: 23.h,
|
||||
// 'assets/images/svg/search.svg',
|
||||
// ),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Icon(
|
||||
Icons.search,
|
||||
size: 35,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
// validatorText: "Enter your full name",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter(),
|
||||
],
|
||||
onInput: (value) {
|
||||
// Onboard().postGroupsearch({"search": value},
|
||||
// streamController: searchcontroller);
|
||||
// searchGroups(value!);
|
||||
Getonboard().getGroupsearch(value,
|
||||
streamController: searchcontroller);
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
StreamBuilder<GrouplistModel>(
|
||||
stream: searchcontroller.stream,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
// Display shimmer effect while waiting for data
|
||||
return Center(child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasError) {
|
||||
// Handle error state
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
CustomTextFormField(
|
||||
// textEditingController: searchcontroller,
|
||||
texttype: TextInputType.text,
|
||||
hintText: "Search groups",
|
||||
leadingIcon:
|
||||
// const Icon(Icons.mail_outline),
|
||||
// SvgPicture.asset(
|
||||
// // width: 23.w,
|
||||
// // height: 23.h,
|
||||
// 'assets/images/svg/search.svg',
|
||||
// ),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Icon(
|
||||
Icons.search,
|
||||
size: 35,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
// validatorText: "Enter your full name",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter(),
|
||||
],
|
||||
onInput: (value) {
|
||||
// Onboard().postGroupsearch({"search": value},
|
||||
// streamController: searchcontroller);
|
||||
// searchGroups(value!);
|
||||
Getonboard().getGroupsearch(value,
|
||||
streamController: searchcontroller);
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
StreamBuilder<GrouplistModel>(
|
||||
stream: searchcontroller.stream,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
// Display shimmer effect while waiting for data
|
||||
return Center(
|
||||
child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasError) {
|
||||
// Handle error state
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Data has been loaded, show actual UI
|
||||
return grouplistobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: Expanded(
|
||||
child: GridView.builder(
|
||||
physics: ScrollPhysics(),
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
crossAxisSpacing: 12.0,
|
||||
mainAxisSpacing: 12.0,
|
||||
),
|
||||
itemCount: grouplistobj!.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
height:
|
||||
150.0, // Adjust this height according to your design
|
||||
child: GroupSelect(
|
||||
titleString: grouplistobj!
|
||||
.data![index].title!,
|
||||
image: grouplistobj
|
||||
?.data?[index]
|
||||
?.groupImage ??
|
||||
'',
|
||||
index: grouplistobj!
|
||||
.data![index].id!,
|
||||
isSelected: _selectedIndices
|
||||
.contains(grouplistobj!
|
||||
.data![index].id!),
|
||||
onTap: _onContainerTap,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
} else {
|
||||
// Data has been loaded, show actual UI
|
||||
return grouplistobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: Expanded(
|
||||
child: GridView.builder(
|
||||
physics: ScrollPhysics(),
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
crossAxisSpacing: 12.0,
|
||||
mainAxisSpacing: 12.0,
|
||||
),
|
||||
itemCount: grouplistobj!.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
height:
|
||||
150.0, // Adjust this height according to your design
|
||||
child: GroupSelect(
|
||||
titleString:
|
||||
grouplistobj!.data![index].title!,
|
||||
image: grouplistobj
|
||||
?.data?[index]?.groupImage ??
|
||||
'',
|
||||
index: grouplistobj!.data![index].id!,
|
||||
isSelected: _selectedIndices.contains(
|
||||
grouplistobj!.data![index].id!),
|
||||
onTap: _onContainerTap,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
// sizedBoxHeight(40.h),
|
||||
CustomButton(
|
||||
text: "Continue",
|
||||
onPressed: () {
|
||||
// Get.toNamed(RouteName.individualcommunitystep4);
|
||||
if (_selectedIndices.isEmpty) {
|
||||
utils.showToast('Please select activity');
|
||||
} else {
|
||||
print(_selectedIndices.toString());
|
||||
// String selectedIndicesString =
|
||||
// _selectedIndices.join(',');
|
||||
// print(
|
||||
// 'Selected Indices: [$selectedIndicesString]');
|
||||
Uploadata();
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
||||
@@ -84,121 +84,86 @@ class _SelectIndividualCommunityState extends State<SelectIndividualCommunity> {
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
child: Scaffold(
|
||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||
bottomNavigationBar: Padding(
|
||||
padding: const EdgeInsets.only(bottom: 10, left: 16, right: 16),
|
||||
child: CustomButton(
|
||||
text: "Continue",
|
||||
onPressed: () {
|
||||
// Get.toNamed(RouteName.individualcommunitystep4);
|
||||
if (_selectedIndices.isEmpty) {
|
||||
utils.showToast('Please select activity');
|
||||
} else {
|
||||
print(_selectedIndices.toString());
|
||||
// String selectedIndicesString =
|
||||
// _selectedIndices.join(',');
|
||||
// print(
|
||||
// 'Selected Indices: [$selectedIndicesString]');
|
||||
Uploadata();
|
||||
}
|
||||
},
|
||||
),
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
Positioned(top: 70, left: -30, child: CommonBlurLeftSecond()),
|
||||
Positioned(top: 400, right: -30, child: CommonBlurRightSecond()),
|
||||
Positioned(top: 630, left: -30, child: CommonBlurLeftBlue()),
|
||||
SingleChildScrollView(
|
||||
child: GlassmorphicContainer(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height:
|
||||
// 500.h,
|
||||
MediaQuery.of(context).size.height,
|
||||
borderRadius: 2,
|
||||
blur: 6,
|
||||
alignment: Alignment.bottomLeft,
|
||||
border: 2,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
],
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 40.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.communitycommitscreen);
|
||||
},
|
||||
child: Text(
|
||||
'Skip',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.w, vertical: 50.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Align(
|
||||
alignment: Alignment.topRight,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.communitycommitscreen);
|
||||
},
|
||||
child: Text(
|
||||
'Skip',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
decoration: TextDecoration.underline,
|
||||
decorationColor: Colors.white),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: text16400white('Step 3 of 3')),
|
||||
sizedBoxHeight(20.h),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 25.h,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1, color: Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.w, vertical: 2.h),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
// width: 216.w,
|
||||
height: 15.h,
|
||||
sizedBoxHeight(30.h),
|
||||
Align(
|
||||
alignment: Alignment.center,
|
||||
child: text16400white('Step 3 of 3')),
|
||||
sizedBoxHeight(20.h),
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 25.h,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 1, color: Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 8.w, vertical: 2.h),
|
||||
child: Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
// width: 216.w,
|
||||
height: 15.h,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Color(0xA5D90B2E),
|
||||
Color(0x42D90B2E)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: 15,
|
||||
height: 15,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Color(0xA5D90B2E),
|
||||
Color(0x42D90B2E)
|
||||
Color(0xFFD90B2E),
|
||||
Color(0x60D90B2E)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
@@ -206,156 +171,145 @@ class _SelectIndividualCommunityState extends State<SelectIndividualCommunity> {
|
||||
BorderRadius.circular(30),
|
||||
),
|
||||
),
|
||||
child: Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.end,
|
||||
children: [
|
||||
Container(
|
||||
width: 15,
|
||||
height: 15,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin:
|
||||
Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Color(0xFFD90B2E),
|
||||
Color(0x60D90B2E)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius:
|
||||
BorderRadius.circular(
|
||||
30),
|
||||
),
|
||||
),
|
||||
)
|
||||
],
|
||||
)))
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
)))
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(40.h),
|
||||
Center(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
text20400white('Find your community'),
|
||||
sizedBoxWidth(5.w),
|
||||
Image.asset(
|
||||
'assets/images/png/informationicon.png',
|
||||
)
|
||||
],
|
||||
)),
|
||||
sizedBoxHeight(10.w),
|
||||
Center(
|
||||
child: Container(
|
||||
width: 108.w,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
strokeAlign: BorderSide.strokeAlignCenter,
|
||||
color: Color(0xFF858585),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(40.h),
|
||||
Center(
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
text20400white('Find your community'),
|
||||
sizedBoxWidth(5.w),
|
||||
Image.asset(
|
||||
'assets/images/png/informationicon.png',
|
||||
)
|
||||
],
|
||||
)),
|
||||
sizedBoxHeight(10.w),
|
||||
Center(
|
||||
child: Container(
|
||||
width: 108.w,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
strokeAlign: BorderSide.strokeAlignCenter,
|
||||
color: Color(0xFF858585),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
CustomTextFormField(
|
||||
texttype: TextInputType.text,
|
||||
hintText: "Search community",
|
||||
leadingIcon:
|
||||
// const Icon(Icons.mail_outline),
|
||||
// SvgPicture.asset(
|
||||
// // width: 23.w,
|
||||
// // height: 23.h,
|
||||
// 'assets/images/svg/search.svg',
|
||||
// ),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Icon(
|
||||
Icons.search,
|
||||
size: 35,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
// validatorText: "Enter your full name",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter(),
|
||||
],
|
||||
onInput: (value) {
|
||||
// Onboard().postGroupsearch({"search": value},
|
||||
// streamController: searchcontroller);
|
||||
// searchGroups(value!);
|
||||
Getonboard().getCommunitysearch(value,
|
||||
streamController: searchcontroller);
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
StreamBuilder<GetcommunitiesModel>(
|
||||
stream: searchcontroller.stream,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
// Display shimmer effect while waiting for data
|
||||
return Center(child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasError) {
|
||||
// Handle error state
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
CustomTextFormField(
|
||||
texttype: TextInputType.text,
|
||||
hintText: "Search community",
|
||||
leadingIcon:
|
||||
// const Icon(Icons.mail_outline),
|
||||
// SvgPicture.asset(
|
||||
// // width: 23.w,
|
||||
// // height: 23.h,
|
||||
// 'assets/images/svg/search.svg',
|
||||
// ),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Icon(
|
||||
Icons.search,
|
||||
size: 35,
|
||||
color: Colors.white,
|
||||
),
|
||||
),
|
||||
// validatorText: "Enter your full name",
|
||||
inputFormatters: [
|
||||
// LengthLimitingTextInputFormatter(20),
|
||||
RemoveEmojiInputFormatter(),
|
||||
],
|
||||
onInput: (value) {
|
||||
// Onboard().postGroupsearch({"search": value},
|
||||
// streamController: searchcontroller);
|
||||
// searchGroups(value!);
|
||||
Getonboard().getCommunitysearch(value,
|
||||
streamController: searchcontroller);
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
StreamBuilder<GetcommunitiesModel>(
|
||||
stream: searchcontroller.stream,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState ==
|
||||
ConnectionState.waiting) {
|
||||
// Display shimmer effect while waiting for data
|
||||
return Center(
|
||||
child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasError) {
|
||||
// Handle error state
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: TextStyle(fontSize: 18),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Data has been loaded, show actual UI
|
||||
return communitylistobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: Expanded(
|
||||
child: GridView.builder(
|
||||
physics: ScrollPhysics(),
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
crossAxisSpacing: 12.0,
|
||||
mainAxisSpacing: 12.0,
|
||||
),
|
||||
itemCount:
|
||||
communitylistobj!.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
height:
|
||||
150.0, // Adjust this height according to your design
|
||||
child: CommunitySelect(
|
||||
titleString: communitylistobj!
|
||||
.data![index]
|
||||
.communityName!,
|
||||
image: communitylistobj
|
||||
?.data?[index]
|
||||
?.communityProfilePhoto ??
|
||||
'',
|
||||
index: communitylistobj!
|
||||
.data![index].id!,
|
||||
isSelected: _selectedIndices
|
||||
.contains(communitylistobj!
|
||||
.data![index].id!),
|
||||
onTap: _onContainerTap,
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
} else {
|
||||
// Data has been loaded, show actual UI
|
||||
return communitylistobj!.data!.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: Expanded(
|
||||
child: GridView.builder(
|
||||
physics: ScrollPhysics(),
|
||||
gridDelegate:
|
||||
SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 2,
|
||||
crossAxisSpacing: 12.0,
|
||||
mainAxisSpacing: 12.0,
|
||||
),
|
||||
itemCount: communitylistobj!.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
return SizedBox(
|
||||
height:
|
||||
150.0, // Adjust this height according to your design
|
||||
child: CommunitySelect(
|
||||
titleString: communitylistobj!
|
||||
.data![index].communityName!,
|
||||
image: communitylistobj?.data?[index]
|
||||
?.communityProfilePhoto ??
|
||||
'',
|
||||
index: communitylistobj!
|
||||
.data![index].id!,
|
||||
isSelected: _selectedIndices.contains(
|
||||
communitylistobj!
|
||||
.data![index].id!),
|
||||
onTap: _onContainerTap,
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
// sizedBoxHeight(30),
|
||||
CustomButton(
|
||||
text: "Continue",
|
||||
onPressed: () {
|
||||
// Get.toNamed(RouteName.individualcommunitystep4);
|
||||
if (_selectedIndices.isEmpty) {
|
||||
utils.showToast('Please select activity');
|
||||
} else {
|
||||
print(_selectedIndices.toString());
|
||||
// String selectedIndicesString =
|
||||
// _selectedIndices.join(',');
|
||||
// print(
|
||||
// 'Selected Indices: [$selectedIndicesString]');
|
||||
Uploadata();
|
||||
}
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
)),
|
||||
|
||||
@@ -368,7 +368,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white('Gender'),
|
||||
sizedBoxHeight(10.h),
|
||||
CustomDropDownWidgetSignup(
|
||||
CustomDropDownRadio(
|
||||
header: 'Select gender',
|
||||
title: '',
|
||||
listData: _gender,
|
||||
|
||||
@@ -23,130 +23,95 @@ class _CommunitycommitmentState extends State<Communitycommitment> {
|
||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||
body: Stack(
|
||||
children: [
|
||||
// Positioned(top: 220, left: -30, child: CommonBlurLeftSecond()),
|
||||
Positioned(top: 230, right: -30, child: CommonBlurRightSecond()),
|
||||
// Positioned(top: 530, left: -30, child: CommonBlurLeftBlue()),
|
||||
GlassmorphicContainer(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height:
|
||||
// 500.h,
|
||||
MediaQuery.of(context).size.height,
|
||||
borderRadius: 2,
|
||||
blur: 6,
|
||||
alignment: Alignment.bottomLeft,
|
||||
border: 2,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 16.w, vertical: 50.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// SvgPicture.asset('assets/images/svg/redregroupicon.svg'),
|
||||
Image.asset('assets/images/png/redregroup.png'),
|
||||
sizedBoxHeight(30.h),
|
||||
Container(
|
||||
width: 358.w,
|
||||
height: 519.h,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.05999999865889549),
|
||||
Colors.white.withOpacity(0.07999999821186066)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 0.80, color: Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.w, vertical: 0.h),
|
||||
child: Scrollbar(
|
||||
thumbVisibility: true,
|
||||
radius: Radius.circular(20.r),
|
||||
// thickness: 6,
|
||||
controller: _scrollController,
|
||||
child: SingleChildScrollView(
|
||||
controller: _scrollController,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white('Our community commitment'),
|
||||
sizedBoxHeight(10.h),
|
||||
Container(
|
||||
width: 222.w,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
strokeAlign:
|
||||
BorderSide.strokeAlignCenter,
|
||||
color: Color(0xFF858585),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 50.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
// SvgPicture.asset('assets/images/svg/redregroupicon.svg'),
|
||||
Image.asset('assets/images/png/redregroup.png'),
|
||||
sizedBoxHeight(30.h),
|
||||
Container(
|
||||
width: 358.w,
|
||||
height: 519.h,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.05999999865889549),
|
||||
Colors.white.withOpacity(0.07999999821186066)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 0.80, color: Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding:
|
||||
EdgeInsets.symmetric(horizontal: 16.w, vertical: 0.h),
|
||||
child: Scrollbar(
|
||||
thumbVisibility: true,
|
||||
radius: Radius.circular(20.r),
|
||||
// thickness: 6,
|
||||
controller: _scrollController,
|
||||
child: SingleChildScrollView(
|
||||
controller: _scrollController,
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(10.h),
|
||||
text16400white('Our community commitment'),
|
||||
sizedBoxHeight(10.h),
|
||||
Container(
|
||||
width: 222.w,
|
||||
decoration: ShapeDecoration(
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(
|
||||
width: 1,
|
||||
strokeAlign: BorderSide.strokeAlignCenter,
|
||||
color: Color(0xFF858585),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text20400white(
|
||||
'Regroup is a community where everyone ca belong'),
|
||||
sizedBoxHeight(15.h),
|
||||
text16400white(
|
||||
'''Lorem ipsum dolor sit amet, consectetur adipis elit. Ut et massa mi. Aliquam in hendrerit urna.\n\nPellentesque sit amet sapien fringilla, mattis ligula consectetur, ultrices mauris. Maecenas vitae mattis tellus. Nullam quis imperdiet augue. Vestibulum auctor ornare leo, non suscipit magna interdum eu. Curabitur pellentesque nibh nibh, at maximus ante fermentum sit amet. Pellentesque commodo lacus at sodales sodales. Quisque sagittis orci ut diam condimentum, vel euismod erat placerat. In iaculis arcu eros, Quisque sagittis orci ut diam condimentum, vel euismod erat placerat. In iaculis arcu eros, Quisque sagittis orci ut diam condimentum, vel euismod erat placerat. '''),
|
||||
sizedBoxHeight(10.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text20400white(
|
||||
'Regroup is a community where everyone ca belong'),
|
||||
sizedBoxHeight(15.h),
|
||||
text16400white(
|
||||
'''Lorem ipsum dolor sit amet, consectetur adipis elit. Ut et massa mi. Aliquam in hendrerit urna.\n\nPellentesque sit amet sapien fringilla, mattis ligula consectetur, ultrices mauris. Maecenas vitae mattis tellus. Nullam quis imperdiet augue. Vestibulum auctor ornare leo, non suscipit magna interdum eu. Curabitur pellentesque nibh nibh, at maximus ante fermentum sit amet. Pellentesque commodo lacus at sodales sodales. Quisque sagittis orci ut diam condimentum, vel euismod erat placerat. In iaculis arcu eros, Quisque sagittis orci ut diam condimentum, vel euismod erat placerat. In iaculis arcu eros, Quisque sagittis orci ut diam condimentum, vel euismod erat placerat. '''),
|
||||
sizedBoxHeight(10.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(
|
||||
flex: 2,
|
||||
),
|
||||
CustomButton(
|
||||
text: 'Agree & continue',
|
||||
onPressed: () {
|
||||
Get.toNamed(RouteName.signupendpage);
|
||||
}),
|
||||
sizedBoxHeight(20.h),
|
||||
CustomButton2(
|
||||
text: 'Decline',
|
||||
onPressed: () {
|
||||
Get.offAllNamed(RouteName.loginScreen);
|
||||
})
|
||||
],
|
||||
),
|
||||
),
|
||||
)),
|
||||
Spacer(
|
||||
flex: 2,
|
||||
),
|
||||
CustomButton(
|
||||
text: 'Agree & continue',
|
||||
onPressed: () {
|
||||
Get.toNamed(RouteName.signupendpage);
|
||||
}),
|
||||
sizedBoxHeight(20.h),
|
||||
CustomButton2(
|
||||
text: 'Decline',
|
||||
onPressed: () {
|
||||
Get.offAllNamed(RouteName.loginScreen);
|
||||
})
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
@@ -23,97 +23,62 @@ class _SignupendPageState extends State<SignupendPage> {
|
||||
backgroundColor: Color.fromARGB(255, 18, 32, 47),
|
||||
body: Stack(
|
||||
children: [
|
||||
Positioned(top: 100, left: -30, child: CommonBlurLeftSecond()),
|
||||
Positioned(top: 300, right: -30, child: CommonBlurRightSecond()),
|
||||
Positioned(top: 530, left: -30, child: CommonBlurLeftBlue()),
|
||||
Positioned(top: 750, right: 40, child: CommonBlurRightSecond()),
|
||||
GlassmorphicContainer(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height:
|
||||
// 500.h,
|
||||
MediaQuery.of(context).size.height,
|
||||
borderRadius: 2,
|
||||
blur: 6,
|
||||
alignment: Alignment.bottomLeft,
|
||||
border: 2,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
],
|
||||
),
|
||||
child: Center(
|
||||
child: Container(
|
||||
width: 358.w,
|
||||
height: 519.h,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.05999999865889549),
|
||||
Colors.white.withOpacity(0.07999999821186066)
|
||||
],
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Center(
|
||||
child: Container(
|
||||
width: 358.w,
|
||||
height: 519.h,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment(0.98, -0.21),
|
||||
end: Alignment(-0.98, 0.21),
|
||||
colors: [
|
||||
Colors.white.withOpacity(0.05999999865889549),
|
||||
Colors.white.withOpacity(0.07999999821186066)
|
||||
],
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side: BorderSide(width: 0.80, color: Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset('assets/images/png/regroupredtexticon.png'),
|
||||
sizedBoxHeight(30.h),
|
||||
text25700white('Welcome Edward '),
|
||||
sizedBoxHeight(20.h),
|
||||
// text16400white(
|
||||
// '''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.'''),
|
||||
Text(
|
||||
'''Congratulations, your account has been successfully created. Get ready to regroup with your community''',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCFCFCFC),
|
||||
fontSize: 16.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
shape: RoundedRectangleBorder(
|
||||
side:
|
||||
BorderSide(width: 0.80, color: Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(5),
|
||||
),
|
||||
),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 30.h),
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/regroupredtexticon.png'),
|
||||
sizedBoxHeight(30.h),
|
||||
text25700white('Welcome Edward '),
|
||||
sizedBoxHeight(20.h),
|
||||
// text16400white(
|
||||
// '''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.'''),
|
||||
Text(
|
||||
'''Congratulations, your account has been successfully created. Get ready to regroup with your community''',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Color(0xCCFCFCFC),
|
||||
fontSize: 16.sp,
|
||||
fontFamily: 'Helvetica',
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
CustomButton(
|
||||
text: "Let's begin",
|
||||
onPressed: () {
|
||||
Get.toNamed(RouteName.mainscreen);
|
||||
})
|
||||
],
|
||||
),
|
||||
)),
|
||||
)),
|
||||
sizedBoxHeight(20.h),
|
||||
CustomButton(
|
||||
text: "Let's begin",
|
||||
onPressed: () {
|
||||
Get.toNamed(RouteName.mainscreen);
|
||||
})
|
||||
],
|
||||
),
|
||||
)),
|
||||
)
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
@@ -55,16 +55,17 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
|
||||
_loginWithGoogle() {
|
||||
googleSigninController.handleGoogleSignIn().then((value) async {
|
||||
final resp = await LoginAPI().storeGoogleSignin(
|
||||
{"google_access_token": value, "one_signal_player_id": "ABCD"});
|
||||
if (value != 'Google Sign-In canceled') {
|
||||
final resp = await LoginAPI().storeGoogleSignin(
|
||||
{"google_access_token": value, "one_signal_player_id": "ABCD"});
|
||||
if (resp.message == "go-to-signin-via-oauth") {
|
||||
Get.toNamed(RouteName.verifygoogleapplepage,
|
||||
arguments: {"email": resp.data});
|
||||
} else if (value == null) {
|
||||
Get.snackbar(
|
||||
'Error',
|
||||
'Google Sign-In canceled',
|
||||
resp.data["message"][0],
|
||||
duration: const Duration(seconds: 2),
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: Colors.red,
|
||||
colorText: Colors.white,
|
||||
@@ -86,7 +87,7 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
} else {
|
||||
Get.snackbar(
|
||||
'Error',
|
||||
'Google Sign-In canceled',
|
||||
resp.data["message"][0],
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: Colors.red,
|
||||
colorText: Colors.white,
|
||||
|
||||
@@ -2,22 +2,16 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:pin_code_fields/pin_code_fields.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
|
||||
import 'package:regroup/Global.dart';
|
||||
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
||||
import 'package:regroup/Utils/Common/blureffect.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/dialogs.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
|
||||
import 'package:regroup/onboarding/Signup/view_model/postmethod.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:timer_button/timer_button.dart';
|
||||
|
||||
class VerifyuserScreenState extends StatefulWidget {
|
||||
@@ -38,50 +32,53 @@ class _VerifyuserScreenStateState extends State<VerifyuserScreenState> {
|
||||
int accounttypenumber = Get.arguments["accountypenumber"];
|
||||
|
||||
Uploadata() async {
|
||||
utils.loader();
|
||||
// utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"email_address": email,
|
||||
"password": userpassword,
|
||||
"account_type": accounttypenumber,
|
||||
"otp": pincode.text
|
||||
};
|
||||
final data = await Onboard().Postverifyregisteration(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
// final data = res
|
||||
final res = await Onboard().Postverifyregisteration(updata);
|
||||
if (res.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
print("verification done");
|
||||
|
||||
if (accounttype == 'Individual') {
|
||||
print('individual selected');
|
||||
Get.toNamed(RouteName.tellusindividualscreen,
|
||||
// arguments: {
|
||||
// 'pageroute' : "nextscreen"
|
||||
// }
|
||||
Get.toNamed(
|
||||
RouteName.tellusindividualscreen,
|
||||
// arguments: {
|
||||
// 'pageroute' : "nextscreen"
|
||||
// }
|
||||
);
|
||||
} else if (accounttype == 'Business') {
|
||||
print('business selected');
|
||||
Get.toNamed(RouteName.tellusbusinessscreen,
|
||||
// arguments: {
|
||||
// 'pageroute' : "nextscreen"
|
||||
// }
|
||||
Get.toNamed(
|
||||
RouteName.tellusbusinessscreen,
|
||||
// arguments: {
|
||||
// 'pageroute' : "nextscreen"
|
||||
// }
|
||||
);
|
||||
}
|
||||
|
||||
return utils.showToast(data.message);
|
||||
}
|
||||
else {
|
||||
// btnController.error();
|
||||
// btnController.reset();
|
||||
Get.snackbar(
|
||||
"Error!",
|
||||
data.data['message'],
|
||||
duration: Duration(seconds: 2),
|
||||
colorText: Colors.white,
|
||||
backgroundColor: Colors.red,
|
||||
margin: EdgeInsets.all(8),
|
||||
snackStyle: SnackStyle.FLOATING,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
}
|
||||
return utils.showToast(res.message);
|
||||
} else {
|
||||
// btnController.error();
|
||||
// btnController.reset();
|
||||
Get.snackbar(
|
||||
"Error!",
|
||||
res.data['message'],
|
||||
duration: Duration(seconds: 2),
|
||||
colorText: Colors.white,
|
||||
backgroundColor: Colors.red,
|
||||
margin: EdgeInsets.all(8),
|
||||
snackStyle: SnackStyle.FLOATING,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
}
|
||||
|
||||
// else {
|
||||
// Get.back();
|
||||
// print("verification not done");
|
||||
@@ -90,7 +87,7 @@ class _VerifyuserScreenStateState extends State<VerifyuserScreenState> {
|
||||
}
|
||||
|
||||
Uploadataresendotp() async {
|
||||
utils.loader();
|
||||
// utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
"email_address": email,
|
||||
"password": userpassword,
|
||||
@@ -98,13 +95,43 @@ class _VerifyuserScreenStateState extends State<VerifyuserScreenState> {
|
||||
};
|
||||
final data = await Onboard().Postregisteration(updata);
|
||||
if (data.status == ResponseStatus.SUCCESS) {
|
||||
Get.back();
|
||||
print("resend up done");
|
||||
return utils.showToast(data.message);
|
||||
} else {
|
||||
Get.back();
|
||||
print("resend not done");
|
||||
return utils.showToast(data.message);
|
||||
// Get.back();
|
||||
// print("resend up done");
|
||||
// return utils.showToast(data.message);
|
||||
Get.snackbar(
|
||||
"Success!",
|
||||
'OTP has been sent to your email address!',
|
||||
duration: Duration(seconds: 2),
|
||||
colorText: Colors.white,
|
||||
backgroundColor: Colors.green,
|
||||
margin: EdgeInsets.all(8),
|
||||
snackStyle: SnackStyle.FLOATING,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
setState(() {
|
||||
pincode.clear();
|
||||
// turnValidation = false;
|
||||
});
|
||||
}
|
||||
// else {
|
||||
// Get.back();
|
||||
// print("resend not done");
|
||||
// return utils.showToast(data.message);
|
||||
// }
|
||||
|
||||
else {
|
||||
// btnController.error();
|
||||
// btnController.reset();
|
||||
Get.snackbar(
|
||||
"Error!",
|
||||
data.data['message'],
|
||||
duration: Duration(seconds: 2),
|
||||
colorText: Colors.white,
|
||||
backgroundColor: Colors.red,
|
||||
margin: EdgeInsets.all(8),
|
||||
snackStyle: SnackStyle.FLOATING,
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,45 +144,13 @@ class _VerifyuserScreenStateState extends State<VerifyuserScreenState> {
|
||||
),
|
||||
body: Stack(
|
||||
children: [
|
||||
// CommonBlurLeftSecond(),
|
||||
Positioned(top: 150, right: -30, child: CommonBlurRightSecond()),
|
||||
Positioned(top: 350, left: -30, child: CommonBlurLeftBlue()),
|
||||
GlassmorphicContainer(
|
||||
width: MediaQuery.of(context).size.width,
|
||||
height:
|
||||
// 500.h,
|
||||
MediaQuery.of(context).size.height,
|
||||
borderRadius: 2,
|
||||
blur: 6,
|
||||
alignment: Alignment.bottomLeft,
|
||||
border: 2,
|
||||
linearGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topCenter,
|
||||
end: Alignment.bottomCenter,
|
||||
colors: [
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
// Color.fromARGB(255, 18, 32, 47).withOpacity(0.50),
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
|
||||
Color(0XFF222935).withOpacity(0.60),
|
||||
],
|
||||
),
|
||||
child: Padding(
|
||||
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: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
@@ -273,7 +268,7 @@ class _VerifyuserScreenStateState extends State<VerifyuserScreenState> {
|
||||
),
|
||||
],
|
||||
),
|
||||
)),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -4,6 +4,7 @@ import 'package:regroup/Common/api_urls.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/data/network/network_api.dart';
|
||||
import 'package:regroup/Global.dart';
|
||||
import 'package:regroup/Utils/dialogs.dart';
|
||||
import 'package:regroup/onboarding/Signup/Model/Onboarding/Individual/tellusIndividual.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
@@ -16,6 +17,12 @@ class Onboard {
|
||||
.postApi(updata, ApiUrls.registeration, optionalpar: true);
|
||||
print("response is ${response.data}");
|
||||
print("response message is ${response.message}");
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
//Map<String, dynamic> responseData = jsonDecode(response.data);
|
||||
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.SUCCESS);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -25,18 +32,34 @@ class Onboard {
|
||||
.postApi(updata, ApiUrls.verifyregisteration, optionalpar: true);
|
||||
print("response is ${response.data}");
|
||||
print("response message is ${response.message}");
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
Map<String, dynamic> res = response.data;
|
||||
print("res is $res");
|
||||
await prefs.setString('access-token', res['data']['token']);
|
||||
// final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
// Map<String, dynamic> res = response.data;
|
||||
// print("res is $res");
|
||||
// await prefs.setString('access-token', res['data']['token']);
|
||||
// await prefs.setInt('isprofileupdate', res['data']['is_profile_updated']);
|
||||
|
||||
token = res['data']['token'];
|
||||
// token = res['data']['token'];
|
||||
|
||||
print("token is $token");
|
||||
print("email is $emailid");
|
||||
print("profile update value is $isprofileupdated");
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
//Map<String, dynamic> responseData = jsonDecode(response.data);
|
||||
final SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
Map<String, dynamic> res = response.data;
|
||||
print("res is $res");
|
||||
await prefs.setString('access-token', res['data']['token']);
|
||||
token = res['data']['token'];
|
||||
|
||||
// if (response.data['status'] == "error") {
|
||||
// // return ResponseData<dynamic>(
|
||||
// // response.data['message'], ResponseStatus.SUCCESS);
|
||||
// return utils.showToast(response.data['message']);
|
||||
// }
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.SUCCESS);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
@@ -50,7 +73,8 @@ class Onboard {
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
if (response.data['status'] == 'success') {
|
||||
TellusIndividualModel tellusindiObj = TellusIndividualModel.fromJson(response.data);
|
||||
TellusIndividualModel tellusindiObj =
|
||||
TellusIndividualModel.fromJson(response.data);
|
||||
// await prefs.setString('fullname', tellusindiObj.data?.profile?.fullName ?? "");
|
||||
// await prefs.setString('username', tellusindiObj.data?.profile?.userName ?? "");
|
||||
// await prefs.setString('email', tellusindiObj.data?.profile?.emailAddress ?? "");
|
||||
@@ -60,7 +84,6 @@ class Onboard {
|
||||
// myusername = tellusindiObj.data?.profile?.userName;
|
||||
// fullname = tellusindiObj.data?.profile?.fullName;
|
||||
// phonenumber = tellusindiObj.data?.profile?.phoneNumber;
|
||||
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
response.data['message'], ResponseStatus.FAILED);
|
||||
|
||||
@@ -45,7 +45,7 @@ import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/ContactUs
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/DeleteAccount.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/FaqScreen.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/HelpAndSupport.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/Notification.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/View/Notification.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/PrivacyPolicy.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/ReportABug.dart';
|
||||
import 'package:regroup/Feed%20Module/Main_Screens/ProfileTab/Settings/Settings.dart';
|
||||
|
||||
Reference in New Issue
Block a user