Created
March 31, 2020 11:21
-
-
Save vijayinyoutube/381f5aa35b5def1b511d721fdd3ea470 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: MyPage(), | |
); | |
} | |
} | |
class MyPage extends StatefulWidget { | |
@override | |
_MyPageState createState() => _MyPageState(); | |
} | |
class _MyPageState extends State<MyPage> { | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
body: SingleChildScrollView( | |
child: Center( | |
child: Column( | |
children: <Widget>[ | |
Card( | |
color: Colors.lime, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
const ListTile( | |
leading: Icon(Icons.flight), | |
title: Text('Boeing 747'), | |
subtitle: Text('UAE -- Sweden, No delay.'), | |
), | |
ButtonBar( | |
children: <Widget>[ | |
FlatButton( | |
color: Colors.red, | |
child: const Text('BUY TICKETS'), | |
onPressed: () {/* ... */}, | |
), | |
FlatButton( | |
color: Colors.redAccent, | |
child: const Text('VIEW'), | |
onPressed: () {/* ... */}, | |
), | |
], | |
), | |
], | |
), | |
), | |
Card( | |
color: Colors.blue, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
const ListTile( | |
leading: Icon(Icons.flight), | |
title: Text('Boeing 747'), | |
subtitle: Text('Florida -- Washington'), | |
), | |
ButtonBar( | |
children: <Widget>[ | |
FlatButton( | |
color: Colors.red, | |
child: const Text('BUY TICKETS'), | |
onPressed: () {/* ... */}, | |
), | |
FlatButton( | |
color: Colors.red, | |
child: const Text('VIEW'), | |
onPressed: () {/* ... */}, | |
), | |
], | |
), | |
], | |
), | |
), | |
Card( | |
color: Colors.green, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
const ListTile( | |
leading: Icon(Icons.flight), | |
title: Text('AirBus A380'), | |
subtitle: Text('Seattle -- Charlotte'), | |
), | |
ButtonBar( | |
children: <Widget>[ | |
FlatButton( | |
color: Colors.red, | |
child: const Text('BUY TICKETS'), | |
onPressed: () {/* ... */}, | |
), | |
FlatButton( | |
color: Colors.red, | |
child: const Text('VIEW'), | |
onPressed: () {/* ... */}, | |
), | |
], | |
), | |
], | |
), | |
), | |
Card( | |
color: Colors.orangeAccent, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
const ListTile( | |
leading: Icon(Icons.flight), | |
title: Text('Aviation'), | |
subtitle: Text('Delhi -- Mumbai'), | |
), | |
ButtonBar( | |
children: <Widget>[ | |
FlatButton( | |
color: Colors.red, | |
child: const Text('BUY TICKETS'), | |
onPressed: () {/* ... */}, | |
), | |
FlatButton( | |
color: Colors.red, | |
child: const Text('VIEW'), | |
onPressed: () {/* ... */}, | |
), | |
], | |
), | |
], | |
), | |
), | |
Card( | |
color: Colors.tealAccent, | |
child: Column( | |
mainAxisSize: MainAxisSize.min, | |
children: <Widget>[ | |
const ListTile( | |
leading: Icon(Icons.flight), | |
title: Text('AirBus'), | |
subtitle: Text('Dubai -- Singapore'), | |
), | |
ButtonBar( | |
children: <Widget>[ | |
FlatButton( | |
color: Colors.red, | |
child: const Text('BUY TICKETS'), | |
onPressed: () {/* ... */}, | |
), | |
FlatButton( | |
color: Colors.red, | |
child: const Text('VIEW'), | |
onPressed: () {/* ... */}, | |
), | |
], | |
), | |
], | |
), | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment