0% found this document useful (0 votes)
30 views5 pages

Flutter Text Style in Product Details

The document contains a Flutter widget implementation for a product detail screen, including an app bar with a back button and a notification icon. It features a product card displaying an image, title, and subtitle, along with options to select sizes and a button to add the product to the cart. The layout is designed for scrolling and includes price information and user reviews.

Uploaded by

solankisatyraj84
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views5 pages

Flutter Text Style in Product Details

The document contains a Flutter widget implementation for a product detail screen, including an app bar with a back button and a notification icon. It features a product card displaying an image, title, and subtitle, along with options to select sizes and a button to add the product to the cart. The layout is designed for scrolling and includes price information and user reviews.

Uploaded by

solankisatyraj84
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

import 'package:flutter/material.

dart';

class ScreenTwo extends StatelessWidget {


const ScreenTwo({[Link]});

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
leading: Padding(
padding: [Link](top: 10),
child: IconButton(
icon: Icon(Icons.arrow_back,size: 35,),
onPressed: () {
[Link](context);
},
),
),
title: Padding(
padding: [Link](top: 17),
child: Center(child: Text('Details',style: TextStyle(fontSize:
30,fontWeight: [Link]),)),
),
actions: [
Padding(
padding:[Link](top: 10),
child: IconButton(
icon: Icon(Icons.notifications_none_sharp,size:37,),
onPressed: () {},
),
),
],
),
body: SingleChildScrollView(
scrollDirection: [Link],
child: Column(
// mainAxisAlignment: [Link],
crossAxisAlignment: [Link],
children: [
Padding(
padding: [Link](top: 40,right: 25,left: 25),
child: ProductCard(
title: "OBATU",
imageUrl: 'assets/images/download (2).jpg',
subtitle: 'A Line Skirt with Elasticated Waistband',
),
),
SizedBox(height: 8),
SingleChildScrollView(
scrollDirection: [Link],
child: Padding(
padding: const [Link](left: 25),
child: Row(
// mainAxisAlignment: [Link],
crossAxisAlignment: [Link],
children: [
Icon([Link],
color: [Link],
),
SizedBox(width: 4),
Text(
'4.0/5',
style:
TextStyle(
fontSize: 25),
),
SizedBox(width: 8),
Text(
'(45 REVIEWS)',
style: TextStyle(
fontSize: 20,color: [Link]
),
),
],
),
),
),
SizedBox(height:8),
Padding(
padding:[Link](left: 30,bottom: 5,top: 5),
child: Row(
children: [
Text(
'Choose Size',
style:
TextStyle(
fontSize: 23,fontWeight: [Link]
),
),
],
),
),
SizedBox(height: 8),
Padding(
padding: [Link](left: 30),
child: SingleChildScrollView(
scrollDirection: [Link],
child: Row(
children: [
ElevatedButton(
onPressed: () {},
style: [Link](
foregroundColor: Colors.black87,
shape:RoundedRectangleBorder(borderRadius: [Link]([Link](8))),
backgroundColor: [Link][100],
padding: [Link](
horizontal: 20,vertical: 20),
),
child: Text('S',style: TextStyle(fontSize: 20),),
),
SizedBox(width: 8),
Padding(
padding: [Link](left: 10,right: 10),
child: ElevatedButton(
onPressed: () {},
style: [Link](
foregroundColor: Colors.black87,
shape:RoundedRectangleBorder(borderRadius:
[Link]([Link](8))),backgroundColor: Colors.black87,
padding: [Link](vertical: 20,horizontal:
20),
),
child: Text('M',style: TextStyle(fontSize: 20,color:
[Link]),),
),
),
SizedBox(width: 8),
Padding(
padding: [Link](right: 10),
child: ElevatedButton(onPressed: () {},
style: [Link](
foregroundColor:
Colors.black87,shape:RoundedRectangleBorder(borderRadius:
[Link]([Link](8))),backgroundColor: [Link][100],
padding: [Link](horizontal: 20,vertical:
20),
),
child:
Text('L',style: TextStyle(fontSize: 20),),
),
),
SizedBox(width: 8),
ElevatedButton(onPressed: () {},
style: [Link](
foregroundColor:
Colors.black87,shape:RoundedRectangleBorder(borderRadius:
[Link]([Link](8))),backgroundColor: [Link][100],
padding: [Link](vertical: 20,horizontal: 20),
),
child:
Text('XL',style: TextStyle(fontSize: 20),),
),
],
),
),
),
Padding(
padding: [Link](top: 27),
child: Center(child: Text('Price',style: TextStyle(fontSize:
27,fontWeight: [Link],color: [Link]),)),
),
Padding(
padding: [Link](top:0),
child: Center(child: Text('₹1999',style: TextStyle(fontSize:
35,fontWeight: [Link],color: Colors.black87),)),
),
Padding(
padding: [Link](left: 20,top: 18,right: 20),
child: Center(
child: ElevatedButton(
onPressed: () {},
style: [Link](
backgroundColor: [Link],
padding: [Link](horizontal: 35,
vertical: 20),
textStyle: TextStyle(fontSize: 16, color:
[Link]),
),
child: Row(
mainAxisAlignment: [Link],
children: [
Icon(Icons.shopping_cart_outlined,
color: [Link], size: 30),
SizedBox(width: 10),
Text('Add to cart',
style: TextStyle(fontSize: 16, color:
[Link])),
],
),
),
),
),
],
),
),
);
}
}

class ProductCard extends StatelessWidget {


final String title;
final String imageUrl;
final String subtitle;

ProductCard({
required [Link],
required [Link],
required [Link],
});
@override
Widget build(BuildContext context) {
return Card(
child: Column(
crossAxisAlignment: [Link],
children: [
Stack(
children: [
Container(
height: 270,
width: [Link],
decoration: BoxDecoration(
image: DecorationImage(image: AssetImage(imageUrl),fit:
[Link]),
borderRadius: [Link](20),
),
),
Positioned(
top: 8.0,
right: 8.0,
child: Icon(
Icons.favorite_sharp,size: 25,
color: [Link],

),
),
],
),
Padding(
padding: const [Link](16),
child: Column(
crossAxisAlignment: [Link],
children: [
Text(
title,
style: TextStyle(
fontWeight: [Link],
fontSize: 35,
),
),
SizedBox(height: 8.0),
Text(
subtitle,
style: TextStyle(
fontSize: 22,
color: Colors.black87,
),
),
],
),
),
],
),
);

}
}

You might also like