Skip to content

Commit

Permalink
Column
Browse files Browse the repository at this point in the history
  • Loading branch information
Anahi Salgado committed Dec 6, 2018
1 parent 4fedcf2 commit 1d34e15
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 5 deletions.
62 changes: 58 additions & 4 deletions platzi_trips_app/lib/description_place.dart
Original file line number Diff line number Diff line change
@@ -1,10 +1,43 @@
import 'package:flutter/material.dart';

class DescriptionPlace extends StatelessWidget {

String namePlace;
int stars;
String descriptionPlace;

DescriptionPlace(this.namePlace, this.stars, this.descriptionPlace);



@override
Widget build(BuildContext context) {
// TODO: implement build

final star_half = Container (
margin: EdgeInsets.only(
top: 323.0,
right: 3.0
),

child: Icon(
Icons.star_half,
color: Color(0xFFf2C611),
),
);

final star_border = Container (
margin: EdgeInsets.only(
top: 323.0,
right: 3.0
),

child: Icon(
Icons.star_border,
color: Color(0xFFf2C611),
),
);

final star = Container (
margin: EdgeInsets.only(
top: 323.0,
Expand All @@ -27,7 +60,7 @@ class DescriptionPlace extends StatelessWidget {
),

child: Text(
"Duwili Ella",
namePlace,
style: TextStyle(
fontSize: 30.0,
fontWeight: FontWeight.w900
Expand All @@ -43,17 +76,38 @@ class DescriptionPlace extends StatelessWidget {
star,
star,
star,
star
star_half
],
)


],
);


final description = Container(
margin: new EdgeInsets.only(
top: 20.0,
left: 20.0,
right: 20.0

return title_stars;
),
child: new Text(
descriptionPlace,
style: const TextStyle(
fontSize: 16.0,
fontWeight: FontWeight.bold,
color: Color(0xFF56575a)
),

),
);

return Column(
children: <Widget>[
title_stars,
description
],
);


}
Expand Down
3 changes: 2 additions & 1 deletion platzi_trips_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
// This widget is the root of your application.
String descriptionDummy = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. \n\nLorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book.";
@override
Widget build(BuildContext context) {
return MaterialApp(
Expand All @@ -25,7 +26,7 @@ class MyApp extends StatelessWidget {
appBar: AppBar(
title: Text("Hola Mundo Feliz"),
),
body: new DescriptionPlace(),
body: new DescriptionPlace("Bahamas", 4, descriptionDummy),
)//MyHomePage(title: 'Flutter Demo Home Page'),
);
}
Expand Down

0 comments on commit 1d34e15

Please sign in to comment.