Skip to content

Instantly share code, notes, and snippets.

@MarcinusX
Created September 3, 2018 04:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcinusX/ea0f42634c7b253d8fd896c4f81556e8 to your computer and use it in GitHub Desktop.
Save MarcinusX/ea0f42634c7b253d8fd896c4f81556e8 to your computer and use it in GitHub Desktop.
class HomePage extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: <Widget>[
AirAsiaBar(height: 210.0),
Positioned.fill(
child: Padding(
padding: EdgeInsets.only(
top: MediaQuery.of(context).padding.top + 40.0),
child: new Column(
children: <Widget>[
_buildButtonsRow(),
Container(), //TODO: Implement a card
],
),
),
),
],
),
);
}
Widget _buildButtonsRow() {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
children: <Widget>[
new RoundedButton(text: "ONE WAY"),
new RoundedButton(text: "ROUND"),
new RoundedButton(text: "MULTICITY", selected: true),
],
),
);
}
}
@LuzCampos
Copy link

how change the content of tab's?

@MarcinusX
Copy link
Author

If you mean the labels of tabs, they're in the lines 30 to 32.
If you mean the children, in the latter parts of the post it's explained how to add content.
If you want to change content based on row, you could use StatefulWidget and for example IndexedStack. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment