commit 813c586a1c631dc2a9cbe36ec587327bfc72e8bb Author: Abraham Date: Tue Jul 15 16:40:14 2025 -0700 save before flutter upgrade diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..29a3a50 --- /dev/null +++ b/.gitignore @@ -0,0 +1,43 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.buildlog/ +.history +.svn/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..8629a4e --- /dev/null +++ b/.metadata @@ -0,0 +1,45 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "abb292a07e20d696c4568099f918f6c5f330e6b0" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + - platform: android + create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + - platform: ios + create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + - platform: linux + create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + - platform: macos + create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + - platform: web + create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + - platform: windows + create_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + base_revision: abb292a07e20d696c4568099f918f6c5f330e6b0 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/README.md b/README.md new file mode 100644 index 0000000..f73da7f --- /dev/null +++ b/README.md @@ -0,0 +1,16 @@ +# nethive_neo + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..6f56801 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..eed3cc8 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,67 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + +def localProperties = new Properties() +def localPropertiesFile = rootProject.file('local.properties') +if (localPropertiesFile.exists()) { + localPropertiesFile.withReader('UTF-8') { reader -> + localProperties.load(reader) + } +} + +def flutterVersionCode = localProperties.getProperty('flutter.versionCode') +if (flutterVersionCode == null) { + flutterVersionCode = '1' +} + +def flutterVersionName = localProperties.getProperty('flutter.versionName') +if (flutterVersionName == null) { + flutterVersionName = '1.0' +} + +android { + namespace "com.example.nethive_neo" + compileSdk flutter.compileSdkVersion + ndkVersion flutter.ndkVersion + + compileOptions { + sourceCompatibility JavaVersion.VERSION_1_8 + targetCompatibility JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = '1.8' + } + + sourceSets { + main.java.srcDirs += 'src/main/kotlin' + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId "com.example.nethive_neo" + // You can update the following values to match your application needs. + // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. + minSdkVersion flutter.minSdkVersion + targetSdkVersion flutter.targetSdkVersion + versionCode flutterVersionCode.toInteger() + versionName flutterVersionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig signingConfigs.debug + } + } +} + +flutter { + source '../..' +} + +dependencies {} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..5f57dc5 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/nethive_neo/MainActivity.kt b/android/app/src/main/kotlin/com/example/nethive_neo/MainActivity.kt new file mode 100644 index 0000000..9330e4b --- /dev/null +++ b/android/app/src/main/kotlin/com/example/nethive_neo/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.nethive_neo + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100644 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100644 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100644 index 0000000..db77bb4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100644 index 0000000..17987b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100644 index 0000000..09d4391 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100644 index 0000000..d5f1c8d Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100644 index 0000000..4d6372e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..bc157bd --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = '../build' +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(':app') +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..598d13f --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..e1ca574 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.3-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..1d6d19b --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,26 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + } + settings.ext.flutterSdkPath = flutterSdkPath() + + includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.3.0" apply false + id "org.jetbrains.kotlin.android" version "1.7.10" apply false +} + +include ":app" diff --git a/assets/referenciamain.txt b/assets/referenciamain.txt new file mode 100644 index 0000000..bbdd69b --- /dev/null +++ b/assets/referenciamain.txt @@ -0,0 +1,193 @@ +import 'package:cbluna_crm_lu/providers/book_details_provider.dart'; +import 'package:dio/dio.dart'; +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:provider/provider.dart'; +import 'package:url_strategy/url_strategy.dart'; +import 'package:supabase_flutter/supabase_flutter.dart'; +import 'package:flutter_portal/flutter_portal.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; + +import 'package:cbluna_crm_lu/helpers/constants.dart'; +import 'package:cbluna_crm_lu/helpers/globals.dart'; +import 'package:cbluna_crm_lu/helpers/scroll_behavior.dart'; +import 'package:cbluna_crm_lu/internationalization/internationalization.dart'; +import 'package:cbluna_crm_lu/models/sales/suggestions_api.dart'; +import 'package:cbluna_crm_lu/models/sales/suggestions_repository_impl.dart'; +import 'package:cbluna_crm_lu/providers/cart_provider.dart'; +import 'package:cbluna_crm_lu/providers/content_manager_provider.dart'; +import 'package:cbluna_crm_lu/providers/content_manager_lu_provider.dart'; +import 'package:cbluna_crm_lu/providers/purchase_order_provider.dart'; +import 'package:cbluna_crm_lu/providers/step1_form_provider.dart'; +import 'package:cbluna_crm_lu/providers/providers.dart'; +import 'package:cbluna_crm_lu/providers/sales_form_view_provider.dart'; +import 'package:cbluna_crm_lu/providers/step2_form_provider.dart'; +import 'package:cbluna_crm_lu/providers/step3_form_provider.dart'; +import 'package:cbluna_crm_lu/providers/step4_form_provider.dart'; +import 'package:cbluna_crm_lu/providers/support_provider.dart'; +import 'package:cbluna_crm_lu/router/router.dart'; +import 'package:cbluna_crm_lu/theme/theme.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + setPathUrlStrategy(); + await Supabase.initialize( + url: supabaseUrl, + anonKey: anonKey, + realtimeClientOptions: const RealtimeClientOptions( + eventsPerSecond: 2, + ), + ); + + supabaseLU = SupabaseClient(supabaseUrl, anonKey, schema: 'lectores_urb'); + + await initGlobals(); + + GoRouter.optionURLReflectsImperativeAPIs = true; + + runApp( + MultiProvider( + providers: [ + ChangeNotifierProvider( + create: (_) => UserState(), + ), + ChangeNotifierProvider( + create: (context) => VisualStateProvider(context), + ), + ChangeNotifierProvider( + create: (_) => CustomersProvider(), + ), + ChangeNotifierProvider( + create: (_) => UsersProvider(), + ), + ChangeNotifierProvider( + create: (_) => OrdersProvider(), + ), + ChangeNotifierProvider( + create: (_) => InventoryProvider(), + ), + ChangeNotifierProvider( + create: (_) => PurchaseOrderProvider(), + ), + ChangeNotifierProvider( + create: (_) => ServiceOrderProvider(), + ), + ChangeNotifierProvider( + create: (_) => VideosProvider(), + ), + ChangeNotifierProvider( + create: (_) => BooksProvider(), + ), + ChangeNotifierProvider( + create: (_) => BillingProvider(), + ), + ChangeNotifierProvider( + create: (_) => CartProvider(), + ), + ChangeNotifierProvider(create: (_) => SupportProvider()), + ChangeNotifierProvider( + create: (_) => SalesFormViewProvider(), + ), + ChangeNotifierProvider( + create: (_) => Step1FormProvider(), + ), + ChangeNotifierProvider( + create: (_) => Step2FormProvider( + SuggestionsRepositoryImpl( + SuggestionsAPI(Dio()), + ), + UniqueKey(), + notify: true), + ), + ChangeNotifierProvider( + create: (_) => Step3FormProvider(), + ), + ChangeNotifierProvider( + create: (_) => Step4FormProvider( + SuggestionsRepositoryImpl( + SuggestionsAPI(Dio()), + ), + UniqueKey(), + notify: true), + ), + ChangeNotifierProvider( + create: (_) => ContentManagerProvider(), + ), + ChangeNotifierProvider( + create: (_) => CRMProvider(), + ), + ChangeNotifierProvider( + create: (_) => ContentManagerLUProvider(), + ), + ChangeNotifierProvider( + create: (_) => QRCodeProvider(), + ), + ChangeNotifierProvider( + create: (_) => BookDetailsProvider(), + ), + ChangeNotifierProvider( + create: (_) => CouponsProvider(), + ), + ChangeNotifierProvider( + create: (_) => BibliotecaVideosProvider(), + ), + ChangeNotifierProvider( + create: (_) => BibliotecaProvider(), + ), + ], + child: const MyApp(), + ), + ); +} + +class MyApp extends StatefulWidget { + const MyApp({Key? key}) : super(key: key); + + // This widget is the root of your application. + @override + State createState() => _MyAppState(); + + static _MyAppState of(BuildContext context) => + context.findAncestorStateOfType<_MyAppState>()!; +} + +class _MyAppState extends State { + Locale _locale = const Locale('es'); + ThemeMode _themeMode = AppTheme.themeMode; + + void setLocale(Locale value) => setState(() => _locale = value); + void setThemeMode(ThemeMode mode) => setState(() { + _themeMode = mode; + AppTheme.saveThemeMode(mode); + }); + + @override + Widget build(BuildContext context) { + return Portal( + child: MaterialApp.router( + title: 'CRM LU', + debugShowCheckedModeBanner: false, + locale: _locale, + localizationsDelegates: const [ + AppLocalizationsDelegate(), + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + supportedLocales: const [Locale('en', 'US')], + theme: ThemeData( + brightness: Brightness.light, + dividerColor: Colors.grey, + ), + darkTheme: ThemeData( + brightness: Brightness.dark, + dividerColor: Colors.grey, + ), + themeMode: _themeMode, + routerConfig: router, + scrollBehavior: MyCustomScrollBehavior(), + ), + ); + } +} diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100644 index 0000000..7a7f987 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100644 index 0000000..7c56964 --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 12.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100644 index 0000000..592ceee --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1 @@ +#include "Generated.xcconfig" diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..2940c83 --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,616 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.nethiveNeo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.nethiveNeo.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.nethiveNeo.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.nethiveNeo.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.nethiveNeo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.nethiveNeo; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..8e3ca5d --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..1d526a1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100644 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100644 index 0000000..70693e4 --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import UIKit +import Flutter + +@UIApplicationMain +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..7353c41 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..6ed2d93 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cd7b00 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fe73094 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..321773c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..502f463 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..e9f5fea Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..84ac32a Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..8953cba Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..0467bf1 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100644 index 0000000..0bedcf2 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100644 index 0000000..89c2725 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100644 index 0000000..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100644 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..03a24c8 --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Nethive Neo + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + nethive_neo + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100644 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/lib/functions/check_password.dart b/lib/functions/check_password.dart new file mode 100644 index 0000000..407aff2 --- /dev/null +++ b/lib/functions/check_password.dart @@ -0,0 +1,12 @@ +String? checkPassword(String password) { + if (password.length < 8) { + return 'La contraseña debe tener al menos 8 caracteres'; + } + final RegExp regex = + RegExp(r'^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$'); + final RegExpMatch? match = regex.firstMatch(password); + if (match == null) { + return 'La contraseña debe tener al menos un número, una letra mayúscula, una letra minúscula, un caracter especial y no debe tener números ni letras consecutivas'; + } + return null; +} diff --git a/lib/functions/date_format.dart b/lib/functions/date_format.dart new file mode 100644 index 0000000..062d283 --- /dev/null +++ b/lib/functions/date_format.dart @@ -0,0 +1,104 @@ +import 'package:intl/intl.dart'; + +String dateFormat( + dynamic x, // Acepta DateTime o String + [ + bool includeTime = false, + bool includeDayName = true, + bool includeTimeAgo = false, + String language = 'es_MX', +]) { + DateTime? date; + + // Verifica si es una cadena de fecha y conviértela a DateTime + if (x is String) { + date = DateTime.tryParse(x); + } else if (x is DateTime) { + date = x; + } + + if (date == null) return '-'; + + // Convierte a hora local + date = date.toLocal(); + + String formattedDate; + + // Formatea la fecha + if (!includeTime) { + if (includeDayName) { + + formattedDate = DateFormat('EEE. dd/MMM/yyyy', language).format(date); + } + else{ + formattedDate = DateFormat('dd/MMM/yyyy', language).format(date); + } + } else { + formattedDate = DateFormat('EEE. dd/MMM/yyyy HH:mm', language).format(date); + } + + // Capitaliza la primera letra del día + List parts = formattedDate.split(' '); + + if (parts.isNotEmpty) { + parts[0] = parts[0][0].toUpperCase() + parts[0].substring(1).toLowerCase(); + } + + // Capitaliza la primera letra del mes + if (parts.length >= 2) { + String datePart = parts[1]; // "dd/MMM/yyyy" o "dd/MMM/yyyy HH:mm" + List dateComponents = datePart.split('/'); + + if (dateComponents.length >= 2) { + // Capitaliza el mes + dateComponents[1] = dateComponents[1][0].toUpperCase() + + dateComponents[1].substring(1).toLowerCase(); + parts[1] = dateComponents.join('/'); + } + } + + formattedDate = parts.join(' '); + + // Manejo de includeTimeAgo + if (includeTimeAgo) { + final Duration difference = DateTime.now().difference(date); + String timeAgo = ''; + + if (difference.isNegative) { + timeAgo = '\n(hace 0 segundos)'; + } else { + if (difference.inSeconds < 60) { + timeAgo = '\n(hace ${difference.inSeconds} segundos)'; + } else if (difference.inMinutes < 60) { + timeAgo = '\n(hace ${difference.inMinutes} minutos)'; + } else if (difference.inHours < 48) { + timeAgo = '\n(hace ${difference.inHours} horas)'; + } else if (difference.inDays <= 30) { + timeAgo = '\n(hace ${difference.inDays} días)'; + } else if (difference.inDays > 30) { + timeAgo = '\n(hace ${difference.inDays ~/ 30} meses)'; + } + } + + formattedDate = '$formattedDate $timeAgo'; + } + + return formattedDate; +} + +// Definir una lista de nombres de los días de la semana +List daysOfWeek = [ + 'Lunes', + 'Martes', + 'Miércoles', + 'Jueves', + 'Viernes', + 'Sábado', + 'Domingo' +]; + +// Obtener el nombre del día de la semana +String getDayName(DateTime now) { + String dayName = daysOfWeek[now.weekday - 1]; + return dayName; +} diff --git a/lib/functions/date_time_format.dart b/lib/functions/date_time_format.dart new file mode 100644 index 0000000..77777e7 --- /dev/null +++ b/lib/functions/date_time_format.dart @@ -0,0 +1,9 @@ +import 'package:intl/intl.dart'; + +String dateTimeFormat(DateTime? date) { + if (date == null) { + return '-'; + } + final formato = DateFormat('MM-dd-yyyy HH:mm:ss'); + return formato.format(date); +} diff --git a/lib/functions/day_month_format.dart b/lib/functions/day_month_format.dart new file mode 100644 index 0000000..d39eabf --- /dev/null +++ b/lib/functions/day_month_format.dart @@ -0,0 +1,11 @@ +import 'package:intl/intl.dart'; + +String dayMothFormat(DateTime fecha) { + String dia = DateFormat('d').format(fecha); + + String mes = DateFormat('MMM', 'es').format(fecha); + mes = mes[0].toUpperCase() + mes.substring(1); + mes = mes.replaceAll('.', ''); + + return '$dia $mes'; +} diff --git a/lib/functions/double_extensions.dart b/lib/functions/double_extensions.dart new file mode 100644 index 0000000..03ffa36 --- /dev/null +++ b/lib/functions/double_extensions.dart @@ -0,0 +1,8 @@ +import 'dart:math'; + +extension Precision on double { + double toPrecision(int fractionDigits) { + var mod = pow(10, fractionDigits.toDouble()).toDouble(); + return ((this * mod).round().toDouble() / mod); + } +} diff --git a/lib/functions/extract_number_from_text.dart b/lib/functions/extract_number_from_text.dart new file mode 100644 index 0000000..87e2a45 --- /dev/null +++ b/lib/functions/extract_number_from_text.dart @@ -0,0 +1,13 @@ +int? extractNumberFromText(String text) { + // Expresión regular para encontrar el primer número en el texto + RegExp regExp = RegExp(r'\d+'); + Match? match = regExp.firstMatch(text); + + // Si se encuentra un número, devolverlo como un entero + if (match != null) { + return int.tryParse(match.group(0) ?? ''); + } + + // Si no se encuentra ningún número, devolver null + return null; +} diff --git a/lib/functions/form_textfield_width.dart b/lib/functions/form_textfield_width.dart new file mode 100644 index 0000000..67e2c96 --- /dev/null +++ b/lib/functions/form_textfield_width.dart @@ -0,0 +1,4 @@ +double formTextFieldWidth(double anchoPantalla, double anchoMin, double anchoMax, double valorMin, double valorMax) { + // Fórmula de interpolación lineal para calcular tamaños adaptativos. + return valorMin + (valorMax - valorMin) * ((anchoPantalla - anchoMin) / (anchoMax - anchoMin)); +} diff --git a/lib/functions/money_format.dart b/lib/functions/money_format.dart new file mode 100644 index 0000000..f8ac98f --- /dev/null +++ b/lib/functions/money_format.dart @@ -0,0 +1,12 @@ +String moneyFormat(double x) { + List parts = x.toString().split('.'); + RegExp re = RegExp(r'\B(?=(\d{3})+(?!\d))'); + + parts[0] = parts[0].replaceAll(re, ','); + if (parts.length == 1) { + parts.add('00'); + } else { + parts[1] = parts[1].padRight(2, '0').substring(0, 2); + } + return parts.join('.'); +} diff --git a/lib/functions/money_format_3_decimals.dart b/lib/functions/money_format_3_decimals.dart new file mode 100644 index 0000000..3bfaf59 --- /dev/null +++ b/lib/functions/money_format_3_decimals.dart @@ -0,0 +1,12 @@ +String moneyFormat3Decimals(double x) { + List parts = x.toString().split('.'); + RegExp re = RegExp(r'\B(?=(\d{3})+(?!\d))'); + + parts[0] = parts[0].replaceAll(re, ','); + if (parts.length == 1) { + parts.add('00'); + } else { + parts[1] = parts[1].padRight(3, '0').substring(0, 3); + } + return parts.join('.'); +} diff --git a/lib/functions/month_name.dart b/lib/functions/month_name.dart new file mode 100644 index 0000000..3d49605 --- /dev/null +++ b/lib/functions/month_name.dart @@ -0,0 +1,11 @@ +import 'package:intl/intl.dart'; + +String monthName(int mes) { + DateTime dateTime = DateTime(DateTime.now().year, mes); + + String value = DateFormat('MMMM', 'es').format(dateTime); + + value = value[0].toUpperCase() + value.substring(1); + + return value; +} diff --git a/lib/functions/no_transition_route.dart b/lib/functions/no_transition_route.dart new file mode 100644 index 0000000..76ceeb9 --- /dev/null +++ b/lib/functions/no_transition_route.dart @@ -0,0 +1,15 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; + +GoRoute noTransitionRoute(String path, String name, Widget Function(BuildContext, GoRouterState) builder, {List? subroutes}) { + return GoRoute( + path: path, + name: name, + pageBuilder: (context, state) { + return NoTransitionPage( + child: builder(context, state), + ); + }, + routes: subroutes ?? [], + ); +} diff --git a/lib/functions/phone_format.dart b/lib/functions/phone_format.dart new file mode 100644 index 0000000..75beba2 --- /dev/null +++ b/lib/functions/phone_format.dart @@ -0,0 +1,4 @@ +String formatPhone(String phone) { + if (phone.length != 10) return phone; + return '(${phone.substring(0, 3)}) ${phone.substring(3, 6)} ${phone.substring(6, 8)} ${phone.substring(8, 10)}'; +} diff --git a/lib/functions/tokens.dart b/lib/functions/tokens.dart new file mode 100644 index 0000000..d7faf9b --- /dev/null +++ b/lib/functions/tokens.dart @@ -0,0 +1,20 @@ +import 'dart:convert'; +import 'dart:developer'; + +import 'package:dart_jsonwebtoken/dart_jsonwebtoken.dart'; +import 'package:nethive_neo/models/models.dart'; + +Token? parseToken(String token) { + try { + // Verify a token + final jwt = JWT.verify(token, SecretKey('secret')); + return Token.fromJson(json.encode(jwt.payload), token); + } on JWTExpiredException { + log('JWT expirada'); + } on JWTException catch (ex) { + log('Error en checkToken - $ex'); + } on Exception { + return null; + } + return null; +} diff --git a/lib/helpers/color_extension.dart b/lib/helpers/color_extension.dart new file mode 100644 index 0000000..123356d --- /dev/null +++ b/lib/helpers/color_extension.dart @@ -0,0 +1,34 @@ +import 'dart:ui'; + +extension ColorExtension on Color { + /// Convert the color to a darken color based on the [percent] + Color darken([int percent = 40]) { + assert(1 <= percent && percent <= 100); + final value = 1 - percent / 100; + return Color.fromARGB( + alpha, + (red * value).round(), + (green * value).round(), + (blue * value).round(), + ); + } + + Color lighten([int percent = 40]) { + assert(1 <= percent && percent <= 100); + final value = percent / 100; + return Color.fromARGB( + alpha, + (red + ((255 - red) * value)).round(), + (green + ((255 - green) * value)).round(), + (blue + ((255 - blue) * value)).round(), + ); + } + + Color avg(Color other) { + final red = (this.red + other.red) ~/ 2; + final green = (this.green + other.green) ~/ 2; + final blue = (this.blue + other.blue) ~/ 2; + final alpha = (this.alpha + other.alpha) ~/ 2; + return Color.fromARGB(alpha, red, green, blue); + } +} diff --git a/lib/helpers/constants.dart b/lib/helpers/constants.dart new file mode 100644 index 0000000..f6b7683 --- /dev/null +++ b/lib/helpers/constants.dart @@ -0,0 +1,30 @@ +//////// DEV CBLUNA //////// +const String supabaseUrl = 'https://cbl-supabase.virtalus.cbluna-dev.com'; +const String anonKey = + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.ewogICJyb2xlIjogImFub24iLAogICJpc3MiOiAic3VwYWJhc2UiLAogICJpYXQiOiAxNzE1MjM4MDAwLAogICJleHAiOiAxODczMDA0NDAwCn0.qKqYn2vjtHqKqyt1FAghuIjvNsyr9b1ElpVfvJg6zJ4'; +const String storageBooksCover = + 'https://cbl-supabase.virtalus.cbluna-dev.com/storage/v1/object/public/lectores_urb/books_cover/'; +const String storageBooks = 'lectores_urb/books'; + +const redirectUrl = '$supabaseUrl/change-pass/change-password/token'; + +const String apiGatewayUrl = 'https://cbl.virtalus.cbluna-dev.com/uapi/lu/api'; +const String n8nUrl = 'https://u-n8n.virtalus.cbluna-dev.com/webhook'; +const bearerApiGateway = "Basic YWlyZmxvdzpjYiF1bmEyMDIz"; + +const int organizationId = 10; +const String lectoresUrl = 'https://lectoresurbanos.com/'; + +const themeId = String.fromEnvironment('themeId', defaultValue: '2'); +const int mobileSize = 800; + +//GoogleMaps +const apiKey = '-plDP_dR7XAGxBSiHgTFyxkxNdjFFHqjQK9ge8b92CE'; + +//Stripe +const stripeKey = + 'sk_test_51QB3lZRxye2e7dlWyeWcHWmgsJ9kEbIz4lrgJtUIKuC7WEB0HM0njk6Mcgq1q1H9GTs7fByRZdvxHaSAGhzcBqYF00fLxZU9E9'; +const authorizationKey = 'Bearer $stripeKey'; + +const urlStripe = 'https://api.stripe.com'; +const idPricePlanRentaQR = 'price_1QPaDnRxye2e7dlWORf4GoHS'; diff --git a/lib/helpers/globals.dart b/lib/helpers/globals.dart new file mode 100644 index 0000000..3b0ffc9 --- /dev/null +++ b/lib/helpers/globals.dart @@ -0,0 +1,325 @@ +import 'package:flutter/material.dart'; +import 'package:flutter_secure_storage/flutter_secure_storage.dart'; +import 'package:shared_preferences/shared_preferences.dart'; +import 'package:pluto_grid/pluto_grid.dart'; +import 'package:supabase_flutter/supabase_flutter.dart' hide User; + +import 'package:nethive_neo/helpers/supabase/queries.dart'; +import 'package:nethive_neo/models/models.dart'; +import 'package:nethive_neo/theme/theme.dart'; + +final GlobalKey snackbarKey = + GlobalKey(); + +const storage = FlutterSecureStorage(); + +final supabase = Supabase.instance.client; +late SupabaseClient supabaseLU; + +late final SharedPreferences prefs; +late Configuration? theme; + +User? currentUser; + +Future initGlobals() async { + prefs = await SharedPreferences.getInstance(); + currentUser = await SupabaseQueries.getCurrentUserData(); + /* //Temas de la aplicacion + if (currentUser == null) { + Configuration? conf = await SupabaseQueries.getDefaultTheme(); + AppTheme.initConfiguration(conf); + } else { + theme = await SupabaseQueries.getUserTheme(); + AppTheme.initConfiguration(theme); + } + */ + if (currentUser == null) return; +} + +PlutoGridScrollbarConfig plutoGridScrollbarConfig(BuildContext context) { + return PlutoGridScrollbarConfig( + isAlwaysShown: true, + scrollbarThickness: 5, + hoverWidth: 20, + scrollBarColor: AppTheme.of(context).primaryColor, + ); +} + +PlutoGridStyleConfig plutoGridStyleConfig(BuildContext context, + {double rowHeight = 50}) { + return AppTheme.themeMode == ThemeMode.light + ? PlutoGridStyleConfig( + menuBackgroundColor: AppTheme.of(context).secondaryColor, + gridPopupBorderRadius: BorderRadius.circular(16), + enableColumnBorderVertical: false, + enableColumnBorderHorizontal: false, + enableCellBorderVertical: false, + enableCellBorderHorizontal: true, + columnTextStyle: AppTheme.of(context).bodyText3.override( + fontFamily: AppTheme.of(context).bodyText3Family, + color: AppTheme.of(context).primaryColor, + ), + cellTextStyle: AppTheme.of(context).bodyText3, + iconColor: AppTheme.of(context).tertiaryColor, + rowColor: Colors.transparent, + borderColor: const Color(0xFFF1F4FA), + rowHeight: rowHeight, + checkedColor: AppTheme.themeMode == ThemeMode.light + ? AppTheme.of(context).secondaryColor + : const Color(0XFF4B4B4B), + enableRowColorAnimation: true, + gridBackgroundColor: Colors.transparent, + gridBorderColor: Colors.transparent, + activatedColor: AppTheme.of(context).primaryBackground, + activatedBorderColor: AppTheme.of(context).tertiaryColor, + ) + : PlutoGridStyleConfig.dark( + menuBackgroundColor: AppTheme.of(context).secondaryColor, + gridPopupBorderRadius: BorderRadius.circular(16), + enableColumnBorderVertical: false, + enableColumnBorderHorizontal: false, + enableCellBorderVertical: false, + enableCellBorderHorizontal: true, + columnTextStyle: AppTheme.of(context).bodyText3.override( + fontFamily: 'Quicksand', + color: AppTheme.of(context).alternate, + ), + cellTextStyle: AppTheme.of(context).bodyText3, + iconColor: AppTheme.of(context).tertiaryColor, + rowColor: Colors.transparent, + borderColor: const Color(0xFFF1F4FA), + rowHeight: rowHeight, + checkedColor: AppTheme.themeMode == ThemeMode.light + ? AppTheme.of(context).secondaryColor + : const Color(0XFF4B4B4B), + enableRowColorAnimation: true, + gridBackgroundColor: Colors.transparent, + gridBorderColor: Colors.transparent, + activatedColor: AppTheme.of(context).primaryBackground, + activatedBorderColor: AppTheme.of(context).tertiaryColor, + ); +} + +PlutoGridStyleConfig plutoGridBigStyleConfig(BuildContext context) { + return AppTheme.themeMode == ThemeMode.light + ? PlutoGridStyleConfig( + menuBackgroundColor: AppTheme.of(context).secondaryColor, + gridPopupBorderRadius: BorderRadius.circular(16), + enableColumnBorderVertical: false, + enableColumnBorderHorizontal: false, + enableCellBorderVertical: false, + enableCellBorderHorizontal: true, + columnTextStyle: AppTheme.of(context).bodyText3.override( + fontFamily: 'Quicksand', + color: AppTheme.of(context).hintText, + ), + cellTextStyle: AppTheme.of(context).bodyText3, + iconColor: AppTheme.of(context).tertiaryColor, + rowColor: Colors.transparent, + borderColor: Colors.transparent, + rowHeight: 50, + checkedColor: AppTheme.themeMode == ThemeMode.light + ? AppTheme.of(context).secondaryColor + : const Color(0XFF4B4B4B), + enableRowColorAnimation: true, + gridBackgroundColor: Colors.transparent, + gridBorderColor: Colors.transparent, + activatedColor: AppTheme.of(context).primaryBackground, + activatedBorderColor: AppTheme.of(context).tertiaryColor, + columnHeight: 100, + gridBorderRadius: BorderRadius.circular(16), + ) + : PlutoGridStyleConfig.dark( + menuBackgroundColor: AppTheme.of(context).secondaryColor, + gridPopupBorderRadius: BorderRadius.circular(16), + enableColumnBorderVertical: false, + enableColumnBorderHorizontal: false, + enableCellBorderVertical: false, + enableCellBorderHorizontal: true, + columnTextStyle: AppTheme.of(context).bodyText3.override( + fontFamily: 'Quicksand', + color: AppTheme.of(context).alternate, + ), + cellTextStyle: AppTheme.of(context).bodyText3, + iconColor: AppTheme.of(context).tertiaryColor, + rowColor: Colors.transparent, + borderColor: const Color(0xFFF1F4FA), + rowHeight: 50, + checkedColor: AppTheme.themeMode == ThemeMode.light + ? AppTheme.of(context).secondaryColor + : const Color(0XFF4B4B4B), + enableRowColorAnimation: true, + gridBackgroundColor: Colors.transparent, + gridBorderColor: Colors.transparent, + activatedColor: AppTheme.of(context).primaryBackground, + activatedBorderColor: AppTheme.of(context).tertiaryColor, + columnHeight: 100, + gridBorderRadius: BorderRadius.circular(16), + ); +} + +PlutoGridStyleConfig plutoGridDashboardStyleConfig(BuildContext context) { + return AppTheme.themeMode == ThemeMode.light + ? PlutoGridStyleConfig( + menuBackgroundColor: AppTheme.of(context).secondaryColor, + gridPopupBorderRadius: BorderRadius.circular(16), + enableColumnBorderVertical: false, + enableColumnBorderHorizontal: false, + enableCellBorderVertical: false, + enableCellBorderHorizontal: true, + columnTextStyle: AppTheme.of(context).bodyText3.override( + fontFamily: 'Quicksand', + color: AppTheme.of(context).hintText, + ), + cellTextStyle: AppTheme.of(context).bodyText3, + iconColor: AppTheme.of(context).tertiaryColor, + rowColor: Colors.transparent, + borderColor: const Color(0xFFF1F4FA), + rowHeight: 50, + checkedColor: AppTheme.themeMode == ThemeMode.light + ? AppTheme.of(context).secondaryColor + : const Color(0XFF4B4B4B), + enableRowColorAnimation: true, + gridBackgroundColor: Colors.transparent, + gridBorderColor: Colors.transparent, + activatedColor: AppTheme.of(context).primaryBackground, + activatedBorderColor: AppTheme.of(context).tertiaryColor, + ) + : PlutoGridStyleConfig.dark( + menuBackgroundColor: AppTheme.of(context).secondaryColor, + gridPopupBorderRadius: BorderRadius.circular(16), + enableColumnBorderVertical: false, + enableColumnBorderHorizontal: false, + enableCellBorderVertical: false, + enableCellBorderHorizontal: true, + columnTextStyle: AppTheme.of(context).bodyText3.override( + fontFamily: 'Quicksand', + color: AppTheme.of(context).alternate, + ), + cellTextStyle: AppTheme.of(context).bodyText3, + iconColor: AppTheme.of(context).tertiaryColor, + rowColor: Colors.transparent, + borderColor: const Color(0xFFF1F4FA), + rowHeight: 50, + checkedColor: AppTheme.themeMode == ThemeMode.light + ? AppTheme.of(context).secondaryColor + : const Color(0XFF4B4B4B), + enableRowColorAnimation: true, + gridBackgroundColor: Colors.transparent, + gridBorderColor: Colors.transparent, + activatedColor: AppTheme.of(context).primaryBackground, + activatedBorderColor: AppTheme.of(context).tertiaryColor, + ); +} + +double rowHeight = 60; + +PlutoGridStyleConfig plutoGridPopUpStyleConfig(BuildContext context) { + return AppTheme.themeMode == ThemeMode.light + ? PlutoGridStyleConfig( + menuBackgroundColor: AppTheme.of(context).secondaryBackground, + gridPopupBorderRadius: BorderRadius.circular(16), + // + enableColumnBorderVertical: false, + columnTextStyle: AppTheme.of(context).bodyText3, + iconColor: AppTheme.of(context).tertiaryColor, + borderColor: Colors.transparent, + // + rowHeight: 40, + rowColor: Colors.transparent, + cellTextStyle: AppTheme.of(context).bodyText3.override( + fontFamily: AppTheme.of(context).bodyText3Family, + color: AppTheme.of(context).primaryText, + ), + enableColumnBorderHorizontal: false, + enableCellBorderVertical: false, + enableCellBorderHorizontal: false, + checkedColor: Colors.transparent, + enableRowColorAnimation: false, + gridBackgroundColor: Colors.transparent, + gridBorderColor: Colors.transparent, + // + activatedColor: AppTheme.of(context).primaryBackground, + activatedBorderColor: AppTheme.of(context).tertiaryColor, + ) + : PlutoGridStyleConfig.dark( + menuBackgroundColor: Colors.transparent, + // + enableColumnBorderVertical: false, + columnTextStyle: AppTheme.of(context).copyRightText, + iconColor: AppTheme.of(context).tertiaryColor, + borderColor: Colors.transparent, + // + rowHeight: 40, + rowColor: Colors.transparent, + cellTextStyle: AppTheme.of(context).copyRightText, + enableColumnBorderHorizontal: false, + enableCellBorderVertical: false, + enableCellBorderHorizontal: false, + checkedColor: Colors.transparent, + enableRowColorAnimation: false, + gridBackgroundColor: Colors.transparent, + gridBorderColor: Colors.transparent, + // + activatedColor: AppTheme.of(context).primaryBackground, + activatedBorderColor: AppTheme.of(context).tertiaryColor, + ); +} + +PlutoGridStyleConfig plutoGridStyleConfigContentManager(BuildContext context, + {double rowHeight = 50}) { + return AppTheme.themeMode == ThemeMode.light + ? PlutoGridStyleConfig( + menuBackgroundColor: AppTheme.of(context).secondaryColor, + gridPopupBorderRadius: BorderRadius.circular(16), + enableColumnBorderVertical: true, + enableColumnBorderHorizontal: true, + enableCellBorderVertical: true, + enableCellBorderHorizontal: true, + columnHeight: 100, + columnTextStyle: AppTheme.of(context).bodyText3.override( + fontFamily: AppTheme.of(context).bodyText3Family, + color: AppTheme.of(context).primaryColor, + ), + cellTextStyle: AppTheme.of(context).bodyText3, + iconColor: AppTheme.of(context).tertiaryColor, + rowColor: Colors.transparent, + borderColor: const Color(0xFFF1F4FA), + rowHeight: rowHeight, + checkedColor: AppTheme.themeMode == ThemeMode.light + ? AppTheme.of(context).secondaryColor + : const Color(0XFF4B4B4B), + enableRowColorAnimation: true, + gridBackgroundColor: Colors.transparent, + gridBorderColor: Colors.transparent, + activatedColor: AppTheme.of(context).primaryBackground, + activatedBorderColor: AppTheme.of(context).tertiaryColor, + gridBorderRadius: BorderRadius.circular(16), + ) + : PlutoGridStyleConfig.dark( + menuBackgroundColor: AppTheme.of(context).secondaryColor, + gridPopupBorderRadius: BorderRadius.circular(16), + enableColumnBorderVertical: true, + enableColumnBorderHorizontal: true, + enableCellBorderVertical: true, + enableCellBorderHorizontal: true, + columnHeight: 100, + columnTextStyle: AppTheme.of(context).bodyText3.override( + fontFamily: 'Quicksand', + color: AppTheme.of(context).alternate, + ), + cellTextStyle: AppTheme.of(context).bodyText3, + iconColor: AppTheme.of(context).tertiaryColor, + rowColor: Colors.transparent, + borderColor: const Color(0xFFF1F4FA), + rowHeight: rowHeight, + checkedColor: AppTheme.themeMode == ThemeMode.light + ? AppTheme.of(context).secondaryColor + : const Color(0XFF4B4B4B), + enableRowColorAnimation: true, + gridBackgroundColor: Colors.transparent, + gridBorderColor: Colors.transparent, + activatedColor: AppTheme.of(context).primaryBackground, + activatedBorderColor: AppTheme.of(context).tertiaryColor, + ); +} diff --git a/lib/helpers/scroll_behavior.dart b/lib/helpers/scroll_behavior.dart new file mode 100644 index 0000000..78f5e59 --- /dev/null +++ b/lib/helpers/scroll_behavior.dart @@ -0,0 +1,12 @@ +// Create Custom Scroll Class for web Drap Behaviour: +import 'package:flutter/gestures.dart'; +import 'package:flutter/material.dart'; + +class MyCustomScrollBehavior extends MaterialScrollBehavior { + // Override behavior methods and getters like dragDevices + @override + Set get dragDevices => { + PointerDeviceKind.touch, + PointerDeviceKind.mouse, + }; +} diff --git a/lib/helpers/supabase/queries.dart b/lib/helpers/supabase/queries.dart new file mode 100644 index 0000000..cfab85f --- /dev/null +++ b/lib/helpers/supabase/queries.dart @@ -0,0 +1,87 @@ +import 'dart:convert'; +import 'dart:developer'; + +import 'package:supabase_flutter/supabase_flutter.dart' hide User; +import 'package:nethive_neo/helpers/globals.dart'; +import 'package:nethive_neo/models/models.dart'; + +class SupabaseQueries { + static Future getCurrentUserData() async { + try { + final user = supabase.auth.currentUser; + if (user == null) return null; + + final PostgrestFilterBuilder query = + supabase.from('users').select().eq('user_profile_id', user.id); + + final res = await query; + + final userProfile = res[0]; + userProfile['id'] = user.id; + userProfile['email'] = user.email!; + + final usuario = User.fromMap(userProfile); + + return usuario; + } catch (e) { + log('Error en getCurrentUserData() - $e'); + return null; + } + } + + static Future getDefaultTheme() async { + try { + final res = await supabase.from('theme').select().eq('id', 1); + return Configuration.fromJson(jsonEncode(res[0])); + } catch (e) { + log('Error en getDefaultTheme() - $e'); + return null; + } + } + + static Future getUserTheme() async { + try { + if (currentUser == null) return null; + final res = await supabase.from('users').select('config').eq( + 'sequential_id', + currentUser! + .sequentialId); //final res = await supabase.from('theme').select().eq('id', 2); + return Configuration.fromJson(jsonEncode(res[0])); + } catch (e) { + log('Error en getUserTheme() - $e'); + return null; + } + } + + static Future tokenChangePassword(String id, String newPassword) async { + try { + final res = await supabase.rpc('token_change_password', params: { + 'user_id': id, + 'new_password': newPassword, + }); + + if (res['data'] == true) { + return true; + } + } catch (e) { + log('Error en tokenChangePassword() - $e'); + } + return false; + } + + static Future saveToken( + String userId, + String tokenType, + String token, + ) async { + try { + await supabase + .from('token') + .upsert({'user_id': userId, tokenType: token}); + return true; + } catch (e) { + log('Error en saveToken() - $e'); + } + return false; + } +} diff --git a/lib/internationalization/internationalization.dart b/lib/internationalization/internationalization.dart new file mode 100644 index 0000000..df572dd --- /dev/null +++ b/lib/internationalization/internationalization.dart @@ -0,0 +1,44 @@ +import 'package:flutter/material.dart'; +import 'package:flutter/foundation.dart'; + +class AppLocalizations { + AppLocalizations(this.locale); + + final Locale locale; + + static AppLocalizations of(BuildContext context) => + Localizations.of(context, AppLocalizations)!; + + static List languages() => ['en']; + + String get languageCode => locale.languageCode; + int get languageIndex => languages().contains(languageCode) + ? languages().indexOf(languageCode) + : 0; + + String getText(String key) => + (kTranslationsMap[key] ?? {})[locale.languageCode] ?? ''; + + String getVariableText({ + String enText = '', + }) => + [enText][languageIndex]; +} + +class AppLocalizationsDelegate extends LocalizationsDelegate { + const AppLocalizationsDelegate(); + + @override + bool isSupported(Locale locale) => + AppLocalizations.languages().contains(locale.languageCode); + + @override + Future load(Locale locale) => + SynchronousFuture(AppLocalizations(locale)); + + @override + bool shouldReload(AppLocalizationsDelegate old) => false; +} + +final kTranslationsMap = + >>[].reduce((a, b) => a..addAll(b)); diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..aeca207 --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,131 @@ +import 'package:flutter/material.dart'; +import 'package:go_router/go_router.dart'; +import 'package:nethive_neo/helpers/scroll_behavior.dart'; +import 'package:nethive_neo/internationalization/internationalization.dart'; +import 'package:nethive_neo/router/router.dart'; +import 'package:nethive_neo/theme/theme.dart'; +import 'package:provider/provider.dart'; +import 'package:supabase_flutter/supabase_flutter.dart'; + +import 'package:nethive_neo/providers/user_provider.dart'; +import 'package:nethive_neo/providers/visual_state_provider.dart'; +import 'package:nethive_neo/providers/users_provider.dart'; +import 'package:nethive_neo/helpers/globals.dart'; +import 'package:url_strategy/url_strategy.dart'; + +import 'package:nethive_neo/helpers/constants.dart'; +import 'package:flutter_portal/flutter_portal.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; + +void main() async { + WidgetsFlutterBinding.ensureInitialized(); + + setPathUrlStrategy(); + await Supabase.initialize( + url: supabaseUrl, + anonKey: anonKey, + realtimeClientOptions: const RealtimeClientOptions( + eventsPerSecond: 2, + ), + ); + + supabaseLU = SupabaseClient(supabaseUrl, anonKey, schema: 'nethive'); + + await initGlobals(); + + GoRouter.optionURLReflectsImperativeAPIs = true; + + runApp( + MultiProvider( + providers: [ + ChangeNotifierProvider(create: (_) => UserState()), + ChangeNotifierProvider( + create: (context) => VisualStateProvider(context)), + ChangeNotifierProvider(create: (_) => UsersProvider()), + ], + child: const MyApp(), + ), + ); +} + +class MyApp extends StatefulWidget { + const MyApp({Key? key}) : super(key: key); + + @override + State createState() => _MyAppState(); + + static _MyAppState of(BuildContext context) => + context.findAncestorStateOfType<_MyAppState>()!; +} + +class _MyAppState extends State { + Locale _locale = const Locale('es'); + ThemeMode _themeMode = ThemeMode.light; + + void setLocale(Locale value) => setState(() => _locale = value); + void setThemeMode(ThemeMode mode) => setState(() => _themeMode = mode); + + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Nethive Neo', + theme: ThemeData( + primarySwatch: Colors.blue, + ), + darkTheme: ThemeData.dark(), + themeMode: _themeMode, + locale: _locale, + home: const Placeholder(), // Cambia esto por tu pantalla inicial + ); + } +} +/* class MyApp extends StatefulWidget { + const MyApp({Key? key}) : super(key: key); + + // This widget is the root of your application. + @override + State createState() => _MyAppState(); + + static _MyAppState of(BuildContext context) => + context.findAncestorStateOfType<_MyAppState>()!; +} + +class _MyAppState extends State { + Locale _locale = const Locale('es'); + ThemeMode _themeMode = AppTheme.themeMode; + + void setLocale(Locale value) => setState(() => _locale = value); + void setThemeMode(ThemeMode mode) => setState(() { + _themeMode = mode; + AppTheme.saveThemeMode(mode); + }); + + @override + Widget build(BuildContext context) { + return Portal( + child: MaterialApp.router( + title: 'NETHIVE', + debugShowCheckedModeBanner: false, + locale: _locale, + localizationsDelegates: const [ + AppLocalizationsDelegate(), + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + supportedLocales: const [Locale('en', 'US')], + theme: ThemeData( + brightness: Brightness.light, + dividerColor: Colors.grey, + ), + darkTheme: ThemeData( + brightness: Brightness.dark, + dividerColor: Colors.grey, + ), + themeMode: _themeMode, + routerConfig: router, + scrollBehavior: MyCustomScrollBehavior(), + ), + ); + } +} */ diff --git a/lib/models/billing/billing_process.dart b/lib/models/billing/billing_process.dart new file mode 100644 index 0000000..ebb0ffc --- /dev/null +++ b/lib/models/billing/billing_process.dart @@ -0,0 +1,34 @@ +import 'dart:convert'; + +class BillingProcess { + BillingProcess({ + required this.billingProcessId, + required this.createdAt, + required this.createdBy, + required this.status, + required this.customersBilled, + required this.totalBilled, + }); + + int billingProcessId; + DateTime createdAt; + String createdBy; + String status; + int customersBilled; + num totalBilled; + + factory BillingProcess.fromJson(String str) => BillingProcess.fromMap(json.decode(str)); + + factory BillingProcess.fromMap(Map json) { + BillingProcess billingProcess = BillingProcess( + billingProcessId: json["billing_process_id"], + createdAt: DateTime.parse(json['created_at']), + createdBy: json['created_by'], + status: json['status'], + customersBilled: json['customers_billed'], + totalBilled: json['total_billed'], + ); + + return billingProcess; + } +} diff --git a/lib/models/configuration.dart b/lib/models/configuration.dart new file mode 100644 index 0000000..a269b07 --- /dev/null +++ b/lib/models/configuration.dart @@ -0,0 +1,133 @@ +import 'dart:convert'; + +class Configuration { + Config? config; + + Configuration({ + this.config, + }); + + factory Configuration.fromJson(String str) => Configuration.fromMap(json.decode(str)); + + String toJson() => json.encode(toMap()); + + factory Configuration.fromMap(Map json) => Configuration( + config: json["config"] == null ? null : Config.fromMap(json["config"]), + ); + + Map toMap() => { + "config": config?.toMap(), + }; +} + +class Config { + Mode? dark; + Mode? light; + Logos? logos; + + Config({ + this.dark, + this.light, + this.logos, + }); + + factory Config.fromJson(String str) => Config.fromMap(json.decode(str)); + + String toJson() => json.encode(toMap()); + + factory Config.fromMap(Map json) => Config( + dark: json["dark"] == null ? null : Mode.fromMap(json["dark"]), + light: json["light"] == null ? null : Mode.fromMap(json["light"]), + logos: json["logos"] == null ? null : Logos.fromMap(json["logos"]), + ); + + Map toMap() => { + "dark": dark?.toMap(), + "light": light?.toMap(), + "logos": logos?.toMap(), + }; +} + +class Mode { + String? hintText; + String? alternate; + String? primaryText; + String? primaryColor; + String? tertiaryText; + String? secondaryText; + String? tertiaryColor; + String? secondaryColor; + String? primaryBackground; + String? tertiaryBackground; + String? secondaryBackground; + + Mode({ + this.hintText, + this.alternate, + this.primaryText, + this.primaryColor, + this.tertiaryText, + this.secondaryText, + this.tertiaryColor, + this.secondaryColor, + this.primaryBackground, + this.tertiaryBackground, + this.secondaryBackground, + }); + + factory Mode.fromJson(String str) => Mode.fromMap(json.decode(str)); + + String toJson() => json.encode(toMap()); + + factory Mode.fromMap(Map json) => Mode( + hintText: json["hintText"], + alternate: json["alternate"], + primaryText: json["primaryText"], + primaryColor: json["primaryColor"], + tertiaryText: json["tertiaryText"], + secondaryText: json["secondaryText"], + tertiaryColor: json["tertiaryColor"], + secondaryColor: json["secondaryColor"], + primaryBackground: json["primaryBackground"], + tertiaryBackground: json["tertiaryBackground"], + secondaryBackground: json["secondaryBackground"], + ); + + Map toMap() => { + "hintText": hintText, + "alternate": alternate, + "primaryText": primaryText, + "primaryColor": primaryColor, + "tertiaryText": tertiaryText, + "secondaryText": secondaryText, + "tertiaryColor": tertiaryColor, + "secondaryColor": secondaryColor, + "primaryBackground": primaryBackground, + "tertiaryBackground": tertiaryBackground, + "secondaryBackground": secondaryBackground, + }; +} + +class Logos { + String? logoColor; + String? logoBlanco; + + Logos({ + this.logoColor, + this.logoBlanco, + }); + + factory Logos.fromJson(String str) => Logos.fromMap(json.decode(str)); + + String toJson() => json.encode(toMap()); + + factory Logos.fromMap(Map json) => Logos( + logoColor: json["logoColor"], + logoBlanco: json["logoBlanco"], + ); + + Map toMap() => { + "logoColor": logoColor, + "logoBlanco": logoBlanco, + }; +} diff --git a/lib/models/content_manager/ad_by_genre.dart b/lib/models/content_manager/ad_by_genre.dart new file mode 100644 index 0000000..888e7c2 --- /dev/null +++ b/lib/models/content_manager/ad_by_genre.dart @@ -0,0 +1,130 @@ +import 'dart:convert'; + +class AdsByGenre { + String genreName; + int videoCount; + int rowNumber; + List