forked from anncode1/Curso-de-Flutter-Avanzado-en-Platzi
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
62 changed files
with
713 additions
and
1 deletion.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
android/app/src/main/kotlin/com/anncode/platzitripsapp/MainActivity.kt
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
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); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?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>CFBundleDevelopmentRegion</key> | ||
<string>en</string> | ||
<key>CFBundleExecutable</key> | ||
<string>App</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>io.flutter.flutter.app</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundleName</key> | ||
<string>App</string> | ||
<key>CFBundlePackageType</key> | ||
<string>FMWK</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
<key>MinimumOSVersion</key> | ||
<string>8.0</string> | ||
</dict> | ||
</plist> |
File renamed without changes.
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "Generated.xcconfig" |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
#include "Generated.xcconfig" |
8 changes: 8 additions & 0 deletions
8
ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
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
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.
Binary file added
BIN
+564 Bytes
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png~HEAD
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Binary file added
BIN
+1.55 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png~HEAD
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+1 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png~HEAD
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+1.68 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png~HEAD
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+1.88 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png~HEAD
Binary file not shown.
Binary file added
BIN
+1.25 KB
.../Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png~16.BottomNavigationBarCupertino
Binary file not shown.
Binary file added
BIN
+1.25 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png~HEAD
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+1.85 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png~HEAD
Binary file not shown.
File renamed without changes.
File renamed without changes.
Binary file added
BIN
+2.6 KB
.../Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png~16.BottomNavigationBarCupertino
Binary file not shown.
Binary file added
BIN
+2.6 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png~HEAD
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+3.74 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png~HEAD
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+1.84 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png~HEAD
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+3.22 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png~HEAD
Binary file not shown.
File renamed without changes.
Binary file added
BIN
+3.53 KB
ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png~HEAD
Binary file not shown.
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
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 | ||
), | ||
|
||
), | ||
), | ||
|
||
), | ||
); | ||
} | ||
|
||
} |
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
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() | ||
], | ||
); | ||
} | ||
|
||
} |
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
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"), | ||
], | ||
), | ||
); | ||
} | ||
|
||
} |
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
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") | ||
], | ||
); | ||
|
||
|
||
} | ||
|
||
} |
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
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 | ||
), | ||
); | ||
} | ||
|
||
} |
Oops, something went wrong.