Compare commits

14 Commits

31 changed files with 1090 additions and 207 deletions

9
.vscode/launch.json vendored
View File

@ -7,19 +7,22 @@
{
"name": "flutter_project",
"request": "launch",
"type": "dart"
"type": "dart",
"program": "lib/main/main.dart"
},
{
"name": "flutter_project (profile mode)",
"request": "launch",
"type": "dart",
"flutterMode": "profile"
"flutterMode": "profile",
"program": "lib/main.dart"
},
{
"name": "flutter_project (release mode)",
"request": "launch",
"type": "dart",
"flutterMode": "release"
"flutterMode": "release",
"program": "lib/main.dart"
}
]
}

View File

@ -1,8 +1,11 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.flutter_project">
<application
android:label="flutter_project"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
@ -11,34 +14,32 @@
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
<!-- Especifica un tema de Android para aplicar a esta actividad tan pronto como se haya iniciado el proceso de Android. Este tema es visible para el usuario mientras la interfaz de usuario de Flutter se inicializa. Después de eso, este tema continúa determinando el fondo de la ventana detrás de la interfaz de usuario de Flutter. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme" />
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<!-- No elimines los metadatos a continuación. Esto es utilizado por la herramienta Flutter para generar GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility?hl=en and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
</application>
<!-- Requerido para consultar actividades que pueden procesar texto, ver: https://developer.android.com/training/package-visibility?hl=en y https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT. En particular, esto es utilizado por el motor Flutter en io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
</queries>
<!-- Permiso de Internet -->
<uses-permission android:name="android.permission.INTERNET" />
</manifest>

View File

@ -4,4 +4,5 @@
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>

BIN
assets/logo-fondo-verde.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

BIN
assets/logo-fondo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

BIN
assets/logo-sin-texto.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
assets/logo-sin-texto.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

53
assets/logo-sin-texto.svg Normal file
View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="66.698677mm"
height="66.133186mm"
viewBox="0 0 66.698677 66.133186"
version="1.1"
id="svg5"
xml:space="preserve"
sodipodi:docname="logo-asoc-grande.svg"
inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="true"
showguides="true"
inkscape:zoom="1.8019391"
inkscape:cx="402.8993"
inkscape:cy="349.0684"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg5"><inkscape:grid
type="xygrid"
id="grid238" /><sodipodi:guide
position="74.64686,85.210352"
orientation="0,-1"
id="guide1143"
inkscape:locked="false" /><sodipodi:guide
position="65.946521,97.814762"
orientation="0,-1"
id="guide398"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs2" /><path
style="fill:#0082bf;fill-opacity:1;stroke-width:0.565242"
d="M 3.8256413,64.96974 C 1.6212279,63.805813 0,61.404811 0,59.304008 0,57.377233 2.0882044,54.474124 4.1923461,53.475657 7.4248337,51.941735 11.533958,52.382721 17.387206,54.891716 l 2.605907,1.117034 -5.038897,5.062341 C 10.481792,65.56433 9.6915923,66.130634 7.9251864,66.108458 6.8306119,66.09564 4.9858169,65.582296 3.8256413,64.96974 Z M 24.682904,60.904947 c 5.716857,-5.793101 7.153276,-8.091559 7.153276,-11.446165 0,-5.656058 -6.928963,-12.757525 -13.299602,-13.630716 -6.213556,-0.851657 -10.6927139,3.613467 -7.053978,7.031886 1.896828,1.781973 3.325517,1.522834 5.689296,-1.031965 1.451897,-1.569214 2.560539,-2.260324 3.623566,-2.25885 3.67423,0.0043 7.486062,4.374543 6.666143,7.64137 -0.213293,0.849798 -1.619931,2.836733 -3.125873,4.415412 l -2.738076,2.870294 -6.700816,-2.74081 C 9.6810515,49.622 7.2878274,48.953364 4.0980112,48.738405 L 0,48.462238 V 33.734441 19.00667 l 5.5657444,5.468226 c 5.6299076,5.53127 8.2441516,7.178718 11.3915446,7.178718 3.981394,0 9.031607,-3.700973 11.918786,-8.734494 2.171855,-3.786448 2.348489,-9.083916 0.375248,-11.254428 -1.837809,-2.0215436 -3.367843,-2.2876689 -5.139682,-0.893935 -2.254293,1.773215 -2.005014,3.853722 0.75905,6.335073 2.445386,2.195272 2.74866,3.486461 1.421638,6.052646 -1.18574,2.292968 -3.784741,3.973187 -6.145794,3.973187 -1.640304,0 -2.584473,-0.541031 -5.178599,-2.967521 l -3.172548,-2.96752 1.732427,-3.80153 C 16.220333,11.48682 18.087776,5.421718 18.087776,2.5852415 V 0 h 14.517832 14.517811 l -5.113015,5.2285064 c -5.899962,6.0332056 -6.965339,7.8059716 -6.965339,11.5900486 0,6.262393 8.05099,13.687774 14.855782,13.701425 5.221114,0.01068 8.410879,-4.338267 5.315221,-7.246482 -1.896824,-1.781974 -3.325509,-1.522834 -5.689296,1.031964 -1.451886,1.569214 -2.560524,2.260324 -3.623573,2.25885 -3.674225,-0.0043 -7.486053,-4.374543 -6.666143,-7.641366 0.213208,-0.849798 1.619932,-2.836733 3.125888,-4.415411 l 2.738076,-2.870295 6.700816,2.740811 c 5.215774,2.133403 7.609022,2.802017 10.798829,3.016998 l 4.098014,0.276166 V 32.399008 47.126784 L 61.132928,41.658553 C 55.46162,36.086607 52.892657,34.479836 49.65538,34.479836 c -4.223161,0 -10.132651,4.748874 -12.461829,10.014382 -1.462696,3.30667 -1.236264,8.694463 0.43276,10.297261 2.02304,1.942733 3.480694,1.975526 5.336243,0.120063 0.930403,-0.930403 1.691649,-1.99108 1.691649,-2.357058 0,-0.365979 -1.144615,-1.826431 -2.543604,-3.245439 -2.789029,-2.828999 -2.911249,-3.245891 -1.75967,-6.001998 1.447079,-3.463346 5.749413,-5.405011 8.566576,-3.866112 0.608562,0.332438 2.194332,1.721579 3.523891,3.087006 l 2.41741,2.482569 -1.484957,3.354653 c -3.287289,7.426278 -4.309277,10.735935 -4.394411,14.231134 l -0.08588,3.528291 -14.685151,0.0043 -14.685147,0.0043 5.159692,-5.228485 z m 31.707195,4.343673 c -3.885232,-2.108088 -4.4682,-8.485545 -1.430458,-15.648539 0.62625,-1.476689 1.31563,-2.684903 1.531978,-2.684903 0.216348,0 2.601435,2.256479 5.300202,5.014402 3.418098,3.49302 4.903098,5.422358 4.894445,6.358978 -0.01923,2.002487 -1.943054,5.871056 -3.443649,6.92212 -1.625677,1.138675 -4.791579,1.156193 -6.852518,0.03803 z M 5.1864032,14.484847 C -0.47485751,8.7119555 -0.7105868,8.1197376 1.081733,4.1729138 2.4319861,1.1995399 4.1710573,0 7.1315298,0 c 4.5858772,0 7.4027162,4.5216518 6.4489542,10.35199 -0.385673,2.357634 -2.481993,8.694651 -3.071597,9.285202 -0.07484,0.07499 -2.4699612,-2.243596 -5.3224838,-5.152345 z M 51.940144,12.223049 C 49.885187,11.49763 47.887058,10.708333 47.499865,10.46904 47.014273,10.168904 48.344899,8.477726 51.789616,5.0169862 56.066357,0.72035633 57.052048,0 58.654696,0 c 4.006343,0 8.043983,3.4280108 8.043983,6.8294454 0,1.9660628 -2.268549,5.1015216 -4.307355,5.9533916 -2.709641,1.13216 -6.185698,0.945977 -10.45118,-0.559788 z"
id="path287-5-2"
inkscape:export-filename="logo-sin-texto.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" /></svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

31
lib/BloC/DataService.dart Normal file
View File

@ -0,0 +1,31 @@
import 'package:http/http.dart' as http;
import 'package:html/parser.dart' as htmlParser;
class DataService {
Future<List<Map<String, dynamic>>> obtenerDatos() async {
final response = await http.get(Uri.parse('http://www.crcivan.com/escaparate/noticias.cgi?idnoticias=192683'));
if (response.statusCode == 200) {
final document = htmlParser.parse(response.body);
final filaTabla = document.querySelectorAll('html > body > div > center > table > tbody > tr > td > div > center > table > tbody > tr > td > table > tbody > tr > td > font > font > table > tbody > tr');
List<Map<String, dynamic>> embalsesData = [];
for (var fila in filaTabla) {
var nombreElemento = fila.querySelector('td > p > span');
var elementos = fila.querySelectorAll('td > span');
if (nombreElemento != null && elementos.isNotEmpty) {
var nombre = nombreElemento.text;
var listaElementos = elementos.map<String>((elemento) => elemento.text).toList();
var embalseMap = {'nombre': nombre, 'elementos': listaElementos};
embalsesData.add(embalseMap);
}
}
return embalsesData;
} else {
throw Exception('Error al obtener datos');
}
}
}

View File

@ -0,0 +1,54 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:url_launcher/url_launcher.dart';
import 'package:http/http.dart' as http;
import 'package:html/parser.dart' as htmlParser;
import 'package:html/dom.dart' as htmlDom;
import 'package:flutter_project/pages/embalses';
// Define el estado
class MyState {
}
// Define el bloc
class MyBloc extends Cubit<MyState> {
MyBloc() : super(MyState());
}
//mejorar código
Future<List<String>> obtenerDatos() async {
final response = await http.get(Uri.parse('http://www.crcivan.com/escaparate/noticias.cgi?idnoticias=192683'));
if (response.statusCode == 200) {
final document = htmlParser.parse(response.body);
final elementosSpan = document.querySelectorAll('html > body > div > center > table > tbody > tr > td > div > center > table > tbody > tr > td > table > tbody > tr > td > font > font > table > tbody > tr > td > span');
List<String> embalsesData = [];
for (var elemento in elementosSpan) {
final style = elemento.attributes['style'];
if (style != null && style.contains('color: #000000; font-size: 12pt;')) {
embalsesData.add(elemento.text);
}
}
return embalsesData;
} else {
throw Exception('Error al cargar los datos de embalses');
}
}
Future<void> launchAemetURL() async {
const urlString = 'https://www.aemet.es/es/eltiempo/prediccion/municipios/caspe-id50074';
final url = Uri.parse(urlString);
try {
await launch(urlString);
/* if (await canLaunch(urlString)) {
await launch(urlString);
} else {
throw 'Could not launch $urlString';
}*/
} catch (e) {
throw Exception('Error al lanzar la URL de Aemet: $e');
}
}

0
lib/BloC/estados Normal file
View File

BIN
lib/assets/logo-fondo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

View File

@ -0,0 +1,53 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="66.698677mm"
height="66.133186mm"
viewBox="0 0 66.698677 66.133186"
version="1.1"
id="svg5"
xml:space="preserve"
sodipodi:docname="logo-asoc-grande.svg"
inkscape:version="1.2.2 (732a01da63, 2022-12-09)"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#111111"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="1"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="true"
showguides="true"
inkscape:zoom="1.8019391"
inkscape:cx="402.8993"
inkscape:cy="349.0684"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="svg5"><inkscape:grid
type="xygrid"
id="grid238" /><sodipodi:guide
position="74.64686,85.210352"
orientation="0,-1"
id="guide1143"
inkscape:locked="false" /><sodipodi:guide
position="65.946521,97.814762"
orientation="0,-1"
id="guide398"
inkscape:locked="false" /></sodipodi:namedview><defs
id="defs2" /><path
style="fill:#0082bf;fill-opacity:1;stroke-width:0.565242"
d="M 3.8256413,64.96974 C 1.6212279,63.805813 0,61.404811 0,59.304008 0,57.377233 2.0882044,54.474124 4.1923461,53.475657 7.4248337,51.941735 11.533958,52.382721 17.387206,54.891716 l 2.605907,1.117034 -5.038897,5.062341 C 10.481792,65.56433 9.6915923,66.130634 7.9251864,66.108458 6.8306119,66.09564 4.9858169,65.582296 3.8256413,64.96974 Z M 24.682904,60.904947 c 5.716857,-5.793101 7.153276,-8.091559 7.153276,-11.446165 0,-5.656058 -6.928963,-12.757525 -13.299602,-13.630716 -6.213556,-0.851657 -10.6927139,3.613467 -7.053978,7.031886 1.896828,1.781973 3.325517,1.522834 5.689296,-1.031965 1.451897,-1.569214 2.560539,-2.260324 3.623566,-2.25885 3.67423,0.0043 7.486062,4.374543 6.666143,7.64137 -0.213293,0.849798 -1.619931,2.836733 -3.125873,4.415412 l -2.738076,2.870294 -6.700816,-2.74081 C 9.6810515,49.622 7.2878274,48.953364 4.0980112,48.738405 L 0,48.462238 V 33.734441 19.00667 l 5.5657444,5.468226 c 5.6299076,5.53127 8.2441516,7.178718 11.3915446,7.178718 3.981394,0 9.031607,-3.700973 11.918786,-8.734494 2.171855,-3.786448 2.348489,-9.083916 0.375248,-11.254428 -1.837809,-2.0215436 -3.367843,-2.2876689 -5.139682,-0.893935 -2.254293,1.773215 -2.005014,3.853722 0.75905,6.335073 2.445386,2.195272 2.74866,3.486461 1.421638,6.052646 -1.18574,2.292968 -3.784741,3.973187 -6.145794,3.973187 -1.640304,0 -2.584473,-0.541031 -5.178599,-2.967521 l -3.172548,-2.96752 1.732427,-3.80153 C 16.220333,11.48682 18.087776,5.421718 18.087776,2.5852415 V 0 h 14.517832 14.517811 l -5.113015,5.2285064 c -5.899962,6.0332056 -6.965339,7.8059716 -6.965339,11.5900486 0,6.262393 8.05099,13.687774 14.855782,13.701425 5.221114,0.01068 8.410879,-4.338267 5.315221,-7.246482 -1.896824,-1.781974 -3.325509,-1.522834 -5.689296,1.031964 -1.451886,1.569214 -2.560524,2.260324 -3.623573,2.25885 -3.674225,-0.0043 -7.486053,-4.374543 -6.666143,-7.641366 0.213208,-0.849798 1.619932,-2.836733 3.125888,-4.415411 l 2.738076,-2.870295 6.700816,2.740811 c 5.215774,2.133403 7.609022,2.802017 10.798829,3.016998 l 4.098014,0.276166 V 32.399008 47.126784 L 61.132928,41.658553 C 55.46162,36.086607 52.892657,34.479836 49.65538,34.479836 c -4.223161,0 -10.132651,4.748874 -12.461829,10.014382 -1.462696,3.30667 -1.236264,8.694463 0.43276,10.297261 2.02304,1.942733 3.480694,1.975526 5.336243,0.120063 0.930403,-0.930403 1.691649,-1.99108 1.691649,-2.357058 0,-0.365979 -1.144615,-1.826431 -2.543604,-3.245439 -2.789029,-2.828999 -2.911249,-3.245891 -1.75967,-6.001998 1.447079,-3.463346 5.749413,-5.405011 8.566576,-3.866112 0.608562,0.332438 2.194332,1.721579 3.523891,3.087006 l 2.41741,2.482569 -1.484957,3.354653 c -3.287289,7.426278 -4.309277,10.735935 -4.394411,14.231134 l -0.08588,3.528291 -14.685151,0.0043 -14.685147,0.0043 5.159692,-5.228485 z m 31.707195,4.343673 c -3.885232,-2.108088 -4.4682,-8.485545 -1.430458,-15.648539 0.62625,-1.476689 1.31563,-2.684903 1.531978,-2.684903 0.216348,0 2.601435,2.256479 5.300202,5.014402 3.418098,3.49302 4.903098,5.422358 4.894445,6.358978 -0.01923,2.002487 -1.943054,5.871056 -3.443649,6.92212 -1.625677,1.138675 -4.791579,1.156193 -6.852518,0.03803 z M 5.1864032,14.484847 C -0.47485751,8.7119555 -0.7105868,8.1197376 1.081733,4.1729138 2.4319861,1.1995399 4.1710573,0 7.1315298,0 c 4.5858772,0 7.4027162,4.5216518 6.4489542,10.35199 -0.385673,2.357634 -2.481993,8.694651 -3.071597,9.285202 -0.07484,0.07499 -2.4699612,-2.243596 -5.3224838,-5.152345 z M 51.940144,12.223049 C 49.885187,11.49763 47.887058,10.708333 47.499865,10.46904 47.014273,10.168904 48.344899,8.477726 51.789616,5.0169862 56.066357,0.72035633 57.052048,0 58.654696,0 c 4.006343,0 8.043983,3.4280108 8.043983,6.8294454 0,1.9660628 -2.268549,5.1015216 -4.307355,5.9533916 -2.709641,1.13216 -6.185698,0.945977 -10.45118,-0.559788 z"
id="path287-5-2"
inkscape:export-filename="logo-sin-texto.svg"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96" /></svg>

After

Width:  |  Height:  |  Size: 5.4 KiB

30
lib/bars/app_bar Normal file
View File

@ -0,0 +1,30 @@
import 'package:flutter/material.dart';
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
const CustomAppBar({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return AppBar(
title: const Text(''),
centerTitle: true,
backgroundColor: Color.fromARGB(255, 78, 169, 6),
flexibleSpace: Container(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Padding(
padding: const EdgeInsets.only(top: 10.0),
child: Image.asset(
'assets/logo-civan.png',
height: 200,
width: 200,
),
),
),
),
);
}
@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}

43
lib/bars/bottom_bar Normal file
View File

@ -0,0 +1,43 @@
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
class CustomBottomBar extends StatelessWidget {
const CustomBottomBar({Key? key}) : super(key: key);
Future<void> _launchURL(String url) async {
try {
await launch(url);
} catch (e) {
// Captura de la excepción
print('An error occurred: $e');
}
}
@override
Widget build(BuildContext context) {
return BottomNavigationBar(
items: const [
BottomNavigationBarItem(
icon: Icon(Icons.call),
label: 'Llamar',
),
BottomNavigationBarItem(
icon: Icon(Icons.email),
label: 'Correo',
),
],
selectedItemColor: Colors.blue,
unselectedItemColor: Colors.blue,
backgroundColor: const Color.fromARGB(255, 255, 255, 255),
currentIndex: 0,
onTap: (int index) {
if (index == 0) {
_launchURL('tel:+348766361379');
} else if (index == 1) {
_launchURL('mailto:civan@crcivan.com');
}
},
);
}
}

View File

@ -1,186 +0,0 @@
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme:
ColorScheme.fromSeed(seedColor: Color.fromARGB(255, 0, 67, 168)),
useMaterial3: true,
),
home: const MyHomePage(title: 'COMUNIDAD DE REGANTES DE CIVÁN'),
);
}
}
class MyHomePage extends StatefulWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
State<MyHomePage> createState() => _MyHomePageState();
}
class _MyHomePageState extends State<MyHomePage> {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: const Text(''),
centerTitle: true,
backgroundColor: const Color.fromARGB(255, 33, 150, 243),
leading: IconButton(
onPressed: () {},
icon: const Icon(Icons.menu),
color: Colors.white,
),
flexibleSpace: Container(
padding: const EdgeInsets.all(8.0),
child: Center(
child: Image.asset(
'assets/logo-civan.png',
height: 200, // Cambia la altura según sea necesario
width: 200, // Cambia el ancho según sea necesario
),
),
),
),
body: Container(
decoration: BoxDecoration(
image: DecorationImage(
image:
AssetImage('assets/agua.jpg'), // Ruta de la imagen de fondo
fit: BoxFit
.cover, // Ajusta la imagen para que cubra todo el contenedor
),
),
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () {
print('Contenedor noticias clickeado');
},
child: SizedBox(
width: 300.0,
child: Padding(
padding: const EdgeInsets.only(bottom: 20.0),
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
'Noticias',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 32.0,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
InkWell(
onTap: () {
print('Contenedor pregón clickeado');
},
customBorder: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(100)),
child: SizedBox(
width: 300.0,
child: Padding(
padding: const EdgeInsets.only(bottom: 20.0),
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: Colors.blue,
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
'Pregón del día',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 32.0,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
InkWell(
onTap: () {
print('Contenedor embalses clickeado');
},
child: SizedBox(
width: 300.0,
child: Padding(
padding: const EdgeInsets.only(bottom: 20.0),
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: const Color.fromRGBO(33, 150, 243, 1),
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
'Embalses',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 32.0,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
InkWell(
onTap: () {
print('Contenedor tiempo clickeado');
},
child: SizedBox(
width: 300.0,
child: Padding(
padding: const EdgeInsets.only(bottom: 20.0),
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: const Color.fromRGBO(33, 150, 243, 1),
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
'Tiempo',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 32.0,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
],
),
),
));
}
}

31
lib/main/main.dart Normal file
View File

@ -0,0 +1,31 @@
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_project/BloC/contenedores_event.dart';
import '../pages/my_home_page.dart';
void main() {
runApp(
BlocProvider(
create: (context) => MyBloc(),
child: const MyApp(),
),
);
}
class MyApp extends StatelessWidget {
const MyApp({Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
colorScheme: ColorScheme.fromSeed(seedColor: Color.fromARGB(255, 0, 67, 168)),
useMaterial3: true,
),
home: const MyHomePage(title: 'COMUNIDAD DE REGANTES DE CIVÁN'),
);
}
//comentario
}

111
lib/pages/embalses Normal file
View File

@ -0,0 +1,111 @@
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:flutter_project/BloC/DataService.dart';
import 'package:html/parser.dart' as htmlParser;
import 'package:flutter_project/BloC/contenedores_event.dart';
import 'package:flutter_project/bars/app_bar';
import 'package:flutter_project/widgets/background_widget.dart';
import 'package:flutter_project/bars/bottom_bar';
class EmbalsesPage extends StatefulWidget {
const EmbalsesPage({Key? key}) : super(key: key);
@override
_EmbalsesPageState createState() => _EmbalsesPageState();
}
class _EmbalsesPageState extends State<EmbalsesPage> {
final DataService dataService = DataService();
List<Map<String, dynamic>> embalsesData = [];
List<String> descripciones = ['Cota (m)', 'Volumen (Hm3)', 'Entrada (l/s)', 'Salida (l/s)'];
@override
void initState() {
super.initState();
obtenerDatos();
}
Future<void> obtenerDatos() async {
try {
final data = await dataService.obtenerDatos();
setState(() {
embalsesData = data;
});
} catch (e) {
print('Error: $e');
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(),
body: BackgroundWidget(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: ListView.builder(
itemCount: embalsesData.length,
itemBuilder: (context, index) {
final embalseData = embalsesData[index];
final nombreEmbalse = embalseData['nombre'];
final listaElementos = embalseData['elementos'];
return Padding(
padding: const EdgeInsets.only(bottom: 8.0),
child: Container(
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.5),
borderRadius: BorderRadius.circular(10.0),
),
child: Column(
children: [
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
nombreEmbalse!,
style: const TextStyle(
fontSize: 25.0,
fontWeight: FontWeight.bold,
),
),
),
),
],
),
Row(
children: [
Expanded(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: List.generate(
listaElementos.length,
(index) => Text(
'${descripciones[index]}: ${listaElementos[index]}',
style: const TextStyle(
fontWeight: FontWeight.normal,
fontSize: 20.0,
),
),
),
),
),
),
],
),
],
),
),
);
},
),
),
),
bottomNavigationBar: const CustomBottomBar(),
);
}
}

145
lib/pages/my_home_page.dart Normal file
View File

@ -0,0 +1,145 @@
import 'package:flutter/material.dart';
import 'package:flutter_project/bars/app_bar';
import 'package:flutter_project/bars/bottom_bar';
import 'package:flutter_project/BloC/contenedores_event.dart';
import 'package:flutter_project/pages/noticias';
import 'package:flutter_project/pages/pregon';
import 'package:flutter_project/pages/embalses';
import 'package:flutter_project/widgets/background_widget.dart';
class MyHomePage extends StatelessWidget {
const MyHomePage({Key? key, required this.title}) : super(key: key);
final String title;
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(),
body: BackgroundWidget(
child: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
InkWell(
onTap: () { Navigator.push(
context,
MaterialPageRoute(builder: (context) => const NoticiasPage()),
);},
child: SizedBox(
width: 300.0,
child: Padding(
padding: const EdgeInsets.only(bottom: 20.0),
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: const Color.fromARGB(255, 78, 169, 6),
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
'Noticias',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 32.0,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const Pregon()),
);
},
child: SizedBox(
width: 300.0,
child: Padding(
padding: const EdgeInsets.only(bottom: 20.0),
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: const Color.fromARGB(255, 78, 169, 6),
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
'Pregón',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 32.0,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
InkWell(
onTap: () {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => const EmbalsesPage()),
);
},
child: SizedBox(
width: 300.0,
child: Padding(
padding: const EdgeInsets.only(bottom: 20.0),
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: const Color.fromARGB(255, 78, 169, 6),
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
'Embalses',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 32.0,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
InkWell(
onTap: () {
launchAemetURL();
},
child: SizedBox(
width: 300.0,
child: Padding(
padding: const EdgeInsets.only(bottom: 20.0),
child: Container(
padding: const EdgeInsets.all(8.0),
decoration: BoxDecoration(
color: const Color.fromARGB(255, 78, 169, 6),
borderRadius: BorderRadius.circular(7.0),
),
child: const Text(
'Tiempo',
textAlign: TextAlign.center,
style: TextStyle(
color: Colors.white,
fontSize: 32.0,
fontWeight: FontWeight.bold,
),
),
),
),
),
),
],
),
),
),
bottomNavigationBar: const CustomBottomBar(),
);
}
}

139
lib/pages/noticias Normal file
View File

@ -0,0 +1,139 @@
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:flutter_project/bars/app_bar';
import 'package:flutter_project/bars/bottom_bar';
import 'package:html/parser.dart' as htmlParser;
import 'package:flutter_project/widgets/background_widget.dart';
class NoticiasPage extends StatefulWidget {
const NoticiasPage({Key? key}) : super(key: key);
@override
_NoticiasPageState createState() => _NoticiasPageState();
}
class _NoticiasPageState extends State<NoticiasPage> {
Map<String, List<Future<String>>> noticiasPorTitulo = {};
@override
void initState() {
super.initState();
obtenerDatos();
}
Future<void> obtenerDatos() async {
final response = await http.get(Uri.parse('http://www.crcivan.com/escaparate/noticias.cgi?idpadre=92776&idempresa=31637'));
if (response.statusCode == 200) {
var document = htmlParser.parse(response.body);
var tituloElements = document.querySelectorAll('html > body > div > center > table > tbody > tr > td > div > center > table > tbody > tr > td > table > tbody > tr > td > b > a');
for (int i = 0; i < tituloElements.length; i++) {
String titulo = tituloElements[i].text.trim();
// Extrayendo el enlace href del elemento <a>
var linkElement = tituloElements[i];
String? link = linkElement.attributes['href'];
if (link != null) {
noticiasPorTitulo[titulo] = [cargarContenidoUrl(link)];
}
}
await Future.wait(noticiasPorTitulo.values.expand((element) => element).toList());
setState(() {});
} else {
throw Exception('Fallo al cargar noticias');
}
}
Future<String> cargarContenidoUrl(String url) async {
final response = await http.get(Uri.parse(url));
if (response.statusCode == 200) {
var document = htmlParser.parse(response.body);
var paragraphAndLists = document.querySelectorAll('html > body > div > center > table > tbody > tr > td > div > center > table > tbody > tr > td > table > tbody > tr > td > font > font > p, html > body > div > center > table > tbody > tr > td > div > center > table > tbody > tr > td > table > tbody > tr > td > font > font > ul');
String content = '';
String currentParagraphContent = '';
for (var element in paragraphAndLists) {
if (element.localName == 'p') {
if (currentParagraphContent.isNotEmpty) {
content += currentParagraphContent + '\n';
currentParagraphContent = '';
}
currentParagraphContent += element.text.trim() + '\n';
} else if (element.localName == 'ul') {
if (currentParagraphContent.isNotEmpty) {
content += currentParagraphContent + '\n';
currentParagraphContent = '';
}
var listItems = element.querySelectorAll('li');
for (var listItem in listItems) {
content += '- ${listItem.text.trim()}\n';
}
}
}
if (currentParagraphContent.isNotEmpty) {
content += currentParagraphContent + '\n';
}
return content;
} else {
throw Exception('Fallo al cargar contenido de URL: $url');
}
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: const CustomAppBar(),
body: BackgroundWidget(
child: ListView.builder(
itemCount: noticiasPorTitulo.length,
itemBuilder: (context, index) {
String titulo = noticiasPorTitulo.keys.elementAt(index);
List<Future<String>>? noticias = noticiasPorTitulo[titulo];
return FutureBuilder<List<String>>(
future: Future.wait(noticias ?? []),
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return CircularProgressIndicator();
} else if (snapshot.hasError) {
return Text('Error: ${snapshot.error}');
} else if (!snapshot.hasData) {
return Text('No hay datos');
} else {
return Container(
color: Colors.white.withOpacity(0.5), // Fondo blanco con 50% de opacidad
margin: const EdgeInsets.all(8.0),
padding: const EdgeInsets.all(8.0),
child: ExpansionTile(
title: Text(
titulo,
style: TextStyle(fontWeight: FontWeight.bold),
),
children: snapshot.data!.map((noticia) {
return Padding(
padding: const EdgeInsets.all(8.0),
child: Text(
noticia,
style: TextStyle(fontSize: 16.0),
),
);
}).toList(),
),
);
}
},
);
},
),
),
bottomNavigationBar: const CustomBottomBar(),
);
}
}

107
lib/pages/pregon Normal file
View File

@ -0,0 +1,107 @@
import 'package:flutter/material.dart';
import 'package:http/http.dart' as http;
import 'package:html/parser.dart' as htmlParser;
import 'package:html/dom.dart' as htmlDom;
import 'package:flutter_project/bars/app_bar';
import 'package:flutter_project/bars/bottom_bar';
import 'package:flutter_project/widgets/background_widget.dart';
class Pregon extends StatefulWidget {
const Pregon({Key? key}) : super(key: key);
@override
_PregonState createState() => _PregonState();
}
class _PregonState extends State<Pregon> {
List<String> datos = [];
@override
void initState() {
super.initState();
obtenerDatos();
}
Future<void> obtenerDatos() async {
final response = await http.get(Uri.parse('http://www.crcivan.com/escaparate/noticias.cgi?idnoticias=192680'));
if (response.statusCode == 200) {
final document = htmlParser.parse(response.body);
// Buscar los elementos <p> dentro de la estructura específica
final elementosParrafos = document.querySelectorAll('body > div > center > table > tbody > tr > td > div > center > table > tbody > tr > td > table > tbody > tr > td > font > font > p');
// Limpiar la lista de datos antes de actualizarla
setState(() {
datos.clear();
});
// Agregar textos de los elementos <p> a la lista, evitando los que contienen solo espacios
for (var elemento in elementosParrafos) {
final texto = elemento.text.trim(); // Eliminar espacios al inicio y al final del texto
if (texto.isNotEmpty) {
setState(() {
datos.add(texto);
});
}
}
} else {
throw Exception('Error al cargar los datos');
}
}
@override
Widget build(BuildContext context) {
// Lista de nombres de los meses del año
final meses = [
'enero', 'febrero', 'marzo', 'abril', 'mayo', 'junio',
'julio', 'agosto', 'septiembre', 'octubre', 'noviembre', 'diciembre'
];
return Scaffold(
appBar: const CustomAppBar(),
body: BackgroundWidget(
child: Center(
child: ListView.builder(
itemCount: datos.length,
itemBuilder: (context, index) {
final hasText = datos[index].isNotEmpty;
final hasMes = meses.any((mes) => datos[index].toLowerCase().contains(mes));
return Column(
children: [
if (hasMes)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 10.0),
child: Divider(color: Colors.green, thickness: 3.0), // Divider antes del párrafo
),
hasText
? ListTile(
title: Center(
child: Text(
datos[index],
textAlign: TextAlign.center,
style: TextStyle(
color: hasMes ? Color.fromARGB(255, 0, 0, 0) : Color.fromARGB(255, 0, 0, 0), fontWeight : FontWeight.bold, fontSize : 22.0
),
),
),
)
: SizedBox.shrink(),
if (hasMes)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 100.0),
child: Divider(color: Colors.green, thickness: 1.0), // Divider después del párrafo
),
],
);
},
shrinkWrap: true, // Ajusta el tamaño de ListView al contenido
),
),
),
bottomNavigationBar: const CustomBottomBar(),
);
}
}

View File

@ -0,0 +1,22 @@
import 'package:flutter/material.dart';
class BackgroundWidget extends StatelessWidget {
final Widget child;
const BackgroundWidget({required this.child, Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return Stack(
children: [
Positioned.fill(
child: Image.asset(
'assets/logo-fondo-verde.png',
fit: BoxFit.cover,
),
),
child,
],
);
}
}

View File

@ -6,6 +6,10 @@
#include "generated_plugin_registrant.h"
#include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);
}

View File

@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_linux
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST

View File

@ -5,6 +5,8 @@
import FlutterMacOS
import Foundation
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}

View File

@ -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:
@ -9,6 +17,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.11.0"
bloc:
dependency: transitive
description:
name: bloc
sha256: "106842ad6569f0b60297619e9e0b1885c2fb9bf84812935490e6c5275777804e"
url: "https://pub.dev"
source: hosted
version: "8.1.4"
boolean_selector:
dependency: transitive
description:
@ -41,6 +57,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.18.0"
csslib:
dependency: transitive
description:
name: csslib
sha256: "706b5707578e0c1b4b7550f64078f0a0f19dec3f50a178ffae7006b0a9ca58fb"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
cupertino_icons:
dependency: "direct main"
description:
@ -62,6 +86,14 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
flutter_bloc:
dependency: "direct main"
description:
name: flutter_bloc
sha256: f0ecf6e6eb955193ca60af2d5ca39565a86b8a142452c5b24d96fb477428f4d2
url: "https://pub.dev"
source: hosted
version: "8.1.5"
flutter_lints:
dependency: "direct dev"
description:
@ -70,11 +102,48 @@ 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
source: sdk
version: "0.0.0"
flutter_web_plugins:
dependency: transitive
description: flutter
source: sdk
version: "0.0.0"
html:
dependency: "direct dev"
description:
name: html
sha256: "3a7812d5bcd2894edf53dfaf8cd640876cf6cef50a8f238745c8b8120ea74d3a"
url: "https://pub.dev"
source: hosted
version: "0.15.4"
http:
dependency: "direct dev"
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:
@ -131,6 +200,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.11.0"
nested:
dependency: transitive
description:
name: nested
sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
url: "https://pub.dev"
source: hosted
version: "1.0.0"
path:
dependency: transitive
description:
@ -139,6 +216,38 @@ 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:
name: plugin_platform_interface
sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02"
url: "https://pub.dev"
source: hosted
version: "2.1.8"
provider:
dependency: transitive
description:
name: provider
sha256: c8a055ee5ce3fd98d6fc872478b03823ffdb448699c6ebdbbc71d59b596fd48c
url: "https://pub.dev"
source: hosted
version: "6.1.2"
sky_engine:
dependency: transitive
description: flutter
@ -192,6 +301,102 @@ 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:
name: url_launcher
sha256: "6ce1e04375be4eed30548f10a315826fd933c1e493206eab82eed01f438c8d2e"
url: "https://pub.dev"
source: hosted
version: "6.2.6"
url_launcher_android:
dependency: transitive
description:
name: url_launcher_android
sha256: "360a6ed2027f18b73c8d98e159dda67a61b7f2e0f6ec26e86c3ada33b0621775"
url: "https://pub.dev"
source: hosted
version: "6.3.1"
url_launcher_ios:
dependency: transitive
description:
name: url_launcher_ios
sha256: "9149d493b075ed740901f3ee844a38a00b33116c7c5c10d7fb27df8987fb51d5"
url: "https://pub.dev"
source: hosted
version: "6.2.5"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
sha256: ab360eb661f8879369acac07b6bb3ff09d9471155357da8443fd5d3cf7363811
url: "https://pub.dev"
source: hosted
version: "3.1.1"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
sha256: b7244901ea3cf489c5335bdacda07264a6e960b1c1b1a9f91e4bc371d9e68234
url: "https://pub.dev"
source: hosted
version: "3.1.0"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
sha256: "8d9e750d8c9338601e709cd0885f95825086bd8b642547f26bda435aade95d8a"
url: "https://pub.dev"
source: hosted
version: "2.3.1"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
sha256: ecf9725510600aa2bb6d7ddabe16357691b6d2805f66216a97d1b881e21beff7
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:
@ -208,5 +413,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "13.0.0"
web:
dependency: transitive
description:
name: web
sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27"
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"

View File

@ -30,6 +30,12 @@ environment:
dependencies:
flutter:
sdk: flutter
url_launcher: ^6.0.12
flutter_bloc: ^8.1.5
flutter_svg: ^2.0.10+1
# The following adds the Cupertino Icons font to your application.
@ -46,6 +52,8 @@ dev_dependencies:
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^3.0.0
http: ^1.2.1
html: 0.15.4
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec
@ -62,6 +70,10 @@ flutter:
assets:
- assets/logo-civan.png
- assets/agua.jpg
- assets/logo-fondo.png
- assets/logo-sin-texto.png
- assets/logo-sin-texto.svg
- assets/logo-fondo-verde.png
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see

View File

@ -8,7 +8,7 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:flutter_project/main.dart';
import 'package:flutter_project/main/main.dart';
void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {

View File

@ -6,6 +6,9 @@
#include "generated_plugin_registrant.h"
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
}

View File

@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
url_launcher_windows
)
list(APPEND FLUTTER_FFI_PLUGIN_LIST