Skip to content

Instantly share code, notes, and snippets.

@vijayinyoutube
Created March 31, 2020 11:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vijayinyoutube/381f5aa35b5def1b511d721fdd3ea470 to your computer and use it in GitHub Desktop.
Save vijayinyoutube/381f5aa35b5def1b511d721fdd3ea470 to your computer and use it in GitHub Desktop.
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