@@ -12,33 +12,36 @@ class MainApp extends StatelessWidget {
12
12
Widget build (BuildContext context) {
13
13
return MaterialApp (
14
14
home: Scaffold (
15
- body: Center (
16
- child: SizedBox (
17
- height: 400 ,
18
- width: 300 ,
19
- child: ProductCard (
20
- imageUrl:
21
- 'https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcQndSK7hvssofrM2uzv75NxVjrkAwH3RwyqWcBesUsmq1ipmkuljRr6x_SRbCKaBXvjTR9CKfAaEFtmUFw-69o52wgVMgk2hp8KDYr4FvKtQ8ZfKewgOW4gDQ&usqp=CAE' ,
22
- categoryName: 'Pants' ,
23
- productName: 'Men Linen Pants' ,
24
- price: 199.99 ,
25
- currency: '\$ ' , // Default is '$'
26
- onTap: () {
27
- // Handle card tap event
28
- },
29
- onFavoritePressed: () {
30
- // Handle favorite button press
31
- },
32
- shortDescription:
33
- 'comfortable & airy.' , // Optional short description
34
- rating: 4.2 , // Optional rating
35
- discountPercentage: 35.0 , // Optional discount percentage
36
- isAvailable: true , // Optional availability status
37
- cardColor: Colors .white, // Optional card background color
38
- textColor: Colors .black, // Optional text color
39
- borderRadius: 8.0 , // Optional border radius
15
+ body: Row (
16
+ mainAxisAlignment: MainAxisAlignment .center,
17
+ children: [
18
+ Center (
19
+ child: ProductCard (
20
+ imageUrl:
21
+ 'https://encrypted-tbn3.gstatic.com/shopping?q=tbn:ANd9GcQndSK7hvssofrM2uzv75NxVjrkAwH3RwyqWcBesUsmq1ipmkuljRr6x_SRbCKaBXvjTR9CKfAaEFtmUFw-69o52wgVMgk2hp8KDYr4FvKtQ8ZfKewgOW4gDQ&usqp=CAE' ,
22
+ categoryName: 'Pants' ,
23
+ productName: 'Men Linen Pants' ,
24
+ price: 199.99 ,
25
+ currency: '\$ ' , // Default is '$'
26
+ onTap: () {
27
+ // Handle card tap event
28
+ },
29
+ onFavoritePressed: () {
30
+ // Handle favorite button press
31
+ },
32
+ shortDescription:
33
+ 'comfortable & airy.' , // Optional short description
34
+ rating: 4.2 , // Optional rating
35
+ discountPercentage: 35.0 , // Optional discount percentage
36
+ isAvailable: true , // Optional availability status
37
+ cardColor: Colors .white, // Optional card background color
38
+ textColor: Colors .black, // Optional text color
39
+ borderRadius: 8.0 , // Optional border radius
40
+ width: 300 , // optional
41
+ height: 380 , // optional
42
+ ),
40
43
),
41
- ) ,
44
+ ] ,
42
45
),
43
46
),
44
47
);
0 commit comments