Skip to content

Instantly share code, notes, and snippets.

@MarcinusX MarcinusX/tickets_page.dart Secret
Created Sep 3, 2018

What would you like to do?
class TicketsPage extends StatefulWidget {
_TicketsPageState createState() => _TicketsPageState();
class _TicketsPageState extends State<TicketsPage>
with TickerProviderStateMixin {
List<FlightStopTicket> stops = [
new FlightStopTicket("Sahara", "SHE", "Macao", "MAC", "SE2341"),
new FlightStopTicket("Macao", "MAC", "Cape Verde", "CAP", "KU2342"),
new FlightStopTicket("Cape Verde", "CAP", "Ireland", "IRE", "KR3452"),
new FlightStopTicket("Ireland", "IRE", "Sahara", "SHE", "MR4321"),
Widget build(BuildContext context) {
return Scaffold(
body: new Stack(
children: <Widget>[
AirAsiaBar(height: 180.0,),
top: MediaQuery.of(context) + 64.0,
child: SingleChildScrollView(
child: new Column(
children: _buildTickets().toList(),
floatingActionButton: _buildFab(),
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
Iterable<Widget> _buildTickets() {
return {
return Padding(
padding: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 8.0),
child: TicketCard(stop: stop),
_buildFab() {
return FloatingActionButton(
onPressed: () => Navigator.of(context).pop(),
child: new Icon(Icons.fingerprint),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.