Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- child: new FutureBuilder(
- future: _orderTicket(widget.perf, widget.nbTicket),
- builder: (BuildContext context, AsyncSnapshot snapshot) {
- if (snapshot.hasData) {
- if (snapshot.data != null) {
- return new Column(
- mainAxisAlignment: MainAxisAlignment.center,
- children: <Widget>[
- new QrImage(
- data: snapshot.data,
- size: 300.0,
- errorCorrectionLevel: 3,
- ),
- new Text(widget.filmTitle,
- style: new TextStyle(
- color: Colors.black,
- fontSize: (widget.filmTitle.length > 16
- ? (widget.filmTitle.length > 24
- ? (widget.filmTitle.length > 40
- ? 10.0
- : 16.0)
- : 20.0)
- : 30.0))),
- new Text(
- (widget.dtime.day.toString() +
- "/" +
- widget.dtime.month.toString() +
- "/" +
- widget.dtime.year.toString() +
- " à " +
- widget.dtime.hour.toString() +
- ":" +
- (widget.dtime.minute < 10
- ? "0" + widget.dtime.minute.toString()
- : widget.dtime.minute.toString())),
- style: new TextStyle(
- color: Colors.black, fontSize: 23.0)),
- new Text(snapshot.data,
- style: new TextStyle(
- color: Colors.black, fontSize: 20.0)),
- new Text(
- widget.nbTicket.toString() +
- (widget.nbTicket == 1
- ? " Ticket"
- : " Tickets"),
- style: new TextStyle(
- color: Colors.black, fontSize: 20.0)),
- ]);
- } else {
- return new CircularProgressIndicator();
- }
- } else {
- return new CircularProgressIndicator();
- }
- }),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement