diff --git a/flutter_soma_app/.gitignore b/flutter_soma_app/.gitignore
new file mode 100644
index 0000000..4dddf66
--- /dev/null
+++ b/flutter_soma_app/.gitignore
@@ -0,0 +1,63 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.build/
+.buildlog/
+.history
+.svn/
+.swiftpm/
+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-dependencies
+.pub-cache/
+.pub/
+/build/
+
+# Regenerados por `flutter pub get`/build a partir de los plugins en
+# pubspec.yaml; versionarlos solo genera diffs falsos entre corridas.
+windows/flutter/generated_plugin_registrant.cc
+windows/flutter/generated_plugin_registrant.h
+windows/flutter/generated_plugins.cmake
+linux/flutter/generated_plugin_registrant.cc
+linux/flutter/generated_plugin_registrant.h
+linux/flutter/generated_plugins.cmake
+macos/Flutter/GeneratedPluginRegistrant.swift
+/coverage/
+
+# 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
+
+# Environment variables
+.env
+
+# Claude Code files
+CLAUDE.md
+.claude
+.claude/
diff --git a/flutter_soma_app/.metadata b/flutter_soma_app/.metadata
new file mode 100644
index 0000000..fac5aec
--- /dev/null
+++ b/flutter_soma_app/.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: "68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3"
+ channel: "stable"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ base_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ - platform: android
+ create_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ base_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ - platform: ios
+ create_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ base_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ - platform: linux
+ create_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ base_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ - platform: macos
+ create_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ base_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ - platform: web
+ create_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ base_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ - platform: windows
+ create_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+ base_revision: 68415ad1d920f6fe5ec284f5c2febf7c4dd5b0b3
+
+ # 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/flutter_soma_app/.vscode/launch.json b/flutter_soma_app/.vscode/launch.json
new file mode 100644
index 0000000..656a4cb
--- /dev/null
+++ b/flutter_soma_app/.vscode/launch.json
@@ -0,0 +1,46 @@
+{
+ // Use IntelliSense to learn about possible attributes.
+ // Hover to view descriptions of existing attributes.
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
+ //
+ // El entorno se elige al compilar con --dart-define-from-file. Cada
+ // configuración apunta a config/dev.json o config/prod.json. Si falta el
+ // archivo, la app corta el arranque (AppEnv.assertConfigured).
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": "SOMA (dev)",
+ "request": "launch",
+ "type": "dart",
+ "args": [
+ "--dart-define-from-file=config/dev.json"
+ ]
+ },
+ {
+ "name": "SOMA (prod)",
+ "request": "launch",
+ "type": "dart",
+ "args": [
+ "--dart-define-from-file=config/prod.json"
+ ]
+ },
+ {
+ "name": "SOMA (dev · profile)",
+ "request": "launch",
+ "type": "dart",
+ "flutterMode": "profile",
+ "args": [
+ "--dart-define-from-file=config/dev.json"
+ ]
+ },
+ {
+ "name": "SOMA (dev · release)",
+ "request": "launch",
+ "type": "dart",
+ "flutterMode": "release",
+ "args": [
+ "--dart-define-from-file=config/dev.json"
+ ]
+ }
+ ]
+}
diff --git a/flutter_soma_app/README.md b/flutter_soma_app/README.md
new file mode 100644
index 0000000..2abc833
--- /dev/null
+++ b/flutter_soma_app/README.md
@@ -0,0 +1,52 @@
+# SOMA - Gym Manager
+
+App de gestión de gimnasio con Flutter y Supabase.
+
+## Setup
+
+### 1. Configurar Supabase
+
+Editá el archivo `.env` con tus credenciales de Supabase:
+
+```env
+SUPABASE_URL=https://TU-PROYECTO.supabase.co
+SUPABASE_ANON_KEY=tu-anon-key-aqui
+```
+
+### 2. Instalar dependencias
+
+```bash
+flutter pub get
+```
+
+### 3. Correr la app
+
+```bash
+flutter run
+```
+
+## Roles
+
+- **admin/superadmin**: Acceso total
+- **profesor**: Gestión de rutinas, horarios propios
+- **usuario**: Ver pagos, rutina y perfil
+
+## Estructura
+
+```
+lib/
+├── core/ # Configuración, tema, widgets compartidos
+├── features/ # Features por dominio (auth, payments, etc)
+└── main.dart
+```
+
+## Stack
+
+- Flutter + Riverpod
+- Supabase (backend)
+- GoRouter (navegación)
+- Clean Architecture
+
+## Documentación
+
+Ver [PROJECT.md](PROJECT.md) para detalles técnicos completos.
diff --git a/flutter_soma_app/analysis_options.yaml b/flutter_soma_app/analysis_options.yaml
new file mode 100644
index 0000000..f9b3034
--- /dev/null
+++ b/flutter_soma_app/analysis_options.yaml
@@ -0,0 +1 @@
+include: package:flutter_lints/flutter.yaml
diff --git a/flutter_soma_app/android/.gitignore b/flutter_soma_app/android/.gitignore
new file mode 100644
index 0000000..be3943c
--- /dev/null
+++ b/flutter_soma_app/android/.gitignore
@@ -0,0 +1,14 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+.cxx/
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/to/reference-keystore
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/flutter_soma_app/android/app/build.gradle.kts b/flutter_soma_app/android/app/build.gradle.kts
new file mode 100644
index 0000000..b24697f
--- /dev/null
+++ b/flutter_soma_app/android/app/build.gradle.kts
@@ -0,0 +1,44 @@
+plugins {
+ id("com.android.application")
+ id("kotlin-android")
+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
+ id("dev.flutter.flutter-gradle-plugin")
+}
+
+android {
+ namespace = "com.example.gimnasio_soma"
+ compileSdk = flutter.compileSdkVersion
+ ndkVersion = flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_17
+ targetCompatibility = JavaVersion.VERSION_17
+ }
+
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_17.toString()
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId = "com.example.gimnasio_soma"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://flutter.dev/to/review-gradle-config.
+ minSdk = flutter.minSdkVersion
+ targetSdk = flutter.targetSdkVersion
+ versionCode = flutter.versionCode
+ versionName = flutter.versionName
+ }
+
+ 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.getByName("debug")
+ }
+ }
+}
+
+flutter {
+ source = "../.."
+}
diff --git a/flutter_soma_app/android/app/src/debug/AndroidManifest.xml b/flutter_soma_app/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/flutter_soma_app/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/flutter_soma_app/android/app/src/main/AndroidManifest.xml b/flutter_soma_app/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..b79e862
--- /dev/null
+++ b/flutter_soma_app/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter_soma_app/android/app/src/main/kotlin/com/example/gimnasio_soma/MainActivity.kt b/flutter_soma_app/android/app/src/main/kotlin/com/example/gimnasio_soma/MainActivity.kt
new file mode 100644
index 0000000..f0d8d64
--- /dev/null
+++ b/flutter_soma_app/android/app/src/main/kotlin/com/example/gimnasio_soma/MainActivity.kt
@@ -0,0 +1,5 @@
+package com.example.gimnasio_soma
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity : FlutterActivity()
diff --git a/flutter_soma_app/android/app/src/main/res/drawable-v21/launch_background.xml b/flutter_soma_app/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/flutter_soma_app/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/flutter_soma_app/android/app/src/main/res/drawable/launch_background.xml b/flutter_soma_app/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..304732f
--- /dev/null
+++ b/flutter_soma_app/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/flutter_soma_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/flutter_soma_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..db77bb4
Binary files /dev/null and b/flutter_soma_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/flutter_soma_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/flutter_soma_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..17987b7
Binary files /dev/null and b/flutter_soma_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/flutter_soma_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/flutter_soma_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..09d4391
Binary files /dev/null and b/flutter_soma_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/flutter_soma_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/flutter_soma_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..d5f1c8d
Binary files /dev/null and b/flutter_soma_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/flutter_soma_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/flutter_soma_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..4d6372e
Binary files /dev/null and b/flutter_soma_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/flutter_soma_app/android/app/src/main/res/values-night/styles.xml b/flutter_soma_app/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/flutter_soma_app/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/flutter_soma_app/android/app/src/main/res/values/styles.xml b/flutter_soma_app/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/flutter_soma_app/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/flutter_soma_app/android/app/src/profile/AndroidManifest.xml b/flutter_soma_app/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/flutter_soma_app/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/flutter_soma_app/android/build.gradle.kts b/flutter_soma_app/android/build.gradle.kts
new file mode 100644
index 0000000..dbee657
--- /dev/null
+++ b/flutter_soma_app/android/build.gradle.kts
@@ -0,0 +1,24 @@
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+val newBuildDir: Directory =
+ rootProject.layout.buildDirectory
+ .dir("../../build")
+ .get()
+rootProject.layout.buildDirectory.value(newBuildDir)
+
+subprojects {
+ val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
+ project.layout.buildDirectory.value(newSubprojectBuildDir)
+}
+subprojects {
+ project.evaluationDependsOn(":app")
+}
+
+tasks.register("clean") {
+ delete(rootProject.layout.buildDirectory)
+}
diff --git a/flutter_soma_app/android/gradle.properties b/flutter_soma_app/android/gradle.properties
new file mode 100644
index 0000000..fbee1d8
--- /dev/null
+++ b/flutter_soma_app/android/gradle.properties
@@ -0,0 +1,2 @@
+org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
+android.useAndroidX=true
diff --git a/flutter_soma_app/android/gradle/wrapper/gradle-wrapper.properties b/flutter_soma_app/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..e4ef43f
--- /dev/null
+++ b/flutter_soma_app/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-8.14-all.zip
diff --git a/flutter_soma_app/android/settings.gradle.kts b/flutter_soma_app/android/settings.gradle.kts
new file mode 100644
index 0000000..ca7fe06
--- /dev/null
+++ b/flutter_soma_app/android/settings.gradle.kts
@@ -0,0 +1,26 @@
+pluginManagement {
+ val flutterSdkPath =
+ run {
+ val properties = java.util.Properties()
+ file("local.properties").inputStream().use { properties.load(it) }
+ val flutterSdkPath = properties.getProperty("flutter.sdk")
+ require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
+ flutterSdkPath
+ }
+
+ includeBuild("$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 "8.11.1" apply false
+ id("org.jetbrains.kotlin.android") version "2.2.20" apply false
+}
+
+include(":app")
diff --git a/flutter_soma_app/assets/images/soma_logo_black.png b/flutter_soma_app/assets/images/soma_logo_black.png
new file mode 100644
index 0000000..9098094
Binary files /dev/null and b/flutter_soma_app/assets/images/soma_logo_black.png differ
diff --git a/flutter_soma_app/assets/images/soma_logo_white.png b/flutter_soma_app/assets/images/soma_logo_white.png
new file mode 100644
index 0000000..04b1338
Binary files /dev/null and b/flutter_soma_app/assets/images/soma_logo_white.png differ
diff --git a/flutter_soma_app/assets/logo.png b/flutter_soma_app/assets/logo.png
new file mode 100644
index 0000000..628d316
Binary files /dev/null and b/flutter_soma_app/assets/logo.png differ
diff --git a/flutter_soma_app/config/example.json b/flutter_soma_app/config/example.json
new file mode 100644
index 0000000..b6b2bd3
--- /dev/null
+++ b/flutter_soma_app/config/example.json
@@ -0,0 +1,5 @@
+{
+ "ENV": "dev",
+ "SUPABASE_URL": "https://TU-PROYECTO.supabase.co",
+ "SUPABASE_ANON_KEY": "tu-anon-key-aqui"
+}
diff --git a/flutter_soma_app/devtools_options.yaml b/flutter_soma_app/devtools_options.yaml
new file mode 100644
index 0000000..fa0b357
--- /dev/null
+++ b/flutter_soma_app/devtools_options.yaml
@@ -0,0 +1,3 @@
+description: This file stores settings for Dart & Flutter DevTools.
+documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
+extensions:
diff --git a/flutter_soma_app/ios/.gitignore b/flutter_soma_app/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/flutter_soma_app/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/flutter_soma_app/ios/Flutter/AppFrameworkInfo.plist b/flutter_soma_app/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..1dc6cf7
--- /dev/null
+++ b/flutter_soma_app/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
+ 13.0
+
+
diff --git a/flutter_soma_app/ios/Flutter/Debug.xcconfig b/flutter_soma_app/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..ec97fc6
--- /dev/null
+++ b/flutter_soma_app/ios/Flutter/Debug.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
+#include "Generated.xcconfig"
diff --git a/flutter_soma_app/ios/Flutter/Release.xcconfig b/flutter_soma_app/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..c4855bf
--- /dev/null
+++ b/flutter_soma_app/ios/Flutter/Release.xcconfig
@@ -0,0 +1,2 @@
+#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
+#include "Generated.xcconfig"
diff --git a/flutter_soma_app/ios/Podfile b/flutter_soma_app/ios/Podfile
new file mode 100644
index 0000000..620e46e
--- /dev/null
+++ b/flutter_soma_app/ios/Podfile
@@ -0,0 +1,43 @@
+# Uncomment this line to define a global platform for your project
+# platform :ios, '13.0'
+
+# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
+ENV['COCOAPODS_DISABLE_STATS'] = 'true'
+
+project 'Runner', {
+ 'Debug' => :debug,
+ 'Profile' => :release,
+ 'Release' => :release,
+}
+
+def flutter_root
+ generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
+ unless File.exist?(generated_xcode_build_settings_path)
+ raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
+ end
+
+ File.foreach(generated_xcode_build_settings_path) do |line|
+ matches = line.match(/FLUTTER_ROOT\=(.*)/)
+ return matches[1].strip if matches
+ end
+ raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
+end
+
+require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)
+
+flutter_ios_podfile_setup
+
+target 'Runner' do
+ use_frameworks!
+
+ flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
+ target 'RunnerTests' do
+ inherit! :search_paths
+ end
+end
+
+post_install do |installer|
+ installer.pods_project.targets.each do |target|
+ flutter_additional_ios_build_settings(target)
+ end
+end
diff --git a/flutter_soma_app/ios/Runner.xcodeproj/project.pbxproj b/flutter_soma_app/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..6bbef56
--- /dev/null
+++ b/flutter_soma_app/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 = 13.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.gimnasioSoma;
+ 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.gimnasioSoma.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.gimnasioSoma.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.gimnasioSoma.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 = 13.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 = 13.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.gimnasioSoma;
+ 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.gimnasioSoma;
+ 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/flutter_soma_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/flutter_soma_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/flutter_soma_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter_soma_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter_soma_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/flutter_soma_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter_soma_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/flutter_soma_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/flutter_soma_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/flutter_soma_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/flutter_soma_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..e3773d4
--- /dev/null
+++ b/flutter_soma_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter_soma_app/ios/Runner.xcworkspace/contents.xcworkspacedata b/flutter_soma_app/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/flutter_soma_app/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/flutter_soma_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/flutter_soma_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/flutter_soma_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/flutter_soma_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/flutter_soma_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/flutter_soma_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/flutter_soma_app/ios/Runner/AppDelegate.swift b/flutter_soma_app/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..6266644
--- /dev/null
+++ b/flutter_soma_app/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import Flutter
+import UIKit
+
+@main
+@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/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/flutter_soma_app/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/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..dc9ada4
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..7353c41
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..6ed2d93
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..4cd7b00
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..fe73094
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..321773c
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..797d452
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..502f463
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..0ec3034
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..e9f5fea
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..84ac32a
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..8953cba
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/flutter_soma_app/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/flutter_soma_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/flutter_soma_app/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/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/flutter_soma_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/flutter_soma_app/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/flutter_soma_app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/flutter_soma_app/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/flutter_soma_app/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter_soma_app/ios/Runner/Base.lproj/Main.storyboard b/flutter_soma_app/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/flutter_soma_app/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/flutter_soma_app/ios/Runner/Info.plist b/flutter_soma_app/ios/Runner/Info.plist
new file mode 100644
index 0000000..dabaf95
--- /dev/null
+++ b/flutter_soma_app/ios/Runner/Info.plist
@@ -0,0 +1,49 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Gimnasio Soma
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ gimnasio_soma
+ 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/flutter_soma_app/ios/Runner/Runner-Bridging-Header.h b/flutter_soma_app/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/flutter_soma_app/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/flutter_soma_app/ios/RunnerTests/RunnerTests.swift b/flutter_soma_app/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 0000000..86a7c3b
--- /dev/null
+++ b/flutter_soma_app/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/flutter_soma_app/lib/core/config/app_config.dart b/flutter_soma_app/lib/core/config/app_config.dart
new file mode 100644
index 0000000..9e05990
--- /dev/null
+++ b/flutter_soma_app/lib/core/config/app_config.dart
@@ -0,0 +1,17 @@
+import 'package:gimnasio_soma/core/config/app_constants.dart';
+
+class AppConfig {
+ final int pagosVentanaEdicionMinutos;
+
+ const AppConfig({required this.pagosVentanaEdicionMinutos});
+
+ factory AppConfig.fromMap(Map map) => AppConfig(
+ pagosVentanaEdicionMinutos:
+ (map['pagos.ventana_edicion_minutos'] as num?)?.toInt() ??
+ AppConstants.pagosVentanaEdicionMinutosDefault,
+ );
+
+ static const AppConfig defaults = AppConfig(
+ pagosVentanaEdicionMinutos: AppConstants.pagosVentanaEdicionMinutosDefault,
+ );
+}
diff --git a/flutter_soma_app/lib/core/config/app_config_provider.dart b/flutter_soma_app/lib/core/config/app_config_provider.dart
new file mode 100644
index 0000000..1ca172f
--- /dev/null
+++ b/flutter_soma_app/lib/core/config/app_config_provider.dart
@@ -0,0 +1,18 @@
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+import 'package:gimnasio_soma/core/config/app_config.dart';
+import 'package:gimnasio_soma/core/config/app_constants.dart';
+import 'package:gimnasio_soma/core/config/supabase_config.dart';
+
+final appConfigProvider = FutureProvider((ref) async {
+ final prefs = await SharedPreferences.getInstance();
+ final token = prefs.getString(AppConstants.tokenKey);
+ final client = SupabaseConfig.client;
+ final params = {};
+ if (token != null) params['p_token'] = token;
+ final response = await client.rpc(AppConstants.rpcGetConfig, params: params);
+ if (response is Map) {
+ return AppConfig.fromMap(Map.from(response));
+ }
+ return AppConfig.defaults;
+});
diff --git a/flutter_soma_app/lib/core/config/app_constants.dart b/flutter_soma_app/lib/core/config/app_constants.dart
new file mode 100644
index 0000000..ded46b1
--- /dev/null
+++ b/flutter_soma_app/lib/core/config/app_constants.dart
@@ -0,0 +1,86 @@
+class AppConstants {
+ AppConstants._();
+
+ static const String appName = 'SOMA PRO';
+
+ // Layout breakpoints
+ static const double kDesktopBreakpoint = 800.0;
+ static const double kWideBreakpoint = 1200.0;
+
+ // Avatar radii
+ static const double kAvatarRadiusSm = 16.0;
+ static const double kAvatarRadiusMd = 20.0;
+ static const double kAvatarRadiusLg = 28.0;
+
+ // SharedPreferences keys
+ static const String tokenKey = 'session_token';
+ static const String usuariosViewModeKey = 'usuarios_view_mode';
+ static const String pagosViewModeKey = 'pagos_view_mode';
+
+ // Supabase RPC names - Auth
+ static const String rpcLogin = 'fc_ingresar';
+ static const String rpcIniciarSesionPorToken = 'fc_iniciar_sesion_por_token';
+ static const String rpcGetUserByToken = 'fc_obtener_usuario_por_token';
+ static const String rpcDestroySession = 'fc_eliminar_sesion';
+
+ // Supabase RPC names - Usuarios
+ static const String rpcGetUsuarios = 'fc_obtener_usuarios';
+ static const String rpcInsertUsuario = 'fc_insertar_usuario';
+ static const String rpcUpdateUsuario = 'fc_modificar_usuario';
+ static const String rpcToggleUsuarioStatus = 'fc_modificar_estado_usuario';
+ static const String rpcDeleteUsuario = 'fc_eliminar_usuario';
+ static const String rpcCambiarPropiaContrasena = 'fc_cambiar_propia_contrasena';
+ static const String rpcResetearContrasenaUsuario = 'fc_resetear_contrasena_usuario';
+
+ // Supabase RPC names - Config
+ static const String rpcGetConfig = 'fc_obtener_config';
+
+ // Supabase RPC names - Pagos
+ static const String rpcGetPagos = 'fc_obtener_pagos';
+ static const String rpcGetMisPagos = 'fc_obtener_mis_pagos';
+ static const String rpcInsertPago = 'fc_insertar_pago';
+ static const String rpcEditarPago = 'fc_editar_pago';
+ static const String rpcAnularPago = 'fc_anular_pago';
+ static const String rpcGetMetodosPago = 'fc_obtener_metodos_pago';
+ static const String rpcUpdateMetodoPago = 'fc_modificar_metodos_pago';
+
+ // Fallback local cuando appConfigProvider aún no resolvió o falló.
+ static const int pagosVentanaEdicionMinutosDefault = 30;
+
+ // Supabase RPC names - Actividades
+ static const String rpcGetActividadesTipoCuota = 'fc_obtener_actividades_tipo_cuota';
+
+ static const String rpcGetActividades = 'fc_obtener_actividades';
+ static const String rpcInsertActividad = 'fc_insertar_actividad';
+ static const String rpcUpdateActividad = 'fc_modificar_actividad';
+ static const String rpcDeleteActividad = 'fc_eliminar_actividad';
+
+ // Supabase RPC names - Horarios
+ static const String rpcObtenerHorarios = 'fc_obtener_horarios';
+ static const String rpcObtenerPlanificacionesFuturas = 'fc_obtener_planificaciones_futuras';
+ static const String rpcInsertHorarioConActividades = 'fc_insertar_horario_con_actividades';
+ static const String rpcEliminarDiaEspecial = 'fc_eliminar_dia_especial';
+
+ // Supabase RPC names - Huerfanas
+ static const String rpcObtenerReservasHuerfanas = 'fc_obtener_reservas_huerfanas';
+ static const String rpcResolverHuerfana = 'fc_resolver_huerfana';
+ static const String rpcMoverReservaHuerfana = 'fc_mover_reserva_huerfana';
+
+ // Supabase RPC names - Turnos
+ static const String rpcObtenerTurnos = 'fc_obtener_turnos';
+ static const String rpcUpsertTurno = 'fc_upsert_turno';
+ static const String rpcLimpiarTurnosAntiguos = 'fc_limpiar_turnos_antiguos';
+ static const String rpcObtenerReservasTurno = 'fc_obtener_reservas_turno';
+ static const String rpcReservarTurnoAdmin = 'fc_reservar_turno_admin';
+ static const String rpcCancelarReservaAdmin = 'fc_cancelar_reserva_admin';
+ static const String rpcObtenerEstadoCupo = 'fc_obtener_estado_cupo';
+
+ // Supabase RPC names - Usuarios Cuota
+ static const String rpcGetUsuarioTipoCuota = 'fc_obtener_usuario_tipo_cuota';
+
+ // Supabase RPC names - Tipos de Cuota
+ static const String rpcGetTiposCuota = 'fc_obtener_tipo_cuota';
+ static const String rpcInsertTipoCuota = 'fc_insertar_tipo_cuota';
+ static const String rpcUpdateTipoCuota = 'fc_modificar_tipo_cuota';
+ static const String rpcDeleteTipoCuota = 'fc_eliminar_tipo_cuota';
+}
diff --git a/flutter_soma_app/lib/core/config/app_env.dart b/flutter_soma_app/lib/core/config/app_env.dart
new file mode 100644
index 0000000..df6fea7
--- /dev/null
+++ b/flutter_soma_app/lib/core/config/app_env.dart
@@ -0,0 +1,52 @@
+/// Configuración de entorno horneada en tiempo de compilación.
+///
+/// Los valores entran al binario por `--dart-define-from-file=config/.json`
+/// (ver `config/dev.json` y `config/prod.json` en la raíz del proyecto). Son
+/// constantes de compilación: se leen con `String.fromEnvironment` y quedan
+/// fijas en el binario. NO hay archivo `.env` ni carga en runtime.
+///
+/// Si la app se compila/corre sin pasar el archivo de config, estas constantes
+/// quedan vacías y [assertConfigured] corta el arranque con un mensaje claro,
+/// en vez de dejar que la app intente conectarse a una URL vacía.
+class AppEnv {
+ AppEnv._();
+
+ /// Identidad del entorno: `'dev'` o `'prod'`. Vacío si no se pasó el archivo.
+ static const String env = String.fromEnvironment('ENV');
+
+ /// URL del proyecto Supabase del entorno.
+ static const String supabaseUrl = String.fromEnvironment('SUPABASE_URL');
+
+ /// Clave pública (anon) del entorno. Es pública por diseño (protegida por RLS),
+ /// por eso puede vivir en `config/*.json` versionado. El secreto real
+ /// (service_role / DATABASE_URL) nunca entra acá.
+ static const String supabaseAnonKey =
+ String.fromEnvironment('SUPABASE_ANON_KEY');
+
+ static bool get isDev => env == 'dev';
+ static bool get isProd => env == 'prod';
+
+ /// Falla temprano y con un mensaje accionable si la app se compiló sin
+ /// `--dart-define-from-file=config/.json`, o con un `ENV` inválido.
+ static void assertConfigured() {
+ final faltantes = [
+ if (env.isEmpty) 'ENV',
+ if (supabaseUrl.isEmpty) 'SUPABASE_URL',
+ if (supabaseAnonKey.isEmpty) 'SUPABASE_ANON_KEY',
+ ];
+ if (faltantes.isNotEmpty) {
+ throw StateError(
+ 'Configuración de entorno ausente: ${faltantes.join(', ')}. '
+ 'Compilá/corré pasando el archivo de entorno, por ejemplo:\n'
+ ' flutter run --dart-define-from-file=config/dev.json\n'
+ ' flutter build windows --dart-define-from-file=config/prod.json',
+ );
+ }
+ if (env != 'dev' && env != 'prod') {
+ throw StateError(
+ 'ENV inválido: "$env". Debe ser "dev" o "prod" '
+ '(ver config/dev.json y config/prod.json).',
+ );
+ }
+ }
+}
diff --git a/flutter_soma_app/lib/core/config/env_banner.dart b/flutter_soma_app/lib/core/config/env_banner.dart
new file mode 100644
index 0000000..c46f672
--- /dev/null
+++ b/flutter_soma_app/lib/core/config/env_banner.dart
@@ -0,0 +1,22 @@
+import 'package:flutter/material.dart';
+import 'package:gimnasio_soma/core/config/app_env.dart';
+
+/// Envuelve la app en una cinta diagonal con el nombre del entorno cuando NO es
+/// prod (ej. "DEV"), para no confundir el entorno de pruebas con el real. En
+/// prod devuelve el hijo sin envolver: no se ve ninguna cinta.
+class EnvBanner extends StatelessWidget {
+ const EnvBanner({super.key, required this.child});
+
+ final Widget child;
+
+ @override
+ Widget build(BuildContext context) {
+ if (AppEnv.isProd) return child;
+ return Banner(
+ message: AppEnv.env.toUpperCase(),
+ location: BannerLocation.topStart,
+ color: Colors.red.shade700,
+ child: child,
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/config/supabase_config.dart b/flutter_soma_app/lib/core/config/supabase_config.dart
new file mode 100644
index 0000000..b54a9be
--- /dev/null
+++ b/flutter_soma_app/lib/core/config/supabase_config.dart
@@ -0,0 +1,23 @@
+import 'package:supabase_flutter/supabase_flutter.dart';
+import 'package:gimnasio_soma/core/config/app_env.dart';
+import 'package:gimnasio_soma/core/services/soma_logger.dart';
+
+class SupabaseConfig {
+ static SupabaseClient get client => Supabase.instance.client;
+
+ static Future initialize() async {
+ await Supabase.initialize(
+ url: AppEnv.supabaseUrl,
+ anonKey: AppEnv.supabaseAnonKey,
+ );
+ }
+
+ /// RPC con logging automático de request, params, duración y resultado.
+ static Future rpc(String fn, {Map? params}) {
+ return SomaLogger.instance.logRpc(
+ fn,
+ params ?? {},
+ () async => await client.rpc(fn, params: params),
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/navigation/navigation_item.dart b/flutter_soma_app/lib/core/navigation/navigation_item.dart
new file mode 100644
index 0000000..d937a01
--- /dev/null
+++ b/flutter_soma_app/lib/core/navigation/navigation_item.dart
@@ -0,0 +1,27 @@
+import 'package:flutter/material.dart';
+
+enum SomaRole { staff, usuario }
+
+class NavigationItem {
+ final String label;
+ final IconData icon;
+ final IconData activeIcon;
+ final String path;
+ final Set allowedRoles;
+
+ const NavigationItem({
+ required this.label,
+ required this.icon,
+ required this.activeIcon,
+ required this.path,
+ required this.allowedRoles,
+ });
+
+ bool isVisibleTo(String userRole) {
+ // Mapear múltiples roles de BD al rol unificado 'staff'
+ if (userRole == 'superadmin' || userRole == 'admin' || userRole == 'profesor') {
+ return allowedRoles.contains(SomaRole.staff);
+ }
+ return allowedRoles.contains(SomaRole.usuario);
+ }
+}
diff --git a/flutter_soma_app/lib/core/navigation/navigation_items.dart b/flutter_soma_app/lib/core/navigation/navigation_items.dart
new file mode 100644
index 0000000..4fdcab0
--- /dev/null
+++ b/flutter_soma_app/lib/core/navigation/navigation_items.dart
@@ -0,0 +1,61 @@
+import 'package:flutter/material.dart';
+import 'navigation_item.dart';
+
+const List kNavigationItems = [
+ NavigationItem(
+ label: 'Usuarios',
+ icon: Icons.people_outline,
+ activeIcon: Icons.people,
+ path: '/usuarios',
+ allowedRoles: {SomaRole.staff},
+ ),
+ NavigationItem(
+ label: 'Pagos',
+ icon: Icons.payment_outlined,
+ activeIcon: Icons.payment,
+ path: '/pagos',
+ allowedRoles: {SomaRole.staff, SomaRole.usuario},
+ ),
+ // Rutinas: módulo aún no desarrollado. Se oculta de la navegación hasta
+ // implementarlo. La ruta /rutinas sigue definida en app_router (el guard
+ // redirige al primer ítem visible si se accede directamente).
+ NavigationItem(
+ label: 'Actividades',
+ icon: Icons.sports_gymnastics_outlined,
+ activeIcon: Icons.sports_gymnastics,
+ path: '/actividades',
+ allowedRoles: {SomaRole.staff},
+ ),
+ NavigationItem(
+ label: 'Horarios',
+ icon: Icons.schedule_outlined,
+ activeIcon: Icons.schedule,
+ path: '/horarios',
+ allowedRoles: {SomaRole.staff, SomaRole.usuario},
+ ),
+ NavigationItem(
+ label: 'Turnos',
+ icon: Icons.event_available_outlined,
+ activeIcon: Icons.event_available,
+ path: '/turnos',
+ allowedRoles: {SomaRole.staff},
+ ),
+ NavigationItem(
+ label: 'Planes',
+ icon: Icons.card_membership_outlined,
+ activeIcon: Icons.card_membership,
+ path: '/planes',
+ allowedRoles: {SomaRole.staff},
+ ),
+ NavigationItem(
+ label: 'Sin turno',
+ icon: Icons.warning_amber_outlined,
+ activeIcon: Icons.warning_amber,
+ path: '/huerfanas',
+ allowedRoles: {SomaRole.staff},
+ ),
+];
+
+List getVisibleItems(String userRole) {
+ return kNavigationItems.where((item) => item.isVisibleTo(userRole)).toList();
+}
diff --git a/flutter_soma_app/lib/core/navigation/navigation_shell.dart b/flutter_soma_app/lib/core/navigation/navigation_shell.dart
new file mode 100644
index 0000000..2f04e27
--- /dev/null
+++ b/flutter_soma_app/lib/core/navigation/navigation_shell.dart
@@ -0,0 +1,157 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:go_router/go_router.dart';
+import 'package:gimnasio_soma/core/navigation/navigation_item.dart';
+import 'package:gimnasio_soma/core/navigation/navigation_items.dart';
+import 'package:gimnasio_soma/core/navigation/widgets/soma_drawer.dart';
+import 'package:gimnasio_soma/core/navigation/widgets/soma_sidebar.dart';
+import 'package:gimnasio_soma/features/auth/presentation/providers/auth_provider.dart';
+
+const _kDesktopBreakpoint = 800.0;
+
+class NavigationShell extends ConsumerWidget {
+ final Widget child;
+
+ const NavigationShell({super.key, required this.child});
+
+ static const _subPageTitles = {
+ '/pagos/metodos': 'Métodos de pago',
+ };
+
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ final width = MediaQuery.of(context).size.width;
+ final isDesktop = width >= _kDesktopBreakpoint;
+ final user = ref.watch(authStateProvider).valueOrNull;
+ final currentPath = GoRouterState.of(context).matchedLocation;
+ final effectiveRole = user?.role ?? '';
+ final visibleItems =
+ user != null ? getVisibleItems(effectiveRole) : [];
+
+ // Detectar si estamos en una sub-página
+ final isSubPage = !visibleItems.any((i) => i.path == currentPath) &&
+ !{'/gallery', '/logs', '/perfil'}.contains(currentPath);
+ final parentItem = isSubPage
+ ? visibleItems
+ .where((i) => currentPath.startsWith(i.path))
+ .firstOrNull
+ : null;
+
+ final theme = Theme.of(context);
+
+ if (isDesktop) {
+ return Scaffold(
+ body: Row(
+ children: [
+ SomaSidebar(
+ items: visibleItems,
+ currentPath: currentPath,
+ user: user,
+ ),
+ Expanded(
+ child: Column(
+ children: [
+ if (isSubPage && parentItem != null)
+ _BackBar(
+ parentLabel: parentItem.label,
+ onBack: () => context.go(parentItem.path),
+ theme: theme,
+ ),
+ Expanded(child: child),
+ ],
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ // Mobile
+ return Scaffold(
+ appBar: AppBar(
+ title: Text(_titleForPath(currentPath)),
+ leading: isSubPage && parentItem != null
+ ? IconButton(
+ icon: const Icon(Icons.arrow_back),
+ onPressed: () => context.go(parentItem.path),
+ )
+ : Builder(
+ builder: (ctx) => IconButton(
+ icon: const Icon(Icons.menu),
+ onPressed: () => Scaffold.of(ctx).openDrawer(),
+ ),
+ ),
+ ),
+ drawer: isSubPage
+ ? null
+ : SomaDrawer(
+ items: visibleItems,
+ currentPath: currentPath,
+ user: user,
+ ),
+ body: child,
+ );
+ }
+
+ String _titleForPath(String path) {
+ // Primero buscar título específico de sub-página
+ final subTitle = _subPageTitles[path];
+ if (subTitle != null) return subTitle;
+
+ final item =
+ kNavigationItems.where((i) => path.startsWith(i.path)).firstOrNull;
+ return item?.label ?? 'SOMA PRO';
+ }
+}
+
+class _BackBar extends StatelessWidget {
+ final String parentLabel;
+ final VoidCallback onBack;
+ final ThemeData theme;
+
+ const _BackBar({
+ required this.parentLabel,
+ required this.onBack,
+ required this.theme,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ height: 44,
+ decoration: BoxDecoration(
+ color: theme.colorScheme.surfaceContainerHighest.withAlpha(80),
+ border: Border(
+ bottom: BorderSide(
+ color: theme.colorScheme.surfaceContainerHighest,
+ width: 0.5,
+ ),
+ ),
+ ),
+ child: InkWell(
+ onTap: onBack,
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 16),
+ child: Row(
+ children: [
+ Icon(
+ Icons.arrow_back,
+ size: 18,
+ color: theme.colorScheme.onSurface.withAlpha(178),
+ ),
+ const SizedBox(width: 8),
+ Text(
+ 'Volver a $parentLabel',
+ style: TextStyle(
+ fontSize: 13,
+ fontWeight: FontWeight.w500,
+ color: theme.colorScheme.onSurface.withAlpha(178),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/navigation/widgets/soma_drawer.dart b/flutter_soma_app/lib/core/navigation/widgets/soma_drawer.dart
new file mode 100644
index 0000000..9332c0e
--- /dev/null
+++ b/flutter_soma_app/lib/core/navigation/widgets/soma_drawer.dart
@@ -0,0 +1,112 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:go_router/go_router.dart';
+import 'package:gimnasio_soma/core/navigation/navigation_item.dart';
+import 'package:gimnasio_soma/core/navigation/widgets/soma_nav_tile.dart';
+import 'package:gimnasio_soma/core/navigation/widgets/soma_user_card.dart';
+import 'package:gimnasio_soma/core/widgets/soma_logo.dart';
+import 'package:gimnasio_soma/features/auth/domain/entities/user_session.dart';
+import 'package:gimnasio_soma/features/auth/presentation/providers/auth_provider.dart';
+
+class SomaDrawer extends ConsumerWidget {
+ final List items;
+ final String currentPath;
+ final UserSession? user;
+
+ const SomaDrawer({
+ super.key,
+ required this.items,
+ required this.currentPath,
+ required this.user,
+ });
+
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ return Drawer(
+ backgroundColor: Theme.of(context).colorScheme.surface,
+ child: SafeArea(
+ child: Column(
+ children: [
+ const SizedBox(height: 20),
+
+ // Logo
+ const SomaLogo(width: 100),
+
+ const SizedBox(height: 24),
+
+ Divider(
+ height: 1,
+ thickness: 0.5,
+ indent: 16,
+ endIndent: 16,
+ color: Theme.of(context).colorScheme.surfaceContainerHighest,
+ ),
+
+ const SizedBox(height: 8),
+
+ // Nav items
+ Expanded(
+ child: ListView.separated(
+ padding: const EdgeInsets.symmetric(horizontal: 12),
+ itemCount: items.length,
+ separatorBuilder: (_, _) => const SizedBox(height: 4),
+ itemBuilder: (context, index) {
+ final item = items[index];
+ final isActive = currentPath.startsWith(item.path);
+ return SomaNavTile(
+ item: item,
+ isActive: isActive,
+ onTap: () {
+ Navigator.of(context).pop();
+ context.go(item.path);
+ },
+ );
+ },
+ ),
+ ),
+
+ // Footer
+ Divider(
+ height: 1,
+ thickness: 0.5,
+ indent: 16,
+ endIndent: 16,
+ color: Theme.of(context).colorScheme.surfaceContainerHighest,
+ ),
+
+ SomaUserCard(
+ user: user,
+ onTap: () {
+ Navigator.of(context).pop();
+ context.go('/perfil');
+ },
+ ),
+
+ Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
+ child: Row(
+ children: [
+ const Spacer(),
+ IconButton(
+ icon: const Icon(Icons.logout, size: 20),
+ tooltip: 'Cerrar sesión',
+ onPressed: () {
+ Navigator.of(context).pop();
+ ref.read(authStateProvider.notifier).logout();
+ },
+ color: Theme.of(context)
+ .colorScheme
+ .onSurface
+ .withAlpha(153),
+ ),
+ ],
+ ),
+ ),
+
+ const SizedBox(height: 8),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/navigation/widgets/soma_nav_tile.dart b/flutter_soma_app/lib/core/navigation/widgets/soma_nav_tile.dart
new file mode 100644
index 0000000..71fd0a7
--- /dev/null
+++ b/flutter_soma_app/lib/core/navigation/widgets/soma_nav_tile.dart
@@ -0,0 +1,147 @@
+import 'package:flutter/material.dart';
+import 'package:gimnasio_soma/core/navigation/navigation_item.dart';
+import 'package:gimnasio_soma/core/theme/soma_colors.dart';
+
+class SomaNavTile extends StatelessWidget {
+ final NavigationItem item;
+ final bool isActive;
+ final bool isCollapsed;
+ final VoidCallback onTap;
+ final int? badge;
+
+ const SomaNavTile({
+ super.key,
+ required this.item,
+ required this.isActive,
+ required this.onTap,
+ this.isCollapsed = false,
+ this.badge,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ final tile = InkWell(
+ onTap: onTap,
+ mouseCursor: SystemMouseCursors.click,
+ borderRadius: BorderRadius.circular(8),
+ child: Container(
+ height: 44,
+ clipBehavior: Clip.antiAlias,
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(8),
+ color: isActive
+ ? SomaColors.primary.withAlpha(18)
+ : Colors.transparent,
+ ),
+ child: Row(
+ children: [
+ // Franja izquierda de acento: reemplaza Border(left:...) no uniforme
+ Container(
+ width: 3,
+ color: isActive ? SomaColors.primary : Colors.transparent,
+ ),
+ Expanded(
+ child: Padding(
+ padding: EdgeInsets.fromLTRB(isCollapsed ? 0 : 9, 0, isCollapsed ? 0 : 12, 0),
+ child: Row(
+ mainAxisAlignment: isCollapsed
+ ? MainAxisAlignment.center
+ : MainAxisAlignment.start,
+ children: [
+ Stack(
+ clipBehavior: Clip.none,
+ children: [
+ Icon(
+ isActive ? item.activeIcon : item.icon,
+ size: 20,
+ color: isActive
+ ? SomaColors.primary
+ : Theme.of(context)
+ .colorScheme
+ .onSurface
+ .withAlpha(153),
+ ),
+ if (badge != null && badge! > 0)
+ Positioned(
+ top: -4,
+ right: -5,
+ child: Container(
+ padding: const EdgeInsets.all(2),
+ constraints: const BoxConstraints(
+ minWidth: 14,
+ minHeight: 14,
+ ),
+ decoration: BoxDecoration(
+ color: SomaColors.error,
+ borderRadius: BorderRadius.circular(7),
+ ),
+ child: Text(
+ badge! > 99 ? '99+' : '$badge',
+ style: const TextStyle(
+ fontSize: 8,
+ fontWeight: FontWeight.w700,
+ color: Colors.white,
+ height: 1,
+ ),
+ textAlign: TextAlign.center,
+ ),
+ ),
+ ),
+ ],
+ ),
+ if (!isCollapsed) ...[
+ const SizedBox(width: 12),
+ Expanded(
+ child: Text(
+ item.label,
+ style: TextStyle(
+ fontSize: 14,
+ fontWeight:
+ isActive ? FontWeight.w600 : FontWeight.w500,
+ color: isActive
+ ? Theme.of(context).colorScheme.onSurface
+ : Theme.of(context)
+ .colorScheme
+ .onSurface
+ .withAlpha(178),
+ ),
+ ),
+ ),
+ if (badge != null && badge! > 0)
+ Container(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 6, vertical: 2),
+ decoration: BoxDecoration(
+ color: SomaColors.error,
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Text(
+ badge! > 99 ? '99+' : '$badge',
+ style: const TextStyle(
+ fontSize: 10,
+ fontWeight: FontWeight.w700,
+ color: Colors.white,
+ ),
+ ),
+ ),
+ ],
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+
+ if (isCollapsed) {
+ return Tooltip(
+ message: item.label,
+ preferBelow: false,
+ child: tile,
+ );
+ }
+
+ return tile;
+ }
+}
diff --git a/flutter_soma_app/lib/core/navigation/widgets/soma_sidebar.dart b/flutter_soma_app/lib/core/navigation/widgets/soma_sidebar.dart
new file mode 100644
index 0000000..e94a32b
--- /dev/null
+++ b/flutter_soma_app/lib/core/navigation/widgets/soma_sidebar.dart
@@ -0,0 +1,240 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:go_router/go_router.dart';
+import 'package:gimnasio_soma/core/navigation/navigation_item.dart';
+import 'package:gimnasio_soma/core/navigation/widgets/soma_nav_tile.dart';
+import 'package:gimnasio_soma/core/navigation/widgets/soma_user_card.dart';
+import 'package:gimnasio_soma/core/theme/soma_colors.dart';
+import 'package:gimnasio_soma/core/widgets/soma_logo.dart';
+import 'package:gimnasio_soma/features/auth/domain/entities/user_session.dart';
+import 'package:gimnasio_soma/features/auth/presentation/providers/auth_provider.dart';
+import 'package:gimnasio_soma/features/huerfanas/presentation/providers/huerfanas_provider.dart';
+
+final sidebarCollapsedProvider = StateProvider((ref) => false);
+
+class SomaSidebar extends ConsumerWidget {
+ final List items;
+ final String currentPath;
+ final UserSession? user;
+
+ const SomaSidebar({
+ super.key,
+ required this.items,
+ required this.currentPath,
+ required this.user,
+ });
+
+ @override
+ Widget build(BuildContext context, WidgetRef ref) {
+ final isCollapsed = ref.watch(sidebarCollapsedProvider);
+
+ Future confirmLogout() async {
+ final confirm = await showDialog(
+ context: context,
+ builder: (ctx) => AlertDialog(
+ title: const Text('Cerrar sesión'),
+ content: const Text('¿Estás seguro de que querés cerrar sesión?'),
+ actions: [
+ TextButton(
+ onPressed: () => Navigator.of(ctx).pop(false),
+ child: const Text('Cancelar'),
+ ),
+ ElevatedButton(
+ style: ElevatedButton.styleFrom(minimumSize: const Size(0, 40)),
+ onPressed: () => Navigator.of(ctx).pop(true),
+ child: const Text('Cerrar sesión'),
+ ),
+ ],
+ ),
+ );
+ if (confirm != true) return;
+ ref.read(authStateProvider.notifier).logout();
+ }
+
+ return AnimatedContainer(
+ duration: const Duration(milliseconds: 200),
+ curve: Curves.easeInOut,
+ width: isCollapsed ? 64 : 240,
+ decoration: BoxDecoration(
+ color: Theme.of(context).colorScheme.surface,
+ border: Border(
+ right: BorderSide(
+ color: Theme.of(context).colorScheme.surfaceContainerHighest,
+ width: 1,
+ ),
+ ),
+ ),
+ child: Column(
+ children: [
+ // Logo
+ Padding(
+ padding: EdgeInsets.fromLTRB(
+ isCollapsed ? 8 : 16,
+ 20,
+ isCollapsed ? 8 : 16,
+ 8,
+ ),
+ child: AnimatedCrossFade(
+ duration: const Duration(milliseconds: 200),
+ crossFadeState: isCollapsed
+ ? CrossFadeState.showSecond
+ : CrossFadeState.showFirst,
+ firstChild: const SomaLogo(width: 90),
+ secondChild: const SomaLogo(width: 32),
+ ),
+ ),
+
+ const SizedBox(height: 16),
+
+ // Nav items
+ Expanded(
+ child: ListView.separated(
+ padding: EdgeInsets.symmetric(
+ horizontal: isCollapsed ? 8 : 12,
+ ),
+ itemCount: items.length,
+ separatorBuilder: (_, _) => const SizedBox(height: 4),
+ itemBuilder: (context, index) {
+ final item = items[index];
+ final isActive = currentPath.startsWith(item.path);
+ int? badge;
+ if (item.path == '/huerfanas') {
+ badge = ref.watch(huerfanasPendienteCountProvider).valueOrNull;
+ }
+ return SomaNavTile(
+ item: item,
+ isActive: isActive,
+ isCollapsed: isCollapsed,
+ badge: badge,
+ onTap: () => context.go(item.path),
+ );
+ },
+ ),
+ ),
+
+ // Footer
+ Divider(
+ height: 1,
+ thickness: 0.5,
+ indent: isCollapsed ? 8 : 16,
+ endIndent: isCollapsed ? 8 : 16,
+ ),
+
+ SomaUserCard(
+ user: user,
+ isCollapsed: isCollapsed,
+ onTap: () => context.go('/perfil'),
+ ),
+
+ // Actions
+ Padding(
+ padding: EdgeInsets.symmetric(
+ horizontal: isCollapsed ? 8 : 12,
+ vertical: 4,
+ ),
+ child: _SidebarActionTile(
+ isCollapsed: isCollapsed,
+ icon: Icons.logout,
+ label: 'Cerrar sesión',
+ color: SomaColors.error,
+ onTap: confirmLogout,
+ ),
+ ),
+ const SizedBox(height: 2),
+
+ // Collapse toggle
+ Padding(
+ padding: EdgeInsets.symmetric(
+ horizontal: isCollapsed ? 8 : 12,
+ vertical: 4,
+ ),
+ child: _SidebarActionTile(
+ isCollapsed: isCollapsed,
+ icon: isCollapsed
+ ? Icons.keyboard_double_arrow_right
+ : Icons.keyboard_double_arrow_left,
+ label: isCollapsed ? 'Expandir panel' : 'Colapsar panel',
+ onTap: () => ref.read(sidebarCollapsedProvider.notifier).state =
+ !isCollapsed,
+ ),
+ ),
+ const SizedBox(height: 8),
+ ],
+ ),
+ );
+ }
+}
+
+class _SidebarActionTile extends StatefulWidget {
+ final bool isCollapsed;
+ final IconData icon;
+ final String label;
+ final VoidCallback onTap;
+ final Color? color;
+
+ const _SidebarActionTile({
+ required this.isCollapsed,
+ required this.icon,
+ required this.label,
+ required this.onTap,
+ this.color,
+ });
+
+ @override
+ State<_SidebarActionTile> createState() => _SidebarActionTileState();
+}
+
+class _SidebarActionTileState extends State<_SidebarActionTile> {
+ bool _hovered = false;
+
+ @override
+ Widget build(BuildContext context) {
+ final baseColor = widget.color ?? Theme.of(context).colorScheme.onSurface;
+
+ if (widget.isCollapsed) {
+ return Tooltip(
+ message: widget.label,
+ waitDuration: const Duration(milliseconds: 600),
+ child: IconButton(
+ icon: Icon(widget.icon, size: 20),
+ onPressed: widget.onTap,
+ color: baseColor.withAlpha(178),
+ splashRadius: 18,
+ ),
+ );
+ }
+
+ return MouseRegion(
+ cursor: SystemMouseCursors.click,
+ onEnter: (_) => setState(() => _hovered = true),
+ onExit: (_) => setState(() => _hovered = false),
+ child: InkWell(
+ onTap: widget.onTap,
+ borderRadius: BorderRadius.circular(8),
+ child: AnimatedContainer(
+ duration: const Duration(milliseconds: 150),
+ height: 38,
+ padding: const EdgeInsets.symmetric(horizontal: 10),
+ decoration: BoxDecoration(
+ borderRadius: BorderRadius.circular(8),
+ color: _hovered ? baseColor.withAlpha(15) : Colors.transparent,
+ ),
+ child: Row(
+ children: [
+ Icon(widget.icon, size: 18, color: baseColor.withAlpha(190)),
+ const SizedBox(width: 10),
+ Text(
+ widget.label,
+ style: TextStyle(
+ fontSize: 13,
+ fontWeight: FontWeight.w500,
+ color: baseColor.withAlpha(190),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/navigation/widgets/soma_user_card.dart b/flutter_soma_app/lib/core/navigation/widgets/soma_user_card.dart
new file mode 100644
index 0000000..48f36ac
--- /dev/null
+++ b/flutter_soma_app/lib/core/navigation/widgets/soma_user_card.dart
@@ -0,0 +1,102 @@
+import 'package:flutter/material.dart';
+import 'package:gimnasio_soma/core/theme/soma_colors.dart';
+import 'package:gimnasio_soma/features/auth/domain/entities/user_session.dart';
+
+class SomaUserCard extends StatelessWidget {
+ final UserSession? user;
+ final bool isCollapsed;
+ final VoidCallback? onTap;
+
+ const SomaUserCard({
+ super.key,
+ required this.user,
+ this.isCollapsed = false,
+ this.onTap,
+ });
+
+ String _getInitials() {
+ if (user == null) return '?';
+ final n = user!.nombre;
+ final a = user!.apellido;
+ if (n.isNotEmpty && a.isNotEmpty) {
+ return '${n[0]}${a[0]}'.toUpperCase();
+ }
+ if (n.isNotEmpty) return n[0].toUpperCase();
+ if (user!.dni.length >= 2) return user!.dni.substring(0, 2);
+ return '?';
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final avatar = CircleAvatar(
+ radius: 16,
+ backgroundColor: SomaColors.primary.withAlpha(40),
+ child: Text(
+ _getInitials(),
+ style: TextStyle(
+ color: Theme.of(context).colorScheme.onSurface,
+ fontSize: 12,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ );
+
+ if (isCollapsed) {
+ return Tooltip(
+ message: user?.displayName ?? '',
+ child: InkWell(
+ onTap: onTap,
+ mouseCursor: SystemMouseCursors.click,
+ borderRadius: BorderRadius.circular(8),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(vertical: 8),
+ child: Center(child: avatar),
+ ),
+ ),
+ );
+ }
+
+ return InkWell(
+ onTap: onTap,
+ mouseCursor: SystemMouseCursors.click,
+ borderRadius: BorderRadius.circular(8),
+ child: Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 8),
+ child: Row(
+ children: [
+ avatar,
+ const SizedBox(width: 10),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Text(
+ user?.displayName ?? '',
+ style: TextStyle(
+ fontSize: 13,
+ fontWeight: FontWeight.w500,
+ color: Theme.of(context).colorScheme.onSurface,
+ ),
+ maxLines: 1,
+ overflow: TextOverflow.ellipsis,
+ ),
+ Text(
+ user?.role ?? '',
+ style: TextStyle(
+ fontSize: 11,
+ color: Theme.of(context)
+ .colorScheme
+ .onSurface
+ .withAlpha(130),
+ ),
+ ),
+ ],
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/router/app_router.dart b/flutter_soma_app/lib/core/router/app_router.dart
new file mode 100644
index 0000000..f37b8a1
--- /dev/null
+++ b/flutter_soma_app/lib/core/router/app_router.dart
@@ -0,0 +1,157 @@
+import 'package:flutter/material.dart';
+import 'package:go_router/go_router.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:gimnasio_soma/core/navigation/navigation_items.dart';
+import 'package:gimnasio_soma/core/navigation/navigation_shell.dart';
+import 'package:gimnasio_soma/features/auth/presentation/providers/auth_provider.dart';
+import 'package:gimnasio_soma/features/auth/presentation/screens/login_screen.dart';
+import 'package:gimnasio_soma/features/auth/presentation/screens/splash_screen.dart';
+import 'package:gimnasio_soma/features/dev/logs_screen.dart';
+import 'package:gimnasio_soma/features/dev/widget_gallery_screen.dart';
+import 'package:gimnasio_soma/features/actividades/presentation/screens/actividades_screen.dart';
+import 'package:gimnasio_soma/features/perfil/presentation/screens/cambiar_contrasena_screen.dart';
+import 'package:gimnasio_soma/features/perfil/presentation/screens/perfil_screen.dart';
+import 'package:gimnasio_soma/features/horarios/presentation/screens/horarios_screen.dart';
+import 'package:gimnasio_soma/features/pagos/presentation/screens/metodos_pago_screen.dart';
+import 'package:gimnasio_soma/features/pagos/presentation/screens/pagos_screen.dart';
+import 'package:gimnasio_soma/features/tipos_cuota/presentation/screens/tipos_cuota_screen.dart';
+import 'package:gimnasio_soma/features/huerfanas/presentation/screens/huerfanas_screen.dart';
+import 'package:gimnasio_soma/features/turnos/presentation/screens/turnos_screen.dart';
+import 'package:gimnasio_soma/features/usuarios/presentation/screens/usuarios_screen.dart';
+
+final routerProvider = Provider((ref) {
+ final authChangeNotifier = ref.watch(authChangeNotifierProvider);
+
+ return GoRouter(
+ initialLocation: '/splash',
+ refreshListenable: authChangeNotifier,
+ redirect: (context, state) {
+ final authState = ref.read(authStateProvider);
+ final user = authState.valueOrNull;
+ final isLoggedIn = user != null;
+ final location = state.matchedLocation;
+ final isAuthScreen = location == '/login' || location == '/splash';
+
+ // No logueado y no está en login/splash → ir a login
+ if (!isLoggedIn && !isAuthScreen) return '/login';
+
+ final effectiveRole = user?.role ?? '';
+
+ // Logueado y está en login o splash → ir al primer item visible
+ if (isLoggedIn && isAuthScreen) {
+ final items = getVisibleItems(effectiveRole);
+ return items.isNotEmpty ? items.first.path : '/usuarios';
+ }
+
+ // Guard: si el usuario navega a una ruta sin permiso
+ if (isLoggedIn) {
+ final visiblePaths =
+ getVisibleItems(effectiveRole).map((i) => i.path).toSet();
+ final matched = state.matchedLocation;
+ final isStaff = user.isStaff;
+
+ // Rutas internas/de staff que no figuran en el menú pero deben
+ // quedar bloqueadas para clientes.
+ const staffOnlyPaths = {
+ '/gallery',
+ '/logs',
+ '/perfil/cambiar-contrasena',
+ };
+ if (staffOnlyPaths.contains(matched) && !isStaff) {
+ return visiblePaths.isNotEmpty ? visiblePaths.first : '/usuarios';
+ }
+
+ if (matched != '/gallery' &&
+ matched != '/perfil' &&
+ matched != '/perfil/cambiar-contrasena' &&
+ matched != '/logs' &&
+ !visiblePaths.any((p) => matched.startsWith(p))) {
+ return visiblePaths.isNotEmpty ? visiblePaths.first : '/usuarios';
+ }
+ }
+
+ return null;
+ },
+ routes: [
+ // Splash - validación de sesión
+ GoRoute(
+ path: '/splash',
+ builder: (context, state) => const SplashScreen(),
+ ),
+
+ // Login - fuera del shell
+ GoRoute(
+ path: '/login',
+ builder: (context, state) => const LoginScreen(),
+ ),
+
+ // Shell con navegación
+ ShellRoute(
+ builder: (context, state, child) => NavigationShell(child: child),
+ routes: [
+ GoRoute(
+ path: '/usuarios',
+ pageBuilder: (c, s) => _fade(s, const UsuariosScreen()),
+ ),
+ GoRoute(
+ path: '/pagos',
+ pageBuilder: (c, s) => _fade(s, const PagosScreen()),
+ ),
+ GoRoute(
+ path: '/pagos/metodos',
+ pageBuilder: (c, s) => _fade(s, const MetodosPagoScreen()),
+ ),
+ GoRoute(
+ path: '/actividades',
+ pageBuilder: (c, s) => _fade(s, const ActividadesScreen()),
+ ),
+ GoRoute(
+ path: '/horarios',
+ pageBuilder: (c, s) => _fade(s, const HorariosScreen()),
+ ),
+ GoRoute(
+ path: '/turnos',
+ pageBuilder: (c, s) => _fade(s, const TurnosScreen()),
+ ),
+ GoRoute(
+ path: '/planes',
+ pageBuilder: (c, s) => _fade(s, const TiposCuotaScreen()),
+ ),
+ GoRoute(
+ path: '/huerfanas',
+ pageBuilder: (c, s) => _fade(s, const HuerfanasScreen()),
+ ),
+ GoRoute(
+ path: '/perfil',
+ pageBuilder: (c, s) => _fade(s, const PerfilScreen()),
+ ),
+ GoRoute(
+ path: '/perfil/cambiar-contrasena',
+ pageBuilder: (c, s) => _fade(s, const CambiarContrasenaScreen()),
+ ),
+ GoRoute(
+ path: '/gallery',
+ pageBuilder: (c, s) => _fade(s, const WidgetGalleryScreen()),
+ ),
+ GoRoute(
+ path: '/logs',
+ pageBuilder: (c, s) => _fade(s, const LogsScreen()),
+ ),
+ ],
+ ),
+ ],
+ );
+});
+
+CustomTransitionPage _fade(GoRouterState state, Widget child) =>
+ CustomTransitionPage(
+ key: state.pageKey,
+ child: child,
+ transitionDuration: const Duration(milliseconds: 180),
+ reverseTransitionDuration: const Duration(milliseconds: 140),
+ transitionsBuilder: (context, animation, secondaryAnimation, child) =>
+ FadeTransition(
+ opacity: CurvedAnimation(parent: animation, curve: Curves.easeOut),
+ child: child,
+ ),
+ );
diff --git a/flutter_soma_app/lib/core/services/soma_logger.dart b/flutter_soma_app/lib/core/services/soma_logger.dart
new file mode 100644
index 0000000..0d0e668
--- /dev/null
+++ b/flutter_soma_app/lib/core/services/soma_logger.dart
@@ -0,0 +1,192 @@
+import 'dart:collection';
+import 'dart:developer' as developer;
+
+import 'package:flutter/foundation.dart';
+
+enum LogLevel { debug, info, warning, error }
+
+class LogEntry {
+ final DateTime timestamp;
+ final LogLevel level;
+ final String tag;
+ final String message;
+ final String? detail;
+ final Duration? duration;
+
+ LogEntry({
+ required this.timestamp,
+ required this.level,
+ required this.tag,
+ required this.message,
+ this.detail,
+ this.duration,
+ });
+
+ String get formatted {
+ final ts =
+ '${timestamp.hour.toString().padLeft(2, '0')}:'
+ '${timestamp.minute.toString().padLeft(2, '0')}:'
+ '${timestamp.second.toString().padLeft(2, '0')}.'
+ '${timestamp.millisecond.toString().padLeft(3, '0')}';
+ final lvl = level.name.toUpperCase().padRight(5);
+ final dur = duration != null ? ' (${duration!.inMilliseconds}ms)' : '';
+ return '[$ts] $lvl [$tag] $message$dur';
+ }
+}
+
+class SomaLogger {
+ SomaLogger._();
+ static final SomaLogger instance = SomaLogger._();
+
+ static const int _maxEntries = 300;
+ final Queue _entries = Queue();
+
+ /// Plataforma detectada al iniciar.
+ String platform = 'unknown';
+
+ List get entries => _entries.toList();
+ int get count => _entries.length;
+
+ void _log(LogLevel level, String tag, String message,
+ {String? detail, Duration? duration}) {
+ final entry = LogEntry(
+ timestamp: DateTime.now(),
+ level: level,
+ tag: tag,
+ message: message,
+ detail: detail,
+ duration: duration,
+ );
+
+ _entries.addLast(entry);
+ while (_entries.length > _maxEntries) {
+ _entries.removeFirst();
+ }
+
+ // Salida a consola multiplataforma
+ developer.log(
+ entry.formatted,
+ name: 'SOMA',
+ level: _levelToInt(level),
+ );
+ if (detail != null) {
+ developer.log(' $detail', name: 'SOMA', level: _levelToInt(level));
+ }
+ }
+
+ int _levelToInt(LogLevel level) {
+ switch (level) {
+ case LogLevel.debug:
+ return 500;
+ case LogLevel.info:
+ return 800;
+ case LogLevel.warning:
+ return 900;
+ case LogLevel.error:
+ return 1000;
+ }
+ }
+
+ void debug(String tag, String message,
+ {String? detail, Duration? duration}) =>
+ _log(LogLevel.debug, tag, message, detail: detail, duration: duration);
+
+ void info(String tag, String message,
+ {String? detail, Duration? duration}) =>
+ _log(LogLevel.info, tag, message, detail: detail, duration: duration);
+
+ void warning(String tag, String message,
+ {String? detail, Duration? duration}) =>
+ _log(LogLevel.warning, tag, message, detail: detail, duration: duration);
+
+ void error(String tag, String message,
+ {String? detail, Duration? duration}) =>
+ _log(LogLevel.error, tag, message, detail: detail, duration: duration);
+
+ /// Wrapper para llamadas RPC con logging automático de request y timing.
+ Future logRpc(
+ String rpcName,
+ Map params,
+ Future Function() call,
+ ) async {
+ final sanitized = _sanitizeParams(params);
+ debug('RPC', '-> $rpcName', detail: sanitized);
+
+ final sw = Stopwatch()..start();
+ try {
+ final result = await call();
+ sw.stop();
+ info('RPC', '<- $rpcName OK',
+ duration: sw.elapsed, detail: _summarizeResult(result));
+ return result;
+ } catch (e) {
+ sw.stop();
+ error('RPC', 'x $rpcName FAIL',
+ duration: sw.elapsed, detail: e.toString());
+ rethrow;
+ }
+ }
+
+ String _sanitizeParams(Map params) {
+ final safe = {};
+ for (final entry in params.entries) {
+ if (entry.key.contains('token') || entry.key.contains('password')) {
+ safe[entry.key] = '***';
+ } else {
+ safe[entry.key] = entry.value;
+ }
+ }
+ return safe.toString();
+ }
+
+ String _summarizeResult(dynamic result) {
+ if (result is List) return '${result.length} items';
+ if (result is Map) return '${result.length} keys';
+ if (result is bool) return result.toString();
+ if (result == null) return 'null';
+ if (result is String && result.length > 80) {
+ return '${result.substring(0, 80)}...';
+ }
+ return result.toString();
+ }
+
+ /// Detecta plataforma actual.
+ void detectPlatform() {
+ if (kIsWeb) {
+ platform = 'Web';
+ } else {
+ switch (defaultTargetPlatform) {
+ case TargetPlatform.android:
+ platform = 'Android';
+ case TargetPlatform.iOS:
+ platform = 'iOS';
+ case TargetPlatform.windows:
+ platform = 'Windows';
+ case TargetPlatform.macOS:
+ platform = 'macOS';
+ case TargetPlatform.linux:
+ platform = 'Linux';
+ case TargetPlatform.fuchsia:
+ platform = 'Fuchsia';
+ }
+ }
+ info('App', 'Plataforma: $platform');
+ }
+
+ void clear() => _entries.clear();
+
+ /// Exporta logs como texto plano.
+ String export() {
+ final buf = StringBuffer();
+ buf.writeln('=== SOMA Logs ===');
+ buf.writeln('Plataforma: $platform');
+ buf.writeln('Exportado: ${DateTime.now()}');
+ buf.writeln('Entradas: ${_entries.length}');
+ buf.writeln('');
+ for (final e in _entries) {
+ buf.writeln(e.formatted);
+ if (e.detail != null) buf.writeln(' ${e.detail}');
+ }
+ return buf.toString();
+ }
+}
diff --git a/flutter_soma_app/lib/core/services/whatsapp_service.dart b/flutter_soma_app/lib/core/services/whatsapp_service.dart
new file mode 100644
index 0000000..707ba14
--- /dev/null
+++ b/flutter_soma_app/lib/core/services/whatsapp_service.dart
@@ -0,0 +1,32 @@
+import 'package:url_launcher/url_launcher.dart';
+
+class WhatsAppService {
+ WhatsAppService._();
+
+ /// Normaliza un número argentino a formato internacional sin +.
+ /// Retorna null si el número es inválido (vacío o menos de 8 dígitos).
+ static String? normalizarNumeroAr(String? rawPhone) {
+ if (rawPhone == null || rawPhone.trim().isEmpty) return null;
+ final digits = rawPhone.replaceAll(RegExp(r'[^\d]'), '');
+ if (digits.length < 8) return null;
+ if (digits.startsWith('0054')) return '54${digits.substring(4)}';
+ if (digits.startsWith('54') && digits.length >= 10) return digits;
+ if (digits.startsWith('0')) return '54${digits.substring(1)}';
+ return '54$digits';
+ }
+
+ /// Abre WhatsApp con un mensaje pre-armado.
+ /// Retorna true si se abrió correctamente, false si el número es inválido
+ /// o si el sistema no pudo lanzar la URL.
+ static Future abrirChat({
+ required String? telefono,
+ required String mensaje,
+ }) async {
+ final number = normalizarNumeroAr(telefono);
+ if (number == null) return false;
+ final uri = Uri.parse(
+ 'https://wa.me/$number?text=${Uri.encodeComponent(mensaje)}',
+ );
+ return launchUrl(uri, mode: LaunchMode.externalApplication);
+ }
+}
diff --git a/flutter_soma_app/lib/core/theme/activity_colors.dart b/flutter_soma_app/lib/core/theme/activity_colors.dart
new file mode 100644
index 0000000..fbd0fa3
--- /dev/null
+++ b/flutter_soma_app/lib/core/theme/activity_colors.dart
@@ -0,0 +1,16 @@
+import 'package:flutter/material.dart';
+
+abstract final class ActivityColors {
+ static const List _palette = [
+ Color(0xFFE07272), // coral
+ Color(0xFFD4904A), // ámbar terroso
+ Color(0xFF9FC44A), // lima
+ Color(0xFF4AC49A), // menta
+ Color(0xFF4A9ED4), // cielo
+ Color(0xFF7A6ED4), // lavanda
+ Color(0xFFC46EC4), // malva
+ Color(0xFFD46E96), // rosa
+ ];
+
+ static Color forId(int actividadId) => _palette[actividadId % _palette.length];
+}
diff --git a/flutter_soma_app/lib/core/theme/soma_colors.dart b/flutter_soma_app/lib/core/theme/soma_colors.dart
new file mode 100644
index 0000000..27e0f0b
--- /dev/null
+++ b/flutter_soma_app/lib/core/theme/soma_colors.dart
@@ -0,0 +1,29 @@
+import 'package:flutter/material.dart';
+
+class SomaColors {
+ SomaColors._();
+
+ // Primary
+ static const Color primary = Color(0xFFFFD600);
+ static const Color primaryDark = Color(0xFFFFC800);
+ static const Color primaryLight = Color(0xFFFFE24D);
+
+ // Variante legible de primary para texto sobre fondo claro
+ static const Color primaryText = Color(0xFF8B7000);
+
+ // Dark theme
+ static const Color darkBackground = Color(0xFF121212);
+ static const Color darkSurface = Color(0xFF1E1E1E);
+ static const Color darkSurfaceVariant = Color(0xFF2C2C2C);
+ static const Color darkOnBackground = Color(0xFFFFFFFF);
+ static const Color darkOnSurface = Color(0xFFE0E0E0);
+ static const Color darkOnSurfaceVariant = Color(0xFF9E9E9E);
+
+ // Semantic
+ static const Color success = Color(0xFF4CAF50);
+ static const Color error = Color(0xFFEF5350);
+ static const Color info = Color(0xFFFFD600);
+
+ // On primary (text on yellow)
+ static const Color onPrimary = Color(0xFF1A1A1A);
+}
diff --git a/flutter_soma_app/lib/core/theme/soma_theme.dart b/flutter_soma_app/lib/core/theme/soma_theme.dart
new file mode 100644
index 0000000..cebe49f
--- /dev/null
+++ b/flutter_soma_app/lib/core/theme/soma_theme.dart
@@ -0,0 +1,116 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+import 'soma_colors.dart';
+
+class SomaTheme {
+ SomaTheme._();
+
+ static ThemeData get dark => ThemeData(
+ useMaterial3: true,
+ brightness: Brightness.dark,
+ scaffoldBackgroundColor: SomaColors.darkBackground,
+ colorScheme: const ColorScheme.dark(
+ primary: SomaColors.primary,
+ onPrimary: SomaColors.onPrimary,
+ surface: SomaColors.darkSurface,
+ onSurface: SomaColors.darkOnSurface,
+ surfaceContainerHighest: SomaColors.darkSurfaceVariant,
+ error: SomaColors.error,
+ ),
+ appBarTheme: const AppBarTheme(
+ backgroundColor: SomaColors.darkBackground,
+ foregroundColor: SomaColors.darkOnBackground,
+ elevation: 0,
+ systemOverlayStyle: SystemUiOverlayStyle.light,
+ ),
+ inputDecorationTheme: InputDecorationTheme(
+ filled: true,
+ fillColor: SomaColors.darkSurfaceVariant,
+ border: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(12),
+ borderSide: BorderSide.none,
+ ),
+ focusedBorder: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(12),
+ borderSide: const BorderSide(color: SomaColors.primary, width: 2),
+ ),
+ errorBorder: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(12),
+ borderSide: const BorderSide(color: SomaColors.error, width: 1),
+ ),
+ focusedErrorBorder: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(12),
+ borderSide: const BorderSide(color: SomaColors.error, width: 2),
+ ),
+ contentPadding:
+ const EdgeInsets.symmetric(horizontal: 16, vertical: 16),
+ hintStyle: const TextStyle(color: SomaColors.darkOnSurfaceVariant),
+ labelStyle: const TextStyle(color: SomaColors.darkOnSurfaceVariant),
+ ),
+ elevatedButtonTheme: ElevatedButtonThemeData(
+ style: ElevatedButton.styleFrom(
+ backgroundColor: SomaColors.primary,
+ foregroundColor: SomaColors.onPrimary,
+ minimumSize: const Size(double.infinity, 52),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(12),
+ ),
+ textStyle: const TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ),
+ outlinedButtonTheme: OutlinedButtonThemeData(
+ style: OutlinedButton.styleFrom(
+ foregroundColor: SomaColors.primary,
+ minimumSize: const Size(double.infinity, 52),
+ side: const BorderSide(color: SomaColors.primary, width: 1.5),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(12),
+ ),
+ textStyle: const TextStyle(
+ fontSize: 16,
+ fontWeight: FontWeight.w600,
+ ),
+ ),
+ ),
+ textButtonTheme: TextButtonThemeData(
+ style: TextButton.styleFrom(
+ foregroundColor: SomaColors.primary,
+ textStyle: const TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.w500,
+ ),
+ ),
+ ),
+ tabBarTheme: const TabBarThemeData(
+ labelColor: SomaColors.darkOnSurface,
+ unselectedLabelColor: SomaColors.darkOnSurfaceVariant,
+ indicatorColor: SomaColors.primary,
+ ),
+ segmentedButtonTheme: SegmentedButtonThemeData(
+ style: ButtonStyle(
+ backgroundColor: WidgetStateProperty.resolveWith((states) {
+ if (states.contains(WidgetState.selected)) return SomaColors.primary;
+ return Colors.transparent;
+ }),
+ foregroundColor: WidgetStateProperty.resolveWith((states) {
+ if (states.contains(WidgetState.selected)) return SomaColors.onPrimary;
+ return null;
+ }),
+ iconColor: WidgetStateProperty.resolveWith((states) {
+ if (states.contains(WidgetState.selected)) return SomaColors.onPrimary;
+ return null;
+ }),
+ ),
+ ),
+ snackBarTheme: SnackBarThemeData(
+ behavior: SnackBarBehavior.floating,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(8),
+ ),
+ contentTextStyle: const TextStyle(fontSize: 14),
+ ),
+ );
+}
diff --git a/flutter_soma_app/lib/core/widgets/soma_header_help.dart b/flutter_soma_app/lib/core/widgets/soma_header_help.dart
new file mode 100644
index 0000000..5979299
--- /dev/null
+++ b/flutter_soma_app/lib/core/widgets/soma_header_help.dart
@@ -0,0 +1,83 @@
+import 'package:flutter/material.dart';
+import 'package:gimnasio_soma/core/theme/soma_colors.dart';
+
+class SomaHelpItem {
+ final IconData icon;
+ final String text;
+
+ const SomaHelpItem({required this.icon, required this.text});
+}
+
+/// Botón "?" para poner al lado del título de una pantalla. Al tocarlo
+/// muestra un globito explicando qué hace cada ícono/acción visible.
+class SomaHeaderHelp extends StatelessWidget {
+ final List items;
+
+ const SomaHeaderHelp({super.key, required this.items});
+
+ void _show(BuildContext context) {
+ final button = context.findRenderObject() as RenderBox;
+ final overlay = Overlay.of(context).context.findRenderObject() as RenderBox;
+ final position = RelativeRect.fromRect(
+ Rect.fromPoints(
+ button.localToGlobal(
+ Offset(0, button.size.height + 6),
+ ancestor: overlay,
+ ),
+ button.localToGlobal(
+ button.size.bottomRight(Offset(0, button.size.height + 6)),
+ ancestor: overlay,
+ ),
+ ),
+ Offset.zero & overlay.size,
+ );
+
+ showMenu(
+ context: context,
+ position: position,
+ constraints: const BoxConstraints(maxWidth: 300),
+ items: [
+ PopupMenuItem(
+ enabled: false,
+ padding: const EdgeInsets.symmetric(horizontal: 14, vertical: 10),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ for (int i = 0; i < items.length; i++) ...[
+ if (i > 0) const SizedBox(height: 10),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Icon(items[i].icon, size: 16, color: SomaColors.primary),
+ const SizedBox(width: 10),
+ Expanded(
+ child: Text(
+ items[i].text,
+ style: const TextStyle(fontSize: 12.5, height: 1.3),
+ ),
+ ),
+ ],
+ ),
+ ],
+ ],
+ ),
+ ),
+ ],
+ );
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ return IconButton(
+ icon: Icon(
+ Icons.help_outline,
+ size: 18,
+ color: Theme.of(context).colorScheme.onSurface.withAlpha(120),
+ ),
+ tooltip: 'Ayuda',
+ visualDensity: VisualDensity.compact,
+ onPressed: () => _show(context),
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/widgets/soma_logo.dart b/flutter_soma_app/lib/core/widgets/soma_logo.dart
new file mode 100644
index 0000000..a29c789
--- /dev/null
+++ b/flutter_soma_app/lib/core/widgets/soma_logo.dart
@@ -0,0 +1,22 @@
+import 'package:flutter/material.dart';
+
+class SomaLogo extends StatelessWidget {
+ final double? width;
+ final double? height;
+
+ const SomaLogo({
+ super.key,
+ this.width,
+ this.height,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return Image.asset(
+ 'assets/logo.png',
+ width: width,
+ height: height,
+ fit: BoxFit.contain,
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/widgets/soma_primary_button.dart b/flutter_soma_app/lib/core/widgets/soma_primary_button.dart
new file mode 100644
index 0000000..4046d4a
--- /dev/null
+++ b/flutter_soma_app/lib/core/widgets/soma_primary_button.dart
@@ -0,0 +1,42 @@
+import 'package:flutter/material.dart';
+
+class SomaPrimaryButton extends StatelessWidget {
+ final String text;
+ final VoidCallback? onPressed;
+ final bool isLoading;
+ final IconData? icon;
+
+ const SomaPrimaryButton({
+ super.key,
+ required this.text,
+ this.onPressed,
+ this.isLoading = false,
+ this.icon,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return ElevatedButton(
+ onPressed: isLoading ? null : onPressed,
+ child: isLoading
+ ? const SizedBox(
+ height: 22,
+ width: 22,
+ child: CircularProgressIndicator(
+ strokeWidth: 2.5,
+ color: Colors.black87,
+ ),
+ )
+ : Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ if (icon != null) ...[
+ Icon(icon, size: 20),
+ const SizedBox(width: 8),
+ ],
+ Text(text),
+ ],
+ ),
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/widgets/soma_secondary_button.dart b/flutter_soma_app/lib/core/widgets/soma_secondary_button.dart
new file mode 100644
index 0000000..58068fc
--- /dev/null
+++ b/flutter_soma_app/lib/core/widgets/soma_secondary_button.dart
@@ -0,0 +1,42 @@
+import 'package:flutter/material.dart';
+
+class SomaSecondaryButton extends StatelessWidget {
+ final String text;
+ final VoidCallback? onPressed;
+ final bool isLoading;
+ final IconData? icon;
+
+ const SomaSecondaryButton({
+ super.key,
+ required this.text,
+ this.onPressed,
+ this.isLoading = false,
+ this.icon,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return OutlinedButton(
+ onPressed: isLoading ? null : onPressed,
+ child: isLoading
+ ? SizedBox(
+ height: 22,
+ width: 22,
+ child: CircularProgressIndicator(
+ strokeWidth: 2.5,
+ color: Theme.of(context).colorScheme.primary,
+ ),
+ )
+ : Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ if (icon != null) ...[
+ Icon(icon, size: 20),
+ const SizedBox(width: 8),
+ ],
+ Text(text),
+ ],
+ ),
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/widgets/soma_text_field.dart b/flutter_soma_app/lib/core/widgets/soma_text_field.dart
new file mode 100644
index 0000000..4e6ff84
--- /dev/null
+++ b/flutter_soma_app/lib/core/widgets/soma_text_field.dart
@@ -0,0 +1,63 @@
+import 'package:flutter/material.dart';
+import 'package:flutter/services.dart';
+
+class SomaTextField extends StatelessWidget {
+ final TextEditingController? controller;
+ final String? hintText;
+ final String? labelText;
+ final IconData? prefixIcon;
+ final Widget? suffixIcon;
+ final bool obscureText;
+ final TextInputType keyboardType;
+ final List? inputFormatters;
+ final String? Function(String?)? validator;
+ final void Function(String)? onChanged;
+ final bool enabled;
+ final int maxLines;
+
+ const SomaTextField({
+ super.key,
+ this.controller,
+ this.hintText,
+ this.labelText,
+ this.prefixIcon,
+ this.suffixIcon,
+ this.obscureText = false,
+ this.keyboardType = TextInputType.text,
+ this.inputFormatters,
+ this.validator,
+ this.onChanged,
+ this.enabled = true,
+ this.maxLines = 1,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return TextFormField(
+ controller: controller,
+ obscureText: obscureText,
+ keyboardType: keyboardType,
+ inputFormatters: inputFormatters,
+ validator: validator,
+ onChanged: onChanged,
+ enabled: enabled,
+ maxLines: maxLines,
+ style: TextStyle(
+ color: Theme.of(context).colorScheme.onSurface,
+ fontSize: 16,
+ ),
+ decoration: InputDecoration(
+ hintText: hintText,
+ labelText: labelText,
+ prefixIcon: prefixIcon != null
+ ? Icon(
+ prefixIcon,
+ color: Theme.of(context).colorScheme.onSurface.withAlpha(153),
+ size: 22,
+ )
+ : null,
+ suffixIcon: suffixIcon,
+ ),
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/core/widgets/soma_toast.dart b/flutter_soma_app/lib/core/widgets/soma_toast.dart
new file mode 100644
index 0000000..8989374
--- /dev/null
+++ b/flutter_soma_app/lib/core/widgets/soma_toast.dart
@@ -0,0 +1,49 @@
+import 'package:flutter/material.dart';
+import 'package:gimnasio_soma/core/theme/soma_colors.dart';
+
+enum ToastType { success, error, info }
+
+class SomaToast {
+ SomaToast._();
+
+ static void show(
+ BuildContext context, {
+ required String message,
+ ToastType type = ToastType.info,
+ SnackBarAction? action,
+ }) {
+ ScaffoldMessenger.of(context).clearSnackBars();
+
+ final (Color bg, Color text, IconData icon) = switch (type) {
+ ToastType.success => (SomaColors.success, Colors.white, Icons.check_circle_outline),
+ ToastType.error => (SomaColors.error, Colors.white, Icons.error_outline),
+ ToastType.info => (SomaColors.primary, SomaColors.onPrimary, Icons.info_outline),
+ };
+
+ ScaffoldMessenger.of(context).showSnackBar(
+ SnackBar(
+ content: Row(
+ children: [
+ Icon(icon, color: text, size: 20),
+ const SizedBox(width: 10),
+ Expanded(
+ child: Text(
+ message,
+ style: TextStyle(
+ color: text,
+ fontSize: 14,
+ fontWeight: FontWeight.w500,
+ ),
+ ),
+ ),
+ ],
+ ),
+ backgroundColor: bg,
+ duration: Duration(seconds: action != null ? 5 : 3),
+ margin: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
+ padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
+ action: action,
+ ),
+ );
+ }
+}
diff --git a/flutter_soma_app/lib/features/actividades/data/repositories/actividades_repository_impl.dart b/flutter_soma_app/lib/features/actividades/data/repositories/actividades_repository_impl.dart
new file mode 100644
index 0000000..a84ab48
--- /dev/null
+++ b/flutter_soma_app/lib/features/actividades/data/repositories/actividades_repository_impl.dart
@@ -0,0 +1,65 @@
+import 'package:shared_preferences/shared_preferences.dart';
+import 'package:gimnasio_soma/core/config/app_constants.dart';
+import 'package:gimnasio_soma/core/config/supabase_config.dart';
+import 'package:gimnasio_soma/features/actividades/domain/entities/actividad.dart';
+import 'package:gimnasio_soma/features/actividades/domain/repositories/actividades_repository.dart';
+
+class ActividadesRepositoryImpl implements ActividadesRepository {
+ Future _getToken() async {
+ final prefs = await SharedPreferences.getInstance();
+ final token = prefs.getString(AppConstants.tokenKey);
+ if (token == null) throw Exception('Sin sesión activa');
+ return token;
+ }
+
+ @override
+ Future> getActividades({bool? soloActivas}) async {
+ final token = await _getToken();
+
+ final params = {'p_token': token};
+ if (soloActivas != null) params['p_solo_activas'] = soloActivas;
+
+ final response = await SupabaseConfig.rpc(
+ AppConstants.rpcGetActividades,
+ params: params,
+ );
+
+ if (response is List) {
+ return response
+ .map((e) => Actividad.fromMap(e as Map))
+ .toList();
+ }
+ return [];
+ }
+
+ @override
+ Future insertActividad(Map datos) async {
+ final token = await _getToken();
+
+ await SupabaseConfig.rpc(
+ AppConstants.rpcInsertActividad,
+ params: {'p_token': token, 'p_datos': datos},
+ );
+ }
+
+ @override
+ Future updateActividad(int id, Map datos) async {
+ final token = await _getToken();
+
+ await SupabaseConfig.rpc(
+ AppConstants.rpcUpdateActividad,
+ params: {'p_token': token, 'p_actividad_id': id, 'p_datos': datos},
+ );
+ }
+
+ @override
+ Future deleteActividad(int id) async {
+ final token = await _getToken();
+
+ final response = await SupabaseConfig.rpc(
+ AppConstants.rpcDeleteActividad,
+ params: {'p_token': token, 'p_actividad_id': id},
+ );
+ return response == true;
+ }
+}
diff --git a/flutter_soma_app/lib/features/actividades/domain/entities/actividad.dart b/flutter_soma_app/lib/features/actividades/domain/entities/actividad.dart
new file mode 100644
index 0000000..ca8b18c
--- /dev/null
+++ b/flutter_soma_app/lib/features/actividades/domain/entities/actividad.dart
@@ -0,0 +1,47 @@
+class Actividad {
+ final int id;
+ final String nombre;
+ final int duracion; // minutos
+ final int capacidadPorDefecto;
+ final bool libre;
+ final bool activo;
+
+ const Actividad({
+ required this.id,
+ required this.nombre,
+ required this.duracion,
+ required this.capacidadPorDefecto,
+ this.libre = false,
+ this.activo = true,
+ });
+
+ factory Actividad.fromMap(Map map) {
+ return Actividad(
+ id: map['id'] as int,
+ nombre: map['nombre'] as String? ?? '',
+ duracion: (map['duracion'] as num?)?.toInt() ?? 0,
+ capacidadPorDefecto: (map['capacidad_por_defecto'] as num?)?.toInt() ?? 0,
+ libre: map['libre'] as bool? ?? false,
+ activo: map['activo'] as bool? ?? true,
+ );
+ }
+
+ Map toMap() {
+ return {
+ 'nombre': nombre,
+ 'duracion': duracion,
+ 'capacidad_por_defecto': capacidadPorDefecto,
+ 'libre': libre,
+ 'activo': activo,
+ };
+ }
+
+ String get duracionDisplay {
+ if (duracion >= 60) {
+ final h = duracion ~/ 60;
+ final m = duracion % 60;
+ return m > 0 ? '${h}h ${m}min' : '${h}h';
+ }
+ return '${duracion}min';
+ }
+}
diff --git a/flutter_soma_app/lib/features/actividades/domain/repositories/actividades_repository.dart b/flutter_soma_app/lib/features/actividades/domain/repositories/actividades_repository.dart
new file mode 100644
index 0000000..6653a3e
--- /dev/null
+++ b/flutter_soma_app/lib/features/actividades/domain/repositories/actividades_repository.dart
@@ -0,0 +1,8 @@
+import 'package:gimnasio_soma/features/actividades/domain/entities/actividad.dart';
+
+abstract class ActividadesRepository {
+ Future> getActividades({bool? soloActivas});
+ Future insertActividad(Map datos);
+ Future updateActividad(int id, Map datos);
+ Future deleteActividad(int id);
+}
diff --git a/flutter_soma_app/lib/features/actividades/presentation/providers/actividades_provider.dart b/flutter_soma_app/lib/features/actividades/presentation/providers/actividades_provider.dart
new file mode 100644
index 0000000..baf81e6
--- /dev/null
+++ b/flutter_soma_app/lib/features/actividades/presentation/providers/actividades_provider.dart
@@ -0,0 +1,67 @@
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:gimnasio_soma/features/actividades/data/repositories/actividades_repository_impl.dart';
+import 'package:gimnasio_soma/features/actividades/domain/entities/actividad.dart';
+import 'package:gimnasio_soma/features/actividades/domain/repositories/actividades_repository.dart';
+import 'package:supabase_flutter/supabase_flutter.dart';
+
+String _errorMessage(Object e) {
+ if (e is PostgrestException) return e.message;
+ return e.toString().replaceFirst('Exception: ', '');
+}
+
+final actividadesRepositoryProvider = Provider((ref) {
+ return ActividadesRepositoryImpl();
+});
+
+final actividadesProvider =
+ StateNotifierProvider>>((ref) {
+ return ActividadesNotifier(ref.read(actividadesRepositoryProvider));
+});
+
+class ActividadesNotifier extends StateNotifier>> {
+ final ActividadesRepository _repository;
+
+ ActividadesNotifier(this._repository) : super(const AsyncValue.loading()) {
+ loadActividades();
+ }
+
+ Future loadActividades() async {
+ state = const AsyncValue.loading();
+ try {
+ final actividades = await _repository.getActividades();
+ state = AsyncValue.data(actividades);
+ } catch (e, st) {
+ state = AsyncValue.error(e, st);
+ }
+ }
+
+ Future insertActividad(Map datos) async {
+ try {
+ await _repository.insertActividad(datos);
+ await loadActividades();
+ return null;
+ } catch (e) {
+ return _errorMessage(e);
+ }
+ }
+
+ Future updateActividad(int id, Map datos) async {
+ try {
+ await _repository.updateActividad(id, datos);
+ await loadActividades();
+ return null;
+ } catch (e) {
+ return _errorMessage(e);
+ }
+ }
+
+ Future deleteActividad(int id) async {
+ try {
+ await _repository.deleteActividad(id);
+ await loadActividades();
+ return null;
+ } catch (e) {
+ return _errorMessage(e);
+ }
+ }
+}
diff --git a/flutter_soma_app/lib/features/actividades/presentation/screens/actividades_screen.dart b/flutter_soma_app/lib/features/actividades/presentation/screens/actividades_screen.dart
new file mode 100644
index 0000000..471a972
--- /dev/null
+++ b/flutter_soma_app/lib/features/actividades/presentation/screens/actividades_screen.dart
@@ -0,0 +1,445 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:gimnasio_soma/core/theme/activity_colors.dart';
+import 'package:gimnasio_soma/core/theme/soma_colors.dart';
+import 'package:gimnasio_soma/core/widgets/soma_toast.dart';
+import 'package:gimnasio_soma/features/actividades/domain/entities/actividad.dart';
+import 'package:gimnasio_soma/features/actividades/presentation/providers/actividades_provider.dart';
+import 'package:gimnasio_soma/features/actividades/presentation/widgets/actividad_form_dialog.dart';
+
+class ActividadesScreen extends ConsumerStatefulWidget {
+ const ActividadesScreen({super.key});
+
+ @override
+ ConsumerState createState() => _ActividadesScreenState();
+}
+
+class _ActividadesScreenState extends ConsumerState {
+ Future _showCreateDialog() async {
+ final result = await showDialog