conflict resolved
This commit is contained in:
@@ -169,5 +169,8 @@ class ApiUrls {
|
||||
|
||||
static const getcommunitygroups = "${baseUrl}fetch-community-all-groups";
|
||||
|
||||
static const getcommunitymembers = "${baseUrl}fetch-community-all-members";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,6 +6,8 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:get/get.dart' hide Response;
|
||||
import 'package:regroup/Global.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Utils/dialogs.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
|
||||
import 'package:http/http.dart' as http;
|
||||
@@ -16,8 +18,8 @@ class NetworkApiServices {
|
||||
Dio dio = Dio();
|
||||
final controllerEntryPoint = Get.put(EntryPointController());
|
||||
|
||||
String basicAuth = 'Basic ${base64.encode(
|
||||
utf8.encode('RegroupUserName:71%@L%es^bUX94`J9XT*@bh,._WWM{\$%^^&&'))}';
|
||||
String basicAuth =
|
||||
'Basic ${base64.encode(utf8.encode('RegroupUserName:71%@L%es^bUX94`J9XT*@bh,._WWM{\$%^^&&'))}';
|
||||
|
||||
Future<ResponseData> getApi(String url, {bool optionalpar = false}) async {
|
||||
if (kDebugMode) {
|
||||
@@ -45,12 +47,48 @@ class NetworkApiServices {
|
||||
: Options(
|
||||
headers: {
|
||||
'authorization': basicAuth,
|
||||
'access-token': token
|
||||
'access-token':
|
||||
token
|
||||
},
|
||||
),
|
||||
);
|
||||
} on Exception catch (e) {
|
||||
log(e.toString());
|
||||
}
|
||||
on Exception catch (e) {
|
||||
// log(e.toString());
|
||||
if (e is DioException) {
|
||||
log(e.response.toString());
|
||||
if (e.response == null) {
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong, Please try again!',
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
}
|
||||
if (e.response!.statusCode == 401) {
|
||||
if (e.response!.data['message'] == 'Invalid token') {
|
||||
// prefs.remove('access-token');
|
||||
// await prefs.clear();
|
||||
// Get.offNamed(RouteName.loginScreen);
|
||||
utils.showToast('Please login again');
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong, Please try again!',
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
if (e.response!.statusCode == 403) {
|
||||
if (e.response!.data['message'] is List) {
|
||||
return ResponseData<dynamic>(
|
||||
e.response!.data['message'][0]!, ResponseStatus.FAILED,
|
||||
data: e.response!.data);
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
e.response!.data['message'], ResponseStatus.FAILED,
|
||||
data: e.response!.data);
|
||||
}
|
||||
}
|
||||
}
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong', ResponseStatus.FAILED);
|
||||
}
|
||||
@@ -174,7 +212,9 @@ class NetworkApiServices {
|
||||
},
|
||||
)
|
||||
: Options(
|
||||
headers: {'authorization': basicAuth, 'access-token': token},
|
||||
headers: {'authorization': basicAuth, 'access-token':
|
||||
token
|
||||
},
|
||||
),
|
||||
);
|
||||
log(response.toString());
|
||||
@@ -188,13 +228,22 @@ class NetworkApiServices {
|
||||
);
|
||||
}
|
||||
if (e.response!.statusCode == 401) {
|
||||
prefs.remove('token');
|
||||
prefs.remove('refreshToken');
|
||||
if (e.response!.data['message'] == 'Invalid token') {
|
||||
prefs.remove('access-token');
|
||||
await prefs.clear();
|
||||
Get.offNamed(RouteName.loginScreen);
|
||||
utils.showToast('Please login again');
|
||||
} else {
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong, Please try again!',
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
}
|
||||
// Get.toNamed(RouteName.login);
|
||||
return ResponseData<dynamic>(
|
||||
'Oops something Went Wrong, Please try again!',
|
||||
ResponseStatus.FAILED,
|
||||
);
|
||||
// return ResponseData<dynamic>(
|
||||
// 'Oops something Went Wrong, Please try again!',
|
||||
// ResponseStatus.FAILED,
|
||||
// );
|
||||
}
|
||||
if (e.response!.statusCode == 403) {
|
||||
if (e.response!.data['message'] is List) {
|
||||
|
||||
@@ -2,13 +2,13 @@ import 'dart:io';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Login/ViewModel/LoginApi.dart';
|
||||
import 'package:regroup/Utils/Common/AppleOAuthService.dart';
|
||||
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
||||
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||
import 'package:regroup/Utils/Common/googleOAuthService.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
@@ -17,8 +17,6 @@ import 'package:regroup/Utils/texts.dart';
|
||||
import 'package:regroup/onboarding/Signup/view_model/getUserprofile.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
|
||||
|
||||
|
||||
class LoginScreen extends StatefulWidget {
|
||||
const LoginScreen({super.key});
|
||||
@@ -32,6 +30,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
RxBool isObscured = true.obs;
|
||||
final TextEditingController _passwordController = TextEditingController();
|
||||
GoogleAuthService googleSigninController = Get.put(GoogleAuthService());
|
||||
bool isLoading = false;
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
@@ -120,7 +119,6 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
final LoginResult result = await FacebookAuth.instance.login();
|
||||
|
||||
if (result.status == LoginStatus.success) {
|
||||
|
||||
final userData = await FacebookAuth.instance.getUserData();
|
||||
logger.i(userData['email']);
|
||||
logger.i(userData['id']);
|
||||
@@ -216,7 +214,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
context: context,
|
||||
builder: (context) {
|
||||
return AlertDialog(
|
||||
backgroundColor: Color(0xff222935),
|
||||
backgroundColor: const Color(0xff222935),
|
||||
title: Text(
|
||||
'Exit App',
|
||||
style: TextStyle(
|
||||
@@ -300,7 +298,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Align(
|
||||
alignment: Alignment.center,
|
||||
child: Container(
|
||||
child: SizedBox(
|
||||
width: 107.w,
|
||||
height: 86.h,
|
||||
child: SvgPicture.asset(
|
||||
@@ -350,7 +348,6 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(30),
|
||||
@@ -396,22 +393,72 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
),
|
||||
sizedBoxHeight(10.h),
|
||||
Align(
|
||||
alignment: Alignment.centerRight,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(right: 6.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.forgotpass);
|
||||
},
|
||||
child:
|
||||
text14400white('Forgot password ?')),
|
||||
)),
|
||||
alignment: Alignment.centerRight,
|
||||
child: Padding(
|
||||
padding: EdgeInsets.only(right: 6.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.forgotpass);
|
||||
},
|
||||
child: text14400white('Forgot password ?'),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(40.h),
|
||||
CustomButton(
|
||||
text: "Login",
|
||||
onPressed: () {
|
||||
_logincheck();
|
||||
}),
|
||||
Center(
|
||||
child: SizedBox(
|
||||
width: isLoading ? 50 : double.infinity,
|
||||
height: 50,
|
||||
child: ElevatedButton(
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: const Color(0xFFD90B2E),
|
||||
padding: EdgeInsets.zero),
|
||||
onPressed: () {
|
||||
setState(
|
||||
() {
|
||||
isLoading = true;
|
||||
},
|
||||
);
|
||||
Future.delayed(
|
||||
const Duration(seconds: 1),
|
||||
() {
|
||||
setState(() {
|
||||
isLoading = false;
|
||||
});
|
||||
_logincheck();
|
||||
},
|
||||
);
|
||||
},
|
||||
child: isLoading
|
||||
? const Row(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.center,
|
||||
children: [
|
||||
SizedBox(
|
||||
width: 30,
|
||||
height: 30,
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.white,
|
||||
strokeWidth: 2,
|
||||
),
|
||||
),
|
||||
],
|
||||
)
|
||||
: Text(
|
||||
'Login',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: "Helvetica",
|
||||
fontWeight: FontWeight.w400,
|
||||
fontSize: 16.sp,
|
||||
color: const Color(0xFFFCFCFC),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
|
||||
@@ -6,21 +6,20 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart' hide MultipartFile, FormData;
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:regroup/Common/CommonButton.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Main_Screens/ProfileTab/EditProfile/View/picturecontroller/indiprofileimagecontroller.dart';
|
||||
import 'package:regroup/Main_Screens/ProfileTab/EditProfile/ViewModel/EditProfileApi.dart';
|
||||
import 'package:regroup/Main_Screens/ProfileTab/EditProfile/ViewModel/InterestApiList.dart';
|
||||
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/CommonDropdown.dart';
|
||||
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
||||
import 'package:regroup/Utils/Common/ImageUpload.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/dialogs.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
|
||||
class EditProfile extends StatefulWidget {
|
||||
@@ -101,16 +100,15 @@ class _EditProfileState extends State<EditProfile> {
|
||||
|
||||
locationController.text = getEditProfileIndi!.data!.about ?? '';
|
||||
aboutController.text = getEditProfileIndi!.data!.about ?? '';
|
||||
positionController.text =
|
||||
getEditProfileIndi!.data!.position ?? 'Lorem lpsum';
|
||||
positionController.text = getEditProfileIndi!.data!.position ?? '';
|
||||
|
||||
trainingScoresController.text =
|
||||
getEditProfileIndi!.data!.trainingScores ?? '50';
|
||||
getEditProfileIndi!.data!.trainingScores ?? '';
|
||||
|
||||
heightController.text = getEditProfileIndi!.data!.height ?? '6 feet';
|
||||
weightController.text = getEditProfileIndi!.data!.weight ?? '70kg';
|
||||
heightController.text = getEditProfileIndi!.data!.height ?? '';
|
||||
weightController.text = getEditProfileIndi!.data!.weight ?? '';
|
||||
battingAvgController.text =
|
||||
getEditProfileIndi!.data!.battingAverage ?? '372';
|
||||
getEditProfileIndi!.data!.battingAverage ?? '';
|
||||
|
||||
isOnce = false;
|
||||
setState(() {});
|
||||
@@ -119,16 +117,12 @@ class _EditProfileState extends State<EditProfile> {
|
||||
|
||||
void saveEditProfileInd() async {
|
||||
utils.loader();
|
||||
|
||||
FormData? updata;
|
||||
|
||||
var imageFile;
|
||||
MultipartFile imageFile = MultipartFile.fromBytes([]);
|
||||
selectedinterestid.isEmpty
|
||||
? getCatIdFromName(listofUserInterests)
|
||||
: selectedinterestid;
|
||||
|
||||
String abilitiesIds = selectedinterestid.toString();
|
||||
|
||||
if (editProfileImage.usserprofilePicPath.value.isNotEmpty) {
|
||||
imageFile = await MultipartFile.fromFile(
|
||||
editProfileImage.usserprofilePicPath.value,
|
||||
@@ -138,8 +132,9 @@ class _EditProfileState extends State<EditProfile> {
|
||||
|
||||
updata = FormData.fromMap({
|
||||
"full_name": fullNameController.text,
|
||||
"profile_image":
|
||||
editProfileImage.usserprofilePicPath.isNotEmpty ? imageFile : null,
|
||||
"profile_image": editProfileImage.usserprofilePicPath.value.isNotEmpty
|
||||
? imageFile
|
||||
: null,
|
||||
"user_name": userNameController.text,
|
||||
"date_of_birth": dateController.text,
|
||||
"gender": _selectedgenderType,
|
||||
@@ -182,404 +177,400 @@ class _EditProfileState extends State<EditProfile> {
|
||||
return GestureDetector(
|
||||
onTap: () => FocusManager.instance.primaryFocus?.unfocus(),
|
||||
child: Scaffold(
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "",
|
||||
),
|
||||
body: FutureBuilder(
|
||||
future: myfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.blue,
|
||||
),
|
||||
);
|
||||
}
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "",
|
||||
),
|
||||
body: FutureBuilder(
|
||||
future: myfuture,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
return const Center(
|
||||
child: CircularProgressIndicator(
|
||||
color: Colors.blue,
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: TextStyle(fontSize: 18.spMin),
|
||||
),
|
||||
);
|
||||
}
|
||||
if (snapshot.hasError) {
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: TextStyle(fontSize: 18.spMin),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
return Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
"assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Stack(
|
||||
children: [
|
||||
Obx(
|
||||
() => editProfileImage
|
||||
.usserprofilePicPath.value !=
|
||||
''
|
||||
? ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(50.r),
|
||||
child: editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value !=
|
||||
''
|
||||
? Image(
|
||||
image: FileImage(
|
||||
File(
|
||||
editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value,
|
||||
),
|
||||
if (snapshot.connectionState == ConnectionState.done &&
|
||||
snapshot.hasData) {
|
||||
return Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage(
|
||||
"assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16),
|
||||
child: Column(children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Stack(
|
||||
children: [
|
||||
Obx(
|
||||
() => editProfileImage
|
||||
.usserprofilePicPath.value !=
|
||||
''
|
||||
? ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(50.r),
|
||||
child: editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value !=
|
||||
''
|
||||
? Image(
|
||||
image: FileImage(
|
||||
File(
|
||||
editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value,
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: double.infinity,
|
||||
errorBuilder:
|
||||
(BuildContext
|
||||
context,
|
||||
Object
|
||||
exception,
|
||||
StackTrace?
|
||||
stackTrace) {
|
||||
return CircleAvatar(
|
||||
backgroundImage:
|
||||
const AssetImage(
|
||||
"assets/images/png/cimg3.png"),
|
||||
radius: 50.r,
|
||||
);
|
||||
},
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/png/cimg3.png')),
|
||||
)
|
||||
: ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(60.r),
|
||||
child: getEditProfileIndi!.data!
|
||||
.profilePhoto !=
|
||||
null
|
||||
? ClipOval(
|
||||
child:
|
||||
SizedBox.fromSize(
|
||||
size: Size.fromRadius(
|
||||
25.r),
|
||||
child: CircleAvatar(
|
||||
backgroundImage:
|
||||
NetworkImage(
|
||||
getEditProfileIndi!
|
||||
.data!
|
||||
.profilePhoto!),
|
||||
radius: 25.r,
|
||||
),
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
width: double.infinity,
|
||||
errorBuilder:
|
||||
(BuildContext context,
|
||||
Object exception,
|
||||
StackTrace?
|
||||
stackTrace) {
|
||||
return CircleAvatar(
|
||||
backgroundImage:
|
||||
const AssetImage(
|
||||
"assets/images/png/cimg3.png"),
|
||||
radius: 50.r,
|
||||
);
|
||||
},
|
||||
)
|
||||
: Image.asset(
|
||||
'assets/images/png/cimg3.png')),
|
||||
)
|
||||
: ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(60.r),
|
||||
child: getEditProfileIndi!
|
||||
.data!.profilePhoto !=
|
||||
null
|
||||
? ClipOval(
|
||||
child: SizedBox.fromSize(
|
||||
size: Size.fromRadius(
|
||||
25.r),
|
||||
child: CircleAvatar(
|
||||
backgroundImage: NetworkImage(
|
||||
getEditProfileIndi!
|
||||
.data!
|
||||
.profilePhoto!),
|
||||
radius: 25.r,
|
||||
),
|
||||
)
|
||||
: Image.asset(
|
||||
"assets/images/blank-profile-picture-973460_1280.png")),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
ImageUploadBottomSheet().showModal(
|
||||
context,
|
||||
true,
|
||||
(result) {
|
||||
editProfileImage
|
||||
.usserprofilePicPath
|
||||
.value = result;
|
||||
),
|
||||
)
|
||||
: Image.asset(
|
||||
"assets/images/blank-profile-picture-973460_1280.png")),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
bottom: 0,
|
||||
right: 0,
|
||||
child: InkWell(
|
||||
onTap: () {
|
||||
ImageUploadBottomSheet().showModal(
|
||||
context,
|
||||
true,
|
||||
(result) {
|
||||
editProfileImage.usserprofilePicPath
|
||||
.value = result;
|
||||
|
||||
var filenameresult =
|
||||
extractFileName1(result);
|
||||
var filenameresult =
|
||||
extractFileName1(result);
|
||||
|
||||
profilePicture = result;
|
||||
isImageAdded = true;
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
},
|
||||
child: Container(
|
||||
height: 35.h,
|
||||
width: 35.w,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFFD90B2E)),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/cameraicon2.png",
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(15.h),
|
||||
text16400white("Edit profile picture"),
|
||||
sizedBoxHeight(20.h),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16400white("Full name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: fullNameController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Enter your full name",
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[a-zA-Z ]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("User name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: userNameController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Enter your user name",
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[a-zA-Z ]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Date of birth"),
|
||||
sizedBoxHeight(16.h),
|
||||
GestureDetector(
|
||||
onTap: () =>
|
||||
datePicker(context, dateController),
|
||||
child: AbsorbPointer(
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/calender.png",
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "12-04-2024",
|
||||
textEditingController: dateController,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Gender"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomDropDownRadio(
|
||||
initialSelectedValue: _selectedgenderType,
|
||||
header: _selectedgenderType ?? "Male",
|
||||
title: "",
|
||||
showOtherOption: true,
|
||||
listData: const [
|
||||
"Male",
|
||||
"Female",
|
||||
"Prefer not to say"
|
||||
],
|
||||
onItemSelected: _onItemSelected,
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Vector ws.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
Row(
|
||||
children: [
|
||||
text16400white("Location"),
|
||||
sizedBoxWidth(6.w),
|
||||
Image.asset(
|
||||
"assets/images/png/octicon_question-24.png",
|
||||
height: 16.h,
|
||||
width: 16.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: locationController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 58645.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Enter your location",
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[a-zA-Z ]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
text16400white("Interests"),
|
||||
sizedBoxWidth(6.w),
|
||||
Image.asset(
|
||||
"assets/images/png/octicon_question-24.png",
|
||||
height: 16.h,
|
||||
width: 16.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomDropDownChexkBox(
|
||||
header: 'Select interest',
|
||||
title: "",
|
||||
listData: listofInterests,
|
||||
onItemSelected: getCatIdFromName,
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Vector (4).png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
initiallySelected: listofUserInterests,
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("About"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField2(
|
||||
textEditingController: aboutController,
|
||||
hintText:
|
||||
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum has been the industry's standard",
|
||||
maxlines: 3,
|
||||
),
|
||||
text16400white("Position"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: positionController,
|
||||
hintText: "Enter your position",
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(50),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Training Scores"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController:
|
||||
trainingScoresController,
|
||||
texttype: TextInputType.number,
|
||||
hintText: "Enter your training scores",
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(10),
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[0-9]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Height"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: heightController,
|
||||
hintText: "Enter your height",
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp(r'[a-zA-Z0-9\s]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Weight"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: weightController,
|
||||
hintText: "Enter your weight",
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp(r'[a-zA-Z0-9\s]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Batting Average"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
texttype: TextInputType.number,
|
||||
textEditingController: battingAvgController,
|
||||
hintText: "Enter your batting average",
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(10),
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[0-9]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(60.h),
|
||||
CommonBtn(
|
||||
text: "Save",
|
||||
onTap: () {
|
||||
if (fullNameController.text.isBlank! ||
|
||||
userNameController.text.isBlank! ||
|
||||
dateController.text.isBlank! ||
|
||||
locationController.text.isBlank! ||
|
||||
aboutController.text.isBlank! ||
|
||||
positionController.text.isBlank! ||
|
||||
trainingScoresController
|
||||
.text.isBlank! ||
|
||||
heightController.text.isBlank! ||
|
||||
weightController.text.isBlank! ||
|
||||
battingAvgController.text.isBlank!) {
|
||||
Get.snackbar(
|
||||
'Error',
|
||||
'Please fill missing details',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: Colors.red,
|
||||
colorText: Colors.white,
|
||||
profilePicture = result;
|
||||
isImageAdded = true;
|
||||
setState(() {});
|
||||
},
|
||||
);
|
||||
} else {
|
||||
saveEditProfileInd();
|
||||
}
|
||||
},
|
||||
},
|
||||
child: Container(
|
||||
height: 35.h,
|
||||
width: 35.w,
|
||||
decoration: const BoxDecoration(
|
||||
shape: BoxShape.circle,
|
||||
color: Color(0xFFD90B2E)),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/cameraicon2.png",
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
))
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(15.h),
|
||||
text16400white("Edit profile picture"),
|
||||
sizedBoxHeight(20.h),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16400white("Full name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: fullNameController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(60.h),
|
||||
],
|
||||
)
|
||||
])))
|
||||
]);
|
||||
}
|
||||
return Container();
|
||||
})),
|
||||
hintText: "Enter your full name",
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[a-zA-Z ]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("User name"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: userNameController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Frame 24.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Enter your user name",
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[a-zA-Z ]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Date of birth"),
|
||||
sizedBoxHeight(16.h),
|
||||
GestureDetector(
|
||||
onTap: () =>
|
||||
datePicker(context, dateController),
|
||||
child: AbsorbPointer(
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/calender.png",
|
||||
width: 18.0,
|
||||
height: 17.0,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "12-04-2024",
|
||||
textEditingController: dateController,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Gender"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomDropDownRadio(
|
||||
initialSelectedValue: _selectedgenderType,
|
||||
header: _selectedgenderType ?? "Male",
|
||||
title: "",
|
||||
showOtherOption: true,
|
||||
listData: const [
|
||||
"Male",
|
||||
"Female",
|
||||
"Prefer not to say"
|
||||
],
|
||||
onItemSelected: _onItemSelected,
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Vector ws.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
Row(
|
||||
children: [
|
||||
text16400white("Location"),
|
||||
sizedBoxWidth(6.w),
|
||||
Image.asset(
|
||||
"assets/images/png/octicon_question-24.png",
|
||||
height: 16.h,
|
||||
width: 16.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: locationController,
|
||||
leadingIcon: SizedBox(
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 58645.png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
),
|
||||
),
|
||||
hintText: "Enter your location",
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[a-zA-Z ]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
text16400white("Interests"),
|
||||
sizedBoxWidth(6.w),
|
||||
Image.asset(
|
||||
"assets/images/png/octicon_question-24.png",
|
||||
height: 16.h,
|
||||
width: 16.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomDropDownChexkBox(
|
||||
header: 'Select interest',
|
||||
title: "",
|
||||
listData: listofInterests,
|
||||
onItemSelected: getCatIdFromName,
|
||||
leadingImage: Image.asset(
|
||||
"assets/images/png/Vector (4).png",
|
||||
width: 18.w,
|
||||
height: 17.h,
|
||||
),
|
||||
initiallySelected: listofUserInterests,
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("About"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField2(
|
||||
textEditingController: aboutController,
|
||||
hintText:
|
||||
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s. Lorem Ipsum has been the industry's standard",
|
||||
maxlines: 3,
|
||||
),
|
||||
text16400white("Position"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: positionController,
|
||||
hintText: "Enter your position",
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(50),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Training Scores"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController:
|
||||
trainingScoresController,
|
||||
texttype: TextInputType.number,
|
||||
hintText: "Enter your training scores",
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(10),
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[0-9]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Height"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: heightController,
|
||||
hintText: "Enter your height",
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp(r'[a-zA-Z0-9\s]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Weight"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
textEditingController: weightController,
|
||||
hintText: "Enter your weight",
|
||||
inputFormatters: [
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp(r'[a-zA-Z0-9\s]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16400white("Batting Average"),
|
||||
sizedBoxHeight(16.h),
|
||||
CustomTextFormField(
|
||||
texttype: TextInputType.number,
|
||||
textEditingController: battingAvgController,
|
||||
hintText: "Enter your batting average",
|
||||
inputFormatters: [
|
||||
LengthLimitingTextInputFormatter(10),
|
||||
FilteringTextInputFormatter.allow(
|
||||
RegExp('[0-9]')),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
sizedBoxHeight(60.h),
|
||||
CommonBtn(
|
||||
text: "Save",
|
||||
onTap: () {
|
||||
if (fullNameController.text.isBlank! ||
|
||||
userNameController.text.isBlank! ||
|
||||
dateController.text.isBlank! ||
|
||||
locationController.text.isBlank! ||
|
||||
aboutController.text.isBlank! ||
|
||||
positionController.text.isBlank! ||
|
||||
trainingScoresController
|
||||
.text.isBlank! ||
|
||||
heightController.text.isBlank! ||
|
||||
weightController.text.isBlank! ||
|
||||
battingAvgController.text.isBlank!) {
|
||||
Get.snackbar(
|
||||
'Error',
|
||||
'Please fill missing details',
|
||||
snackPosition: SnackPosition.BOTTOM,
|
||||
backgroundColor: Colors.red,
|
||||
colorText: Colors.white,
|
||||
);
|
||||
} else {
|
||||
saveEditProfileInd();
|
||||
}
|
||||
},
|
||||
),
|
||||
sizedBoxHeight(60.h),
|
||||
],
|
||||
)
|
||||
])))
|
||||
]);
|
||||
}
|
||||
return Container();
|
||||
}),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -70,10 +70,10 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
return Colors.transparent;
|
||||
} else if (_firstSelectedIndex == index && _isFirstSelectionActive) {
|
||||
// Apply Color(0XFFD90B2E) to the first selected item
|
||||
return Color(0XFFD90B2E);
|
||||
return const Color(0XFFD90B2E);
|
||||
} else if (_selectedIndices.contains(index)) {
|
||||
// Apply Color(0xFF009DAB) to all other selected items
|
||||
return Color(0xFF009DAB);
|
||||
return const Color(0xFF009DAB);
|
||||
}
|
||||
return Colors.transparent;
|
||||
}
|
||||
@@ -318,35 +318,40 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
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
|
||||
crossAxisCount: 3,
|
||||
crossAxisSpacing: 12.w,
|
||||
mainAxisSpacing: 12.h,
|
||||
),
|
||||
itemCount:
|
||||
indiactivityobj!.data!.length,
|
||||
itemBuilder: (context, index) {
|
||||
final activity =
|
||||
indiactivityobj!.data![index];
|
||||
return ActivityContainer(
|
||||
index: indiactivityobj!
|
||||
.data![index].id!,
|
||||
titleString: indiactivityobj!
|
||||
.data![index].name!,
|
||||
image: indiactivityobj!
|
||||
.data![index].image,
|
||||
// 'assets/images/svg/individualact7.svg',
|
||||
key: ValueKey(
|
||||
activity.id), // Added ValueKey
|
||||
index: activity.id!,
|
||||
titleString: activity.name!,
|
||||
image: activity.image,
|
||||
isSelected: _selectedIndices
|
||||
.contains(indiactivityobj!
|
||||
.data![index].id!),
|
||||
gradientColor: _getGradientColor(
|
||||
indiactivityobj!
|
||||
.data![index].id!),
|
||||
onTap: _onContainerTap,
|
||||
.contains(activity.id!),
|
||||
gradientColor:
|
||||
_getGradientColor(activity.id!),
|
||||
onTap: (selectedIndex) {
|
||||
setState(() {
|
||||
if (_selectedIndices
|
||||
.contains(selectedIndex)) {
|
||||
_selectedIndices
|
||||
.remove(selectedIndex);
|
||||
} else {
|
||||
_selectedIndices
|
||||
.add(selectedIndex);
|
||||
}
|
||||
});
|
||||
},
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
sizedBoxHeight(30.h),
|
||||
// text20400FCFCFC("Add other activity"),
|
||||
// sizedBoxHeight(25.h),
|
||||
@@ -412,10 +417,10 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
width: 212.w,
|
||||
height: 35.h,
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFF363636),
|
||||
color: const Color(0xFF363636),
|
||||
borderRadius: BorderRadius.circular(20),
|
||||
border:
|
||||
Border.all(color: Color(0xFFD90B2E), width: 1.w)),
|
||||
border: Border.all(
|
||||
color: const Color(0xFFD90B2E), width: 1.w)),
|
||||
child: Center(
|
||||
child: text16400white("Can’t find your interest"))),
|
||||
)
|
||||
@@ -450,7 +455,7 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
Get.back();
|
||||
@@ -524,7 +529,7 @@ class _SelectIndividualActivityState extends State<SelectIndividualActivity> {
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
Spacer(),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/x-circle.png",
|
||||
height: 28.h,
|
||||
@@ -560,7 +565,8 @@ class ActivityContainer extends StatelessWidget {
|
||||
final Color gradientColor;
|
||||
final Function(int) onTap;
|
||||
|
||||
ActivityContainer({
|
||||
const ActivityContainer({
|
||||
super.key,
|
||||
required this.index,
|
||||
required this.titleString,
|
||||
required this.image,
|
||||
@@ -584,8 +590,8 @@ class ActivityContainer extends StatelessWidget {
|
||||
? _firstSelectedIndex == index &&
|
||||
_isFirstSelectionActive == true
|
||||
? [
|
||||
Color(0xFF009DAB).withOpacity(0.80),
|
||||
Color(0xFF009DAB).withOpacity(0.77),
|
||||
const Color(0xFF009DAB).withOpacity(0.80),
|
||||
const Color(0xFF009DAB).withOpacity(0.77),
|
||||
gradientColor.withOpacity(0.70),
|
||||
gradientColor.withOpacity(0.50),
|
||||
]
|
||||
@@ -604,7 +610,7 @@ class ActivityContainer extends StatelessWidget {
|
||||
_isFirstSelectionActive == true
|
||||
? BorderSide(width: 0.4.w, color: Colors.transparent)
|
||||
: BorderSide(width: 3.w, color: gradientColor)
|
||||
: BorderSide(width: 2.w, color: Color(0xFF434A53)),
|
||||
: BorderSide(width: 2.w, color: const Color(0xFF434A53)),
|
||||
borderRadius: BorderRadius.circular(10),
|
||||
),
|
||||
),
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:dio/dio.dart';
|
||||
@@ -6,7 +5,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart' hide MultipartFile, FormData;
|
||||
import 'package:glassmorphism/glassmorphism.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/base_manager.dart';
|
||||
import 'package:regroup/Common/controller/profileimagecontroller.dart';
|
||||
@@ -15,14 +14,12 @@ import 'package:regroup/Utils/Common/CommonDropdown.dart';
|
||||
import 'package:regroup/Utils/Common/CustomNextButton.dart';
|
||||
import 'package:regroup/Utils/Common/CustomTextformfield.dart';
|
||||
import 'package:regroup/Utils/Common/ImageUpload.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:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||
import 'package:path/path.dart' as path;
|
||||
|
||||
class TellusaboutIndividual extends StatefulWidget {
|
||||
const TellusaboutIndividual({super.key});
|
||||
@@ -36,6 +33,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
TextEditingController userNameController = TextEditingController();
|
||||
TextEditingController datecontroller = TextEditingController();
|
||||
TextEditingController locationcontroller = TextEditingController();
|
||||
TextEditingController imageFile = TextEditingController();
|
||||
|
||||
DateTime? _selectedDate;
|
||||
final photographController = TextEditingController();
|
||||
@@ -132,7 +130,7 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
|
||||
void TellusUploadData() async {
|
||||
utils.loader();
|
||||
var imageFile;
|
||||
MultipartFile? imageFile;
|
||||
if (editProfileImage.profilePicPath.value.isNotEmpty) {
|
||||
imageFile = await MultipartFile.fromFile(
|
||||
editProfileImage.profilePicPath.value,
|
||||
@@ -431,8 +429,10 @@ class _TellusaboutIndividualState extends State<TellusaboutIndividual> {
|
||||
datecontroller.text.isBlank! ||
|
||||
_selectedgendertype.isEmpty ||
|
||||
locationcontroller.text.isBlank! ||
|
||||
// imageFile.text.isBlank! ||
|
||||
editProfileImage.profilePicPath.value == '') {
|
||||
utils.showToast('Please fill all fields');
|
||||
utils
|
||||
.showToast('Please Upload Profile Picture');
|
||||
} else {
|
||||
TellusUploadData();
|
||||
}
|
||||
|
||||
@@ -520,7 +520,7 @@ class _SignupScreenState extends State<SignupScreen> {
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(
|
||||
0.71, -0.70),
|
||||
0.71, -0.70),
|
||||
end:
|
||||
const Alignment(-0.71, 0.7),
|
||||
colors: [
|
||||
|
||||
@@ -145,6 +145,9 @@ class RouteName {
|
||||
|
||||
static const String viewalluserspinned = '/viewallusersspinned';
|
||||
|
||||
static const String communitymembers = '/communitymembers';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ import 'package:regroup/sidemenu/Community/Admin/PopupItem/Community%20settings/
|
||||
import 'package:regroup/sidemenu/Community/Announcements/AnnouncementRequest.dart';
|
||||
import 'package:regroup/sidemenu/Community/Announcements/ManageMembers.dart';
|
||||
import 'package:regroup/sidemenu/Community/Announcements/NewAnnouncement/NewAnnounceent.dart';
|
||||
import 'package:regroup/sidemenu/Community/Members/CommunityMembers.dart';
|
||||
import 'package:regroup/sidemenu/Community/MyCommunity/AddGroups.dart';
|
||||
import 'package:regroup/sidemenu/Community/MyCommunity/NewCommunity.dart';
|
||||
import 'package:regroup/sidemenu/Community/MyCommunity/View/RequestsScreen.dart';
|
||||
@@ -537,10 +538,18 @@ class AppRoutes {
|
||||
name: RouteName.viewalluserspinned,
|
||||
page: () => const Viewtusertags(),
|
||||
),
|
||||
|
||||
GetPage(
|
||||
name: RouteName.communitymembers,
|
||||
page: () => const CommunityMembers(),
|
||||
),
|
||||
|
||||
|
||||
GetPage(
|
||||
name: RouteName.requestscreen,
|
||||
page: () => const RequestsScreen(),
|
||||
),
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
@@ -19,36 +19,11 @@ class Group extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _GroupState extends State<Group> {
|
||||
List GroupData = [
|
||||
{
|
||||
"imagepath": "assets/images/png/img45.png",
|
||||
"title": "Cardio crusaders circle",
|
||||
"subtitle": "Iron titans fitness crew",
|
||||
"members": "7 members"
|
||||
},
|
||||
{
|
||||
"imagepath": "assets/images/png/Rectangle 25.png",
|
||||
"title": "Strength squad syndicate",
|
||||
"subtitle": "Iron titans fitness crew",
|
||||
"members": "7 members"
|
||||
},
|
||||
{
|
||||
"imagepath": "assets/images/png/img2.png",
|
||||
"title": "Flexibility faction force",
|
||||
"subtitle": "Iron titans fitness crew",
|
||||
"members": "7 members"
|
||||
},
|
||||
];
|
||||
|
||||
late Future myfuture;
|
||||
int id = Get.arguments["id"];
|
||||
bool iscommunity = Get.arguments["iscommunity"];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
|
||||
// myfuture = Sidegetmethod().getJoinedusergroups(id);
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@@ -64,7 +39,7 @@ class _GroupState extends State<Group> {
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: iscommunity == true
|
||||
? FutureBuilder(
|
||||
future: Getcommunity().getCommunitygroups(1),
|
||||
future: Getcommunity().getCommunitygroups(id),
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.data == null) {
|
||||
return const Column(
|
||||
|
||||
267
lib/sidemenu/Community/Members/CommunityMembers.dart
Normal file
267
lib/sidemenu/Community/Members/CommunityMembers.dart
Normal file
@@ -0,0 +1,267 @@
|
||||
import 'dart:async';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/controller/CommonTextFormField.dart';
|
||||
import 'package:regroup/Utils/Common/CommonAppbar.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:regroup/sidemenu/Community/MyCommunity/Model/communityMebersModel.dart';
|
||||
import 'package:regroup/sidemenu/Community/MyCommunity/view_model/getmethod.dart';
|
||||
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||
|
||||
class CommunityMembers extends StatefulWidget {
|
||||
const CommunityMembers({super.key});
|
||||
|
||||
@override
|
||||
State<CommunityMembers> createState() => _CommunityMembersState();
|
||||
}
|
||||
|
||||
class _CommunityMembersState extends State<CommunityMembers> {
|
||||
StreamController<CommunityMembersModel> searchcontroller = StreamController();
|
||||
|
||||
int communityid = Get.arguments["communityid"];
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
print(communityid);
|
||||
var updata = communityid;
|
||||
var updata2 = "";
|
||||
Getcommunity().getCommunityMemberssearch(updata, updata2,
|
||||
streamController: searchcontroller);
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
searchcontroller.close();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
backgroundColor: const Color(0xFF222935),
|
||||
extendBody: true,
|
||||
appBar: const CommonAppbar(
|
||||
titleTxt: "Members",
|
||||
),
|
||||
resizeToAvoidBottomInset: false,
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
SingleChildScrollView(
|
||||
child: Column(children: [
|
||||
Column(crossAxisAlignment: CrossAxisAlignment.start, children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: SizedBox(
|
||||
height: 23,
|
||||
width: 23,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/ion_search-outline.png",
|
||||
height: 23,
|
||||
width: 23,
|
||||
),
|
||||
),
|
||||
),
|
||||
texttype: TextInputType.text,
|
||||
inputFormatters: [
|
||||
RemoveEmojiInputFormatter(),
|
||||
],
|
||||
onInput: (value) {
|
||||
Getcommunity().getCommunityMemberssearch(communityid, value,
|
||||
streamController: searchcontroller);
|
||||
},
|
||||
hintText: "Search people",
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(25.h),
|
||||
StreamBuilder<CommunityMembersModel>(
|
||||
stream: searchcontroller.stream,
|
||||
builder: (ctx, snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.waiting) {
|
||||
// Display shimmer effect while waiting for data
|
||||
return const Center(child: CircularProgressIndicator());
|
||||
} else if (snapshot.hasError) {
|
||||
// Handle error state
|
||||
return Center(
|
||||
child: Text(
|
||||
'${snapshot.error} occurred',
|
||||
style: const TextStyle(fontSize: 18),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
// Data has been loaded, show actual UI
|
||||
return communitymembersobj!.data.isEmpty
|
||||
? _buildNoDataBody(context)
|
||||
: ListView.separated(
|
||||
physics: const ScrollPhysics(),
|
||||
shrinkWrap: true,
|
||||
itemCount: communitymembersobj!.data.length,
|
||||
separatorBuilder:
|
||||
(BuildContext context, int index) {
|
||||
return commonDivider();
|
||||
},
|
||||
itemBuilder: (context, index) {
|
||||
var mainFollowersData =
|
||||
communitymembersobj!.data[index];
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
mainFollowersData
|
||||
.iamPrincipal!.principalTypeXid ==
|
||||
1
|
||||
? Get.toNamed(
|
||||
RouteName.profiletabindguest,
|
||||
arguments: {
|
||||
"FolloweridIndex":
|
||||
mainFollowersData
|
||||
.iamPrincipalXid!,
|
||||
})
|
||||
: Get.toNamed(
|
||||
RouteName.profiletabbusguest,
|
||||
arguments: {
|
||||
"FolloweridIndex":
|
||||
mainFollowersData
|
||||
.iamPrincipalXid!,
|
||||
});
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
vertical: 16.h, horizontal: 16.w),
|
||||
child: Row(
|
||||
children: [
|
||||
mainFollowersData.iamPrincipal!
|
||||
.profilePhoto ==
|
||||
null ||
|
||||
mainFollowersData
|
||||
.iamPrincipal!
|
||||
.profilePhoto!
|
||||
.isEmpty
|
||||
? CircleAvatar(
|
||||
backgroundImage: const AssetImage(
|
||||
'assets/images/png/Ellipse 43.png'),
|
||||
radius: 25.r,
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage:
|
||||
CachedNetworkImageProvider(
|
||||
mainFollowersData
|
||||
.iamPrincipal!
|
||||
.profilePhoto!,
|
||||
),
|
||||
|
||||
// NetworkImage(
|
||||
// mainFollowersData
|
||||
// .iamPrincipal!
|
||||
// .profilePhoto!),
|
||||
radius: 25.r,
|
||||
child: CachedNetworkImage(
|
||||
cacheKey: mainFollowersData
|
||||
.iamPrincipalXid
|
||||
.toString(),
|
||||
maxHeightDiskCache: 100,
|
||||
maxWidthDiskCache: 100,
|
||||
imageUrl: mainFollowersData
|
||||
.iamPrincipal!
|
||||
.profilePhoto!,
|
||||
placeholder:
|
||||
(context, url) =>
|
||||
Container(),
|
||||
errorWidget:
|
||||
(context, url, error) =>
|
||||
Icon(Icons.error),
|
||||
imageBuilder: (context,
|
||||
imageProvider) =>
|
||||
CircleAvatar(
|
||||
backgroundImage:
|
||||
imageProvider,
|
||||
radius: 25.r,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Column(
|
||||
crossAxisAlignment:
|
||||
CrossAxisAlignment.start,
|
||||
children: [
|
||||
mainFollowersData.iamPrincipal!
|
||||
.userName ==
|
||||
null ||
|
||||
mainFollowersData
|
||||
.iamPrincipal!
|
||||
.userName!
|
||||
.isEmpty ==
|
||||
true
|
||||
? text16w400_FCFCFC("Regroup")
|
||||
: text16w400_FCFCFC(
|
||||
mainFollowersData
|
||||
.iamPrincipal!
|
||||
.userName!),
|
||||
sizedBoxHeight(4.h),
|
||||
mainFollowersData.iamPrincipal!
|
||||
.userName ==
|
||||
null ||
|
||||
mainFollowersData
|
||||
.iamPrincipal!
|
||||
.userName!
|
||||
.isEmpty ==
|
||||
true
|
||||
? text12w400_FCFCFC_blur(
|
||||
"regroup")
|
||||
: text12w400_FCFCFC_blur(
|
||||
mainFollowersData
|
||||
.iamPrincipal!
|
||||
.userName!)
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
},
|
||||
),
|
||||
])
|
||||
]),
|
||||
)
|
||||
]),
|
||||
);
|
||||
}
|
||||
|
||||
Widget _buildNoDataBody(context) {
|
||||
return Center(
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Text(
|
||||
"No Members Found",
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 16.sp,
|
||||
fontWeight: FontWeight.w600),
|
||||
)
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@ import 'dart:async';
|
||||
import 'dart:developer';
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
@@ -333,9 +334,26 @@ class _AddGroupState extends State<AddGroup> {
|
||||
backgroundImage: AssetImage('assets/images/png/img2.png'),
|
||||
radius: 20.r,
|
||||
)
|
||||
: CircleAvatar(
|
||||
backgroundImage: NetworkImage(imagePath),
|
||||
:
|
||||
// CircleAvatar(
|
||||
// backgroundImage: NetworkImage(imagePath),
|
||||
// radius: 20.r,
|
||||
// ),
|
||||
CircleAvatar(
|
||||
backgroundImage: CachedNetworkImageProvider(imagePath),
|
||||
radius: 20.r,
|
||||
child: CachedNetworkImage(
|
||||
cacheKey: index.toString(),
|
||||
maxHeightDiskCache: 100,
|
||||
maxWidthDiskCache: 100,
|
||||
imageUrl: imagePath,
|
||||
placeholder: (context, url) => Container(),
|
||||
errorWidget: (context, url, error) => Icon(Icons.error),
|
||||
imageBuilder: (context, imageProvider) => CircleAvatar(
|
||||
backgroundImage: imageProvider,
|
||||
radius: 25.r,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(10.w),
|
||||
Expanded(
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
class CommunityMembersModel {
|
||||
CommunityMembersModel({
|
||||
required this.status,
|
||||
required this.statusCode,
|
||||
required this.message,
|
||||
required this.data,
|
||||
});
|
||||
|
||||
final String? status;
|
||||
final int? statusCode;
|
||||
final String? message;
|
||||
final List<Datum> data;
|
||||
|
||||
factory CommunityMembersModel.fromJson(Map<String, dynamic> json){
|
||||
return CommunityMembersModel(
|
||||
status: json["status"],
|
||||
statusCode: json["status_code"],
|
||||
message: json["message"],
|
||||
data: json["data"] == null ? [] : List<Datum>.from(json["data"]!.map((x) => Datum.fromJson(x))),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class Datum {
|
||||
Datum({
|
||||
required this.id,
|
||||
required this.iamPrincipalXid,
|
||||
required this.manageCommunityXid,
|
||||
required this.iamPrincipal,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final int? iamPrincipalXid;
|
||||
final int? manageCommunityXid;
|
||||
final IamPrincipal? iamPrincipal;
|
||||
|
||||
factory Datum.fromJson(Map<String, dynamic> json){
|
||||
return Datum(
|
||||
id: json["id"],
|
||||
iamPrincipalXid: json["iam_principal_xid"],
|
||||
manageCommunityXid: json["manage_community_xid"],
|
||||
iamPrincipal: json["iam_principal"] == null ? null : IamPrincipal.fromJson(json["iam_principal"]),
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
class IamPrincipal {
|
||||
IamPrincipal({
|
||||
required this.id,
|
||||
required this.principalTypeXid,
|
||||
required this.userName,
|
||||
required this.profilePhoto,
|
||||
required this.isUserPinned,
|
||||
});
|
||||
|
||||
final int? id;
|
||||
final int? principalTypeXid;
|
||||
final String? userName;
|
||||
final String? profilePhoto;
|
||||
final bool? isUserPinned;
|
||||
|
||||
factory IamPrincipal.fromJson(Map<String, dynamic> json){
|
||||
return IamPrincipal(
|
||||
id: json["id"],
|
||||
principalTypeXid: json["principal_type_xid"],
|
||||
userName: json["user_name"],
|
||||
profilePhoto: json["profile_photo"],
|
||||
isUserPinned: json["is_user_pinned"],
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_reaction_button/flutter_reaction_button.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
@@ -265,9 +267,8 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
]),
|
||||
sizedBoxHeight(40.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(
|
||||
children: [
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(children: [
|
||||
Row(
|
||||
children: [
|
||||
text20w700_FCFCFC(
|
||||
@@ -292,152 +293,166 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(30.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
text13w400_FCFCFC("Show Details"),
|
||||
sizedBoxWidth(4.w),
|
||||
InkWell(
|
||||
onTap: () {
|
||||
additionalContent = !additionalContent!;
|
||||
setState(() {});
|
||||
},
|
||||
child: Image.asset(
|
||||
InkWell(
|
||||
onTap: () {
|
||||
additionalContent = !additionalContent!;
|
||||
setState(() {});
|
||||
},
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
text13w400_FCFCFC("Show Details"),
|
||||
sizedBoxWidth(4.w),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector 8.png",
|
||||
height: 8.h,
|
||||
width: 20.w,
|
||||
),
|
||||
)
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
if (additionalContent == true)
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(30.h),
|
||||
text16w400_FCFCFC("About community"),
|
||||
sizedBoxHeight(16.h),
|
||||
text14w400_FCFCFCblur(
|
||||
""),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
commonGlassUI(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 58645.png",
|
||||
height: 17.h,
|
||||
width: 13.w,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(30.h),
|
||||
text16w400_FCFCFC("About community"),
|
||||
sizedBoxHeight(16.h),
|
||||
text14w400_FCFCFCblur(
|
||||
"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."),
|
||||
sizedBoxHeight(20.h),
|
||||
Row(
|
||||
children: [
|
||||
commonGlassUI(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
borderRadius:
|
||||
BorderRadius.circular(100),
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/Group 58645.png",
|
||||
height: 17.h,
|
||||
width: 13.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
borderwidth: 0.5),
|
||||
sizedBoxWidth(12.w),
|
||||
text16400white(
|
||||
"Elm street london, United Kingdom")
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
Row(
|
||||
children: [
|
||||
commonGlassUI(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/puzzle-pieces 1 (traced).png",
|
||||
height: 20.h,
|
||||
width: 16.w,
|
||||
borderwidth: 0.5),
|
||||
sizedBoxWidth(12.w),
|
||||
text16400white(
|
||||
"Elm street london, United Kingdom")
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(16.h),
|
||||
Row(
|
||||
children: [
|
||||
commonGlassUI(
|
||||
width: 35.w,
|
||||
height: 35.h,
|
||||
opacity1: 0.24,
|
||||
opacity2: 0.24,
|
||||
borderRadius:
|
||||
BorderRadius.circular(100),
|
||||
customWidget: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/puzzle-pieces 1 (traced).png",
|
||||
height: 20.h,
|
||||
width: 16.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
borderwidth: 0.5),
|
||||
sizedBoxWidth(12.w),
|
||||
text16400white("Sports")
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
commonGlassUI(
|
||||
borderwidth: 0.5),
|
||||
sizedBoxWidth(12.w),
|
||||
text16400white("Sports")
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 51.h,
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
customWidget: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(
|
||||
children: [
|
||||
sizedBoxWidth(16.w),
|
||||
stackContainers(
|
||||
number: "+2",
|
||||
containerImages: [
|
||||
"assets/images/png/cimg3.png",
|
||||
"assets/images/png/cimg2.png",
|
||||
"assets/images/png/cimg3.png",
|
||||
"assets/images/png/cimg2.png",
|
||||
],
|
||||
),
|
||||
sizedBoxWidth(90.w),
|
||||
text16w400_white('7 members'),
|
||||
Spacer(),
|
||||
Icon(
|
||||
Icons.arrow_forward,
|
||||
size: 20.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
sizedBoxWidth(16.w),
|
||||
],
|
||||
),
|
||||
],
|
||||
),
|
||||
borderwidth: 1.w),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.addgroup);
|
||||
},
|
||||
child: commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 51.h,
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.w),
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(children: [
|
||||
Image.asset(
|
||||
"assets/images/png/Black.png",
|
||||
height: 23.h,
|
||||
width: 31.w,
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(
|
||||
RouteName.communitymembers,
|
||||
arguments: {
|
||||
'communityid': CommunityId,
|
||||
});
|
||||
},
|
||||
child: Row(
|
||||
children: [
|
||||
sizedBoxWidth(16.w),
|
||||
stackContainers(
|
||||
number: "+2",
|
||||
containerImages: [
|
||||
"assets/images/png/cimg3.png",
|
||||
"assets/images/png/cimg2.png",
|
||||
"assets/images/png/cimg3.png",
|
||||
"assets/images/png/cimg2.png",
|
||||
],
|
||||
),
|
||||
sizedBoxWidth(15.w),
|
||||
text16w400white('10 groups'),
|
||||
sizedBoxWidth(90.w),
|
||||
text16w400_white('7 members'),
|
||||
Spacer(),
|
||||
Icon(
|
||||
Icons.arrow_forward,
|
||||
size: 20.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
]),
|
||||
],
|
||||
sizedBoxWidth(16.w),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
borderwidth: 1),
|
||||
),
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(40.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.addgroup);
|
||||
},
|
||||
child: commonGlassUI(
|
||||
width: double.infinity,
|
||||
height: 51.h,
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
customWidget: Padding(
|
||||
padding: EdgeInsets.symmetric(
|
||||
horizontal: 16.w),
|
||||
child: Column(
|
||||
mainAxisAlignment:
|
||||
MainAxisAlignment.center,
|
||||
children: [
|
||||
Row(children: [
|
||||
Image.asset(
|
||||
"assets/images/png/Black.png",
|
||||
height: 23.h,
|
||||
width: 31.w,
|
||||
),
|
||||
sizedBoxWidth(15.w),
|
||||
text16w400white('10 groups'),
|
||||
Spacer(),
|
||||
Icon(
|
||||
Icons.arrow_forward,
|
||||
size: 20.sp,
|
||||
color: Colors.white,
|
||||
),
|
||||
]),
|
||||
],
|
||||
),
|
||||
),
|
||||
borderwidth: 1),
|
||||
),
|
||||
]),
|
||||
sizedBoxHeight(25.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.announcement);
|
||||
// Get.toNamed(RouteName.addgroup);
|
||||
Get.toNamed(RouteName.group, arguments: {
|
||||
'id': CommunityId,
|
||||
'iscommunity': true,
|
||||
});
|
||||
},
|
||||
child: commonGlassUI(
|
||||
width: double.infinity,
|
||||
@@ -473,7 +488,7 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
),
|
||||
borderwidth: 1),
|
||||
),
|
||||
sizedBoxHeight(35.h),
|
||||
sizedBoxHeight(40.h),
|
||||
Container(
|
||||
height: 40.h,
|
||||
width: 200.w,
|
||||
@@ -484,9 +499,7 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
child: text14w400white("Leave the community")),
|
||||
),
|
||||
sizedBoxHeight(50.h),
|
||||
],
|
||||
),
|
||||
),
|
||||
])),
|
||||
DefaultTabController(
|
||||
length: 2,
|
||||
// initialIndex: selectedIndex.value,
|
||||
|
||||
@@ -4,11 +4,14 @@ import 'dart:developer';
|
||||
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/sidemenu/Community/MyCommunity/Model/communityMebersModel.dart';
|
||||
import 'package:regroup/sidemenu/Community/MyCommunity/Model/communityaddgroupsModel.dart';
|
||||
import 'package:regroup/sidemenu/Community/MyCommunity/Model/communitygroupsModel.dart';
|
||||
|
||||
CommunityAddgroupsModel? communityaddgroupobj;
|
||||
CommunitygroupsModel? communitygroupspobj;
|
||||
CommunityMembersModel? communitymembersobj;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -41,4 +44,19 @@ class Getcommunity {
|
||||
return response;
|
||||
}
|
||||
|
||||
Future<ResponseData<dynamic>> getCommunityMemberssearch(updata,updata2,
|
||||
{required StreamController<CommunityMembersModel> streamController}) async {
|
||||
final response =
|
||||
await NetworkApiServices().getApi(
|
||||
"${ApiUrls.getcommunitymembers}?manage_community_xid=$updata&search=$updata2",
|
||||
|
||||
);
|
||||
|
||||
if (response.status == ResponseStatus.SUCCESS) {
|
||||
communitymembersobj = CommunityMembersModel.fromJson(response.data);
|
||||
if (!streamController.isClosed) streamController.sink.add(communitymembersobj!);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1214,7 +1214,7 @@ packages:
|
||||
source: hosted
|
||||
version: "7.0.0"
|
||||
sqflite:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sqflite
|
||||
sha256: a43e5a27235518c03ca238e7b4732cf35eabe863a369ceba6cbefa537a66f16d
|
||||
|
||||
@@ -77,6 +77,9 @@ dependencies:
|
||||
flutter_html: ^3.0.0-beta.2
|
||||
comment_tree: ^0.3.0
|
||||
flutter_keyboard_visibility: ^6.0.0
|
||||
|
||||
sqflite: ^2.3.3+1
|
||||
|
||||
cached_network_image: any
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user