Last active
April 20, 2020 02:34
-
-
Save felipebueno/f0476caaaad14c1db60229ada99fdb41 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
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
title: 'Flutter Demo', | |
debugShowCheckedModeBanner: false, | |
theme: ThemeData( | |
primarySwatch: Colors.blue, | |
), | |
home: MyHomePage(), | |
); | |
} | |
} | |
class MyHomePage extends StatelessWidget { | |
final items = [1, 2, 3, 4, 5, 6, 7]; | |
Widget _buildItem(item) { | |
return IntrinsicHeight( | |
child: Row( | |
children: <Widget>[ | |
Container( | |
margin: EdgeInsets.all(10.0), | |
height: 100.0, | |
width: 100.0, | |
color: Colors.blue, | |
), | |
Expanded( | |
child: Container( | |
margin: EdgeInsets.symmetric(vertical: 10.0), | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.start, | |
crossAxisAlignment: CrossAxisAlignment.start, | |
children: <Widget>[ | |
Text( | |
'Nome: Nome Sobrenome', | |
), | |
Text( | |
'Numero: (00) 0000-0000', | |
), | |
Expanded( | |
child: Align( | |
alignment: Alignment.bottomLeft, | |
child: Text('Aniversário: 10/10/1998'), | |
), | |
), | |
], | |
), | |
), | |
) | |
], | |
), | |
); | |
} | |
@override | |
Widget build(BuildContext context) { | |
return Scaffold( | |
appBar: AppBar( | |
title: Text('Demo'), | |
), | |
body: Column(children: items.map((item) => _buildItem(item)).toList()), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment