Skip to content

Commit

Permalink
Imagen Decorada
Browse files Browse the repository at this point in the history
  • Loading branch information
Anahi Salgado committed Dec 6, 2018
1 parent 4c4bb6c commit e9bdef3
Show file tree
Hide file tree
Showing 11 changed files with 74 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package com.anncode.platzitripsapp

import android.annotation.TargetApi
import android.os.Build
import android.os.Bundle

import io.flutter.app.FlutterActivity
import io.flutter.plugins.GeneratedPluginRegistrant

class MainActivity: FlutterActivity() {
@TargetApi(Build.VERSION_CODES.LOLLIPOP)
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
GeneratedPluginRegistrant.registerWith(this)
this.getWindow().setStatusBarColor(android.graphics.Color.TRANSPARENT);
}
}
Binary file added platzi_trips_app/assets/img/beach.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added platzi_trips_app/assets/img/beach_palm.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added platzi_trips_app/assets/img/mountain.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added platzi_trips_app/assets/img/mountain_stars.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added platzi_trips_app/assets/img/river.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added platzi_trips_app/assets/img/sunset.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions platzi_trips_app/lib/card_image.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
import 'package:flutter/material.dart';

class CardImage extends StatelessWidget {

String pathImage = "assets/img/beach.jpeg";

CardImage(this.pathImage);

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

final card = Container(
height: 350.0,
width: 250.0,
margin: EdgeInsets.only(
top: 80.0,
left: 20.0

),

decoration: BoxDecoration(
image: DecorationImage(
fit: BoxFit.cover,
image: AssetImage(pathImage)
),
borderRadius: BorderRadius.all(Radius.circular(10.0)),
shape: BoxShape.rectangle,
boxShadow: <BoxShadow>[
BoxShadow (
color: Colors.black38,
blurRadius: 15.0,
offset: Offset(0.0, 7.0)
)
]

),
);

return card;
}

}
20 changes: 20 additions & 0 deletions platzi_trips_app/lib/gradient_back.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import 'package:flutter/material.dart';

class GradientBack extends StatelessWidget {


String title = "Popular";

GradientBack(this.title);

@override
Widget build(BuildContext context) {
// TODO: implement build
Expand All @@ -18,6 +24,20 @@ class GradientBack extends StatelessWidget {
tileMode: TileMode.clamp
)
),


child: Text(
title,
style: TextStyle(
color: Colors.white,
fontSize: 30.0,
fontFamily: "Lato",
fontWeight: FontWeight.bold
),
),

alignment: Alignment(-0.9, -0.6),

);
}

Expand Down
2 changes: 1 addition & 1 deletion platzi_trips_app/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class MyApp extends StatelessWidget {

],
),
GradientBack()
GradientBack("Popular")
],
),
)//MyHomePage(title: 'Flutter Demo Home Page'),
Expand Down
6 changes: 6 additions & 0 deletions platzi_trips_app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ flutter:
- assets/img/people.jpg
- assets/img/ann.jpg
- assets/img/girl.jpg
- assets/img/mountain.jpeg
- assets/img/beach.jpeg
- assets/img/beach_palm.jpeg
- assets/img/mountain_stars.jpeg
- assets/img/sunset.jpeg
- assets/img/river.jpeg

fonts:
- family: Lato
Expand Down

0 comments on commit e9bdef3

Please sign in to comment.