Advertisement
Guest User

Untitled

a guest
Aug 30th, 2018
198
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 8.44 KB | None | 0 0
  1. import 'package:adaTeman/utils/utils.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:adaTeman/components/button/DialogBoxButton.dart';
  4. import 'package:adaTeman/statusPeminjaman/statusPeminjaman.dart';
  5.  
  6. class KonfirmasiProposal extends StatefulWidget {
  7.   final String category;
  8.   bool isTerima;
  9.  
  10.   KonfirmasiProposal({
  11.     Key key,
  12.     this.category,
  13.     this.isTerima = false,
  14.   }) : super(key: key);
  15.  
  16.   @override
  17.   _KonfirmasiProposal createState() => new _KonfirmasiProposal();
  18. }
  19.  
  20. class _KonfirmasiProposal extends State<KonfirmasiProposal> {
  21.  
  22.   Widget wait;
  23.   Widget isi;
  24.   Widget form;
  25.   final util = new Util();
  26.  
  27.   @override
  28.   void initState() {
  29.     super.initState();
  30.   }
  31.  
  32.   @override
  33.   Widget build(BuildContext context) {
  34.     var height = MediaQuery.of(context).size.height;
  35.     var width = MediaQuery.of(context).size.width;
  36.  
  37.     form = new Container(
  38.       height: height,
  39.       child: new Column(
  40.         children: <Widget>[
  41.           Expanded(
  42.             child: new ListView(
  43.               padding: EdgeInsets.only(
  44.                 top: 30.0,
  45.                 right: 30.0,
  46.                 left: 30.0,
  47.               ),
  48.               children: <Widget>[
  49.                 new Column(
  50.                   children: <Widget>[
  51.                     new Row(
  52.                       crossAxisAlignment: CrossAxisAlignment.start,
  53.                       children: <Widget>[
  54.                         new Container(
  55.                           color: Colors.grey,
  56.                           width: 93.0,
  57.                           height: 93.0,
  58.                         ),
  59.                         new Padding(
  60.                           padding: EdgeInsets.only(left: 20.0),
  61.                         ),
  62.                         new Column(
  63.                           crossAxisAlignment: CrossAxisAlignment.start,
  64.                           children: <Widget>[
  65.                             new Text(
  66.                               "BOLA FUTSAL",
  67.                               style: TextStyle(
  68.                                 fontSize: 18.0,
  69.                                 fontWeight: FontWeight.bold,
  70.                               ),
  71.                             ),
  72.                             new Row(
  73.                               children: <Widget>[
  74.                                 new Icon(
  75.                                   Icons.location_on,
  76.                                   color: Colors.redAccent,
  77.                                 ),
  78.                                 new Text(
  79.                                   "Fasilkom, UI",
  80.                                   textAlign: TextAlign.right,
  81.                                   style: TextStyle(
  82.                                       color: Colors.redAccent,
  83.                                       fontWeight: FontWeight.bold
  84.                                   ),
  85.                                 )
  86.                               ],
  87.                             ),
  88.                             new Divider(
  89.                               color: Colors.black,
  90.                             ),
  91.                             new FlatButton(
  92.                               padding: EdgeInsets.all(0.0),
  93.                               onPressed: () {},
  94.                               child: new Column(
  95.                                 children: <Widget>[
  96.                                   new Text(
  97.                                     "Danang Joewono",
  98.                                     style: TextStyle(
  99.                                       fontSize: 16.0,
  100.                                       fontWeight: FontWeight.bold,
  101.                                     ),
  102.                                   ),
  103.                                   new Padding(
  104.                                     padding: EdgeInsets.only(top: 3.0),
  105.                                   ),
  106.                                   new Text(
  107.                                     "@DanangJoewono"
  108.                                   )
  109.                                 ],
  110.                               ),
  111.                             ),
  112.                           ],
  113.                         ),
  114.                       ],
  115.                     ),
  116.                     new Padding(
  117.                       padding: EdgeInsets.only(top: 5.0),
  118.                     ),
  119.                     new Divider(color: Colors.black,),
  120.                     new Container(
  121.                       padding: EdgeInsets.only(top: 20.0),
  122.                       child: new Column(
  123.                         crossAxisAlignment: CrossAxisAlignment.start,
  124.                         children: <Widget>[
  125.                           new Text(
  126.                             "Tanggal mulai peminjaman",
  127.                             style: new TextStyle(
  128.                                 color: Colors.grey, fontSize: 15.0),
  129.                           ),
  130.                           new Padding(padding: EdgeInsets.all(5.0)),
  131.                           new Text(
  132.                             "12/02/2018",
  133.                             style: new TextStyle(fontSize: 20.0),
  134.                           ),
  135.                           new Padding(padding: EdgeInsets.only(top: 15.0)),
  136.                           new Text(
  137.                             "Tanggal selesai peminjaman",
  138.                             style: new TextStyle(
  139.                                 color: Colors.grey, fontSize: 15.0),
  140.                           ),
  141.                           new Padding(
  142.                             padding: EdgeInsets.all(5.0),
  143.                           ),
  144.                           new Text(
  145.                             "12/02/2018",
  146.                             style: new TextStyle(fontSize: 20.0),
  147.                           ),
  148.                           new Padding(
  149.                             padding: EdgeInsets.all(15.0),
  150.                           ),
  151.                           new Text(
  152.                             "Alasan peminjaman",
  153.                             style: new TextStyle(
  154.                               color: Colors.grey,
  155.                               fontSize: 15.0,
  156.                             ),
  157.                           ),
  158.                           new Padding(
  159.                             padding: EdgeInsets.all(5.0),
  160.                           ),
  161.                           new Text(
  162.                             "Aku ingin pinjem sepatu ini buat main fifa sama ivannnnnn",
  163.                             style: new TextStyle(fontSize: 20.0),
  164.                           ),
  165.                         ],
  166.                       ),
  167.                     ),
  168.                   ],
  169.                 ),
  170.               ],
  171.             ),
  172.           ),
  173.           Container(
  174.             width: width,
  175.             padding: EdgeInsets.only(
  176.               left: util.fitScreenSize(width, 0.065),
  177.               right: util.fitScreenSize(width, 0.065),
  178.             ),
  179.             child: DialogBoxButton(
  180.               text: "Terima",
  181.               color: "#E0486C",
  182.               textColor: "#FFFFFF",
  183.               highlightColor: "#E0486C",
  184.               splashColor: "#E0486C",
  185.               action: () {
  186.                 Navigator.push(
  187.                     context,
  188.                     MaterialPageRoute(
  189.                         builder: (context) => StatusPeminjaman()
  190.                     )
  191.                 );
  192.               },
  193.             ),
  194.           ),
  195.           Padding(
  196.             padding: EdgeInsets.only(
  197.               top: 10.0,
  198.             ),
  199.           ),
  200.           Container(
  201.             width: width,
  202.             padding: EdgeInsets.only(
  203.               left: util.fitScreenSize(width, 0.065),
  204.               right: util.fitScreenSize(width, 0.065),
  205.               bottom: util.fitScreenSize(height, 0.02)
  206.             ),
  207.             child: DialogBoxButton(
  208.               text: "Tolak",
  209.               textColor: "#E0486C",
  210.               color: "#FFFFFF",
  211.               action: () {
  212.                 print("Tolak");
  213.               },
  214.             ),
  215.           ),
  216. //          customColorBtn(),
  217.         ],
  218.       ),
  219.     );
  220.  
  221.     return new Scaffold(
  222.       appBar: new AppBar(
  223.         title: new Text(
  224.           "Konfirmasi Proposal",
  225.           style: new TextStyle(
  226.               color: Colors.black
  227.           ),
  228.         ),
  229.         backgroundColor: Colors.white,
  230.         leading: new IconButton(
  231.           icon: new Icon(Icons.arrow_back),
  232.           color: Colors.black,
  233.           onPressed: () {
  234.             Navigator.pop(context);
  235.           },
  236.         ),
  237.       ),
  238.       body: form,
  239.     );
  240.   }
  241. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement