Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import 'package:flutter/material.dart';
- void main() => runApp(new MyApp());
- class MyApp extends StatelessWidget {
- // This widget is the root of your application.
- @override
- Widget build(BuildContext context) {
- return new MaterialApp(
- title: 'Flutter Demo',
- theme: new ThemeData(
- primarySwatch: Colors.blue,
- ),
- home: new ListView(
- children: <Widget>[
- new CustomCard(),
- new CustomCard(),
- new CustomCard(),
- new CustomCard(),
- new CustomCard(),
- new CustomCard()
- ],
- ),
- );
- }
- }
- class CustomCard extends StatelessWidget {
- CustomCard();
- factory CustomCard.forDesignTime() => new CustomCard();
- @override
- Widget build(BuildContext context) {
- return new Container(
- height: 200.0,
- width: double.infinity,
- child: new Card(
- child: new InkWell(
- child: new Padding(
- padding: const EdgeInsets.all(8.0),
- child: new Row(
- crossAxisAlignment: CrossAxisAlignment.start,
- children: <Widget>[
- new Container(
- decoration: new BoxDecoration(
- color: Colors.blue,
- borderRadius:
- new BorderRadius.all(new Radius.circular(12.0))),
- child: new FadeInImage.assetNetwork(
- alignment: Alignment.center,
- fit: BoxFit.fitHeight,
- height: 1 * 44.8,
- width: 1 * 31.3,
- placeholder: "graphics/placeholder.png",
- image:
- 'https://lh3.googleusercontent.com/oV45LX4lVsUj92o_zRKcDzQrBxqzYlNwOWeT5o5RaOBlTR-wqd87Ss7v13OQpwuTjktpLsiblsQJhA=w1080-h1081-rw-no',
- ),
- ),
- new Expanded(
- child: new Container(
- padding: const EdgeInsets.only(left: 8.0),
- child: new Column(
- children: <Widget>[
- new Text(
- 'toto',
- style: new TextStyle(fontSize: 30.0),
- textAlign: TextAlign.center,
- //overflow: TextOverflow.fade,
- //softWrap: false,
- ),
- new Divider(),
- new Expanded(
- child: new Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: <Widget>[
- new Expanded(
- child: new Container(
- child: new Row(
- children: <Widget>[],
- ),
- ),
- ),
- new Padding(
- padding: const EdgeInsets.only(right: 8.0),
- child: new Column(
- children: <Widget>[
- new Text('runtime'),
- new Text('language'),
- ],
- ),
- ),
- ],
- ),
- ),
- new Divider(),
- new Row(
- mainAxisAlignment: MainAxisAlignment.spaceEvenly,
- children: _airTimeBuilder(['12', '13']),
- ),
- ],
- ),
- ),
- ),
- ],
- ),
- ),
- onTap: () {
- print('what');
- },
- ),
- ),
- );
- }
- }
- List<Widget> _airTimeBuilder(List<String> airtimes) {
- List<Widget> temporary = [];
- for (int i = 0; i < airtimes.length; i++) {
- temporary.add(new Chip(
- label: new Text(airtimes[i]),
- ));
- }
- return temporary;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement