Merge pull request 'Development' (#9) from Development into main

Reviewed-on: #9
This commit is contained in:
2024-07-08 06:27:42 +00:00
24 changed files with 1060 additions and 836 deletions

View File

@@ -1,3 +1,4 @@
{
"CodeGPT.apiKey": "CodeGPT Plus Beta"
"CodeGPT.apiKey": "CodeGPT Plus Beta",
"dart.flutterSdkPath": "D:\\pooja\\fluttersdk\\flutter_3.16.9\\flutter"
}

View File

@@ -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'
}

View File

@@ -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>

View 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>

View File

@@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>

View File

@@ -375,7 +375,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = A89AY6VY4F;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@@ -508,7 +508,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = A89AY6VY4F;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
@@ -535,7 +535,7 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
CURRENT_PROJECT_VERSION = 8;
DEVELOPMENT_TEAM = A89AY6VY4F;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;

View File

@@ -2,35 +2,30 @@ import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:glassmorphism/glassmorphism.dart';
import 'package:glassmorphism_ui/glassmorphism_ui.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/controller/MainController.dart';
GlassmorphicContainer bottomnavigationbar(MainController _mainController) {
return GlassmorphicContainer(
GlassContainer bottomnavigationbar(MainController _mainController) {
return GlassContainer(
width: double.infinity,
height: 100.h,
borderRadius: 2,
height: 100,
borderRadius: BorderRadius.circular(2),
blur: 6,
alignment: Alignment.center,
border: 0,
linearGradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.white.withOpacity(0.04),
const Color(0xFFFFFFFF).withOpacity(0.05),
],
stops: const [
0.1,
1,
]),
borderGradient: const LinearGradient(
opacity: 0.2,
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Colors.transparent,
Colors.transparent,
Color(0xFFFFFFFF).withOpacity(0.4),
const Color(0xFFFFFFFF).withOpacity(0.5),
],
stops: const [
0.1,
1,
],
),
border: Border.all(color: const Color(0xff434A53)),
child: BottomNavigationBar(
type: BottomNavigationBarType.fixed,
backgroundColor: const Color(0xFFFFFFFF).withOpacity(0),

View File

@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:glassmorphism/glassmorphism.dart';
import 'package:glassmorphism_ui/glassmorphism_ui.dart';
Widget commonGlassContainer({
required double width,
@@ -78,3 +79,68 @@ Widget commonGlassContainerblue({
),
child: customWidget);
}
Widget commonGlassUIBlue({
required double width,
required double height,
required Widget customWidget,
// required double border,
double mainOpacity = 0.05,
Color borderColor = const Color(0xff434A53),
required BorderRadius? borderRadius,
}) {
return GlassContainer(
width: width,
height: height,
borderRadius: borderRadius,
blur: 6,
opacity: mainOpacity,
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFF009DAB).withOpacity(0.48),
Color(0xFF009DAB).withOpacity(0.12),
],
stops: const [
0.1,
1,
],
),
border: Border.all(color: borderColor),
child: customWidget);
}
Widget commonGlassUI({
required double width,
required double height,
// required double border,
double mainOpacity = 1,
double opacity1 = 0.04,
double opacity2 = 0.05,
Color borderColor = const Color(0xff434A53),
double borderwidth = 1.0,
required BorderRadius? borderRadius,
required Widget customWidget,
}) {
return GlassContainer(
width: width,
height: height,
borderRadius: borderRadius,
blur: 6,
opacity: mainOpacity,
gradient: LinearGradient(
begin: Alignment.topLeft,
end: Alignment.bottomRight,
colors: [
Color(0xFFFFFFFF).withOpacity(opacity1),
const Color(0xFFFFFFFF).withOpacity(opacity2),
],
stops: const [
0.1,
1,
],
),
border: Border.all(color: borderColor, width: borderwidth),
child: customWidget);
}

View File

@@ -312,20 +312,22 @@ Widget stackReaction({
return Positioned(
top: 6.h,
left: index * 23.w,
child: commonGlassContainer(
width: 30.w,
height: 30.h,
borderradius: 100,
opacity1: 0.05,
opacity2: 0.06,
customWidget: Center(
child: Image.asset(
containerImages[index],
height: 18.h,
width: 18.w,
),
child: commonGlassUI(
width: 30.w,
height: 30.h,
mainOpacity: 1,
opacity1: 0.05,
opacity2: 0.06,
borderRadius: BorderRadius.circular(100),
customWidget: Center(
child: Image.asset(
containerImages[index],
height: 18.h,
width: 18.w,
),
border: 1.71));
),
));
}),
),
),

View File

@@ -282,6 +282,7 @@ class _CalenderTabState extends State<CalenderTab> {
allowViewNavigation: true,
allowDragAndDrop: true,
showDatePickerButton: true,
monthViewSettings: MonthViewSettings(
navigationDirection: MonthNavigationDirection.horizontal,
),

File diff suppressed because it is too large Load Diff

View File

@@ -62,7 +62,7 @@ class _PostScreenState extends State<PostScreen> {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(20.h),
text16w400_FCFCFC("Caption"),
sizedBoxHeight(18.h),

View File

@@ -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",

View File

@@ -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']),

View File

@@ -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(

View File

@@ -67,7 +67,8 @@ class _ProfileTabState extends State<ProfileTab> {
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)),
),
SafeArea(
child: SingleChildScrollView(
@@ -232,16 +233,18 @@ class _ProfileTabState extends State<ProfileTab> {
onTap: () {
Get.toNamed(RouteName.shareProfile);
},
child: commonGlassContainer(
child: commonGlassUI(
width: 170.w,
height: 40.h,
opacity1: 0.05,
opacity2: 0.07,
borderradius: 30.r,
borderRadius: BorderRadius.circular(30.r),
mainOpacity: 1,
customWidget: Center(
child: text16w400_FCFCFC("Share profile"),
),
border: 1,
// border: 1,
),
)
],
@@ -254,19 +257,20 @@ class _ProfileTabState extends State<ProfileTab> {
sizedBoxHeight(25.h),
Row(
children: [
commonGlassContainer(
commonGlassUI(
width: 25.w,
height: 25.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100,
mainOpacity: 1,
borderRadius: BorderRadius.circular(100),
customWidget: Center(
child: Image.asset(
"assets/images/png/Group 58645.png",
height: 12.h,
width: 12.w,
)),
border: 0.5),
borderwidth: 0.5),
sizedBoxWidth(12.w),
text14400whiteblur(
"Elm street london, United Kingdom"),
@@ -275,75 +279,78 @@ class _ProfileTabState extends State<ProfileTab> {
sizedBoxHeight(20.h),
Row(
children: [
commonGlassContainer(
width: 25.w,
height: 25.h,
opacity1: 0.24,
opacity2: 0.24,
borderradius: 100,
customWidget: Center(
child: Image.asset(
"assets/images/png/Vector (4).png",
height: 12.h,
width: 12.w,
)),
border: 0.5),
commonGlassUI(
width: 25.w,
height: 25.h,
opacity1: 0.24,
opacity2: 0.24,
mainOpacity: 1,
borderRadius: BorderRadius.circular(100),
borderwidth: 0.5,
customWidget: Center(
child: Image.asset(
"assets/images/png/Vector (4).png",
height: 12.h,
width: 12.w,
)),
),
sizedBoxWidth(12.w),
text14400whiteblur("Rowing, Football, Swimming"),
],
),
sizedBoxHeight(30.h),
commonGlassContainer(
width: double.infinity,
height: 135.h,
borderradius: 10,
customWidget: Padding(
padding: EdgeInsets.symmetric(
vertical: 12.h, horizontal: 16.w),
child: Column(
children: [
Row(
children: [
text16w700white("Badges"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.badges);
},
child: text12400white("View more"))
],
),
sizedBoxHeight(8.h),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
],
),
],
),
commonGlassUI(
width: double.infinity,
height: 135.h,
borderRadius: BorderRadius.circular(10),
customWidget: Padding(
padding: EdgeInsets.symmetric(
vertical: 12.h, horizontal: 16.w),
child: Column(
children: [
Row(
children: [
text16w700white("Badges"),
Spacer(),
GestureDetector(
onTap: () {
Get.toNamed(RouteName.badges);
},
child: text12400white("View more"))
],
),
sizedBoxHeight(8.h),
Row(
mainAxisAlignment:
MainAxisAlignment.spaceBetween,
children: [
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
Image.asset(
"assets/images/png/Frame 1000004056.png",
height: 70.h,
width: 74.w,
),
],
),
],
),
border: 1),
),
// border: 1
),
sizedBoxHeight(40.h),
],
),
@@ -429,13 +436,13 @@ class _ProfileTabState extends State<ProfileTab> {
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
commonGlassContainer(
border: 0.5,
commonGlassUI(
width: 40.w,
height: 40.h,
borderradius: 100,
opacity1: 0.5,
opacity2: 0.4,
borderwidth: 0.5,
borderRadius: BorderRadius.circular(100.r),
customWidget: Center(
child: Image.asset(
'assets/images/png/ph_arrow-up-thin.png',
@@ -507,36 +514,37 @@ class _ProfileTabState extends State<ProfileTab> {
Expanded(
child: Column(
children: [
commonGlassContainer(
width: double.infinity,
height: 145.h,
borderradius: 10.r,
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
CircleAvatar(
radius: 10.r,
backgroundImage: AssetImage(imagePath),
),
sizedBoxWidth(8.w),
text14700white(title)
],
),
sizedBoxHeight(10.h),
text12700white("Team captain"),
sizedBoxHeight(8.h),
text12400white("April 2023 - May 2024"),
sizedBoxHeight(10.h),
text10400whiteblur(
"Lorem Ipsum is simply dummy text of the printing and typesetting industry.")
],
),
commonGlassUI(
width: double.infinity,
height: 145.h,
borderRadius: BorderRadius.circular(10.r),
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
CircleAvatar(
radius: 10.r,
backgroundImage: AssetImage(imagePath),
),
sizedBoxWidth(8.w),
text14700white(title)
],
),
sizedBoxHeight(10.h),
text12700white("Team captain"),
sizedBoxHeight(8.h),
text12400white("April 2023 - May 2024"),
sizedBoxHeight(10.h),
text10400whiteblur(
"Lorem Ipsum is simply dummy text of the printing and typesetting industry.")
],
),
border: 1),
),
// border: 1
),
],
),
),
@@ -741,13 +749,13 @@ class _ProfileTabState extends State<ProfileTab> {
'assets/images/png/party-popper 2.png'
]),
Spacer(),
commonGlassContainer(
border: 0.43,
commonGlassUI(
width: 30.w,
height: 30.h,
opacity1: 0.05,
opacity2: 0.06,
borderradius: 100,
borderwidth: 0.43,
borderRadius: BorderRadius.circular(100),
customWidget: Center(
child: Image.asset(
'assets/images/png/Frame 1000004088.png',
@@ -759,13 +767,13 @@ class _ProfileTabState extends State<ProfileTab> {
sizedBoxWidth(12.w),
text14w400_FCFCFC('20'),
sizedBoxWidth(20.w),
commonGlassContainer(
border: 0.43,
commonGlassUI(
width: 30.w,
height: 30.h,
borderradius: 100,
opacity1: 0.05,
opacity2: 0.06,
borderwidth: 0.43,
borderRadius: BorderRadius.circular(100),
customWidget: Center(
child: Image.asset(
'assets/images/png/Vector (1).png',
@@ -896,12 +904,12 @@ class _ProfileTabState extends State<ProfileTab> {
}
Widget containertile({required String text}) {
return commonGlassContainer(
border: 0.9,
return commonGlassUI(
width: 100.w,
height: 30.h,
borderradius: 30.r,
borderColor: Color(0xFFD90B2E),
borderwidth: 0.9,
borderRadius: BorderRadius.circular(30.r),
customWidget: Padding(
padding: EdgeInsets.symmetric(horizontal: 10.w),
child: Center(child: text14w400_FCFCFC(text)),

View File

@@ -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(

View File

@@ -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,
),
),
],
);
}),
);
},
),
),
],
);
}),
);
},
),
],
),
),
],
),
),
]),

View File

@@ -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'))),
),
),
],
),

View File

@@ -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,
@@ -494,6 +535,7 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
widget.onItemSelected(item);
},
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Row(
children: [
@@ -522,7 +564,7 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
),
],
),
SizedBox(height: 5.h),
// SizedBox(height: 5.h),
if (index != widget.listData.length - 1)
Divider(thickness: 1, color: const Color(0xFF434A53)),
],
@@ -671,7 +713,7 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
// thumbVisibility: true,
child: Container(
width: double.infinity,
height: widget.listData.length > 4 ? 250.h : null,
//height: widget.listData.length > 4 ? 250.h : null,
decoration: BoxDecoration(
color: Color(0xFFFFFFFF).withOpacity(0.10),
borderRadius: BorderRadius.vertical(
@@ -687,8 +729,9 @@ class _CustomDropDownRadioState extends State<CustomDropDownRadio> {
],
),
),
child: ListView(
shrinkWrap: true,
child: Column(
// shrinkWrap: true,
// reverse: true,
children: _buildDropdownMenuItems(),
),
),

View File

@@ -116,7 +116,6 @@ class _CustomTextFormFieldState extends State<CustomTextFormField> {
enableInteractiveSelection: false,
maxLines: widget.maxlines,
obscureText: obscureText,
controller: widget.textEditingController,
decoration: InputDecoration(
hintText: widget.hintText,

View File

@@ -16,15 +16,19 @@ import 'package:statsfl/statsfl.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setPreferredOrientations([
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
]).then((value) => runApp(StatsFl(
align: Alignment.center, width: 200, height: 100, child: const MyApp())));
]).then(
(value) =>
// runApp(MyApp())
runApp(StatsFl(
align: Alignment.center,
width: 200,
height: 100,
child: const MyApp())),
);
}
// runApp(
// StatsFl(
// align: Alignment.center, width: 200, height: 100, child: const MyApp())));
class MyApp extends StatefulWidget {
const MyApp({super.key});

View File

@@ -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:

View File

@@ -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