365 lines
11 KiB
Dart
365 lines
11 KiB
Dart
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:regroup/Common/CommonGlassmorphism.dart';
|
|
import 'package:regroup/Feed%20Module/Main_Screens/Community/Community.dart';
|
|
import 'package:regroup/Utils/Common/CommonAppbar.dart';
|
|
import 'package:regroup/Utils/Common/blureffect.dart';
|
|
import 'package:regroup/Utils/Common/sized_box.dart';
|
|
import 'package:regroup/Utils/texts.dart';
|
|
|
|
class CycleScreen extends StatefulWidget {
|
|
const CycleScreen({super.key});
|
|
|
|
@override
|
|
State<CycleScreen> createState() => _CycleScreenState();
|
|
}
|
|
|
|
class _CycleScreenState extends State<CycleScreen> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Scaffold(
|
|
backgroundColor: Color(0xFF222935),
|
|
extendBody: true,
|
|
appBar: CommonAppbar(
|
|
titleTxt: "Cycle",
|
|
customActionWidget: Image.asset(
|
|
"assets/images/png/sidemenu/f7_pin-fill.png",
|
|
height: 26.h,
|
|
width: 26.w,
|
|
)),
|
|
body: Stack(children: [
|
|
const CommonBlurLeftRed(),
|
|
const CommonBlurRightRed(),
|
|
const CommonBlurLeft(),
|
|
const CommonBlurRight(),
|
|
Positioned(
|
|
child: Column(children: [
|
|
sizedBoxHeight(10.h),
|
|
DefaultTabController(
|
|
length: 2,
|
|
// initialIndex: selectedIndex.value,
|
|
child: Column(
|
|
children: [
|
|
CycleTabBar(),
|
|
SizedBox(
|
|
height: 670.h,
|
|
child: TabBarView(
|
|
children: [
|
|
CyclepopularTab(),
|
|
CyclelatestTab(),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
))
|
|
]))
|
|
]));
|
|
}
|
|
}
|
|
|
|
Widget CyclepopularTab() {
|
|
return SingleChildScrollView(
|
|
child: Column(children: [
|
|
normalcardtile(),
|
|
sizedBoxHeight(30.h),
|
|
normalcardtile(),
|
|
]),
|
|
);
|
|
}
|
|
|
|
Widget CyclelatestTab() {
|
|
return SingleChildScrollView(
|
|
child: Column(children: [
|
|
normalcardtile(),
|
|
]),
|
|
);
|
|
}
|
|
|
|
Widget normalcardtile() {
|
|
return Column(
|
|
children: [
|
|
sizedBoxHeight(25.h),
|
|
Padding(
|
|
padding: EdgeInsets.symmetric(horizontal: 16.w),
|
|
child: Row(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
CircleAvatar(
|
|
foregroundImage: AssetImage('assets/images/png/Ellipse 43.png'),
|
|
radius: 25.r,
|
|
),
|
|
sizedBoxWidth(12.w),
|
|
Column(
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
text16w400_FCFCFC('Edward Hackket'),
|
|
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: Color(0xFFFCFCFC),
|
|
size: 4.sp,
|
|
),
|
|
sizedBoxWidth(6.w),
|
|
text12w400_FCFCFC('1 Hour ago'),
|
|
],
|
|
)
|
|
],
|
|
),
|
|
Spacer(),
|
|
Image.asset(
|
|
'assets/images/png/Group 1000004071.png',
|
|
width: 4.w,
|
|
height: 18.h,
|
|
),
|
|
sizedBoxWidth(5.w)
|
|
],
|
|
),
|
|
),
|
|
sizedBoxHeight(20.h),
|
|
Image.asset('assets/images/png/Rectangle 22.png'),
|
|
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: titles.length,
|
|
itemBuilder: (context, index) {
|
|
return Padding(
|
|
padding: EdgeInsets.only(right: 12.w),
|
|
child: containertile(text: titles[index]),
|
|
);
|
|
},
|
|
),
|
|
),
|
|
sizedBoxHeight(20.h),
|
|
text16w400_FCFCFC(
|
|
"Lorem Ipsum has been the industry's standard dummy text ever since the 1500s . . ."),
|
|
Row(children: [
|
|
commonGlassContainer(
|
|
border: 0.9,
|
|
|
|
width: 30.w,
|
|
height: 30.h,
|
|
borderradius: 100,
|
|
customWidget: Center(
|
|
child: ReactionButton<String>(
|
|
itemSize: Size.fromHeight(20),
|
|
onReactionChanged: (Reaction<String>? reaction) {
|
|
debugPrint('Selected value: ${reaction?.value}');
|
|
},
|
|
reactions: <Reaction<String>>[
|
|
Reaction<String>(
|
|
value: 'like',
|
|
icon: Image.asset(
|
|
'assets/images/png/f7_hand-thumbsup.png',
|
|
height: 17.h,
|
|
width: 17.w,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
commonGlassContainer(
|
|
border: 0.9,
|
|
|
|
width: 30.w,
|
|
height: 30.h,
|
|
borderradius: 100,
|
|
customWidget: Center(
|
|
child: ReactionButton<String>(
|
|
itemSize: Size.fromHeight(20),
|
|
onReactionChanged: (Reaction<String>? reaction) {
|
|
debugPrint('Selected value: ${reaction?.value}');
|
|
},
|
|
reactions: <Reaction<String>>[
|
|
Reaction<String>(
|
|
value: 'Favourite',
|
|
icon: Image.asset(
|
|
'assets/images/png/heart 2.png',
|
|
height: 17.h,
|
|
width: 17.w,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
commonGlassContainer(
|
|
border: 0.9,
|
|
|
|
width: 30.w,
|
|
height: 30.h,
|
|
borderradius: 100,
|
|
customWidget: Center(
|
|
child: ReactionButton<String>(
|
|
itemSize: Size.fromHeight(20),
|
|
onReactionChanged: (Reaction<String>? reaction) {
|
|
debugPrint('Selected value: ${reaction?.value}');
|
|
},
|
|
reactions: <Reaction<String>>[
|
|
Reaction<String>(
|
|
value: 'Party',
|
|
icon: Image.asset(
|
|
'assets/images/png/party-popper 2.png',
|
|
height: 17.h,
|
|
width: 17.w,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
sizedBoxWidth(7),
|
|
text14w400_FCFCFC('20'),
|
|
Spacer(),
|
|
commonGlassContainer(
|
|
border: 0.9,
|
|
|
|
width: 30.w,
|
|
height: 30.h,
|
|
borderradius: 100,
|
|
customWidget: Center(
|
|
child: ReactionButton<String>(
|
|
itemSize: Size.fromHeight(20),
|
|
onReactionChanged: (Reaction<String>? reaction) {
|
|
debugPrint('Selected value: ${reaction?.value}');
|
|
},
|
|
reactions: <Reaction<String>>[
|
|
Reaction<String>(
|
|
value: 'message',
|
|
icon: Image.asset(
|
|
'assets/images/png/Vector.png',
|
|
height: 13.h,
|
|
width: 13.w,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
sizedBoxWidth(12.w),
|
|
text14w400_FCFCFC('20'),
|
|
sizedBoxWidth(20.w),
|
|
commonGlassContainer(
|
|
border: 0.9,
|
|
|
|
width: 30.w,
|
|
height: 30.h,
|
|
borderradius: 100,
|
|
customWidget: Center(
|
|
child: ReactionButton<String>(
|
|
itemSize: Size.fromHeight(20),
|
|
onReactionChanged: (Reaction<String>? reaction) {
|
|
debugPrint('Selected value: ${reaction?.value}');
|
|
},
|
|
reactions: <Reaction<String>>[
|
|
Reaction<String>(
|
|
value: 'message',
|
|
icon: Image.asset(
|
|
'assets/images/png/Vector (1).png',
|
|
height: 12.h,
|
|
width: 12.w,
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
),
|
|
sizedBoxWidth(12.w),
|
|
text14w400_FCFCFC('10'),
|
|
]),
|
|
sizedBoxHeight(30.h),
|
|
Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceAround,
|
|
children: [
|
|
Column(
|
|
children: [
|
|
GestureDetector(
|
|
onTap: () {},
|
|
child: Image.asset(
|
|
'assets/images/png/uiw_like-o.png',
|
|
height: 19.h,
|
|
width: 19.w,
|
|
),
|
|
),
|
|
sizedBoxHeight(8.h),
|
|
text11w400_FCFCFC('Like')
|
|
],
|
|
),
|
|
Column(
|
|
children: [
|
|
Image.asset(
|
|
'assets/images/png/Vector.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')
|
|
],
|
|
)
|
|
],
|
|
)
|
|
]),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
|
|
class CycleTabBar extends StatelessWidget {
|
|
// Set the desired height
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return TabBar(
|
|
dividerColor: Color(0xFFFFFFFF).withOpacity(0.07),
|
|
labelStyle: TextStyle(
|
|
fontSize: 14.sp,
|
|
color: Color(0xFFFCFCFC),
|
|
fontWeight: FontWeight.w400,
|
|
fontFamily: 'Helvetica'),
|
|
indicatorSize: TabBarIndicatorSize.tab,
|
|
indicatorColor: const Color(0xFFD90B2E),
|
|
// labelColor: Colors.white,
|
|
indicatorWeight: 2.h,
|
|
dividerHeight: 2.h,
|
|
unselectedLabelColor: Color(0xFFFCFCFC),
|
|
overlayColor: MaterialStateProperty.all(const Color(0xFFD90B2E)),
|
|
tabs: const [
|
|
Tab(
|
|
text: 'Popular',
|
|
),
|
|
Tab(
|
|
text: 'Latest',
|
|
),
|
|
]);
|
|
}
|
|
}
|