Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- import '../module.dart';
- class DetailDiskusi extends StatefulWidget {
- @override
- _DetailDiskusiState createState() => new _DetailDiskusiState();
- }
- class _DetailDiskusiState extends State<DetailDiskusi> {
- final modulx = new Module();
- MediaQueryData queryData;
- @override
- Widget build(BuildContext context) {
- queryData = MediaQuery.of(context);
- double ukuranfont = queryData.size.width * 0.05;
- return new Scaffold(
- appBar: new AppBar(
- title: Text("Diskusi Produk"),
- // backgroundColor: Colors.blueGrey,
- // leading: new Icon(Icons.arrow_back),
- automaticallyImplyLeading: true,
- ),
- bottomNavigationBar: new Container(
- padding: new EdgeInsets.all(5.0),
- child: new Row(
- children: <Widget>[
- new Expanded(
- flex: 6,
- child: new TextFormField(
- keyboardType: TextInputType.text,
- decoration: InputDecoration(
- hintText: 'Balas Diskusi',
- contentPadding: EdgeInsets.fromLTRB(10.0, 10.0, 20.0, 10.0),
- border: new OutlineInputBorder(borderSide: new BorderSide(width: 12.0, color: Colors.grey)),
- filled: true,
- fillColor: Colors.white
- ),
- ),
- ),
- new IconButton(
- onPressed: () {},
- icon: new Icon(Icons.send),color: Colors.green,)
- ],
- ),
- ),
- body: new Container(
- color: Colors.white,
- child: new Column(
- children: <Widget>[
- new Container(
- padding: new EdgeInsets.all(10.0),
- child: new GestureDetector(
- onTap: () {print("buka produknya");},
- child: new Row(
- crossAxisAlignment: CrossAxisAlignment.center,
- children: <Widget>[
- new Expanded(
- flex: 1,
- child: new AspectRatio(
- aspectRatio: 1.0,
- child: new Image.network("https://mirrorlesscomparison.com/wp-content/uploads/2017/07/fuji-xa3-vs-xa10-product-shots-2.jpg", fit: BoxFit.cover)),
- ),
- new Padding(padding: new EdgeInsets.only(right: 10.0)),
- new Expanded(
- flex: 3,
- child: new Text(modulx.productTitleShort("Fujifilm X-A3 / XA3 LCD Tempered Glass Screen Protector Anti Gores", 80), style: new TextStyle(fontWeight: FontWeight.bold, fontSize: ukuranfont))),
- ],
- ),
- ),
- ),
- new Divider(height: 10.0, color: Colors.grey,),
- new Container(
- padding: new EdgeInsets.all(10.0),
- child: new Row(
- // mainAxisAlignment: MainAxisAlignment.spaceAround,
- children: <Widget>[
- new Expanded(
- flex: 2,
- child: new AspectRatio(
- aspectRatio: 2.0/2.0,
- child: new Container(
- padding: new EdgeInsets.all(10.0),
- child: new CircleAvatar(backgroundImage: new NetworkImage("http://www.claudejobin.com/art/wp-content/uploads/2012/06/MartinDouvilleProfilDeMarc.jpg"),)))),
- new Expanded(
- flex: 4,
- child: new Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- new Text("Gunawan", style: new TextStyle(fontSize: ukuranfont-1, color: Colors.black54)),
- new Text("18 Februari 2018, 08:15", style: new TextStyle(color: Colors.black54, fontSize: ukuranfont-5)),
- new Container(
- padding: new EdgeInsets.symmetric(vertical: 10.0),
- child: new Text("favoritin toko kita kak biar dapet update produk terbaru, anyway Terima kasih sudah berbelanja di toko Godric Store ya, ditunggu next ordernya :)", style: new TextStyle(fontSize: ukuranfont-2)))
- ],
- ),
- ),
- new Expanded(
- flex: 1,
- child: new IconButton(
- icon: new Icon(Icons.more_vert),
- onPressed: () => {},
- ),
- )
- ],
- ),
- ),
- // new Divider(),
- new Expanded(
- child: new Container(
- color: Colors.black12,
- child: new ListView.builder(
- padding: new EdgeInsets.all(5.0),
- itemCount: 38,
- itemBuilder: (BuildContext context, int index){
- return new Padding(
- padding: new EdgeInsets.symmetric(vertical: 10.0),
- child: new Column(
- children: <Widget>[
- new Row(
- children: <Widget>[
- new Expanded(
- flex: 2,
- child: new AspectRatio(
- aspectRatio: 2.0/2.0,
- child: new Container(
- padding: new EdgeInsets.all(10.0),
- child: new CircleAvatar(backgroundImage: new NetworkImage("http://www.claudejobin.com/art/wp-content/uploads/2012/06/MartinDouvilleProfilDeMarc.jpg"),)))),
- new Expanded(
- flex: 4,
- child: new Column(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- new Text("Gunawan", style: new TextStyle(fontSize: ukuranfont-1, color: Colors.black54)),
- new Container(
- padding: new EdgeInsets.all(7.0),
- margin: new EdgeInsets.only(top: 5.0, bottom: 5.0),
- decoration: new BoxDecoration(color: Colors.white, borderRadius: new BorderRadius.circular(10.0)),
- child: new Text("favoritin toko kita kak biar dapet update produk terbaru, anyway Terima kasih sudah berbelanja di toko Godric Store ya, ditunggu next ordernya :)", style: new TextStyle(fontSize: ukuranfont-2))),
- new Text("18 Februari 2018, 08:15", style: new TextStyle(color: Colors.black54, fontSize: ukuranfont-5)),
- ],
- ),
- ),
- new Expanded(
- flex: 1,
- child: new IconButton(
- icon: new Icon(Icons.more_vert),
- onPressed: () => {},
- ),
- )
- ],
- ),
- new Divider(),
- ],
- ),
- ); //atau apa aja
- }
- ),
- )
- )
- ],
- ),
- ),
- );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement