diff --git a/lib/blocs/auth_bloc/auth_bloc.dart b/lib/blocs/auth_bloc/auth_bloc.dart index b27f877..ebdcae3 100644 --- a/lib/blocs/auth_bloc/auth_bloc.dart +++ b/lib/blocs/auth_bloc/auth_bloc.dart @@ -138,7 +138,7 @@ class AuthBloc extends Bloc { } } } catch (e) { - emit(const AuthStateFailure(message: "Error inesperado. PUTA 馃ジ")); + emit(const AuthStateFailure(message: "Error inesperado. 馃ジ")); } } @@ -184,7 +184,7 @@ class AuthBloc extends Bloc { // await _userRepository } catch (e) { - emit(const AuthStateFailure(message: "Error inesperado. PUTA 馃ジ")); + emit(const AuthStateFailure(message: "Error inesperado. 馃ジ")); } } diff --git a/lib/components/general_drawer.dart b/lib/components/general_drawer.dart index dcf633b..5faa3dd 100644 --- a/lib/components/general_drawer.dart +++ b/lib/components/general_drawer.dart @@ -1,12 +1,28 @@ import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:prosappco/components/general_drawer_header.dart'; import 'package:prosappco/components/general_drawer_item.dart'; import 'package:prosappco/screens/configuration/configuration_screen.dart'; +import 'package:prosappco/screens/configuration/configuration_support_screen.dart'; +import 'package:prosappco/screens/web/web_view_screen.dart'; +import 'package:url_launcher/url_launcher.dart'; class GeneralDrawer extends StatelessWidget { const GeneralDrawer({super.key}); + Future _irSugerencias() async { + const url = 'https://admin.prosapp.co/sugerencias'; + + final Uri _url = Uri.parse(url); + + if (await canLaunchUrl(_url)) { + await launchUrl(_url); + } else { + throw 'No se pudo abrir la URL $url'; + } + } + @override Widget build(BuildContext context) { return Drawer( @@ -49,13 +65,33 @@ class GeneralDrawer extends StatelessWidget { label: 'Soporte', onTap: () { Navigator.pop(context); + Navigator.push( + context, + CupertinoPageRoute( + builder: (context) => + const ConfigurationSupportScreen(), + ), + ); }, ), GeneralDrawerItem( leading: Icons.campaign_outlined, label: 'Sugerencias', onTap: () { - Navigator.pop(context); + if (kIsWeb) { + _irSugerencias(); + } else { + Navigator.push( + context, + CupertinoPageRoute( + builder: (BuildContext context) { + return WebViewScreen( + label: 'Sugerencias', + link: 'https://admin.prosapp.co/sugerencias'); + }, + ), + ); + } }, ), ], diff --git a/lib/components/general_drawer_item.dart b/lib/components/general_drawer_item.dart index 81c616b..2d7f6d8 100644 --- a/lib/components/general_drawer_item.dart +++ b/lib/components/general_drawer_item.dart @@ -2,24 +2,26 @@ import 'package:flutter/material.dart'; class GeneralDrawerItem extends StatelessWidget { final String label; + final String? subtitle; final IconData? leading; final bool trailing; final Color? color; - final VoidCallback onTap; + final VoidCallback? onTap; const GeneralDrawerItem({ super.key, required this.label, + this.subtitle, this.leading, this.trailing = false, this.color, - required this.onTap, + this.onTap, }); @override Widget build(BuildContext context) { return ListTile( - onTap: onTap, + onTap: onTap == null ? null : () => onTap!(), leading: leading == null ? null : Icon( @@ -36,6 +38,10 @@ class GeneralDrawerItem extends StatelessWidget { label, style: TextStyle(fontSize: 15, color: color), ), + subtitle: subtitle == null + ? null + : Text(subtitle ?? "", style: const TextStyle(color: Colors.black54)), + // dense: true, ); } } diff --git a/lib/dependency/app_di.dart b/lib/dependency/app_di.dart index 6525373..5da4eb5 100644 --- a/lib/dependency/app_di.dart +++ b/lib/dependency/app_di.dart @@ -9,6 +9,7 @@ import 'package:prosappco/blocs/sign_up_bloc/sign_up_bloc.dart'; import 'package:prosappco/blocs/sing_in_bloc/sign_in_bloc.dart'; import 'package:user_repository/user_repository.dart'; import 'package:city_repository/city_repository.dart'; +import 'package:setting_repository/setting_repository.dart'; class AppDI { void register() { @@ -19,6 +20,9 @@ class AppDI { injector.registerSingleton(() => FirebaseCityRepository()); + injector.registerSingleton( + () => FirebaseSettingRepository()); + injector.registerSingleton((() => AuthenticationBloc(myUserRepository: injector.get()))); diff --git a/lib/screens/about/about_screen.dart b/lib/screens/about/about_screen.dart deleted file mode 100644 index 162ac97..0000000 --- a/lib/screens/about/about_screen.dart +++ /dev/null @@ -1,10 +0,0 @@ -import 'package:flutter/material.dart'; - -class AboutScreen extends StatelessWidget { - const AboutScreen({super.key}); - - @override - Widget build(BuildContext context) { - return Placeholder(); - } -} diff --git a/lib/screens/configuration/configuration_about_screen.dart b/lib/screens/configuration/configuration_about_screen.dart new file mode 100644 index 0000000..06c4a9e --- /dev/null +++ b/lib/screens/configuration/configuration_about_screen.dart @@ -0,0 +1,103 @@ +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter/cupertino.dart'; +import 'package:injector/injector.dart'; +import 'package:prosappco/components/general_drawer_item.dart'; +import 'package:prosappco/screens/web/web_view_screen.dart'; +import 'package:setting_repository/setting_repository.dart'; +import 'package:url_launcher/url_launcher.dart'; + +class ConfigurationAboutScreen extends StatefulWidget { + const ConfigurationAboutScreen({super.key}); + + @override + State createState() => + _ConfigurationAboutScreenState(); +} + +class _ConfigurationAboutScreenState extends State { + final settingRepository = Injector.appInstance.get(); + SettingEntity? settings; + + @override + void initState() { + super.initState(); + + _loadSettings(); + } + + void _loadSettings() { + settingRepository.getSettings().then( + (value) => setState(() { + settings = value; + }), + ); + } + + void _launchURL(String url) async { + if (await canLaunch(url)) { + await launch(url, forceSafariVC: false, forceWebView: false); + } else { + throw 'No se pudo abrir el enlace $url'; + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Acerca de la aplicaci贸n'), + ), + body: ListView( + children: [ + GeneralDrawerItem( + label: 'Pol铆ticas de privacidad', + onTap: () { + if (kIsWeb) { + _launchURL(settings?.politicasPrivacidad ?? ''); + } else { + Navigator.push( + context, + CupertinoPageRoute( + builder: (BuildContext context) { + return WebViewScreen( + label: 'Pol铆ticas de privacidad', + link: settings?.politicasPrivacidad ?? '', + ); + }, + ), + ); + } + }, + trailing: true, + ), + GeneralDrawerItem( + label: 'T茅rminos y condiciones', + onTap: () { + if (kIsWeb) { + _launchURL(settings?.terminosCondiciones ?? ''); + } else { + Navigator.push( + context, + CupertinoPageRoute( + builder: (BuildContext context) { + return WebViewScreen( + label: 'T茅rminos y condiciones', + link: settings?.terminosCondiciones ?? '', + ); + }, + ), + ); + } + }, + trailing: true, + ), + GeneralDrawerItem( + label: 'Versi贸n de la aplicaci贸n', + subtitle: settings?.version, + ), + ], + ), + ); + } +} diff --git a/lib/screens/configuration/configuration_screen.dart b/lib/screens/configuration/configuration_screen.dart index 044ab2c..0c86c8d 100644 --- a/lib/screens/configuration/configuration_screen.dart +++ b/lib/screens/configuration/configuration_screen.dart @@ -127,11 +127,13 @@ import 'dart:developer'; +import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:injector/injector.dart'; import 'package:prosappco/blocs/setting_bloc/setting_bloc.dart'; import 'package:prosappco/components/general_drawer_item.dart'; +import 'package:prosappco/screens/configuration/configuration_about_screen.dart'; class ConfigurationScreen extends StatelessWidget { const ConfigurationScreen({super.key}); @@ -156,7 +158,16 @@ class ConfigurationScreen extends StatelessWidget { children: [ GeneralDrawerItem( label: 'Acerca de la aplicaci贸n', - onTap: () {}, + onTap: () { + Navigator.push( + context, + CupertinoPageRoute( + builder: (BuildContext context) { + return const ConfigurationAboutScreen(); + }, + ), + ); + }, trailing: true, ), GeneralDrawerItem( diff --git a/lib/screens/configuration/configuration_support_screen.dart b/lib/screens/configuration/configuration_support_screen.dart new file mode 100644 index 0000000..76d83e5 --- /dev/null +++ b/lib/screens/configuration/configuration_support_screen.dart @@ -0,0 +1,212 @@ +import 'package:community_material_icon/community_material_icon.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/material.dart'; +import 'package:injector/injector.dart'; +import 'package:setting_repository/setting_repository.dart'; +import 'package:url_launcher/url_launcher.dart'; +import 'package:flutter_email_sender/flutter_email_sender.dart'; + +class ConfigurationSupportScreen extends StatefulWidget { + const ConfigurationSupportScreen({super.key}); + + @override + State createState() => + _ConfigurationSupportScreenState(); +} + +class _ConfigurationSupportScreenState + extends State { + final settingRepository = Injector.appInstance.get(); + SettingEntity? settings; + final String subject = 'Soporte Prosapp'; + final String body = ''; + + @override + void initState() { + super.initState(); + + _loadSettings(); + } + + void _loadSettings() { + settingRepository.getSettings().then( + (value) => setState(() { + settings = value; + }), + ); + } + + Future _sendWhatsapp(String? number) async { + final _whatsappUrl = + 'https://api.whatsapp.com/send?phone=$number&text=Hola%21+soy+usuario+de+Prosapp+y+quisiera+conocer+mas+sobre+esta+app+%F0%9F%98%81'; + if (!await launch(_whatsappUrl)) { + ScaffoldMessenger.of(context).clearSnackBars(); + ScaffoldMessenger.of(context).showSnackBar(const SnackBar( + content: Text('Error al enviar el mensaje de WhatsApp'), + )); + } + } + + Future _sendEmail(String recipients) async { + final Email email = Email( + body: body, + subject: subject, + recipients: [recipients], + isHTML: false, + ); + + await FlutterEmailSender.send(email); + } + + void _sendEmailWeb(String recipients) async { + final email = + 'mailto:$recipients?subject=${Uri.encodeComponent(recipients)}&body=${Uri.encodeComponent(body)}'; + if (await canLaunch(email)) { + await launch(email); + } else { + ScaffoldMessenger.of(context).clearSnackBars(); + ScaffoldMessenger.of(context).showSnackBar(const SnackBar( + content: Text('Error al enviar el correo'), + )); + } + } + + @override + Widget build(BuildContext context) { + return Scaffold( + appBar: AppBar( + title: const Text('Soporte'), + ), + body: Column( + children: [ + Padding( + padding: const EdgeInsets.only(top: 30, left: 35, right: 35), + child: Text( + '${settings?.tituloSoporte}', + style: const TextStyle(fontWeight: FontWeight.w600), + ), + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 30, horizontal: 35), + child: Text(settings?.parrafoSoporte ?? 'Cargando...'), + ), + Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Material( + color: Colors.blue, // Color de fondo azul + shape: const CircleBorder(), // Forma circular + child: InkWell( + borderRadius: BorderRadius.circular( + 30), // Radio del 谩rea de interacci贸n + onTap: () { + _sendWhatsapp(settings?.numeroSoporte); + }, + child: const Padding( + padding: EdgeInsets.all(15), + child: Icon( + CommunityMaterialIcons.whatsapp, + color: Colors.white, + size: 30, + ), + ), + ), + ), + const SizedBox(width: 20), + Material( + color: Colors.blue, + shape: const CircleBorder(), + child: InkWell( + borderRadius: BorderRadius.circular(30), + onTap: () { + if (kIsWeb) { + _sendEmailWeb(settings?.emailSoporte ?? ''); + } else { + _sendEmail(settings?.emailSoporte ?? ''); + } + }, + child: const Padding( + padding: EdgeInsets.all(15), + child: Icon( + Icons.email_outlined, + color: Colors.white, + size: 30, + ), + ), + ), + ), + // ElevatedButton( + // onPressed: () { + // // _sendWhatsapp(settings?.numeroSoporte); + // }, + // style: ElevatedButton.styleFrom( + // foregroundColor: Colors.white, + // backgroundColor: const Color(0xFF2BA4EC), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(50), + // side: const BorderSide( + // color: Color(0xFF2BA4EC), + // width: 2, + // ), + // ), + // ), + // child: const Padding( + // padding: EdgeInsets.symmetric(vertical: 18, horizontal: 0), + // child: Icon( + // CommunityMaterialIcons.whatsapp, + // size: 30, + // color: Colors.white, + // ), + // ), + // ), + // const SizedBox(width: 20), + // ElevatedButton( + // onPressed: () { + // if (kIsWeb) { + // // _sendEmailWeb(settings?.emailSoporte ?? ''); + // } else { + // // _sendEmail(settings?.emailSoporte ?? ''); + // } + // }, + // style: ElevatedButton.styleFrom( + // foregroundColor: Colors.white, + // backgroundColor: const Color(0xFF2BA4EC), + // shape: RoundedRectangleBorder( + // borderRadius: BorderRadius.circular(50), + // side: const BorderSide( + // color: Color(0xFF2BA4EC), + // width: 2, + // ), + // ), + // ), + // child: const Padding( + // padding: EdgeInsets.symmetric(vertical: 18, horizontal: 0), + // child: Icon( + // Icons.email_outlined, + // size: 30, + // color: Colors.white, + // ), + // ), + // ), + ], + ), + Padding( + padding: const EdgeInsets.symmetric(vertical: 50), + child: Column( + children: [ + const Text( + 'Horario de atenci贸n:', + style: TextStyle(fontWeight: FontWeight.w600), + ), + const SizedBox(height: 20), + Text('${settings?.diasSoporte}'), + const SizedBox(height: 5), + Text('${settings?.horasSoporte}'), + ], + ), + ), + ], + ), + ); + } +} diff --git a/lib/src/presentation/screens/web_view.dart b/lib/screens/web/web_view_screen.dart similarity index 97% rename from lib/src/presentation/screens/web_view.dart rename to lib/screens/web/web_view_screen.dart index d0cd6de..a6c891b 100644 --- a/lib/src/presentation/screens/web_view.dart +++ b/lib/screens/web/web_view_screen.dart @@ -48,6 +48,11 @@ class _WebViewScreenState extends State { ..loadRequest(Uri.parse(widget.link)); } + @override + void dispose() { + super.dispose(); + } + @override Widget build(BuildContext context) { return Scaffold( diff --git a/lib/src/components/drawer_professional.dart b/lib/src/components/drawer_professional.dart index b24940d..3e4100b 100644 --- a/lib/src/components/drawer_professional.dart +++ b/lib/src/components/drawer_professional.dart @@ -3,6 +3,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; +import 'package:prosappco/screens/web/web_view_screen.dart'; import 'package:prosappco/src/authentication/authentication_repository.dart'; import 'package:prosappco/src/components/photo_view.dart'; import 'package:prosappco/src/models/user_model.dart'; diff --git a/packages/city_repository/pubspec.lock b/packages/city_repository/pubspec.lock index 4372f4c..cb1d0da 100644 --- a/packages/city_repository/pubspec.lock +++ b/packages/city_repository/pubspec.lock @@ -89,30 +89,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" - firebase_auth: - dependency: "direct main" - description: - name: firebase_auth - sha256: "17b841e1b000c3441b8ffceca88f468e078d0443db9643e77541bdfb7a3fd16b" - url: "https://pub.dev" - source: hosted - version: "4.17.8" - firebase_auth_platform_interface: - dependency: transitive - description: - name: firebase_auth_platform_interface - sha256: f294ceef40409a36c819a14280ca864fe487b44033e5276443377c66cb448310 - url: "https://pub.dev" - source: hosted - version: "7.1.8" - firebase_auth_web: - dependency: transitive - description: - name: firebase_auth_web - sha256: "1f231da900fe7ff9f2974f8adcbdb3363c410c24725978afa5dc33e1e7e62e06" - url: "https://pub.dev" - source: hosted - version: "5.9.8" firebase_core: dependency: "direct main" description: @@ -160,14 +136,6 @@ packages: description: flutter source: sdk version: "0.0.0" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" js: dependency: transitive description: @@ -277,14 +245,6 @@ 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" vector_math: dependency: transitive description: diff --git a/packages/city_repository/pubspec.yaml b/packages/city_repository/pubspec.yaml index 84fdda6..921a431 100644 --- a/packages/city_repository/pubspec.yaml +++ b/packages/city_repository/pubspec.yaml @@ -13,7 +13,6 @@ dependencies: equatable: ^2.0.5 # Firebase - firebase_auth: ^4.17.4 cloud_firestore: ^4.15.4 firebase_core: ^2.25.4 diff --git a/packages/setting_repository/lib/setting_repository.dart b/packages/setting_repository/lib/setting_repository.dart index e69de29..9f234a6 100644 --- a/packages/setting_repository/lib/setting_repository.dart +++ b/packages/setting_repository/lib/setting_repository.dart @@ -0,0 +1,6 @@ +library setting_repository; + +export 'src/models/models.dart'; +export 'src/entities/entities.dart'; +export 'src/repositories/setting_repo.dart'; +export 'src/repositories/firebase_setting_repository.dart'; diff --git a/packages/setting_repository/lib/src/entities/entities.dart b/packages/setting_repository/lib/src/entities/entities.dart new file mode 100644 index 0000000..15a67d9 --- /dev/null +++ b/packages/setting_repository/lib/src/entities/entities.dart @@ -0,0 +1 @@ +export '/src/entities/setting_entity.dart'; diff --git a/packages/setting_repository/lib/src/entities/setting_entity.dart b/packages/setting_repository/lib/src/entities/setting_entity.dart new file mode 100644 index 0000000..ee19255 --- /dev/null +++ b/packages/setting_repository/lib/src/entities/setting_entity.dart @@ -0,0 +1,107 @@ +import 'package:equatable/equatable.dart'; + +class SettingEntity extends Equatable { + final bool? tarifas; + final bool? domicilios; + final bool? google; + final String? version; + final String? horaNotificacion; + final String? tituloSoporte; + final String? parrafoSoporte; + final String? numeroSoporte; + final String? emailSoporte; + final String? diasSoporte; + final String? horasSoporte; + final String? politicasPrivacidad; + final String? politicasPrivacidadTitle; + final String? politicasPrivacidadBody; + final String? terminosCondiciones; + final String? terminosCondicionesTitle; + final String? terminosCondicionesBody; + + const SettingEntity({ + required this.tarifas, + required this.domicilios, + required this.google, + required this.version, + required this.horaNotificacion, + required this.tituloSoporte, + required this.parrafoSoporte, + required this.numeroSoporte, + required this.emailSoporte, + required this.diasSoporte, + required this.horasSoporte, + required this.politicasPrivacidad, + required this.politicasPrivacidadTitle, + required this.politicasPrivacidadBody, + required this.terminosCondiciones, + required this.terminosCondicionesTitle, + required this.terminosCondicionesBody, + }); + + static SettingEntity fromDocument(Map doc) { + return SettingEntity( + tarifas: doc['tarifas'] as bool?, + domicilios: doc['domicilios'] as bool?, + google: doc['google'] as bool?, + version: doc['version'] as String?, + horaNotificacion: doc['hora_notificacion'] as String?, + tituloSoporte: doc['titulo_soporte'] as String?, + parrafoSoporte: doc['parrafo_soporte'] as String?, + numeroSoporte: doc['numero_soporte'] as String?, + emailSoporte: doc['email_soporte'] as String?, + diasSoporte: doc['dias_soporte'] as String?, + horasSoporte: doc['horas_soporte'] as String?, + politicasPrivacidad: doc['politicas_privacidad'] as String?, + politicasPrivacidadTitle: doc['politicas_privacidad_title'] as String?, + politicasPrivacidadBody: doc['politicas_privacidad_body'] as String?, + terminosCondiciones: doc['terminos_condiciones'] as String?, + terminosCondicionesTitle: doc['terminos_condiciones_title'] as String?, + terminosCondicionesBody: doc['terminos_condiciones_body'] as String?, + ); + } + + @override + List get props => [ + tarifas, + domicilios, + google, + version, + horaNotificacion, + tituloSoporte, + parrafoSoporte, + numeroSoporte, + emailSoporte, + diasSoporte, + horasSoporte, + politicasPrivacidad, + politicasPrivacidadTitle, + politicasPrivacidadBody, + terminosCondiciones, + terminosCondicionesTitle, + terminosCondicionesBody, + ]; + + @override + String toString() { + return '''SettingEntity { + tarifas: $tarifas + domicilios: $domicilios + google: $google + version: $version + horaNotificacion: $horaNotificacion + tituloSoporte: $tituloSoporte + parrafoSoporte: $parrafoSoporte + numeroSoporte: $numeroSoporte + emailSoporte: $emailSoporte + diasSoporte: $diasSoporte + horasSoporte: $horasSoporte + politicasPrivacidad: $politicasPrivacidad + politicasPrivacidadTitle: $politicasPrivacidadTitle + politicasPrivacidadBody: $politicasPrivacidadBody + terminosCondiciones: $terminosCondiciones + terminosCondicionesTitle: $terminosCondicionesTitle + terminosCondicionesBody: $terminosCondicionesBody + }'''; + } +} diff --git a/packages/setting_repository/lib/src/models/models.dart b/packages/setting_repository/lib/src/models/models.dart new file mode 100644 index 0000000..e69de29 diff --git a/packages/setting_repository/lib/src/models/setting_ui.dart b/packages/setting_repository/lib/src/models/setting_ui.dart new file mode 100644 index 0000000..1f1d490 --- /dev/null +++ b/packages/setting_repository/lib/src/models/setting_ui.dart @@ -0,0 +1,19 @@ +import 'package:equatable/equatable.dart'; + +class SettingUi extends Equatable { + final String cityName; + final String coordsOfCity; + final String stateOfCity; + final String countryOfCity; + + const SettingUi({ + required this.cityName, + required this.coordsOfCity, + required this.stateOfCity, + required this.countryOfCity, + }); + + @override + List get props => + [cityName, coordsOfCity, stateOfCity, countryOfCity]; +} diff --git a/packages/setting_repository/lib/src/repositories/firebase_setting_repository.dart b/packages/setting_repository/lib/src/repositories/firebase_setting_repository.dart new file mode 100644 index 0000000..a151c35 --- /dev/null +++ b/packages/setting_repository/lib/src/repositories/firebase_setting_repository.dart @@ -0,0 +1,14 @@ +import 'package:setting_repository/src/entities/entities.dart'; +import 'package:setting_repository/src/repositories/setting_repo.dart'; +import 'package:cloud_firestore/cloud_firestore.dart'; + +class FirebaseSettingRepository implements SettingRepository { + final settingsCollection = FirebaseFirestore.instance.collection('settings'); + + @override + Future getSettings() async { + final DocumentSnapshot doc = await settingsCollection.doc('global').get(); + + return SettingEntity.fromDocument(doc.data() as Map); + } +} diff --git a/packages/setting_repository/lib/src/repositories/setting_repo.dart b/packages/setting_repository/lib/src/repositories/setting_repo.dart new file mode 100644 index 0000000..568b4e4 --- /dev/null +++ b/packages/setting_repository/lib/src/repositories/setting_repo.dart @@ -0,0 +1,5 @@ +import 'package:setting_repository/src/entities/entities.dart'; + +abstract class SettingRepository { + Future getSettings(); +} diff --git a/packages/setting_repository/pubspec.lock b/packages/setting_repository/pubspec.lock index 4372f4c..cb1d0da 100644 --- a/packages/setting_repository/pubspec.lock +++ b/packages/setting_repository/pubspec.lock @@ -89,30 +89,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.3.1" - firebase_auth: - dependency: "direct main" - description: - name: firebase_auth - sha256: "17b841e1b000c3441b8ffceca88f468e078d0443db9643e77541bdfb7a3fd16b" - url: "https://pub.dev" - source: hosted - version: "4.17.8" - firebase_auth_platform_interface: - dependency: transitive - description: - name: firebase_auth_platform_interface - sha256: f294ceef40409a36c819a14280ca864fe487b44033e5276443377c66cb448310 - url: "https://pub.dev" - source: hosted - version: "7.1.8" - firebase_auth_web: - dependency: transitive - description: - name: firebase_auth_web - sha256: "1f231da900fe7ff9f2974f8adcbdb3363c410c24725978afa5dc33e1e7e62e06" - url: "https://pub.dev" - source: hosted - version: "5.9.8" firebase_core: dependency: "direct main" description: @@ -160,14 +136,6 @@ packages: description: flutter source: sdk version: "0.0.0" - http_parser: - dependency: transitive - description: - name: http_parser - sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" - url: "https://pub.dev" - source: hosted - version: "4.0.2" js: dependency: transitive description: @@ -277,14 +245,6 @@ 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" vector_math: dependency: transitive description: diff --git a/packages/setting_repository/pubspec.yaml b/packages/setting_repository/pubspec.yaml index 7ef35a0..3c09a49 100644 --- a/packages/setting_repository/pubspec.yaml +++ b/packages/setting_repository/pubspec.yaml @@ -1,5 +1,5 @@ name: setting_repository -description: Dart package which manages the cities. +description: Dart package which manages the settings. publish_to: "none" version: 1.0.11+11 @@ -13,7 +13,6 @@ dependencies: equatable: ^2.0.5 # Firebase - firebase_auth: ^4.17.4 cloud_firestore: ^4.15.4 firebase_core: ^2.25.4 diff --git a/pubspec.lock b/pubspec.lock index 9296f4b..362f3b4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1004,6 +1004,13 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.0" + setting_repository: + dependency: "direct main" + description: + path: "packages/setting_repository" + relative: true + source: path + version: "1.0.11+11" shared_preferences: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 8318154..3740ca9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -56,6 +56,8 @@ dependencies: path: packages/user_repository city_repository: path: packages/city_repository + setting_repository: + path: packages/setting_repository webview_flutter: ^4.4.1 dev_dependencies: