Files
Regroup/lib/Feed Module/Main_Screens/ExploreDesign/DetailExplore.dart
2024-07-29 15:20:19 +05:30

196 lines
5.7 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:get/get.dart';
import 'package:regroup/Common/CommonGlassmorphism.dart';
import 'package:regroup/Common/CommonTabBar.dart';
import 'package:regroup/Common/CommonWidget.dart';
import 'package:regroup/Common/controller/CommonTextFormField.dart';
import 'package:regroup/Utils/Common/sized_box.dart';
import 'package:regroup/Utils/texts.dart';
class DetailExplore extends StatefulWidget {
const DetailExplore({super.key});
@override
State<DetailExplore> createState() => _DetailExploreState();
}
class _DetailExploreState extends State<DetailExplore> {
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: const Color(0xFF222935),
extendBody: true,
resizeToAvoidBottomInset: false,
body: SafeArea(
child: Stack(children: [
Container(
decoration: const BoxDecoration(
image: DecorationImage(
image: AssetImage("assets/images/png/Ellipse 1496.png"),
fit: BoxFit.fill)),
), Column(children: [
sizedBoxHeight(20.h),
commonDivider(),
sizedBoxHeight(20.h),
Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Row(
children: [
GestureDetector(
onTap: () {
Get.back();
},
child: commonGlassContainer(
width: 40.w,
height: 40.h,
borderradius: 100,
customWidget: const Center(
child: Icon(
Icons.arrow_back,
color: Colors.white,
)),
border: 1,
borderColor: const Color(0xFF55434F)),
),
sizedBoxWidth(12.w),
Expanded(
child: CustomTextFormField(
leadingIcon: SizedBox(
height: 23,
width: 23,
child: Center(
child: Image.asset(
"assets/images/png/ion_search-outline.png",
height: 23,
width: 23,
),
),
),
hintText: "",
),
),
],
),
),
sizedBoxHeight(30.h),
Expanded(
child: DefaultTabController(
length: 4,
// initialIndex: selectedIndex.value,
child: Column(children: [
const CommonTabBar(tabs: [
Tab(
text: 'All',
),
Tab(
text: 'Events',
),
Tab(
text: 'Groups',
),
Tab(
text: 'Communities',
),
]),
Expanded(
child: TabBarView(
children: [
allTab(),
eventsTab(),
groupsTab(),
communitiesTab(),
],
),
),
])),
)
])
])));
}
Widget allTab() {
List alldata = [
{
"imagePath": "assets/images/png/notification1.png",
"title": "Kartikey gautam"
},
{
"imagePath": "assets/images/png/notification2.png",
"title": "Kartikey gautam"
},
{
"imagePath": "assets/images/png/notification1.png",
"title": "Kartikey gautam"
},
];
return Padding(
padding: EdgeInsets.symmetric(horizontal: 16.w),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
sizedBoxHeight(30.h),
text16w700_FCFCFC("People"),
sizedBoxHeight(16.h),
ListView.builder(
shrinkWrap: true,
itemCount: alldata.length,
itemBuilder: (context, index) {
return Column(
children: [
rowTile(
imagePath: alldata[index]["imagePath"],
title: alldata[index]["title"]),
if (index != alldata.length - 1) commonDivider()
],
);
},
)
],
),
);
}
Widget rowTile({required String imagePath, required String title}) {
return Padding(
padding: EdgeInsets.symmetric(
vertical: 16.h,
),
child: Row(
children: [
Container(
height: 30.h,
width: 30.w,
decoration: BoxDecoration(
border: Border.all(color: const Color(0xFF434A53), width: 0.5.w),
shape: BoxShape.circle,
),
child: Center(child: Image.asset(imagePath, fit: BoxFit.fill)),
),
sizedBoxWidth(12.w),
text16400white(title),
],
),
);
}
Widget eventsTab() {
return const Column(
children: [],
);
}
Widget groupsTab() {
return const Column(
children: [],
);
}
Widget communitiesTab() {
return const Column(
children: [],
);
}
}