Advertisement
iqbalme

overflow keyboard

Jun 8th, 2018
158
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 7.58 KB | None | 0 0
  1. import 'package:flutter/material.dart';
  2. import '../module.dart';
  3.  
  4. class DetailDiskusi extends StatefulWidget {
  5.   @override
  6.   _DetailDiskusiState createState() => new _DetailDiskusiState();
  7. }
  8.  
  9. class _DetailDiskusiState extends State<DetailDiskusi> {
  10.   final modulx = new Module();
  11.   MediaQueryData queryData;
  12.  
  13.   @override
  14.   Widget build(BuildContext context) {
  15.     queryData = MediaQuery.of(context);
  16.     double ukuranfont = queryData.size.width * 0.05;
  17.     return new Scaffold(
  18.       appBar: new AppBar(
  19.         title: Text("Diskusi Produk"),
  20.         // backgroundColor: Colors.blueGrey,
  21.         // leading: new Icon(Icons.arrow_back),
  22.         automaticallyImplyLeading: true,
  23.       ),
  24.       bottomNavigationBar: new Container(
  25.         padding: new EdgeInsets.all(5.0),
  26.         child: new Row(
  27.           children: <Widget>[
  28.             new Expanded(
  29.               flex: 6,
  30.               child: new TextFormField(
  31.                 keyboardType: TextInputType.text,
  32.                 decoration: InputDecoration(
  33.                   hintText: 'Balas Diskusi',
  34.                   contentPadding: EdgeInsets.fromLTRB(10.0, 10.0, 20.0, 10.0),
  35.                   border: new OutlineInputBorder(borderSide: new BorderSide(width: 12.0, color: Colors.grey)),
  36.                   filled: true,
  37.                   fillColor: Colors.white
  38.                 ),
  39.               ),
  40.             ),
  41.             new IconButton(
  42.               onPressed: () {},
  43.               icon: new Icon(Icons.send),color: Colors.green,)
  44.           ],
  45.         ),
  46.       ),
  47.       body: new Container(
  48.         color: Colors.white,
  49.         child: new Column(
  50.           children: <Widget>[
  51.             new Container(
  52.               padding: new EdgeInsets.all(10.0),
  53.               child: new GestureDetector(
  54.                 onTap: () {print("buka produknya");},
  55.                 child: new Row(
  56.                   crossAxisAlignment: CrossAxisAlignment.center,
  57.                   children: <Widget>[
  58.                     new Expanded(
  59.                       flex: 1,
  60.                       child: new AspectRatio(
  61.                         aspectRatio: 1.0,
  62.                         child: new Image.network("https://mirrorlesscomparison.com/wp-content/uploads/2017/07/fuji-xa3-vs-xa10-product-shots-2.jpg", fit: BoxFit.cover)),
  63.                     ),
  64.                     new Padding(padding: new EdgeInsets.only(right: 10.0)),
  65.                     new Expanded(
  66.                       flex: 3,
  67.                       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))),
  68.                   ],
  69.                 ),
  70.               ),
  71.             ),
  72.             new Divider(height: 10.0, color: Colors.grey,),
  73.             new Container(
  74.               padding: new EdgeInsets.all(10.0),
  75.               child: new Row(
  76.                 // mainAxisAlignment: MainAxisAlignment.spaceAround,
  77.                 children: <Widget>[
  78.                   new Expanded(
  79.                     flex: 2,
  80.                     child: new AspectRatio(
  81.                       aspectRatio: 2.0/2.0,
  82.                       child: new Container(
  83.                         padding: new EdgeInsets.all(10.0),
  84.                         child: new CircleAvatar(backgroundImage: new NetworkImage("http://www.claudejobin.com/art/wp-content/uploads/2012/06/MartinDouvilleProfilDeMarc.jpg"),)))),
  85.                   new Expanded(
  86.                     flex: 4,
  87.                     child: new Column(
  88.                       crossAxisAlignment: CrossAxisAlignment.start,
  89.                       children: <Widget>[
  90.                         new Text("Gunawan", style: new TextStyle(fontSize: ukuranfont-1, color: Colors.black54)),
  91.                         new Text("18 Februari 2018, 08:15", style: new TextStyle(color: Colors.black54, fontSize: ukuranfont-5)),
  92.                         new Container(
  93.                           padding: new EdgeInsets.symmetric(vertical: 10.0),
  94.                           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)))
  95.                       ],
  96.                     ),
  97.                   ),
  98.                   new Expanded(
  99.                     flex: 1,
  100.                     child: new IconButton(
  101.                       icon: new Icon(Icons.more_vert),
  102.                       onPressed: () => {},
  103.                     ),
  104.                   )
  105.                 ],
  106.               ),
  107.             ),
  108.             // new Divider(),
  109.             new Expanded(
  110.               child: new Container(
  111.                 color: Colors.black12,
  112.                   child: new ListView.builder(
  113.                   padding: new EdgeInsets.all(5.0),
  114.                   itemCount: 38,
  115.                   itemBuilder: (BuildContext context, int index){
  116.                     return new Padding(
  117.                       padding: new EdgeInsets.symmetric(vertical: 10.0),
  118.                       child: new Column(
  119.                         children: <Widget>[
  120.                           new Row(
  121.                             children: <Widget>[
  122.                               new Expanded(
  123.                                 flex: 2,
  124.                                 child: new AspectRatio(
  125.                                   aspectRatio: 2.0/2.0,
  126.                                   child: new Container(
  127.                                     padding: new EdgeInsets.all(10.0),
  128.                                     child: new CircleAvatar(backgroundImage: new NetworkImage("http://www.claudejobin.com/art/wp-content/uploads/2012/06/MartinDouvilleProfilDeMarc.jpg"),)))),
  129.                               new Expanded(
  130.                                 flex: 4,
  131.                                 child: new Column(
  132.                                   crossAxisAlignment: CrossAxisAlignment.start,
  133.                                   children: <Widget>[
  134.                                     new Text("Gunawan", style: new TextStyle(fontSize: ukuranfont-1, color: Colors.black54)),
  135.                                     new Container(
  136.                                       padding: new EdgeInsets.all(7.0),
  137.                                       margin: new EdgeInsets.only(top: 5.0, bottom: 5.0),
  138.                                       decoration: new BoxDecoration(color: Colors.white, borderRadius: new BorderRadius.circular(10.0)),
  139.                                       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))),
  140.                                     new Text("18 Februari 2018, 08:15", style: new TextStyle(color: Colors.black54, fontSize: ukuranfont-5)),
  141.                                   ],
  142.                                 ),
  143.                               ),
  144.                               new Expanded(
  145.                                 flex: 1,
  146.                                 child: new IconButton(
  147.                                   icon: new Icon(Icons.more_vert),
  148.                                   onPressed: () => {},
  149.                                 ),
  150.                               )
  151.                             ],
  152.                           ),
  153.                           new Divider(),
  154.                         ],
  155.                       ),
  156.                       ); //atau apa aja
  157.                   }
  158.                 ),
  159.               )
  160.             )
  161.           ],
  162.         ),
  163.       ),
  164.     );
  165.   }
  166. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement