CARVIEW |
Select Language
HTTP/2 200
date: Sun, 12 Oct 2025 09:45:13 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=6bc1882f6482cb8251821c1be27fafcd58cc069bbef2970cfdfc0349bde4f1cfa%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22TAJen6oSGGvpWeRENoDaiVxixEGUVqhQ%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d5a9c3cd17c537-BLR
CarouselWidget - Pastebin.com
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CarouselWidget extends StatefulWidget {
- const CarouselWidget({super.key});
- @override
- State<CarouselWidget> createState() => _CarouselWidgetState();
- }
- class _CarouselWidgetState extends State<CarouselWidget> {
- CarouselController carouselController = CarouselController();
- @override
- Widget build(BuildContext context) {
- Size size = MediaQuery.sizeOf(context);
- double height = size.height;
- double width = size.width;
- HabitCategoryData habitCategoryData =
- Provider.of<HabitCategoryProvider>(context).habitCategoryData;
- List<HabitCategoryData> habitCategoryDataList =
- habitCategoryDataMap.values.toList();
- int newIndex = habitCategoryDataList.indexOf(habitCategoryData);
- return Column(
- children: [
- RepaintBoundary(
- child: SizedBox(
- height: height * 0.24,
- width: width,
- child: Stack(
- alignment: Alignment.center,
- children: [
- Positioned.fill(
- child: CarouselSlider.builder(
- carouselController: carouselController,
- itemCount: habitCategoryDataMap.length,
- itemBuilder: (context, index, realIndex) {
- return CategoryCard(
- habitCategoryData: habitCategoryDataList[index]);
- },
- options: CarouselOptions(
- initialPage: newIndex,
- enlargeCenterPage: true,
- autoPlay: false,
- viewportFraction: 0.6,
- onPageChanged: (index, reason) {
- HabitCategoryData newHabitCategoryData =
- habitCategoryDataList[index];
- Provider.of<HabitCategoryProvider>(context,
- listen: false)
- .setHabitVariables(newHabitCategoryData);
- Provider.of<HabitCategoryProvider>(context,
- listen: false)
- .clearSelectedItemsList();
- },
- ),
- ),
- ),
- Positioned(
- left: 12,
- //bottom: height * 0.25 / 2,
- child: Container(
- alignment: Alignment.center,
- height: (height * 0.24) * (1 / 4),
- decoration: BoxDecoration(
- color: Colors.white.withOpacity(0.7),
- borderRadius: BorderRadius.circular(12),
- ),
- child: IconButton(
- onPressed: carouselController.previousPage,
- icon: const Icon(Icons.arrow_back_ios_rounded),
- ),
- ),
- ),
- Positioned(
- right: 12,
- //bottom: height * 0.25 / 2,
- child: Container(
- alignment: Alignment.center,
- height: (height * 0.24) * (1 / 4),
- decoration: BoxDecoration(
- color: Colors.white.withOpacity(0.7),
- borderRadius: BorderRadius.circular(12),
- ),
- child: IconButton(
- onPressed: carouselController.nextPage,
- icon: const Icon(Icons.arrow_forward_ios_rounded),
- ),
- ),
- ),
- ],
- ),
- ),
- ),
- const SizedBox(
- height: 8,
- ),
- Text(
- habitCategoryData.title,
- style: Theme.of(context).textTheme.bodyLarge,
- ),
- ],
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
-
📌 Swapzone +37% glitch ⭐ P
JavaScript | 1 sec ago | 0.25 KB
-
⭐⭐⭐Profit Method⭐⭐
Java | 2 sec ago | 0.10 KB
-
✅ Make $2500 in 20 minutes⭐⭐⭐ V
JavaScript | 5 sec ago | 0.25 KB
-
✅⭐ Make huge profits on trading ⭐⭐ R
JavaScript | 10 sec ago | 0.25 KB
-
⭐⭐⭐MAKE $1000 INSTANTLY⭐⭐
Java | 13 sec ago | 0.10 KB
-
📌 Swapzone +37% glitch ⭐ P
JavaScript | 14 sec ago | 0.25 KB
-
⭐✅ Marketplace Glitch ✅ Working ✅ NEVER SEEN...
JavaScript | 19 sec ago | 0.25 KB
-
✅⭐ Make huge profits on trading ⭐⭐ 2
JavaScript | 24 sec ago | 0.25 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand