Advertisement
Guest User

Untitled

a guest
Jul 2nd, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 2.89 KB | None | 0 0
  1. child: new FutureBuilder(
  2.                 future: _orderTicket(widget.perf, widget.nbTicket),
  3.                 builder: (BuildContext context, AsyncSnapshot snapshot) {
  4.                   if (snapshot.hasData) {
  5.                     if (snapshot.data != null) {
  6.                       return new Column(
  7.                           mainAxisAlignment: MainAxisAlignment.center,
  8.                           children: <Widget>[
  9.                             new QrImage(
  10.                               data: snapshot.data,
  11.                               size: 300.0,
  12.                               errorCorrectionLevel: 3,
  13.                             ),
  14.                             new Text(widget.filmTitle,
  15.                                 style: new TextStyle(
  16.                                     color: Colors.black,
  17.                                     fontSize: (widget.filmTitle.length > 16
  18.                                         ? (widget.filmTitle.length > 24
  19.                                             ? (widget.filmTitle.length > 40
  20.                                                 ? 10.0
  21.                                                 : 16.0)
  22.                                             : 20.0)
  23.                                         : 30.0))),
  24.                             new Text(
  25.                                 (widget.dtime.day.toString() +
  26.                                     "/" +
  27.                                     widget.dtime.month.toString() +
  28.                                     "/" +
  29.                                     widget.dtime.year.toString() +
  30.                                     "  à  " +
  31.                                     widget.dtime.hour.toString() +
  32.                                     ":" +
  33.                                     (widget.dtime.minute < 10
  34.                                         ? "0" + widget.dtime.minute.toString()
  35.                                         : widget.dtime.minute.toString())),
  36.                                 style: new TextStyle(
  37.                                     color: Colors.black, fontSize: 23.0)),
  38.                             new Text(snapshot.data,
  39.                                 style: new TextStyle(
  40.                                     color: Colors.black, fontSize: 20.0)),
  41.                             new Text(
  42.                                 widget.nbTicket.toString() +
  43.                                     (widget.nbTicket == 1
  44.                                         ? " Ticket"
  45.                                         : " Tickets"),
  46.                                 style: new TextStyle(
  47.                                     color: Colors.black, fontSize: 20.0)),
  48.                           ]);
  49.                     } else {
  50.                       return new CircularProgressIndicator();
  51.                     }
  52.                   } else {
  53.                     return new CircularProgressIndicator();
  54.                   }
  55.                 }),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement