Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CarouselOverLay extends StatelessWidget {
- final CarouselController carouselController;
- const CarouselOverLay({
- super.key,
- required this.carouselController,
- });
- @override
- Widget build(BuildContext context) {
- TextTheme textTheme = Theme.of(context).textTheme;
- // ignore: unused_local_variable
- ColorScheme colorScheme = Theme.of(context).colorScheme;
- HabitCategoryData habitCategoryData =
- Provider.of<HabitCategoryProvider>(context).habitCategoryData;
- return Row(
- crossAxisAlignment: CrossAxisAlignment.end,
- mainAxisSize: MainAxisSize.max,
- mainAxisAlignment: MainAxisAlignment.spaceBetween,
- children: [
- Row(
- mainAxisSize: MainAxisSize.min,
- crossAxisAlignment: CrossAxisAlignment.end,
- children: [
- InkWell(
- onTap: carouselController.previousPage,
- child: Container(
- padding: const EdgeInsets.symmetric(
- horizontal: 8,
- vertical: 12,
- ),
- alignment: Alignment.center,
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- color: Colors.white.withOpacity(0.7),
- ),
- child: const Icon(
- Icons.arrow_back_ios_rounded,
- ),
- ),
- ),
- Padding(
- padding: const EdgeInsets.symmetric(horizontal: 8.0),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Material(
- color: Colors.white.withOpacity(0.7),
- borderRadius: const BorderRadius.all(Radius.circular(8)),
- child: Padding(
- padding: const EdgeInsets.symmetric(horizontal: 8.0),
- child: Text(
- "New Habit",
- style: textTheme.bodyLarge!
- .copyWith(fontWeight: FontWeight.bold),
- ),
- ),
- ),
- const SizedBox(
- height: 4,
- ),
- Material(
- color: Colors.white.withOpacity(0.7),
- borderRadius: const BorderRadius.all(Radius.circular(12)),
- child: Padding(
- padding: const EdgeInsets.all(4.0),
- child: Text(
- habitCategoryData.title,
- style: textTheme.headlineSmall,
- ),
- ),
- ),
- ],
- ),
- ),
- ],
- ),
- InkWell(
- onTap: carouselController.nextPage,
- child: Container(
- padding: const EdgeInsets.symmetric(
- horizontal: 8,
- vertical: 10,
- ),
- alignment: Alignment.center,
- decoration: BoxDecoration(
- shape: BoxShape.circle,
- color: Colors.white.withOpacity(0.7),
- ),
- child: const Icon(
- Icons.arrow_forward_ios_rounded,
- ),
- ),
- ),
- ],
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement