Skip to content

Commit

Permalink
Animation Updated
Browse files Browse the repository at this point in the history
  • Loading branch information
Aditya-Thakur-369 committed Dec 26, 2023
1 parent 027c236 commit b07e7cf
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 7 additions & 3 deletions lib/screens/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ class _HomePageState extends State<HomePage> {
height: MediaQuery.of(context).size.height * 0.4 - 30,
width: double.infinity,
child: ListView.builder(
physics: BouncingScrollPhysics(),
scrollDirection: Axis.horizontal,
itemCount: ProductList().product.length,
itemBuilder: (context, index) {
Expand Down Expand Up @@ -279,9 +280,12 @@ class _HomePageState extends State<HomePage> {
),
SizedBox(
height: 200,
child: Image.asset(
data.image,
scale: 0.2,
child: Hero(
tag: data.name,
child: Image.asset(
data.image,
scale: 0.2,
),
),
),
],
Expand Down
10 changes: 5 additions & 5 deletions lib/screens/product_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class _ProductPageState extends State<ProductPage> {
Colors.deepPurple,
Colors.pink
];
int selectedphoto = 0;
int selectedphoto = 0;
List<String> images = [
'assets/product/shoe_thumb_1.png',
'assets/product/shoe_thumb_3.png',
Expand Down Expand Up @@ -141,7 +141,9 @@ class _ProductPageState extends State<ProductPage> {
SizedBox(
height: 250,
width: double.infinity,
child: Image.asset(selectedphotoname),
child: Hero(
tag: data.image,
child: Image.asset(selectedphotoname)),
),
],
),
Expand Down Expand Up @@ -361,9 +363,7 @@ class _ProductPageState extends State<ProductPage> {
width: 2)),
child: Container(
decoration: BoxDecoration(
color: index == selectedcolor
? MyColors().mainColor
: data,
color: data,
borderRadius:
BorderRadius.circular(40)),
child: index == selectedcolor
Expand Down

0 comments on commit b07e7cf

Please sign in to comment.