Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:ecommerce1/product.dart';
- import 'package:flutter/material.dart';
- import 'package:google_fonts/google_fonts.dart';
- class DetailProduct extends StatelessWidget {
- final Product product;
- DetailProduct({this.product});
- @override
- Widget build(BuildContext context) {
- return Scaffold(
- appBar: AppBar(
- title: Text("Pickup",
- style: GoogleFonts.roboto(
- // textStyle: TextStyle(c)
- )),
- centerTitle: true,
- ),
- body: SafeArea(
- child: SingleChildScrollView(
- padding: EdgeInsets.all(19),
- child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- SizedBox(height: 10),
- Center(
- child: Container(
- child: Column(
- children: <Widget>[
- Hero(
- tag: product.name,
- child: Image.network(
- product.urlimage,
- fit: BoxFit.fill,
- ),
- ),
- Text(product.name,
- style: GoogleFonts.roboto(
- textStyle: TextStyle(
- fontSize: 25,
- fontWeight: FontWeight.bold,
- color: Colors.purple[100],
- ))),
- SizedBox(height: 12),
- Text("Rp. ${product.price}",
- style: GoogleFonts.roboto(
- textStyle: TextStyle(
- fontSize: 20,
- fontWeight: FontWeight.bold,
- color: Colors.purple[100],
- ))),
- SizedBox(height: 12),
- Text(product.description,
- style: GoogleFonts.roboto(
- textStyle: TextStyle(
- fontSize: 17,
- fontWeight: FontWeight.w500,
- color: Colors.white70,
- ))),
- SizedBox(height: 17),
- SizedBox(
- height: 50,
- width: 200,
- child: RaisedButton(
- shape: RoundedRectangleBorder(
- borderRadius: BorderRadius.circular(16)),
- color: Colors.orange,
- onPressed: () {},
- child: Text("Add to Cart"),
- ),
- )
- ],
- ),
- ),
- )
- ],
- ),
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement