Untitled
unknown
dart
4 years ago
18 kB
10
Indexable
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
home: Scaffold(
body: Stack(
children:[
CustomScrollView(
slivers: [
SliverAppBar(
floating: true,
leading: BackButton(),
actions: [
IconButton(
onPressed: null,
icon: Icon(Icons.search,color: Colors.white,)),
IconButton(
onPressed: null,
icon: Icon(Icons.keyboard_voice,color: Colors.white,)),
IconButton(
onPressed: null,
icon: Icon(Icons.shopping_cart,color: Colors.white,))
],
),
SliverToBoxAdapter(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
height: 500,
child: Stack(
children:[
PageView(
scrollDirection: Axis.horizontal,
children: [
Image.network('https://rukminim1.flixcart.com/image/800/960/k3dc7m80/top/g/r/a/xs-gbk1165-god-bless-original-imafmhswbqdygtdv.jpeg?q=50'),
Image.network('https://rukminim1.flixcart.com/image/800/960/k3dc7m80/top/g/r/a/xl-gbk1165-god-bless-original-imafmhswhgkhahnu.jpeg?q=50'),
Image.network('https://rukminim1.flixcart.com/image/800/960/k3dc7m80/top/g/r/a/m-gbk1165-god-bless-original-imafmhswjrsdhemt.jpeg?q=50'),
Image.network('https://rukminim1.flixcart.com/image/800/960/k3dc7m80/top/g/r/a/s-gbk1165-god-bless-original-imafmhswrgtwqugj.jpeg?q=50')
],
// children: [
// Image.asset("assets/image1.jpeg"),
// Image.asset("assets/image2.jpeg"),
// Image.asset("assets/image3.jpeg"),
// Image.asset("assets/image4.jpeg"),
// ],
),
Positioned(
top: 10,
right: 10,
child: Container(
width: 40,
height: 40,
child: IconButton(
icon:Icon(Icons.favorite,color: Colors.black26),
onPressed: null,),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black26,
blurRadius: 2.0,
)
],
borderRadius: BorderRadius.circular(20.0),
),
),
),
Positioned(
top: 60,
right: 10,
child: Container(
width: 40,
height: 40,
child: IconButton(
icon:Icon(Icons.share,color: Colors.black26),
onPressed: null,),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black26,
blurRadius: 2.0,
)
],
borderRadius: BorderRadius.circular(20.0),
),
),
),
],
),
),
Divider(),
SizedBox(height: 15),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child: Text('God Bless',style: TextStyle(fontSize: 16),),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Casual Regular Sleeve Checkered Women',
style: TextStyle(fontSize:17,color: Colors.black45 ),),
Text('White, Black, Grey Top',
style: TextStyle(fontSize:17,color: Colors.black45),),
],
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 70,
decoration: BoxDecoration(
color: Color.fromRGBO(229,244,229,1.0),
borderRadius: BorderRadius.circular(5.0)
),
child: Padding(
padding: const EdgeInsets.only(left: 12.0,top: 8.0,bottom: 8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('Special Price',
style: TextStyle(
color: Color.fromRGBO(53,140,56,1.0),
fontSize: 14,
fontWeight: FontWeight.bold),
),
SizedBox(height: 5),
Row(
children: [
Text('₹',style: TextStyle(
fontSize: 12,)),
Text('379',style: TextStyle(fontSize: 18,fontWeight: FontWeight.w600),),
SizedBox(width: 6),
Text('1,299',style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w800,
decoration: TextDecoration.lineThrough,
color: Colors.black38),),
SizedBox(width: 6),
Text('70% off',style: TextStyle(
fontSize: 18,fontWeight:FontWeight.bold,
color: Color.fromRGBO(53,140,56,1.0)),),
],
)
],
),
),
),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: [
Container(
width: 40,
height: 25,
decoration: BoxDecoration(
color: Color.fromRGBO(3,137,3,1.0),
borderRadius: BorderRadius.circular(10.0)
),
child: Row(
children: [
Padding(
padding: const EdgeInsets.only(left: 8.0),
child: Text('4',style: TextStyle(color: Colors.white,fontSize: 12),),
),
Expanded(
child: IconButton(
onPressed: null,
icon: Icon(Icons.star,size: 10,color: Colors.white,),))
],
),
),
SizedBox(width: 8),
Text('7,240 ratings',style: TextStyle(
color: Colors.black45,
fontSize: 12,
fontWeight: FontWeight.w600),),
SizedBox(width: 15),
Container(
width: 80,
child: Image.network('https://www.adgully.com/img/800/68264_fl.png.jpg'),
)
],
),
),
Divider(),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
child:Text('Available offers',style: TextStyle(fontSize: 16,fontWeight: FontWeight.w600),)
),
),
Container(
height: 160,
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ListTile(
leading:Icon(CupertinoIcons.tag_solid,color: Color.fromRGBO(53,140,56,1.0),size:20,),
title: Text('Bank Offer 5% Unlimitd Cashback on Flipkart '
'Axis Bank Credit card',style: TextStyle(fontSize: 13),),
trailing: Icon(Icons.arrow_forward_ios,size: 18,color: Colors.black)
),
ListTile(
leading:Icon(CupertinoIcons.tag_solid, color: Color.fromRGBO(53,140,56,1.0),size:20,),
title: Text('Bank Offer Flat ₹100 on first Flipkart Pay Later '
'order of ₹500 and Above',style: TextStyle(fontSize: 13),),
trailing: Icon(Icons.arrow_forward_ios,size: 18,color: Colors.black)
),
Padding(
padding: const EdgeInsets.only(left: 55.0),
child: ElevatedButton(
style:ButtonStyle(backgroundColor:MaterialStateProperty.all(Colors.white10)),
onPressed: null, child: Text('+ 2 offers',
style: TextStyle(color: Colors.blue),),),
)
],
),
),
Divider(),
Divider(),
Padding(
padding: const EdgeInsets.all(8.0),
child: Container(
height: 120,
child: Column(
children: [
Row(
children: [
Text('Size',style: TextStyle(fontWeight: FontWeight.w500,fontSize: 18)),
Spacer(),
Container(
child: Row(
children: [
ElevatedButton.icon(onPressed: null,
icon:Icon(Icons.bar_chart,color: Colors.blue,),
label: Text('Size Chart',style: TextStyle(color: Colors.blue),),
style:ButtonStyle(backgroundColor:MaterialStateProperty.all(Colors.white10)),)
],
),
),
],
),
Row(
children: [
Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
style:ElevatedButton.styleFrom(side: BorderSide(color: Colors.black26),),
onPressed: null,
child: Text('XS',style: TextStyle(color: Colors.black),)),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
style:ElevatedButton.styleFrom(side: BorderSide(color: Colors.black26),),
onPressed: null,
child: Text('XS',style: TextStyle(color: Colors.black),)),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
style:ElevatedButton.styleFrom(side: BorderSide(color: Colors.black26),),
onPressed: null,
child: Text('XS',style: TextStyle(color: Colors.black),)),
),
Padding(
padding: const EdgeInsets.all(8.0),
child: ElevatedButton(
style:ElevatedButton.styleFrom(side: BorderSide(color: Colors.black26),),
onPressed: null,
child: Text('XS',style: TextStyle(color: Colors.black),)),
)
],
)
],
),
),
),
Divider(),
],
),
),
),
]
),
Align(
alignment: Alignment.bottomCenter,
child: Container(
height: 50,
child: Row(
children: [
Container(
width: 200,
color: Colors.white,
child: Center(child: Text('ADD TO CART',
style: TextStyle(fontWeight: FontWeight.w600),))),
Expanded(
child: Container(
color: Colors.deepOrange,
child: Center(child: Text('BUY NOW',
style: TextStyle(color: Colors.white,fontWeight: FontWeight.w600)))),
)
],
)
),
),
]
),
),);
}
}
Editor is loading...