diff --git a/assets/logo-sin-texto.jpg b/assets/logo-sin-texto.jpg
new file mode 100644
index 0000000..f05fb9e
Binary files /dev/null and b/assets/logo-sin-texto.jpg differ
diff --git a/assets/logo-sin-texto.png b/assets/logo-sin-texto.png
new file mode 100644
index 0000000..1a092d4
Binary files /dev/null and b/assets/logo-sin-texto.png differ
diff --git a/assets/logo-sin-texto.svg b/assets/logo-sin-texto.svg
new file mode 100644
index 0000000..d556d56
--- /dev/null
+++ b/assets/logo-sin-texto.svg
@@ -0,0 +1,53 @@
+
+
+
+
diff --git a/lib/assets/logo-sin-texto.png b/lib/assets/logo-sin-texto.png
new file mode 100644
index 0000000..1a092d4
Binary files /dev/null and b/lib/assets/logo-sin-texto.png differ
diff --git a/lib/assets/logo-sin-texto.svg b/lib/assets/logo-sin-texto.svg
new file mode 100644
index 0000000..d556d56
--- /dev/null
+++ b/lib/assets/logo-sin-texto.svg
@@ -0,0 +1,53 @@
+
+
+
+
diff --git a/lib/bottom_bar b/lib/bottom_bar
index baded55..88d3c42 100644
--- a/lib/bottom_bar
+++ b/lib/bottom_bar
@@ -3,7 +3,7 @@ import 'package:url_launcher/url_launcher.dart';
class CustomBottomBar extends StatelessWidget {
const CustomBottomBar({Key? key}) : super(key: key);
-
+
Future _launchURL(String url) async {
try {
await launch(url);
@@ -39,6 +39,5 @@ class CustomBottomBar extends StatelessWidget {
},
);
}
-
}
diff --git a/lib/contenedores_event.dart b/lib/contenedores_event.dart
index fc39f52..c23dfd8 100644
--- a/lib/contenedores_event.dart
+++ b/lib/contenedores_event.dart
@@ -1,8 +1,9 @@
import 'package:flutter_bloc/flutter_bloc.dart';
+import 'package:url_launcher/url_launcher.dart';
// Define el estado
class MyState {
-
+
}
// Define el bloc
@@ -10,3 +11,11 @@ class MyBloc extends Cubit {
MyBloc() : super(MyState());
}
+Future launchAemetURL() async {
+ const url = 'https://www.aemet.es/es/eltiempo/prediccion/municipios/caspe-id50074';
+ if (await canLaunch(url)) {
+ await launch(url);
+ } else {
+ throw 'Could not launch $url';
+ }
+}
\ No newline at end of file
diff --git a/lib/my_home_page.dart b/lib/my_home_page.dart
index bdcd6bf..a9b0c8b 100644
--- a/lib/my_home_page.dart
+++ b/lib/my_home_page.dart
@@ -1,7 +1,11 @@
import 'package:flutter/material.dart';
-import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_project/app_bar';
import 'package:flutter_project/bottom_bar';
+import 'package:flutter_project/contenedores_event.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:flutter_svg/svg.dart';
+
+
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
@@ -11,13 +15,14 @@ class MyHomePage extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(),
-
body: Container(
+
decoration: const BoxDecoration(
image: DecorationImage(
- image: AssetImage('assets/logo-fondo.png'),
+ image: AssetImage('assets/logo-sin-texto.png'),
fit: BoxFit.cover,
),
+
),
child: Center(
child: Column(
@@ -99,7 +104,9 @@ class MyHomePage extends StatelessWidget {
),
),
InkWell(
- onTap: () {},
+ onTap: () {
+ launchAemetURL();
+ },
child: SizedBox(
width: 300.0,
child: Padding(
@@ -127,8 +134,7 @@ class MyHomePage extends StatelessWidget {
),
),
),
- bottomNavigationBar: const CustomBottomBar(),
-
+ bottomNavigationBar: const CustomBottomBar(),
);
}
}
diff --git a/pubspec.lock b/pubspec.lock
index 4325320..7e8934f 100644
--- a/pubspec.lock
+++ b/pubspec.lock
@@ -1,6 +1,14 @@
# Generated by pub
# See https://dart.dev/tools/pub/glossary#lockfile
packages:
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.5.0"
async:
dependency: transitive
description:
@@ -86,6 +94,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.0.2"
+ flutter_svg:
+ dependency: "direct main"
+ description:
+ name: flutter_svg
+ sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.10+1"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -96,6 +112,22 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
+ http:
+ dependency: transitive
+ description:
+ name: http
+ sha256: "761a297c042deedc1ffbb156d6e2af13886bb305c2a343a4d972504cd67dd938"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.1"
+ http_parser:
+ dependency: transitive
+ description:
+ name: http_parser
+ sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.2"
leak_tracker:
dependency: transitive
description:
@@ -168,6 +200,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.0"
+ path_parsing:
+ dependency: transitive
+ description:
+ name: path_parsing
+ sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ petitparser:
+ dependency: transitive
+ description:
+ name: petitparser
+ sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.0.2"
plugin_platform_interface:
dependency: transitive
description:
@@ -237,6 +285,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.1"
+ typed_data:
+ dependency: transitive
+ description:
+ name: typed_data
+ sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.2"
url_launcher:
dependency: "direct main"
description:
@@ -301,6 +357,30 @@ packages:
url: "https://pub.dev"
source: hosted
version: "3.1.1"
+ vector_graphics:
+ dependency: transitive
+ description:
+ name: vector_graphics
+ sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.11+1"
+ vector_graphics_codec:
+ dependency: transitive
+ description:
+ name: vector_graphics_codec
+ sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.11+1"
+ vector_graphics_compiler:
+ dependency: transitive
+ description:
+ name: vector_graphics_compiler
+ sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.11+1"
vector_math:
dependency: transitive
description:
@@ -325,6 +405,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.5.1"
+ xml:
+ dependency: transitive
+ description:
+ name: xml
+ sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.5.0"
sdks:
dart: ">=3.3.4 <4.0.0"
flutter: ">=3.19.0"
diff --git a/pubspec.yaml b/pubspec.yaml
index 8cca170..b96da84 100644
--- a/pubspec.yaml
+++ b/pubspec.yaml
@@ -32,6 +32,9 @@ dependencies:
sdk: flutter
url_launcher: ^6.0.12
flutter_bloc: ^7.0.0
+ flutter_svg: ^2.0.10+1
+
+
# The following adds the Cupertino Icons font to your application.
@@ -65,6 +68,8 @@ flutter:
- assets/logo-civan.png
- assets/agua.jpg
- assets/logo-fondo.png
+ - assets/logo-sin-texto.png
+ - assets/logo-sin-texto.svg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see