diff --git a/lib/main.dart b/lib/main.dart index 51162b8..95a9fe7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,6 @@ import 'package:flutter/material.dart'; import 'package:adaptive_theme/adaptive_theme.dart'; +import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:learn/pages/about.dart'; import 'package:learn/pages/flowers.dart'; import 'package:learn/pages/modules/atoz.dart'; @@ -11,11 +12,10 @@ import 'package:learn/pages/modules/parts.dart'; import 'package:learn/pages/modules/shapes.dart'; import 'package:learn/pages/modules/solar.dart'; import 'package:learn/utils/routes.dart'; -import 'package:learn/widgets/drawer.dart'; import 'package:learn/pages/modules/colours.dart'; -import 'package:fluttertoast/fluttertoast.dart'; import 'package:learn/widgets/navbar/navbar.dart'; +import 'cubit/index_cubit.dart'; import 'pages/home.dart'; DateTime? currentBackPressTime; diff --git a/lib/pages/home.dart b/lib/pages/home.dart index cb749e3..86b9844 100644 --- a/lib/pages/home.dart +++ b/lib/pages/home.dart @@ -18,6 +18,7 @@ class _MyHomePageState extends State { bool _isImageClicked2 = false; bool _isImageClicked3 = false; bool _isImageClicked4 = false; + bool _isImageClicked5 = false; bool _isDarkTheme = false; Future _onBackPressed() { @@ -262,6 +263,44 @@ class _MyHomePageState extends State { style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), ), const Text("Explore and learn about the colours!"), + const SizedBox(height: 20), + GestureDetector( + onTap: () { + setState(() { + _isImageClicked5 = !_isImageClicked5; + }); + Future.delayed(const Duration(milliseconds: 300), () { + Navigator.pushNamed(context, AllRoutes.flowerRoute); + }); + }, + child: AnimatedContainer( + duration: const Duration(milliseconds: 300), + curve: Curves.easeInOut, + height: _isImageClicked5 ? 325 : 350, + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(12), + border: Border.all(color: Colors.black, width: 2), + boxShadow: [ + BoxShadow( + color: Colors.black.withOpacity(0.2), + spreadRadius: 2, + blurRadius: 5, + offset: const Offset(0, 3), + ), + ], + image: const DecorationImage( + image: AssetImage('assets/images/flowers/flower_banner.jpeg'), + fit: BoxFit.cover, + ), + ), + ), + ), + const SizedBox(height: 20), + const Text( + 'FLOWERS', + style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold), + ), + const Text("Explore beauty of nature flowers."), ], ), ),