Merge branch 'main' into hotfixes
This commit is contained in:
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
@@ -1,3 +1,4 @@
|
||||
{
|
||||
"CodeGPT.apiKey": "CodeGPT Plus Beta"
|
||||
"CodeGPT.apiKey": "CodeGPT Plus Beta",
|
||||
"dart.flutterSdkPath": "D:\\pooja\\fluttersdk\\flutter_3.16.9\\flutter"
|
||||
}
|
||||
@@ -8,7 +8,7 @@ if (localPropertiesFile.exists()) {
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
throw GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
@@ -68,4 +68,6 @@ flutter {
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
implementation 'com.facebook.android:facebook-login:latest.release'
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.example.regroup">
|
||||
package="com.example.regroup"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
>
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
|
||||
<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>
|
||||
|
||||
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
|
||||
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
|
||||
<uses-permission
|
||||
@@ -47,5 +52,23 @@
|
||||
android:value="2" />
|
||||
<meta-data android:name="com.google.android.geo.API_KEY"
|
||||
android:value="AIzaSyDdTfKwZav5Qyg3ht88N76lDTFntOe30dQ"/>
|
||||
<meta-data android:name="com.facebook.sdk.ApplicationId" android:value="@string/facebook_app_id"/>
|
||||
<meta-data android:name="com.facebook.sdk.ClientToken" android:value="@string/facebook_client_token"/>
|
||||
|
||||
<activity android:name="com.facebook.FacebookActivity"
|
||||
android:configChanges=
|
||||
"keyboard|keyboardHidden|screenLayout|screenSize|orientation"
|
||||
android:label="@string/app_name" />
|
||||
<activity
|
||||
android:name="com.facebook.CustomTabActivity"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<data android:scheme="@string/fb_login_protocol_scheme" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
</application>
|
||||
</manifest>
|
||||
|
||||
7
android/app/src/main/res/values/strings.xml
Normal file
7
android/app/src/main/res/values/strings.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">ReGroup123</string>
|
||||
<string name="facebook_app_id">8076081959097016</string>
|
||||
<string name="fb_login_protocol_scheme">fb8076081959097016</string>
|
||||
<string name="facebook_client_token">ca5a1805872edbec0d3a0a0b02229ba5</string>
|
||||
</resources>
|
||||
@@ -282,6 +282,7 @@ class _CalenderTabState extends State<CalenderTab> {
|
||||
allowViewNavigation: true,
|
||||
allowDragAndDrop: true,
|
||||
showDatePickerButton: true,
|
||||
|
||||
monthViewSettings: MonthViewSettings(
|
||||
navigationDirection: MonthNavigationDirection.horizontal,
|
||||
),
|
||||
|
||||
@@ -2,14 +2,13 @@ import 'package:flutter/material.dart';
|
||||
import 'package:flutter_reaction_button/flutter_reaction_button.dart';
|
||||
import 'package:flutter_screenutil/flutter_screenutil.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:glass_kit/glass_kit.dart';
|
||||
import 'package:glassmorphism_ui/glassmorphism_ui.dart';
|
||||
import 'package:regroup/Common/CommonBottomNavigationBar.dart';
|
||||
import 'package:regroup/Common/CommonGlassmorphism.dart';
|
||||
import 'package:regroup/Common/CommonTabBar.dart';
|
||||
import 'package:regroup/Common/CommonWidget.dart';
|
||||
import 'package:regroup/Common/controller/MainScreen.dart';
|
||||
import 'package:regroup/Feed%20Module/sidemenu/sidemenu.dart';
|
||||
import 'package:regroup/Utils/Common/blureffect.dart';
|
||||
import 'package:regroup/Utils/Common/sized_box.dart';
|
||||
import 'package:regroup/Utils/texts.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
@@ -220,6 +219,414 @@ Widget feedTab() {
|
||||
]));
|
||||
}
|
||||
|
||||
Widget normalcardtile2({
|
||||
required String profileImg,
|
||||
required String title,
|
||||
required String mainImg,
|
||||
required List<String> containerTitle,
|
||||
}) {
|
||||
var mainImage = 'assets/images/png/uiw_like-o.png'.obs;
|
||||
void updateImage(String reaction) {
|
||||
if (reaction == 'like') {
|
||||
mainImage.value = 'assets/images/png/f7_hand-thumbsup.png';
|
||||
} else if (reaction == 'heart') {
|
||||
mainImage.value = 'assets/images/png/heart 2.png';
|
||||
} else if (reaction == 'party') {
|
||||
mainImage.value = 'assets/images/png/party-popper 2.png';
|
||||
}
|
||||
}
|
||||
|
||||
return GlassContainer(
|
||||
height: 570.h,
|
||||
width: double.infinity,
|
||||
borderRadius: BorderRadius.circular(1),
|
||||
blur: 6,
|
||||
opacity: 0.04,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFFFFFFF).withOpacity(0.4),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.5),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
border: Border.all(color: Color(0xff434A53)),
|
||||
// borderGradient: LinearGradient(
|
||||
// begin: Alignment.topLeft,
|
||||
// end: Alignment.bottomRight,
|
||||
// colors: [
|
||||
// borderColor,
|
||||
// borderColor,
|
||||
// ],
|
||||
// ),
|
||||
child: Column(
|
||||
children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
foregroundImage: AssetImage(profileImg),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16w400_FCFCFC(title),
|
||||
sizedBoxHeight(5.h),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/community 1 (traced).png',
|
||||
height: 14.w,
|
||||
width: 14.w,
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text12w400_FCFCFC('Active alliance network'),
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: const Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
text12w400_FCFCFC('1 Hour ago'),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: const Offset(0, 50),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Report Post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
width: 15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Share post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Pin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Image.asset(
|
||||
'assets/images/png/Group 1000004071.png',
|
||||
width: 16.w,
|
||||
height: 18.h,
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(5.w)
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Container(
|
||||
height: 163.h,
|
||||
width: double.infinity,
|
||||
child: Image.asset(
|
||||
mainImg,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)),
|
||||
sizedBoxHeight(20.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(children: [
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
itemCount: containerTitle.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.cyclescreen);
|
||||
},
|
||||
child: containertile2(
|
||||
text: ("#${containerTitle[index]}"))),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16w400_FCFCFC(
|
||||
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
|
||||
Row(children: [
|
||||
// InkWell(
|
||||
// onTap: () {
|
||||
// Get.toNamed(RouteName.reactionview);
|
||||
// },
|
||||
// child: stackReaction(number: '20', containerImages: [
|
||||
// 'assets/images/png/f7_hand-thumbsup.png',
|
||||
// 'assets/images/png/heart 2.png',
|
||||
// 'assets/images/png/party-popper 2.png'
|
||||
// ]),
|
||||
// ),
|
||||
const Spacer(),
|
||||
GlassContainer(
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
opacity: 0.2,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
blur: 6,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFFFFFFF).withOpacity(0.5),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.6),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
border: Border.all(color: Color(0xff434A53)),
|
||||
// borderGradient: LinearGradient(
|
||||
// begin: Alignment.topLeft,
|
||||
// end: Alignment.bottomRight,
|
||||
// colors: [
|
||||
// borderColor,
|
||||
// borderColor,
|
||||
// ],
|
||||
// ),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 13.h,
|
||||
width: 13.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('20'),
|
||||
sizedBoxWidth(20.w),
|
||||
GlassContainer(
|
||||
height: 30.h,
|
||||
width: 30.w,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
blur: 6,
|
||||
opacity: 0.2,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFFFFFFF).withOpacity(0.5),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.6),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
border: Border.all(color: Color(0xff434A53)),
|
||||
// borderGradient: LinearGradient(
|
||||
// begin: Alignment.topLeft,
|
||||
// end: Alignment.bottomRight,
|
||||
// colors: [
|
||||
// borderColor,
|
||||
// borderColor,
|
||||
// ],
|
||||
// ),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Vector (1).png',
|
||||
height: 12.h,
|
||||
width: 12.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('10'),
|
||||
]),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Obx(() {
|
||||
return ReactionButton<String>(
|
||||
onReactionChanged: (reaction) {
|
||||
updateImage(reaction?.value ?? 'like');
|
||||
debugPrint('Selected value: ${reaction?.value}');
|
||||
},
|
||||
reactions: <Reaction<String>?>[
|
||||
Reaction<String>(
|
||||
value: 'like',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png',
|
||||
),
|
||||
),
|
||||
Reaction<String>(
|
||||
value: 'heart',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/heart 2.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/heart 2.png'),
|
||||
),
|
||||
Reaction<String>(
|
||||
value: 'party',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/party-popper 2.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/party-popper 2.png'),
|
||||
),
|
||||
],
|
||||
selectedReaction: Reaction<String>(
|
||||
value: 'like',
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/f7_hand-thumbs.png'),
|
||||
),
|
||||
boxColor: Colors.white,
|
||||
boxElevation: 2,
|
||||
boxRadius: 30,
|
||||
itemsSpacing: 8,
|
||||
itemScale: 0.4,
|
||||
itemSize: const Size(45, 45),
|
||||
boxPadding: const EdgeInsets.all(8),
|
||||
boxAnimationDuration:
|
||||
const Duration(milliseconds: 200),
|
||||
itemAnimationDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
// toggle: false,
|
||||
direction: ReactionsBoxAlignment.rtl,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
);
|
||||
})
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Comment')
|
||||
],
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004089.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Save')
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
]),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
Widget announcecardtile({
|
||||
required String profileImg,
|
||||
required String title,
|
||||
@@ -570,419 +977,6 @@ Widget announcecardtile({
|
||||
));
|
||||
}
|
||||
|
||||
Widget normalcardtile2({
|
||||
required String profileImg,
|
||||
required String title,
|
||||
required String mainImg,
|
||||
required List<String> containerTitle,
|
||||
}) {
|
||||
var mainImage = 'assets/images/png/uiw_like-o.png'.obs;
|
||||
void updateImage(String reaction) {
|
||||
if (reaction == 'like') {
|
||||
mainImage.value = 'assets/images/png/f7_hand-thumbsup.png';
|
||||
} else if (reaction == 'heart') {
|
||||
mainImage.value = 'assets/images/png/heart 2.png';
|
||||
} else if (reaction == 'party') {
|
||||
mainImage.value = 'assets/images/png/party-popper 2.png';
|
||||
}
|
||||
}
|
||||
|
||||
return GlassContainer(
|
||||
height: 580,
|
||||
width: double.infinity,
|
||||
blur: 6,
|
||||
alignment: Alignment.center,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFFFFFFF).withOpacity(0.04),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff434A53),
|
||||
Color(0xff434A53),
|
||||
],
|
||||
),
|
||||
elevation: 3.0,
|
||||
isFrostedGlass: true,
|
||||
frostedOpacity: 0.04,
|
||||
child: Column(
|
||||
children: [
|
||||
sizedBoxHeight(25.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CircleAvatar(
|
||||
foregroundImage: AssetImage(profileImg),
|
||||
radius: 25.r,
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
text16w400_FCFCFC(title),
|
||||
sizedBoxHeight(5.h),
|
||||
Row(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/community 1 (traced).png',
|
||||
height: 14.w,
|
||||
width: 14.w,
|
||||
),
|
||||
sizedBoxWidth(7.w),
|
||||
text12w400_FCFCFC('Active alliance network'),
|
||||
sizedBoxWidth(7.w),
|
||||
Icon(
|
||||
Icons.circle,
|
||||
color: const Color(0xFFFCFCFC),
|
||||
size: 4.sp,
|
||||
),
|
||||
sizedBoxWidth(6.w),
|
||||
text12w400_FCFCFC('1 Hour ago'),
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
const Spacer(),
|
||||
PopupMenuButton(
|
||||
surfaceTintColor: const Color(0xFF222935),
|
||||
constraints: BoxConstraints.tightFor(width: 176.w),
|
||||
offset: const Offset(0, 50),
|
||||
color: const Color(0xFF222935),
|
||||
tooltip: "",
|
||||
itemBuilder: (BuildContext context) => <PopupMenuEntry>[
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Report Post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/Vector (5).png",
|
||||
height: 15.h,
|
||||
width: 15.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Share post',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/share.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12.w),
|
||||
child: Row(
|
||||
children: [
|
||||
Text(
|
||||
'Pin',
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w800,
|
||||
fontFamily: "Nunito Sans",
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
Image.asset(
|
||||
"assets/images/png/f7_pin-fill (2).png",
|
||||
height: 25.h,
|
||||
width: 25.w,
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
child: Image.asset(
|
||||
'assets/images/png/Group 1000004071.png',
|
||||
width: 16.w,
|
||||
height: 18.h,
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(5.w)
|
||||
],
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Container(
|
||||
height: 163.h,
|
||||
width: double.infinity,
|
||||
child: Image.asset(
|
||||
mainImg,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
)),
|
||||
sizedBoxHeight(20.h),
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(children: [
|
||||
SizedBox(
|
||||
height: 30.h,
|
||||
child: ListView.builder(
|
||||
scrollDirection: Axis.horizontal,
|
||||
shrinkWrap: true,
|
||||
itemCount: containerTitle.length,
|
||||
itemBuilder: (context, index) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(right: 12.w),
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.cyclescreen);
|
||||
},
|
||||
child: containertile2(
|
||||
text: ("#${containerTitle[index]}"))),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(20.h),
|
||||
text16w400_FCFCFC(
|
||||
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
|
||||
Row(children: [
|
||||
// InkWell(
|
||||
// onTap: () {
|
||||
// Get.toNamed(RouteName.reactionview);
|
||||
// },
|
||||
// child: stackReaction(number: '20', containerImages: [
|
||||
// 'assets/images/png/f7_hand-thumbsup.png',
|
||||
// 'assets/images/png/heart 2.png',
|
||||
// 'assets/images/png/party-popper 2.png'
|
||||
// ]),
|
||||
// ),
|
||||
const Spacer(),
|
||||
GlassContainer(
|
||||
height: 30,
|
||||
width: 30,
|
||||
blur: 6,
|
||||
alignment: Alignment.center,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.06),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff434A53),
|
||||
Color(0xff434A53),
|
||||
],
|
||||
),
|
||||
elevation: 3.0,
|
||||
isFrostedGlass: true,
|
||||
frostedOpacity: 0.12,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 13.h,
|
||||
width: 13.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('20'),
|
||||
sizedBoxWidth(20.w),
|
||||
GlassContainer(
|
||||
height: 30,
|
||||
width: 30,
|
||||
blur: 6,
|
||||
alignment: Alignment.center,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.06),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xff434A53),
|
||||
Color(0xff434A53),
|
||||
],
|
||||
),
|
||||
elevation: 3.0,
|
||||
isFrostedGlass: true,
|
||||
frostedOpacity: 0.12,
|
||||
borderRadius: BorderRadius.circular(100),
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Vector (1).png',
|
||||
height: 12.h,
|
||||
width: 12.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxWidth(12.w),
|
||||
text14w400_FCFCFC('10'),
|
||||
]),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
||||
children: [
|
||||
Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Obx(() {
|
||||
return ReactionButton<String>(
|
||||
onReactionChanged: (reaction) {
|
||||
updateImage(reaction?.value ?? 'like');
|
||||
debugPrint('Selected value: ${reaction?.value}');
|
||||
},
|
||||
reactions: <Reaction<String>?>[
|
||||
Reaction<String>(
|
||||
value: 'like',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/f7_hand-thumbsup.png',
|
||||
),
|
||||
),
|
||||
Reaction<String>(
|
||||
value: 'heart',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/heart 2.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/heart 2.png'),
|
||||
),
|
||||
Reaction<String>(
|
||||
value: 'party',
|
||||
previewIcon: _buildReactionsPreviewIcon(
|
||||
'assets/images/png/party-popper 2.png'),
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/party-popper 2.png'),
|
||||
),
|
||||
],
|
||||
selectedReaction: Reaction<String>(
|
||||
value: 'like',
|
||||
icon: _buildReactionsIcon(
|
||||
'assets/images/png/f7_hand-thumbs.png'),
|
||||
),
|
||||
boxColor: Colors.white,
|
||||
boxElevation: 2,
|
||||
boxRadius: 30,
|
||||
itemsSpacing: 8,
|
||||
itemScale: 0.4,
|
||||
itemSize: const Size(45, 45),
|
||||
boxPadding: const EdgeInsets.all(8),
|
||||
boxAnimationDuration:
|
||||
const Duration(milliseconds: 200),
|
||||
itemAnimationDuration:
|
||||
const Duration(milliseconds: 500),
|
||||
hoverDuration: const Duration(milliseconds: 700),
|
||||
// toggle: false,
|
||||
direction: ReactionsBoxAlignment.rtl,
|
||||
|
||||
child: _buildReactionsIcon(mainImage.value),
|
||||
);
|
||||
})
|
||||
],
|
||||
),
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.postdetailsScreen);
|
||||
},
|
||||
child: Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004088.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Comment')
|
||||
],
|
||||
),
|
||||
),
|
||||
Column(
|
||||
children: [
|
||||
Image.asset(
|
||||
'assets/images/png/Frame 1000004089.png',
|
||||
height: 19.h,
|
||||
width: 19.w,
|
||||
),
|
||||
sizedBoxHeight(8.h),
|
||||
text11w400_FCFCFC('Save')
|
||||
],
|
||||
)
|
||||
],
|
||||
),
|
||||
sizedBoxHeight(12.h),
|
||||
commonDivider(),
|
||||
sizedBoxHeight(12.h),
|
||||
]),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
Widget normalcardtile({
|
||||
required String profileImg,
|
||||
required String title,
|
||||
@@ -1369,34 +1363,32 @@ Widget containertile({required String text}) {
|
||||
|
||||
Widget containertile2({required String text}) {
|
||||
return GlassContainer(
|
||||
height: 30,
|
||||
width: 130,
|
||||
height: 30.h,
|
||||
width: 130.w,
|
||||
// opacity: 0.2,
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
blur: 6,
|
||||
alignment: Alignment.center,
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFFFFFFF).withOpacity(0.05),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.06),
|
||||
Color(0xFFFFFFFF).withOpacity(0.5),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.6),
|
||||
],
|
||||
stops: const [
|
||||
0.1,
|
||||
1,
|
||||
],
|
||||
),
|
||||
borderGradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
Color(0xFFD90B2E),
|
||||
Color(0xFFD90B2E),
|
||||
],
|
||||
),
|
||||
elevation: 3.0,
|
||||
isFrostedGlass: true,
|
||||
frostedOpacity: 0.12,
|
||||
borderRadius: BorderRadius.circular(30),
|
||||
border: Border.all(color: Color(0xFFD90B2E)),
|
||||
// borderGradient: LinearGradient(
|
||||
// begin: Alignment.topLeft,
|
||||
// end: Alignment.bottomRight,
|
||||
// colors: [
|
||||
// borderColor,
|
||||
// borderColor,
|
||||
// ],
|
||||
// ),
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 10.w),
|
||||
child: Center(child: text14w400_FCFCFC(text)),
|
||||
@@ -1454,7 +1446,8 @@ Widget popularTab() {
|
||||
'Events',
|
||||
'Marathon',
|
||||
'Events'
|
||||
])
|
||||
]),
|
||||
sizedBoxHeight(20.h),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
||||
@@ -62,7 +62,7 @@ class _PostScreenState extends State<PostScreen> {
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
sizedBoxHeight(20.h),
|
||||
|
||||
|
||||
text16w400_FCFCFC("Caption"),
|
||||
|
||||
sizedBoxHeight(18.h),
|
||||
|
||||
@@ -427,6 +427,7 @@ class _GroupDetailState extends State<GroupDetail> {
|
||||
padding: EdgeInsets.only(right: 16.w),
|
||||
child: Center(
|
||||
child: Row(children: [
|
||||
sizedBoxWidth(16.w),
|
||||
stackContainers(containerImages: [
|
||||
"assets/images/png/cimg3.png",
|
||||
"assets/images/png/cimg2.png",
|
||||
|
||||
@@ -207,14 +207,14 @@ class _NewPostState extends State<NewPost> {
|
||||
// sizedBoxHeight(18.h),
|
||||
// CustomTextFormField(),
|
||||
// sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC("Post as"),
|
||||
sizedBoxHeight(18.h),
|
||||
CustomDropDownRadio(
|
||||
header: "",
|
||||
title: "",
|
||||
listData: ['Individual', 'Anonymous'],
|
||||
onItemSelected: (p0) {},
|
||||
leadingImage: SizedBox()),
|
||||
// text16w400_FCFCFC("Post as"),
|
||||
// sizedBoxHeight(18.h),
|
||||
// CustomDropDownRadio(
|
||||
// header: "",
|
||||
// title: "",
|
||||
// listData: ['Individual', 'Anonymous'],
|
||||
// onItemSelected: (p0) {},
|
||||
// leadingImage: SizedBox()),
|
||||
// CommonDropdownradioBtn(
|
||||
// hint: '', items: ['Individual', 'Anonymous']),
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ 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/texts.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
|
||||
class Sessions extends StatefulWidget {
|
||||
const Sessions({super.key});
|
||||
@@ -25,6 +26,105 @@ List<File?> bannerPath = [];
|
||||
bool isbannerAdded = false;
|
||||
|
||||
class _SessionsState extends State<Sessions> {
|
||||
DateTime? _selectedDate;
|
||||
TimeOfDay? _selectedTime;
|
||||
String _formattedDateTime = 'Thu, Jan 20 08:00 pm';
|
||||
|
||||
Future<TimeOfDay?> showCustomTimePicker(BuildContext context,
|
||||
{TimeOfDay? initialTime}) {
|
||||
final ThemeData customTheme2 = Theme.of(context).copyWith(
|
||||
colorScheme: const ColorScheme.light(
|
||||
primary: Color(0xFFD90B2E),
|
||||
surfaceTint: Color(0xFF222935),
|
||||
surface: Color(0xFF222935),
|
||||
onPrimary: Colors.white,
|
||||
onSurface: Colors.white,
|
||||
),
|
||||
textTheme: Theme.of(context).textTheme.copyWith(
|
||||
headline6: TextStyle(color: Colors.blue),
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Color(0xFFD90B2E),
|
||||
),
|
||||
));
|
||||
return showTimePicker(
|
||||
context: context,
|
||||
initialTime: initialTime ?? TimeOfDay.now(),
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return Theme(
|
||||
data: customTheme2,
|
||||
child: child!,
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Future<void> _selectDateTime(BuildContext context) async {
|
||||
final ThemeData customTheme2 = Theme.of(context).copyWith(
|
||||
colorScheme: const ColorScheme.light(
|
||||
primary: Color(0xFFD90B2E),
|
||||
surfaceTint: Color(0xFF222935),
|
||||
surface: Color(0xFF222935),
|
||||
onPrimary: Colors.white,
|
||||
onSurface: Colors.white,
|
||||
// onSecondary: Colors.red,
|
||||
),
|
||||
textTheme: Theme.of(context).textTheme.copyWith(
|
||||
headline6: TextStyle(color: Colors.blue),
|
||||
),
|
||||
textButtonTheme: TextButtonThemeData(
|
||||
style: TextButton.styleFrom(
|
||||
foregroundColor: Color(0xFFD90B2E),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
final DateTime? pickedDate = await showDatePicker(
|
||||
context: context,
|
||||
initialDate: DateTime.now(),
|
||||
firstDate: DateTime(2000),
|
||||
lastDate: DateTime(2101),
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return Theme(
|
||||
data: customTheme2,
|
||||
child: child!,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
if (pickedDate != null) {
|
||||
final TimeOfDay? pickedTime = await showTimePicker(
|
||||
context: context,
|
||||
initialTime: TimeOfDay.now(),
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
return Theme(
|
||||
data: customTheme2,
|
||||
child: child!,
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
if (pickedTime != null) {
|
||||
setState(() {
|
||||
_selectedDate = pickedDate;
|
||||
_selectedTime = pickedTime;
|
||||
|
||||
final DateTime selectedDateTime = DateTime(
|
||||
_selectedDate!.year,
|
||||
_selectedDate!.month,
|
||||
_selectedDate!.day,
|
||||
_selectedTime!.hour,
|
||||
_selectedTime!.minute,
|
||||
);
|
||||
|
||||
_formattedDateTime =
|
||||
DateFormat('EEE, MMM d h:mm a').format(selectedDateTime);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -112,18 +212,26 @@ class _SessionsState extends State<Sessions> {
|
||||
sizedBoxHeight(25.h),
|
||||
text16w400_FCFCFC('Starts'),
|
||||
sizedBoxHeight(25.h),
|
||||
CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/clock.png",
|
||||
GestureDetector(
|
||||
onTap: () {
|
||||
_selectDateTime(context);
|
||||
},
|
||||
child: AbsorbPointer(
|
||||
child: CustomTextFormField(
|
||||
leadingIcon: Container(
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
),
|
||||
)),
|
||||
hintText: "Thu, Jan 20 08:00 pm",
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
"assets/images/png/clock.png",
|
||||
height: 20.h,
|
||||
width: 20.w,
|
||||
),
|
||||
)),
|
||||
hintText: _formattedDateTime,
|
||||
// hintText: "Thu, Jan 20 08:00 pm",
|
||||
),
|
||||
),
|
||||
),
|
||||
sizedBoxHeight(10.h),
|
||||
Row(
|
||||
|
||||
@@ -32,7 +32,8 @@ class _SettingsState extends State<Settings> {
|
||||
Container(
|
||||
decoration: const BoxDecoration(
|
||||
image: DecorationImage(
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"), fit: BoxFit.fill)),
|
||||
image: AssetImage("assets/images/png/Ellipse 1496.png"),
|
||||
fit: BoxFit.fill)),
|
||||
),
|
||||
Column(children: [
|
||||
GestureDetector(
|
||||
|
||||
@@ -65,89 +65,88 @@ class _WatchlistState extends State<Watchlist> {
|
||||
: SizedBox.shrink()),
|
||||
),
|
||||
body: Stack(children: [
|
||||
const CommonBlurLeftRed(),
|
||||
const CommonBlurRightRed(),
|
||||
const CommonBlurLeft(),
|
||||
const CommonBlurRight(),
|
||||
Positioned.fill(
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
||||
child: Column(
|
||||
children: [
|
||||
sizedBoxHeight(40.h),
|
||||
Expanded(
|
||||
child: GridView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
gridDelegate:
|
||||
const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
mainAxisSpacing: 8,
|
||||
crossAxisSpacing: 8,
|
||||
childAspectRatio: 1,
|
||||
),
|
||||
itemCount: images.length,
|
||||
itemBuilder: (context, index) {
|
||||
return GestureDetector(
|
||||
onLongPress: () {
|
||||
toggleCircles();
|
||||
},
|
||||
onTap: () {
|
||||
toggleSelection(index);
|
||||
},
|
||||
child: Obx(() {
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
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(
|
||||
children: [
|
||||
sizedBoxHeight(40.h),
|
||||
Expanded(
|
||||
child: GridView.builder(
|
||||
scrollDirection: Axis.vertical,
|
||||
gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(
|
||||
crossAxisCount: 3,
|
||||
mainAxisSpacing: 8,
|
||||
crossAxisSpacing: 8,
|
||||
childAspectRatio: 1,
|
||||
),
|
||||
itemCount: images.length,
|
||||
itemBuilder: (context, index) {
|
||||
return GestureDetector(
|
||||
onLongPress: () {
|
||||
toggleCircles();
|
||||
},
|
||||
onTap: () {
|
||||
toggleSelection(index);
|
||||
},
|
||||
child: Obx(() {
|
||||
return Stack(
|
||||
children: [
|
||||
Container(
|
||||
width: 115.w,
|
||||
height: 115.h,
|
||||
child: Image.asset(
|
||||
images[index],
|
||||
width: 115.w,
|
||||
height: 115.h,
|
||||
child: Image.asset(
|
||||
images[index],
|
||||
width: 115.w,
|
||||
height: 115.h,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
if (showCircles.value)
|
||||
Positioned(
|
||||
top: 8.h,
|
||||
right: 8.w,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
toggleSelection(index);
|
||||
},
|
||||
child: Container(
|
||||
width: 18.w,
|
||||
height: 18.h,
|
||||
decoration: BoxDecoration(
|
||||
color: selected[index]
|
||||
? Colors.white
|
||||
: Colors.transparent,
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: Colors.white, width: 1),
|
||||
),
|
||||
child: selected[index]
|
||||
? Center(
|
||||
child: Icon(
|
||||
Icons.check,
|
||||
color: Color(0xFF344436),
|
||||
size: 12,
|
||||
weight: 3,
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
if (showCircles.value)
|
||||
Positioned(
|
||||
top: 8.h,
|
||||
right: 8.w,
|
||||
child: GestureDetector(
|
||||
onTap: () {
|
||||
toggleSelection(index);
|
||||
},
|
||||
child: Container(
|
||||
width: 18.w,
|
||||
height: 18.h,
|
||||
decoration: BoxDecoration(
|
||||
color: selected[index]
|
||||
? Colors.white
|
||||
: Colors.transparent,
|
||||
shape: BoxShape.circle,
|
||||
border: Border.all(
|
||||
color: Colors.white, width: 1),
|
||||
),
|
||||
child: selected[index]
|
||||
? Center(
|
||||
child: Icon(
|
||||
Icons.check,
|
||||
color: Color(0xFF344436),
|
||||
size: 12,
|
||||
weight: 3,
|
||||
),
|
||||
)
|
||||
: null,
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
);
|
||||
}),
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
]),
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'dart:ui';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
@@ -14,6 +13,7 @@ import 'package:regroup/Utils/texts.dart';
|
||||
import 'package:regroup/resources/routes/route_name.dart';
|
||||
import 'package:remove_emoji_input_formatter/remove_emoji_input_formatter.dart';
|
||||
import 'package:show_fps/show_fps.dart';
|
||||
import 'package:flutter_facebook_auth/flutter_facebook_auth.dart';
|
||||
|
||||
class LoginScreen extends StatefulWidget {
|
||||
const LoginScreen({super.key});
|
||||
@@ -23,11 +23,69 @@ class LoginScreen extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _LoginScreenState extends State<LoginScreen> {
|
||||
Map<String, dynamic>? _userData;
|
||||
AccessToken? _accessToken;
|
||||
bool _checking = true;
|
||||
final TextEditingController _email = TextEditingController();
|
||||
RxBool isObscured = true.obs;
|
||||
final TextEditingController _password = TextEditingController();
|
||||
// final GlobalKey<FormState> _form = GlobalKey<FormState>();
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// TODO: implement initState
|
||||
|
||||
super.initState();
|
||||
}
|
||||
|
||||
_checkIfisLoggedIn() async {
|
||||
//user token
|
||||
final accessToken = await FacebookAuth.instance.accessToken;
|
||||
|
||||
setState(() {
|
||||
_checking = false;
|
||||
});
|
||||
|
||||
if (accessToken != null) {
|
||||
print("/////////////////////////////////////////check");
|
||||
print("worked");
|
||||
print(accessToken.toJson());
|
||||
final userData = await FacebookAuth.instance.getUserData();
|
||||
_accessToken = accessToken;
|
||||
setState(() {
|
||||
_userData = userData;
|
||||
});
|
||||
} else {
|
||||
print("/////////////////////////////////////////check");
|
||||
|
||||
print("not worked");
|
||||
_login();
|
||||
}
|
||||
}
|
||||
_login() async {
|
||||
final LoginResult result = await FacebookAuth.instance.login();
|
||||
|
||||
if (result.status == LoginStatus.success) {
|
||||
_accessToken = result.accessToken;
|
||||
|
||||
final userData = await FacebookAuth.instance.getUserData();
|
||||
_userData = userData;
|
||||
} else {
|
||||
print(result.status);
|
||||
print(result.message);
|
||||
}
|
||||
setState(() {
|
||||
_checking = false;
|
||||
});
|
||||
}
|
||||
|
||||
_logout() async {
|
||||
await FacebookAuth.instance.logOut();
|
||||
_accessToken = null;
|
||||
_userData = null;
|
||||
setState(() {});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
@@ -242,28 +300,44 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
'assets/images/png/login3.png'))),
|
||||
),
|
||||
const Spacer(),
|
||||
Container(
|
||||
width: 55,
|
||||
height: 55,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(0.71, -0.70),
|
||||
end: const Alignment(-0.71, 0.7),
|
||||
colors: [
|
||||
Colors.white
|
||||
.withOpacity(0.07999999821186066),
|
||||
Colors.white
|
||||
.withOpacity(0.12999999523162842)
|
||||
],
|
||||
),
|
||||
shape: const OvalBorder(
|
||||
side: BorderSide(
|
||||
width: 0.50,
|
||||
color: Color(0xFF434A53)),
|
||||
),
|
||||
image: const DecorationImage(
|
||||
image: AssetImage(
|
||||
'assets/images/png/login4.png'))),
|
||||
GestureDetector(
|
||||
onTap: () async {
|
||||
_checkIfisLoggedIn();
|
||||
|
||||
/* FacebookAuth.instance.login(
|
||||
permissions: ['public_profile', 'email'],
|
||||
).then((value) {
|
||||
FacebookAuth.instance.getUserData().then((userData) {
|
||||
setState(() {
|
||||
/* _isLoggedIn = true;
|
||||
_userObj = userData; */
|
||||
});
|
||||
});
|
||||
}); */
|
||||
},
|
||||
child: Container(
|
||||
width: 55,
|
||||
height: 55,
|
||||
decoration: ShapeDecoration(
|
||||
gradient: LinearGradient(
|
||||
begin: const Alignment(0.71, -0.70),
|
||||
end: const Alignment(-0.71, 0.7),
|
||||
colors: [
|
||||
Colors.white
|
||||
.withOpacity(0.07999999821186066),
|
||||
Colors.white
|
||||
.withOpacity(0.12999999523162842)
|
||||
],
|
||||
),
|
||||
shape: const OvalBorder(
|
||||
side: BorderSide(
|
||||
width: 0.50,
|
||||
color: Color(0xFF434A53)),
|
||||
),
|
||||
image: const DecorationImage(
|
||||
image: AssetImage(
|
||||
'assets/images/png/login4.png'))),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -208,33 +208,73 @@ class _CustomDropDownTag1State extends State<CustomDropDownTag1> {
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
CustomTextFormField(
|
||||
hintText: widget.header,
|
||||
suffixIcon: GestureDetector(
|
||||
onTap: () {
|
||||
onDropTap.value = !onDropTap.value;
|
||||
},
|
||||
child: Container(
|
||||
height: 20.h,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 58575.png',
|
||||
height: 20.h,
|
||||
width: 20,
|
||||
Container(
|
||||
width: double.infinity,
|
||||
height: 50.h,
|
||||
padding: EdgeInsets.only(
|
||||
right: 12.w,
|
||||
left: 12.w,
|
||||
),
|
||||
decoration: BoxDecoration(
|
||||
color: Color(0xFFFFFFFF).withOpacity(0.10),
|
||||
gradient: LinearGradient(
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
colors: [
|
||||
const Color(0xFFffffff).withOpacity(0.50),
|
||||
const Color(0xFFFFFFFF).withOpacity(0.50),
|
||||
],
|
||||
),
|
||||
// color: Color(0xFFFFFFFF).withOpacity(0.10),
|
||||
borderRadius: onDropTap.value && filteredListData.isNotEmpty
|
||||
? BorderRadius.vertical(
|
||||
top: Radius.circular(30.r),
|
||||
)
|
||||
: BorderRadius.circular(30.r),
|
||||
border: Border.all(color: const Color(0xFF434A53)),
|
||||
),
|
||||
child: Center(
|
||||
child: TextFormField(
|
||||
controller: textEditingController,
|
||||
style: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontFamily: 'Helvetica'),
|
||||
cursorColor: Colors.red,
|
||||
enableInteractiveSelection: false,
|
||||
obscureText: false,
|
||||
decoration: InputDecoration(
|
||||
hintText: widget.header,
|
||||
hintStyle: TextStyle(
|
||||
fontSize: 16.sp,
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.w400,
|
||||
fontFamily: 'Helvetica'),
|
||||
suffixIcon: GestureDetector(
|
||||
onTap: () {
|
||||
onDropTap.value = !onDropTap.value;
|
||||
},
|
||||
child: Container(
|
||||
height: 20.h,
|
||||
width: 20,
|
||||
child: Center(
|
||||
child: Image.asset(
|
||||
'assets/images/png/Frame 58575.png',
|
||||
height: 20.h,
|
||||
width: 20,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
border: InputBorder.none,
|
||||
),
|
||||
onTap: () {
|
||||
onDropTap.value = !onDropTap.value;
|
||||
},
|
||||
),
|
||||
),
|
||||
textEditingController: textEditingController,
|
||||
// onInput: (p0) {
|
||||
// onDropTap.value = !onDropTap.value;
|
||||
// },
|
||||
onTap: () {
|
||||
onDropTap.value = !onDropTap.value;
|
||||
},
|
||||
),
|
||||
if (onDropTap.value)
|
||||
if (onDropTap.value && filteredListData.isNotEmpty)
|
||||
Container(
|
||||
width: double.infinity,
|
||||
decoration: BoxDecoration(
|
||||
@@ -262,6 +302,7 @@ class _CustomDropDownTag1State extends State<CustomDropDownTag1> {
|
||||
onDropTap.value = false;
|
||||
textEditingController.text = selectedValue.value;
|
||||
widget.onItemSelected(selectedValue.value);
|
||||
onDropTap.value = !onDropTap.value;
|
||||
},
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
|
||||
@@ -116,7 +116,6 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
|
||||
enableInteractiveSelection: false,
|
||||
maxLines: widget.maxlines,
|
||||
obscureText: obscureText,
|
||||
|
||||
controller: widget.textEditingController,
|
||||
decoration: InputDecoration(
|
||||
hintText: widget.hintText,
|
||||
|
||||
@@ -26,6 +26,7 @@ Future<void> main() async {
|
||||
width: 200,
|
||||
height: 100,
|
||||
child: const MyApp())));
|
||||
|
||||
}
|
||||
|
||||
// runApp(
|
||||
|
||||
24
pubspec.lock
24
pubspec.lock
@@ -230,6 +230,30 @@ packages:
|
||||
description: flutter
|
||||
source: sdk
|
||||
version: "0.0.0"
|
||||
flutter_facebook_auth:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: flutter_facebook_auth
|
||||
sha256: fd1a6749dafbd5923585038671b63abdcedd4fe5923eb42fc154247dc5622519
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "6.0.4"
|
||||
flutter_facebook_auth_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_facebook_auth_platform_interface
|
||||
sha256: "86630c4dbba1c20fba26ea9e59ad0d48f5ff59e7373cacd36f916160186f9ce9"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.0"
|
||||
flutter_facebook_auth_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_facebook_auth_web
|
||||
sha256: "0e2960e9e23f2538e29b406495e18b047fbf233abfaed8d2b99acda17a2f7479"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "5.0.1"
|
||||
flutter_lints:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
||||
@@ -68,6 +68,7 @@ dependencies:
|
||||
show_fps: ^1.0.6
|
||||
statsfl: ^2.3.0
|
||||
glass_kit: ^4.0.1
|
||||
flutter_facebook_auth: ^6.0.4
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user