Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

16.bottom navigation bar cupertino #1

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
File renamed without changes.
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);
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added assets/img/ann.jpg
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 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 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 assets/img/girl.jpg
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 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 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 assets/img/people.jpg
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 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 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.
Binary file added fonts/Lato-Regular.ttf
Binary file not shown.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildSystemType</key>
<string>Original</string>
</dict>
</plist>
File renamed without changes.
61 changes: 61 additions & 0 deletions lib/button_purple.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import 'package:flutter/material.dart';


class ButtonPurple extends StatelessWidget {

String buttonText = "Navigate";

ButtonPurple(this.buttonText);

@override
Widget build(BuildContext context) {
// TODO: implement build
return InkWell(
onTap: () {
Scaffold.of(context).showSnackBar(
SnackBar(
content: Text("Navegando"),
)
);
},
child: Container(
margin: EdgeInsets.only(
top: 30.0,
left: 20.0,
right: 20.0
),
height: 50.0,
width: 180.0,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30.0),
gradient: LinearGradient(
colors: [
Color(0xFF4268D3),
Color(0xFF584CD1)
],
begin: FractionalOffset(0.2, 0.0),
end: FractionalOffset(1.0, 0.6),
stops: [0.0, 0.6],
tileMode: TileMode.clamp

)

),

child: Center(
child: Text(
buttonText,
style: TextStyle(
fontSize: 18.0,
fontFamily: "Lato",
color: Colors.white
),

),
),

),
);
}

}
50 changes: 50 additions & 0 deletions lib/card_image.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import 'package:flutter/material.dart';
import 'floating_action_button_green.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 Stack(
alignment: Alignment(0.9,1.1),
children: <Widget>[
card,
FloatingActionButtonGreen()
],
);
}

}
25 changes: 25 additions & 0 deletions lib/card_image_list.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import 'package:flutter/material.dart';
import 'card_image.dart';

class CardImageList extends StatelessWidget {

@override
Widget build(BuildContext context) {
// TODO: implement build
return Container(
height: 350.0,
child: ListView(
padding: EdgeInsets.all(25.0),
scrollDirection: Axis.horizontal,
children: <Widget>[
CardImage("assets/img/beach_palm.jpeg"),
CardImage("assets/img/mountain.jpeg"),
CardImage("assets/img/mountain_stars.jpeg"),
CardImage("assets/img/river.jpeg"),
CardImage("assets/img/sunset.jpeg"),
],
),
);
}

}
120 changes: 120 additions & 0 deletions lib/description_place.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
import 'package:flutter/material.dart';
import 'button_purple.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: 353.0,
right: 3.0
),

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

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

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

final star = Container (
margin: EdgeInsets.only(
top: 353.0,
right: 3.0
),

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

final title_stars = Row (
children: <Widget>[
Container (
margin: EdgeInsets.only(
top: 350.0,
left: 20.0,
right: 20.0
),

child: Text(
namePlace,
style: TextStyle(
fontFamily: "Lato",
fontSize: 30.0,
fontWeight: FontWeight.w900
),
textAlign: TextAlign.left,
),

),

Row(
children: <Widget>[
star,
star,
star,
star,
star_half
],
)


],
);

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

),
child: new Text(
descriptionPlace,
style: const TextStyle(
fontFamily: "Lato",
fontSize: 16.0,
fontWeight: FontWeight.bold,
color: Color(0xFF56575a)
),

),
);

return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: <Widget>[
title_stars,
description,
ButtonPurple("Navigate")
],
);


}

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

class FloatingActionButtonGreen extends StatefulWidget {
@override
State<StatefulWidget> createState() {
// TODO: implement createState
return _FloatingActionButtonGreen();
}

}


class _FloatingActionButtonGreen extends State<FloatingActionButtonGreen> {

void onPressedFav(){
Scaffold.of(context).showSnackBar(
SnackBar(
content: Text("Agregaste a tus Favoritos"),
)
);

}

@override
Widget build(BuildContext context) {
// TODO: implement build
return FloatingActionButton(
backgroundColor: Color(0xFF11DA53),
mini: true,
tooltip: "Fav",
onPressed: onPressedFav,
child: Icon(
Icons.favorite_border
),
);
}

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

class GradientBack extends StatelessWidget {


String title = "Popular";

GradientBack(this.title);

@override
Widget build(BuildContext context) {
// TODO: implement build
return Container(
height: 250.0,
decoration: BoxDecoration(
gradient: LinearGradient(
colors: [
Color(0xFF4268D3),
Color(0xFF584CD1)
],
begin: FractionalOffset(0.2, 0.0),
end: FractionalOffset(1.0, 0.6),
stops: [0.0, 0.6],
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),

);
}

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

class HeaderAppBar extends StatelessWidget {
@override
Widget build(BuildContext context) {
// TODO: implement build
return Stack(
children: <Widget>[
GradientBack("Bienvenido"),
CardImageList()
],
);
}

}
Loading