From e18c08d91feac6a08d7dd7d806c82c5d20eb85d1 Mon Sep 17 00:00:00 2001 From: poojapandeyx Date: Thu, 4 Jul 2024 18:54:52 +0530 Subject: [PATCH 1/5] facebook change --- .vscode/settings.json | 3 +- android/app/build.gradle | 4 +- android/app/src/main/AndroidManifest.xml | 25 +++- android/app/src/main/res/values/strings.xml | 7 ++ lib/Login/View/loginscreen.dart | 120 ++++++++++++++++---- lib/main.dart | 9 +- pubspec.lock | 24 ++++ pubspec.yaml | 1 + 8 files changed, 165 insertions(+), 28 deletions(-) create mode 100644 android/app/src/main/res/values/strings.xml diff --git a/.vscode/settings.json b/.vscode/settings.json index 3ebdbc0..fe1640e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,4 @@ { - "CodeGPT.apiKey": "CodeGPT Plus Beta" + "CodeGPT.apiKey": "CodeGPT Plus Beta", + "dart.flutterSdkPath": "D:\\pooja\\fluttersdk\\flutter_3.16.9\\flutter" } \ No newline at end of file diff --git a/android/app/build.gradle b/android/app/build.gradle index 54842fa..3b66bba 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -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' + } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 970b96b..9fc0f9d 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,11 @@ + package="com.example.regroup" + xmlns:tools="http://schemas.android.com/tools" + > + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml new file mode 100644 index 0000000..b304a14 --- /dev/null +++ b/android/app/src/main/res/values/strings.xml @@ -0,0 +1,7 @@ + + + ReGroup123 + 8076081959097016 + fb8076081959097016 + ca5a1805872edbec0d3a0a0b02229ba5 + \ No newline at end of file diff --git a/lib/Login/View/loginscreen.dart b/lib/Login/View/loginscreen.dart index 9b83556..106b500 100644 --- a/lib/Login/View/loginscreen.dart +++ b/lib/Login/View/loginscreen.dart @@ -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 { + Map? _userData; + AccessToken? _accessToken; + bool _checking = true; final TextEditingController _email = TextEditingController(); RxBool isObscured = true.obs; final TextEditingController _password = TextEditingController(); // final GlobalKey _form = GlobalKey(); + @override + void initState() { + // TODO: implement initState + // _checkIfisLoggedIn(); + + super.initState(); + } + + _checkIfisLoggedIn() async { + 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 { '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'))), + ), ), ], ), diff --git a/lib/main.dart b/lib/main.dart index 41732c0..0b4cc70 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,8 +18,13 @@ Future main() async { 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())), */ + ); } class MyApp extends StatefulWidget { diff --git a/pubspec.lock b/pubspec.lock index 4e96466..9dac0de 100644 --- a/pubspec.lock +++ b/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: diff --git a/pubspec.yaml b/pubspec.yaml index a6fe0b6..f78c8fe 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -67,6 +67,7 @@ dependencies: glassmorphism_ui: ^0.3.0 show_fps: ^1.0.6 statsfl: ^2.3.0 + flutter_facebook_auth: ^6.0.4 From 807f765d2e77211d24a2551857c60e9ce53a5f5f Mon Sep 17 00:00:00 2001 From: cj201199 Date: Thu, 4 Jul 2024 20:46:08 +0530 Subject: [PATCH 2/5] session tab done. --- .../Main_Screens/CalenderTab/CalenderTab.dart | 1 + .../Main_Screens/Community/Community.dart | 510 +----------------- .../GroupTab/View/GroupDetail.dart | 1 + .../Main_Screens/GroupTab/View/NewPost.dart | 16 +- .../Main_Screens/GroupTab/View/Sessions.dart | 128 ++++- 5 files changed, 135 insertions(+), 521 deletions(-) diff --git a/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart b/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart index 12f1914..5ab912c 100644 --- a/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart +++ b/lib/Feed Module/Main_Screens/CalenderTab/CalenderTab.dart @@ -282,6 +282,7 @@ class _CalenderTabState extends State { allowViewNavigation: true, allowDragAndDrop: true, showDatePickerButton: true, + monthViewSettings: MonthViewSettings( navigationDirection: MonthNavigationDirection.horizontal, ), diff --git a/lib/Feed Module/Main_Screens/Community/Community.dart b/lib/Feed Module/Main_Screens/Community/Community.dart index 758a286..b3a2343 100644 --- a/lib/Feed Module/Main_Screens/Community/Community.dart +++ b/lib/Feed Module/Main_Screens/Community/Community.dart @@ -170,43 +170,19 @@ Widget feedTab() { return SingleChildScrollView( child: Column(children: [ sizedBoxHeight(16.h), - normalcardtile2( + normalcardtile( profileImg: 'assets/images/png/Ellipse 43.png', title: 'Edward Hackket', mainImg: 'assets/images/png/Rectangle 24.png', containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']), sizedBoxHeight(20.h), - // announcecardtile( - // profileImg: 'assets/images/png/Ellipse 48.png', - // title: 'Jocelyn Dokidis', - // mainImg: 'assets/images/png/Rectangle 46.png', - // containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), + announcecardtile( + profileImg: 'assets/images/png/Ellipse 48.png', + title: 'Jocelyn Dokidis', + mainImg: 'assets/images/png/Rectangle 46.png', + containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( + normalcardtile( profileImg: 'assets/images/png/Ellipse 52.png', title: 'Ryan Dorwat', mainImg: 'assets/images/png/Rectangle 25.png', @@ -570,419 +546,6 @@ Widget announcecardtile({ )); } -Widget normalcardtile2({ - required String profileImg, - required String title, - required String mainImg, - required List 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) => [ - 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( - onReactionChanged: (reaction) { - updateImage(reaction?.value ?? 'like'); - debugPrint('Selected value: ${reaction?.value}'); - }, - reactions: ?>[ - Reaction( - value: 'like', - previewIcon: _buildReactionsPreviewIcon( - 'assets/images/png/f7_hand-thumbsup.png'), - icon: _buildReactionsIcon( - 'assets/images/png/f7_hand-thumbsup.png', - ), - ), - Reaction( - value: 'heart', - previewIcon: _buildReactionsPreviewIcon( - 'assets/images/png/heart 2.png'), - icon: _buildReactionsIcon( - 'assets/images/png/heart 2.png'), - ), - Reaction( - value: 'party', - previewIcon: _buildReactionsPreviewIcon( - 'assets/images/png/party-popper 2.png'), - icon: _buildReactionsIcon( - 'assets/images/png/party-popper 2.png'), - ), - ], - selectedReaction: Reaction( - 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, @@ -1367,42 +930,6 @@ Widget containertile({required String text}) { )); } -Widget containertile2({required String text}) { - return GlassContainer( - height: 30, - width: 130, - 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(0xFFD90B2E), - Color(0xFFD90B2E), - ], - ), - elevation: 3.0, - isFrostedGlass: true, - frostedOpacity: 0.12, - borderRadius: BorderRadius.circular(30), - child: Padding( - padding: EdgeInsets.symmetric(horizontal: 10.w), - child: Center(child: text14w400_FCFCFC(text)), - )); -} - Widget popularTab() { return SingleChildScrollView( child: Column( @@ -1432,29 +959,6 @@ Widget popularTab() { 'Events' ]), sizedBoxHeight(20.h), - normalcardtile( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Edward Hackket', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Edward Hackket', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]) ], ), ); diff --git a/lib/Feed Module/Main_Screens/GroupTab/View/GroupDetail.dart b/lib/Feed Module/Main_Screens/GroupTab/View/GroupDetail.dart index be5ff22..c1e53db 100644 --- a/lib/Feed Module/Main_Screens/GroupTab/View/GroupDetail.dart +++ b/lib/Feed Module/Main_Screens/GroupTab/View/GroupDetail.dart @@ -427,6 +427,7 @@ class _GroupDetailState extends State { 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", diff --git a/lib/Feed Module/Main_Screens/GroupTab/View/NewPost.dart b/lib/Feed Module/Main_Screens/GroupTab/View/NewPost.dart index 52de928..acb9d69 100644 --- a/lib/Feed Module/Main_Screens/GroupTab/View/NewPost.dart +++ b/lib/Feed Module/Main_Screens/GroupTab/View/NewPost.dart @@ -207,14 +207,14 @@ class _NewPostState extends State { // 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']), diff --git a/lib/Feed Module/Main_Screens/GroupTab/View/Sessions.dart b/lib/Feed Module/Main_Screens/GroupTab/View/Sessions.dart index b2c7872..13d2fee 100644 --- a/lib/Feed Module/Main_Screens/GroupTab/View/Sessions.dart +++ b/lib/Feed Module/Main_Screens/GroupTab/View/Sessions.dart @@ -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 bannerPath = []; bool isbannerAdded = false; class _SessionsState extends State { + DateTime? _selectedDate; + TimeOfDay? _selectedTime; + String _formattedDateTime = 'Thu, Jan 20 08:00 pm'; + + Future 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 _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 { 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( From babc4418fcca932167a36b094724bd73c341e6b5 Mon Sep 17 00:00:00 2001 From: cj201199 Date: Fri, 5 Jul 2024 14:49:57 +0530 Subject: [PATCH 3/5] new glassUi package added --- .../Main_Screens/Community/Community.dart | 507 +++++++++++++++++- .../Main_Screens/Community/PostScreen.dart | 2 +- .../ProfileTab/Settings/Settings.dart | 3 +- .../sidemenu/Community/Watchlist.dart | 151 +++--- lib/Utils/Common/CommonDropdown.dart | 85 ++- lib/Utils/Common/CustomTextformfield.dart | 1 - 6 files changed, 639 insertions(+), 110 deletions(-) diff --git a/lib/Feed Module/Main_Screens/Community/Community.dart b/lib/Feed Module/Main_Screens/Community/Community.dart index b3a2343..30f6234 100644 --- a/lib/Feed Module/Main_Screens/Community/Community.dart +++ b/lib/Feed Module/Main_Screens/Community/Community.dart @@ -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'; @@ -170,19 +169,43 @@ Widget feedTab() { return SingleChildScrollView( child: Column(children: [ sizedBoxHeight(16.h), - normalcardtile( + normalcardtile2( profileImg: 'assets/images/png/Ellipse 43.png', title: 'Edward Hackket', mainImg: 'assets/images/png/Rectangle 24.png', containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']), sizedBoxHeight(20.h), - announcecardtile( - profileImg: 'assets/images/png/Ellipse 48.png', - title: 'Jocelyn Dokidis', - mainImg: 'assets/images/png/Rectangle 46.png', - containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), + // announcecardtile( + // profileImg: 'assets/images/png/Ellipse 48.png', + // title: 'Jocelyn Dokidis', + // mainImg: 'assets/images/png/Rectangle 46.png', + // containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), sizedBoxHeight(20.h), - normalcardtile( + normalcardtile2( + profileImg: 'assets/images/png/Ellipse 52.png', + title: 'Ryan Dorwat', + mainImg: 'assets/images/png/Rectangle 25.png', + containerTitle: [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ]), + sizedBoxHeight(20.h), + normalcardtile2( + profileImg: 'assets/images/png/Ellipse 52.png', + title: 'Ryan Dorwat', + mainImg: 'assets/images/png/Rectangle 25.png', + containerTitle: [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ]), + sizedBoxHeight(20.h), + normalcardtile2( profileImg: 'assets/images/png/Ellipse 52.png', title: 'Ryan Dorwat', mainImg: 'assets/images/png/Rectangle 25.png', @@ -196,6 +219,414 @@ Widget feedTab() { ])); } +Widget normalcardtile2({ + required String profileImg, + required String title, + required String mainImg, + required List 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) => [ + 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( + onReactionChanged: (reaction) { + updateImage(reaction?.value ?? 'like'); + debugPrint('Selected value: ${reaction?.value}'); + }, + reactions: ?>[ + Reaction( + value: 'like', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/f7_hand-thumbsup.png'), + icon: _buildReactionsIcon( + 'assets/images/png/f7_hand-thumbsup.png', + ), + ), + Reaction( + value: 'heart', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/heart 2.png'), + icon: _buildReactionsIcon( + 'assets/images/png/heart 2.png'), + ), + Reaction( + value: 'party', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/party-popper 2.png'), + icon: _buildReactionsIcon( + 'assets/images/png/party-popper 2.png'), + ), + ], + selectedReaction: Reaction( + 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, @@ -930,6 +1361,40 @@ Widget containertile({required String text}) { )); } +Widget containertile2({required String text}) { + return GlassContainer( + height: 30.h, + width: 130.w, + // opacity: 0.2, + borderRadius: BorderRadius.circular(30), + 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(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)), + )); +} + Widget popularTab() { return SingleChildScrollView( child: Column( @@ -959,6 +1424,30 @@ Widget popularTab() { 'Events' ]), sizedBoxHeight(20.h), + normalcardtile( + profileImg: 'assets/images/png/Ellipse 52.png', + title: 'Edward Hackket', + mainImg: 'assets/images/png/Rectangle 25.png', + containerTitle: [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ]), + sizedBoxHeight(20.h), + normalcardtile( + profileImg: 'assets/images/png/Ellipse 52.png', + title: 'Edward Hackket', + mainImg: 'assets/images/png/Rectangle 25.png', + containerTitle: [ + 'Football', + 'Teams player', + 'Events', + 'Marathon', + 'Events' + ]), + sizedBoxHeight(20.h), ], ), ); diff --git a/lib/Feed Module/Main_Screens/Community/PostScreen.dart b/lib/Feed Module/Main_Screens/Community/PostScreen.dart index 9d047f7..18cbe83 100644 --- a/lib/Feed Module/Main_Screens/Community/PostScreen.dart +++ b/lib/Feed Module/Main_Screens/Community/PostScreen.dart @@ -62,7 +62,7 @@ class _PostScreenState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ sizedBoxHeight(20.h), - + text16w400_FCFCFC("Caption"), sizedBoxHeight(18.h), diff --git a/lib/Feed Module/Main_Screens/ProfileTab/Settings/Settings.dart b/lib/Feed Module/Main_Screens/ProfileTab/Settings/Settings.dart index b31c071..8dfdd7d 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/Settings/Settings.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/Settings/Settings.dart @@ -32,7 +32,8 @@ class _SettingsState extends State { 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( diff --git a/lib/Feed Module/sidemenu/Community/Watchlist.dart b/lib/Feed Module/sidemenu/Community/Watchlist.dart index f49f03d..5063a82 100644 --- a/lib/Feed Module/sidemenu/Community/Watchlist.dart +++ b/lib/Feed Module/sidemenu/Community/Watchlist.dart @@ -65,89 +65,88 @@ class _WatchlistState extends State { : 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, ), ), - ], - ); - }), - ); - }, - ), + ), + ], + ); + }), + ); + }, ), - ], - ), + ), + ], ), ), ]), diff --git a/lib/Utils/Common/CommonDropdown.dart b/lib/Utils/Common/CommonDropdown.dart index d7d02da..91d0d62 100644 --- a/lib/Utils/Common/CommonDropdown.dart +++ b/lib/Utils/Common/CommonDropdown.dart @@ -208,33 +208,73 @@ class _CustomDropDownTag1State extends State { 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 { onDropTap.value = false; textEditingController.text = selectedValue.value; widget.onItemSelected(selectedValue.value); + onDropTap.value = !onDropTap.value; }, child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/Utils/Common/CustomTextformfield.dart b/lib/Utils/Common/CustomTextformfield.dart index 24b617e..a6caef8 100644 --- a/lib/Utils/Common/CustomTextformfield.dart +++ b/lib/Utils/Common/CustomTextformfield.dart @@ -116,7 +116,6 @@ class _CustomTextFormFieldState extends State { enableInteractiveSelection: false, maxLines: widget.maxlines, obscureText: obscureText, - controller: widget.textEditingController, decoration: InputDecoration( hintText: widget.hintText, From 0933f2a8b5bb19d6011c1c86b3fb2d2626f99ac3 Mon Sep 17 00:00:00 2001 From: kishan06 Date: Fri, 5 Jul 2024 15:20:18 +0530 Subject: [PATCH 4/5] signup button dropdown fixes --- ios/Flutter/AppFrameworkInfo.plist | 2 +- ios/Runner.xcodeproj/project.pbxproj | 6 +++--- lib/Utils/Common/CommonDropdown.dart | 10 ++++++---- lib/main.dart | 10 ++++++++-- 4 files changed, 18 insertions(+), 10 deletions(-) diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 9625e10..7c56964 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 1e00913..0577cba 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -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; diff --git a/lib/Utils/Common/CommonDropdown.dart b/lib/Utils/Common/CommonDropdown.dart index d7d02da..67fc4b4 100644 --- a/lib/Utils/Common/CommonDropdown.dart +++ b/lib/Utils/Common/CommonDropdown.dart @@ -494,6 +494,7 @@ class _CustomDropDownRadioState extends State { widget.onItemSelected(item); }, child: Column( + mainAxisAlignment: MainAxisAlignment.start, children: [ Row( children: [ @@ -522,7 +523,7 @@ class _CustomDropDownRadioState extends State { ), ], ), - SizedBox(height: 5.h), + // SizedBox(height: 5.h), if (index != widget.listData.length - 1) Divider(thickness: 1, color: const Color(0xFF434A53)), ], @@ -671,7 +672,7 @@ class _CustomDropDownRadioState extends State { // 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 +688,9 @@ class _CustomDropDownRadioState extends State { ], ), ), - child: ListView( - shrinkWrap: true, + child: Column( + // shrinkWrap: true, + // reverse: true, children: _buildDropdownMenuItems(), ), ), diff --git a/lib/main.dart b/lib/main.dart index 2e52474..6298410 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -18,8 +18,14 @@ Future main() async { SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, - ]).then((value) => runApp(StatsFl( - align: Alignment.center, width: 200, height: 100, child: const MyApp()))); + ]).then((value) => runApp( + + //const MyApp() + StatsFl( + align: Alignment.center, + width: 200, + height: 100, + child: const MyApp()))); } // runApp( From c780c1d0c128457d79ee23206c5f9d47f7881917 Mon Sep 17 00:00:00 2001 From: cj201199 Date: Mon, 8 Jul 2024 11:52:29 +0530 Subject: [PATCH 5/5] glassUi package added to community, profile tab --- lib/Common/CommonBottomNavigationBar.dart | 35 +- lib/Common/CommonGlassmorphism.dart | 66 ++ lib/Common/CommonWidget.dart | 28 +- .../Main_Screens/Community/Community.dart | 914 ++++++++---------- .../Main_Screens/ProfileTab/ProfileTab.dart | 230 ++--- lib/main.dart | 9 +- 6 files changed, 612 insertions(+), 670 deletions(-) diff --git a/lib/Common/CommonBottomNavigationBar.dart b/lib/Common/CommonBottomNavigationBar.dart index 77e29d7..34f5a91 100644 --- a/lib/Common/CommonBottomNavigationBar.dart +++ b/lib/Common/CommonBottomNavigationBar.dart @@ -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), diff --git a/lib/Common/CommonGlassmorphism.dart b/lib/Common/CommonGlassmorphism.dart index f779dd3..0283a55 100644 --- a/lib/Common/CommonGlassmorphism.dart +++ b/lib/Common/CommonGlassmorphism.dart @@ -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); +} diff --git a/lib/Common/CommonWidget.dart b/lib/Common/CommonWidget.dart index 38e2f2a..9a2bf5c 100644 --- a/lib/Common/CommonWidget.dart +++ b/lib/Common/CommonWidget.dart @@ -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)); + ), + )); }), ), ), diff --git a/lib/Feed Module/Main_Screens/Community/Community.dart b/lib/Feed Module/Main_Screens/Community/Community.dart index 30f6234..b250f4e 100644 --- a/lib/Feed Module/Main_Screens/Community/Community.dart +++ b/lib/Feed Module/Main_Screens/Community/Community.dart @@ -175,11 +175,11 @@ Widget feedTab() { mainImg: 'assets/images/png/Rectangle 24.png', containerTitle: ['Cycle', 'Marathon', 'Events', 'Marathon', 'Events']), sizedBoxHeight(20.h), - // announcecardtile( - // profileImg: 'assets/images/png/Ellipse 48.png', - // title: 'Jocelyn Dokidis', - // mainImg: 'assets/images/png/Rectangle 46.png', - // containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), + announcecardtile( + profileImg: 'assets/images/png/Ellipse 48.png', + title: 'Jocelyn Dokidis', + mainImg: 'assets/images/png/Rectangle 46.png', + containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), sizedBoxHeight(20.h), normalcardtile2( profileImg: 'assets/images/png/Ellipse 52.png', @@ -193,29 +193,6 @@ Widget feedTab() { 'Events' ]), sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile2( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Ryan Dorwat', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), ])); } @@ -236,34 +213,12 @@ Widget normalcardtile2({ } } - return GlassContainer( - height: 570.h, + return commonGlassUI( width: double.infinity, + height: 570.h, + mainOpacity: 1, 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( + customWidget: Column( children: [ sizedBoxHeight(25.h), Padding( @@ -438,45 +393,25 @@ Widget normalcardtile2({ 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' - // ]), - // ), + 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, + commonGlassUI( width: 30.w, - opacity: 0.2, + height: 30.h, 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( + mainOpacity: 0.4, + opacity1: 0.5, + opacity2: 0.6, + customWidget: Center( child: Image.asset( 'assets/images/png/Frame 1000004088.png', height: 13.h, @@ -487,34 +422,14 @@ Widget normalcardtile2({ sizedBoxWidth(12.w), text14w400_FCFCFC('20'), sizedBoxWidth(20.w), - GlassContainer( - height: 30.h, + commonGlassUI( width: 30.w, + height: 30.h, 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( + mainOpacity: 0.4, + opacity1: 0.5, + opacity2: 0.6, + customWidget: Center( child: Image.asset( 'assets/images/png/Vector (1).png', height: 12.h, @@ -627,356 +542,6 @@ Widget normalcardtile2({ )); } -Widget announcecardtile({ - required String profileImg, - required String title, - required String mainImg, - required List 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'; - } - } - -// MediaQuery.of(context).size.height - return commonGlassContainerblue( - width: double.infinity, - height: 610.h, - border: 0, - borderradius: 1, - customWidget: Column( - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - sizedBoxHeight(25.h), - Padding( - padding: EdgeInsets.only(left: 16.w), - child: text16w700_FCFCFC("#Announcement"), - ), - 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) => [ - 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: containertile(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(), - commonGlassContainer( - border: 0.43, - width: 30.w, - height: 30.h, - opacity1: 0.05, - opacity2: 0.06, - borderradius: 100, - customWidget: 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), - commonGlassContainer( - border: 0.43, - width: 30.w, - height: 30.h, - borderradius: 100, - opacity1: 0.05, - opacity2: 0.06, - customWidget: 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( - onReactionChanged: (reaction) { - updateImage(reaction?.value ?? 'like'); - debugPrint('Selected value: ${reaction?.value}'); - }, - reactions: ?>[ - Reaction( - value: 'like', - previewIcon: _buildReactionsPreviewIcon( - 'assets/images/png/f7_hand-thumbsup.png'), - icon: _buildReactionsIcon( - 'assets/images/png/f7_hand-thumbsup.png'), - ), - Reaction( - value: 'heart', - previewIcon: _buildReactionsPreviewIcon( - 'assets/images/png/heart 2.png'), - icon: _buildReactionsIcon( - 'assets/images/png/heart 2.png'), - ), - Reaction( - value: 'party', - previewIcon: _buildReactionsPreviewIcon( - 'assets/images/png/party-popper 2.png'), - icon: _buildReactionsIcon( - 'assets/images/png/party-popper 2.png'), - ), - ], - selectedReaction: Reaction( - value: 'like', - icon: _buildReactionsIcon( - 'assets/images/png/f7_hand-thumbsup.png'), - ), - boxColor: Colors.white, - boxElevation: 9, - 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, - - 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, @@ -1323,6 +888,356 @@ Widget normalcardtile({ )); } +Widget announcecardtile({ + required String profileImg, + required String title, + required String mainImg, + required List 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'; + } + } + +// MediaQuery.of(context).size.height + return commonGlassUIBlue( + width: double.infinity, + height: 610.h, + mainOpacity: 1, + borderRadius: BorderRadius.circular(1), + customWidget: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + sizedBoxHeight(25.h), + Padding( + padding: EdgeInsets.only(left: 16.w), + child: text16w700_FCFCFC("#Announcement"), + ), + 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) => [ + 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: containertile(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(), + commonGlassContainer( + border: 0.43, + width: 30.w, + height: 30.h, + opacity1: 0.05, + opacity2: 0.06, + borderradius: 100, + customWidget: 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), + commonGlassContainer( + border: 0.43, + width: 30.w, + height: 30.h, + borderradius: 100, + opacity1: 0.05, + opacity2: 0.06, + customWidget: 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( + onReactionChanged: (reaction) { + updateImage(reaction?.value ?? 'like'); + debugPrint('Selected value: ${reaction?.value}'); + }, + reactions: ?>[ + Reaction( + value: 'like', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/f7_hand-thumbsup.png'), + icon: _buildReactionsIcon( + 'assets/images/png/f7_hand-thumbsup.png'), + ), + Reaction( + value: 'heart', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/heart 2.png'), + icon: _buildReactionsIcon( + 'assets/images/png/heart 2.png'), + ), + Reaction( + value: 'party', + previewIcon: _buildReactionsPreviewIcon( + 'assets/images/png/party-popper 2.png'), + icon: _buildReactionsIcon( + 'assets/images/png/party-popper 2.png'), + ), + ], + selectedReaction: Reaction( + value: 'like', + icon: _buildReactionsIcon( + 'assets/images/png/f7_hand-thumbsup.png'), + ), + boxColor: Colors.white, + boxElevation: 9, + 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, + + 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 _buildReactionsPreviewIcon(String assetPath) { return Padding( padding: const EdgeInsets.all(8.0), @@ -1362,34 +1277,15 @@ Widget containertile({required String text}) { } Widget containertile2({required String text}) { - return GlassContainer( - height: 30.h, + return commonGlassUI( width: 130.w, - // opacity: 0.2, - borderRadius: BorderRadius.circular(30), - 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(0xFFD90B2E)), - // borderGradient: LinearGradient( - // begin: Alignment.topLeft, - // end: Alignment.bottomRight, - // colors: [ - // borderColor, - // borderColor, - // ], - // ), - child: Padding( + height: 30.h, + // mainOpacity: 0.2, + opacity1: 0.5, + opacity2: 0.6, + borderColor: const Color(0xFFD90B2E), + borderRadius: BorderRadius.circular(30.r), + customWidget: Padding( padding: EdgeInsets.symmetric(horizontal: 10.w), child: Center(child: text14w400_FCFCFC(text)), )); @@ -1400,7 +1296,7 @@ Widget popularTab() { child: Column( children: [ sizedBoxHeight(20.h), - normalcardtile( + normalcardtile2( profileImg: 'assets/images/png/Ellipse 43.png', title: 'Edward Hackket', mainImg: 'assets/images/png/Rectangle 24.png', @@ -1412,31 +1308,7 @@ Widget popularTab() { 'Events' ]), sizedBoxHeight(20.h), - normalcardtile( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Edward Hackket', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile( - profileImg: 'assets/images/png/Ellipse 52.png', - title: 'Edward Hackket', - mainImg: 'assets/images/png/Rectangle 25.png', - containerTitle: [ - 'Football', - 'Teams player', - 'Events', - 'Marathon', - 'Events' - ]), - sizedBoxHeight(20.h), - normalcardtile( + normalcardtile2( profileImg: 'assets/images/png/Ellipse 52.png', title: 'Edward Hackket', mainImg: 'assets/images/png/Rectangle 25.png', @@ -1457,7 +1329,7 @@ Widget latestTab() { return SingleChildScrollView( child: Column(children: [ sizedBoxHeight(16.h), - normalcardtile( + normalcardtile2( profileImg: 'assets/images/png/Ellipse 43.png', title: 'Edward Hackket', mainImg: 'assets/images/png/Rectangle 24.png', @@ -1469,7 +1341,7 @@ Widget latestTab() { mainImg: 'assets/images/png/Rectangle 46.png', containerTitle: ['Race', 'Swimming', 'Events', 'Marathon', 'Events']), sizedBoxHeight(20.h), - normalcardtile( + normalcardtile2( profileImg: 'assets/images/png/Ellipse 52.png', title: 'Ryan Dorwat', mainImg: 'assets/images/png/Rectangle 25.png', diff --git a/lib/Feed Module/Main_Screens/ProfileTab/ProfileTab.dart b/lib/Feed Module/Main_Screens/ProfileTab/ProfileTab.dart index 368c7a7..59700f6 100644 --- a/lib/Feed Module/Main_Screens/ProfileTab/ProfileTab.dart +++ b/lib/Feed Module/Main_Screens/ProfileTab/ProfileTab.dart @@ -67,7 +67,8 @@ class _ProfileTabState extends State { 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 { 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 { 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 { 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 { 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 { 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 { '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 { 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 { } 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)), diff --git a/lib/main.dart b/lib/main.dart index e9a7217..4ebc27f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -19,17 +19,16 @@ Future main() async { SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, ]).then( - (value) =>runApp(MyApp()) /* runApp(StatsFl( + (value) => + // runApp(MyApp()) + runApp(StatsFl( align: Alignment.center, width: 200, height: 100, - child: const MyApp())), */ + child: const MyApp())), ); } -// runApp( -// StatsFl( -// align: Alignment.center, width: 200, height: 100, child: const MyApp()))); class MyApp extends StatefulWidget { const MyApp({super.key});