diff --git a/platzi_trips_app/lib/button_purple.dart b/platzi_trips_app/lib/button_purple.dart new file mode 100644 index 000000000..f7aa7d973 --- /dev/null +++ b/platzi_trips_app/lib/button_purple.dart @@ -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 + ), + + ), + ), + + ), + ); + } + +} \ No newline at end of file diff --git a/platzi_trips_app/lib/description_place.dart b/platzi_trips_app/lib/description_place.dart index 64d908bc5..f3d4137c2 100644 --- a/platzi_trips_app/lib/description_place.dart +++ b/platzi_trips_app/lib/description_place.dart @@ -1,4 +1,5 @@ import 'package:flutter/material.dart'; +import 'button_purple.dart'; class DescriptionPlace extends StatelessWidget { @@ -105,9 +106,11 @@ class DescriptionPlace extends StatelessWidget { ); return Column( + crossAxisAlignment: CrossAxisAlignment.start, children: [ title_stars, - description + description, + ButtonPurple("Navigate") ], );