commit 8bbc9dbff28321c696e5ca30076b3f7ff063bf76
Author: Emre Emir <72244860+emreemir29@users.noreply.github.com>
Date: Thu Jun 11 15:57:31 2026 +0300
Initial commit: DLS - Dental Lab System
- Flutter + PocketBase dental lab management system
- Clinic & lab dashboards, job tracking, patient management
- Product catalog, finance tracking, multi-language support
- AI assistant integration, realtime notifications
- Windows installer (Inno Setup) included
- Developed by kovakyazilim.com
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..87d5858
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,52 @@
+# 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
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+/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
+
+# MCP server config — contains API keys and credentials
+.mcp.json
+
+# Claude Code project settings — local dev tooling only
+.claude/
diff --git a/.metadata b/.metadata
new file mode 100644
index 0000000..83b34eb
--- /dev/null
+++ b/.metadata
@@ -0,0 +1,45 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: "f6ff1529fd6d8af5f706051d9251ac9231c83407"
+ channel: "stable"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ - platform: android
+ create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ - platform: ios
+ create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ - platform: linux
+ create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ - platform: macos
+ create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ - platform: web
+ create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ - platform: windows
+ create_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+ base_revision: f6ff1529fd6d8af5f706051d9251ac9231c83407
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..8e5bfde
--- /dev/null
+++ b/README.md
@@ -0,0 +1,16 @@
+# lab_app
+
+A new Flutter project.
+
+## Getting Started
+
+This project is a starting point for a Flutter application.
+
+A few resources to get you started if this is your first Flutter project:
+
+- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab)
+- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook)
+
+For help getting started with Flutter development, view the
+[online documentation](https://docs.flutter.dev/), which offers tutorials,
+samples, guidance on mobile development, and a full API reference.
diff --git a/analysis_options.yaml b/analysis_options.yaml
new file mode 100644
index 0000000..0d29021
--- /dev/null
+++ b/analysis_options.yaml
@@ -0,0 +1,28 @@
+# This file configures the analyzer, which statically analyzes Dart code to
+# check for errors, warnings, and lints.
+#
+# The issues identified by the analyzer are surfaced in the UI of Dart-enabled
+# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be
+# invoked from the command line by running `flutter analyze`.
+
+# The following line activates a set of recommended lints for Flutter apps,
+# packages, and plugins designed to encourage good coding practices.
+include: package:flutter_lints/flutter.yaml
+
+linter:
+ # The lint rules applied to this project can be customized in the
+ # section below to disable rules from the `package:flutter_lints/flutter.yaml`
+ # included above or to enable additional rules. A list of all available lints
+ # and their documentation is published at https://dart.dev/lints.
+ #
+ # Instead of disabling a lint rule for the entire project in the
+ # section below, it can also be suppressed for a single line of code
+ # or a specific dart file by using the `// ignore: name_of_lint` and
+ # `// ignore_for_file: name_of_lint` syntax on the line or in the file
+ # producing the lint.
+ rules:
+ # avoid_print: false # Uncomment to disable the `avoid_print` rule
+ # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/android/.gitignore b/android/.gitignore
new file mode 100644
index 0000000..be3943c
--- /dev/null
+++ b/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/android/app/build.gradle.kts b/android/app/build.gradle.kts
new file mode 100644
index 0000000..f8fd821
--- /dev/null
+++ b/android/app/build.gradle.kts
@@ -0,0 +1,45 @@
+plugins {
+ id("com.android.application")
+ id("kotlin-android")
+ id("com.google.gms.google-services")
+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
+ id("dev.flutter.flutter-gradle-plugin")
+}
+
+android {
+ namespace = "com.kovakyazilim.labapp"
+ 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.kovakyazilim.labapp"
+ // 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/android/app/google-services.json b/android/app/google-services.json
new file mode 100644
index 0000000..0e06756
--- /dev/null
+++ b/android/app/google-services.json
@@ -0,0 +1,29 @@
+{
+ "project_info": {
+ "project_number": "751114036897",
+ "project_id": "dlslabapp",
+ "storage_bucket": "dlslabapp.firebasestorage.app"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:751114036897:android:5da96f1a9691458099f2e0",
+ "android_client_info": {
+ "package_name": "com.kovakyazilim.labapp"
+ }
+ },
+ "oauth_client": [],
+ "api_key": [
+ {
+ "current_key": "AIzaSyBjRvRur8zmczbDNOad0PGuFy19XRGS8QE"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": []
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..4bff20e
--- /dev/null
+++ b/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,45 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/kotlin/com/kovakyazilim/labapp/MainActivity.kt b/android/app/src/main/kotlin/com/kovakyazilim/labapp/MainActivity.kt
new file mode 100644
index 0000000..a5f71e5
--- /dev/null
+++ b/android/app/src/main/kotlin/com/kovakyazilim/labapp/MainActivity.kt
@@ -0,0 +1,5 @@
+package com.kovakyazilim.labapp
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity : FlutterActivity()
diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..f74085f
--- /dev/null
+++ b/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..304732f
--- /dev/null
+++ b/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..20a7924
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
new file mode 100644
index 0000000..20a7924
Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..e04dca9
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
new file mode 100644
index 0000000..e04dca9
Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..17151ac
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..17151ac
Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..ded3046
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..ded3046
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..36b5574
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
new file mode 100644
index 0000000..36b5574
Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..06952be
--- /dev/null
+++ b/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/main/res/values/strings.xml b/android/app/src/main/res/values/strings.xml
new file mode 100644
index 0000000..522466a
--- /dev/null
+++ b/android/app/src/main/res/values/strings.xml
@@ -0,0 +1,4 @@
+
+
+ DLS
+
diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..cb1ef88
--- /dev/null
+++ b/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/android/build.gradle.kts b/android/build.gradle.kts
new file mode 100644
index 0000000..dbee657
--- /dev/null
+++ b/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/android/gradle.properties b/android/gradle.properties
new file mode 100644
index 0000000..fbee1d8
--- /dev/null
+++ b/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/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..e4ef43f
--- /dev/null
+++ b/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts
new file mode 100644
index 0000000..e4e86fb
--- /dev/null
+++ b/android/settings.gradle.kts
@@ -0,0 +1,27 @@
+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
+ id("com.google.gms.google-services") version "4.4.2" apply false
+}
+
+include(":app")
diff --git a/database.md b/database.md
new file mode 100644
index 0000000..8a73e3e
--- /dev/null
+++ b/database.md
@@ -0,0 +1,418 @@
+# DLS — Veritabanı Referansı (Directus)
+
+> **Backend:** Appwrite → **Directus** migrasyonu. Kaynak gerçek bu dokümandır.
+> Oluşturulma: 2026-06-05 (Directus MCP ile canlıdan inşa edildi).
+
+## 1. Bağlantı bilgileri
+
+| | Değer |
+|---|---|
+| Directus URL | (Coolify'da set edilecek) |
+| Auth | Directus built-in JWT (email + şifre) |
+| Storage | Directus Files (directus_files) |
+| Tenant izolasyonu | `tenants` + `tenant_members` tabloları |
+
+> **Appwrite → Directus eşlemesi:**
+> - `Appwrite Team` → `tenants` koleksiyonu
+> - `Appwrite Team membership` → `tenant_members` koleksiyonu
+> - `Appwrite Auth` → `directus_users` (Directus built-in)
+> - `Appwrite Storage buckets` → `directus_files` (tek bucket, `kind` alanıyla ayrım)
+> - Row-level security → Directus policies + `$CURRENT_USER` + Flutter tarafında `tenant_id` filtresi
+
+## 2. Uygulama özeti (DLS — Dental Lab System)
+
+**Diş klinikleri ↔ diş laboratuvarları** arasındaki protez iş alışverişini dijitalleştirir.
+- Klinik bir hasta için protez işi açar → bağlı laboratuvara yollar.
+- Lab gelen kutusundan görür, durum adımlarını işler: **Ölçü → Alt Yapı Prova → Üst Yapı Prova → Cila/Bitim**.
+- Tamamlanınca iş `sent` → klinik teslim alınca `delivered`.
+- Her iki taraf finansal akışı kendi defterinde izler.
+
+## 3. Multi-tenancy & yetki modeli
+
+- **Tenant = `tenants` satırı.** Her tenant'ın bir `kind`'ı var: `clinic` veya `lab`.
+- Kullanıcı → `tenant_members` üzerinden bir veya birden fazla tenant'a bağlanır.
+- **`member_number`** (12 hane, unique): tenant'ın **bağlantı kodu**. Login'de kullanılmaz; sadece iki tenant'ı eşlemek için.
+- Flutter tarafında her sorguda `tenant_id` (veya `clinic_tenant_id`/`lab_tenant_id`) filtresi **zorunlu**.
+- Cross-tenant tablolar (`connections`, `jobs`, `job_files`, `job_status_history`): hem `clinic_tenant_id` hem `lab_tenant_id` taşır — iki taraf da erişir.
+
+## 4. Koleksiyonlar (17)
+
+> Notasyon: `IDX`=index, `UNQ`=unique, `FK`=foreign key, `DEF`=default.
+> Tüm tablolarda sistem alanları: `id` (uuid PK), `date_created`, `date_updated` (varsa).
+
+### `tenants` — tenant profili (Appwrite Team karşılığı)
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| kind | enum[lab\|clinic] | tenant türü · **IDX** |
+| member_number | string(12) | bağlantı kodu · **UNQ** |
+| company_name | string(255) | |
+| company_tax_id | string(50) | |
+| company_address | text | |
+| company_email | string(255) | |
+| company_phone | string(30) | |
+| logo | uuid | → `directus_files` |
+| default_currency | string(8) | DEF: `TRY` |
+| status | enum[active\|suspended] | DEF: `active` |
+
+### `tenant_members` — kullanıcı ↔ tenant üyeliği
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| tenant_id | uuid | → `tenants` CASCADE · **IDX** |
+| user_id | uuid | → `directus_users` CASCADE |
+| role | enum[owner\|admin\|member] | DEF: `member` |
+
+### `profiles` — kullanıcı başına ek bilgi
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| tenant_id | uuid | → `tenants` |
+| user_id | uuid | → `directus_users` |
+| display_name | string(255) | |
+| phone | string(30) | |
+| title | string(100) | |
+
+### `connections` — iki tenant arası bağlantı
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| clinic_tenant_id | uuid | → `tenants` · **IDX** |
+| lab_tenant_id | uuid | → `tenants` · **IDX** |
+| status | enum[pending\|approved\|rejected] | DEF: `pending` · **IDX** |
+| requested_by | uuid | → `directus_users` |
+| requested_at | timestamp | |
+| approved_at | timestamp | |
+| rejected_at | timestamp | |
+
+> **Unique constraint:** `(clinic_tenant_id, lab_tenant_id)` — aynı çift iki kez bağlanamaz. Flutter tarafında kontrol edilmeli; DB constraint Directus MCP ile eklenemez, migration SQL ile ekle.
+
+### `patients` — klinik hasta kayıtları
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| clinic_tenant_id | uuid | → `tenants` · **IDX** |
+| created_by | uuid | → `directus_users` |
+| patient_code | string(50) | klinik içinde unique (soft) |
+| first_name | string(100) | |
+| last_name | string(100) | |
+| phone | string(30) | |
+| date_of_birth | date | |
+| notes | text | |
+| archived | boolean | DEF: false |
+
+### `jobs` — protez işi (çekirdek tablo — en ağır)
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| clinic_tenant_id | uuid | → `tenants` · **IDX** |
+| lab_tenant_id | uuid | → `tenants` · **IDX** |
+| created_by | uuid | → `directus_users` |
+| patient_id | uuid | → `patients` SET NULL · **IDX** |
+| patient_code | string(50) | |
+| prosthetic_id | uuid | → `prosthetics` SET NULL |
+| prosthetic_type | enum[metal_porselen\|zirkonyum\|implant_ustu_zirkonyum\|gecici\|e_max\|diger] | |
+| member_count | integer | üye (diş) sayısı |
+| teeth | json | diş numaraları dizisi `List` |
+| color | string(20) | Vita renk kodu |
+| description | text | |
+| price | decimal(10,2) | |
+| currency | string(8) | |
+| status | enum[pending\|in_progress\|sent\|delivered\|cancelled] | DEF: `pending` · **IDX** |
+| current_step | enum[olcu\|alt_yapi_prova\|ust_yapi_prova\|cila_bitim] | |
+| location | enum[at_clinic\|at_lab] | DEF: `at_clinic` |
+| due_date | timestamp | |
+
+**Query pattern (Flutter):**
+```
+// Lab gelen kutusu
+GET /items/jobs?filter[lab_tenant_id][_eq]=$tenantId&filter[status][_eq]=pending
+ &sort=-date_created&limit=50&page=1
+
+// Klinik giden işler
+GET /items/jobs?filter[clinic_tenant_id][_eq]=$tenantId
+ &sort=-date_created&limit=50&page=1
+
+// Filtre + arama
+&filter[status][_in]=pending,in_progress
+&search=hasta_kodu
+```
+
+### `job_files` — işe bağlı dosyalar
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| job_id | uuid | → `jobs` CASCADE · **IDX** |
+| clinic_tenant_id | uuid | → `tenants` CASCADE · **IDX** |
+| lab_tenant_id | uuid | → `tenants` CASCADE · **IDX** |
+| uploaded_by | uuid | → `directus_users` |
+| file_id | uuid | → `directus_files` SET NULL |
+| kind | enum[scan\|image\|document] | |
+| name | string(255) | |
+| size | integer | bayt |
+| mime_type | string(100) | |
+| archived_at | timestamp | soft-delete; set → download disabled |
+
+### `job_status_history` — stepper denetim izi
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| job_id | uuid | → `jobs` CASCADE · **IDX** |
+| clinic_tenant_id | uuid | → `tenants` |
+| lab_tenant_id | uuid | → `tenants` |
+| step | enum[olcu\|alt_yapi_prova\|ust_yapi_prova\|cila_bitim] | |
+| completed_by | uuid | → `directus_users` |
+| completed_at | timestamp | |
+| note | text | |
+
+### `prosthetics` — lab ürün kataloğu
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| tenant_id | uuid | → `tenants` · **IDX** |
+| created_by | uuid | → `directus_users` |
+| name | string(255) | |
+| type | enum[...prosthetic_types...] | |
+| unit_price | decimal(10,2) | |
+| currency | string(8) | DEF: `TRY` |
+| archived | boolean | DEF: false · **IDX** |
+
+### `finance_entries` — tek-taraflı defter
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| tenant_id | uuid | → `tenants` · **IDX** |
+| created_by | uuid | → `directus_users` |
+| job_id | uuid | → `jobs` SET NULL |
+| counterpart_tenant_id | uuid | → `tenants` SET NULL |
+| type | enum[income\|expense\|receivable\|payable] | |
+| amount | decimal(12,2) | |
+| currency | string(8) | |
+| status | enum[pending\|paid\|cancelled] | DEF: `pending` · **IDX** |
+| date | timestamp | **IDX** |
+| description | text | |
+
+> **Cross-tenant sync (Directus Flow):** İş `sent`/`delivered` olunca:
+> - Lab tarafı → `receivable/pending` satır
+> - Klinik tarafı → `payable/pending` satır
+> Idempotent: `(job_id, tenant_id, type)` kombinasyonu varsa atla.
+
+### `payments` — ödeme kayıtları
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| tenant_id | uuid | → `tenants` |
+| counterpart_tenant_id | uuid | → `tenants` |
+| direction | enum[inflow\|outflow] | |
+| amount | decimal(12,2) | |
+| currency | string(8) | |
+| payment_date | timestamp | |
+| method | string(30) | |
+| notes | text | |
+| recorded_by | uuid | → `directus_users` |
+| status | enum[pending\|confirmed\|rejected] | DEF: `confirmed` |
+
+### `clinic_pricing` — kliniğe özel lab fiyatı
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| lab_tenant_id | uuid | → `tenants` CASCADE |
+| clinic_tenant_id | uuid | → `tenants` CASCADE |
+| prosthetic_type | enum[...] | |
+| custom_unit_price | decimal(10,2) | |
+| discount_percent | decimal(5,2) | |
+| currency | string(8) | |
+| created_by | uuid | → `directus_users` |
+
+> **Unique:** `(lab_tenant_id, clinic_tenant_id, prosthetic_type)` — Flutter tarafında kontrol et.
+
+### `notifications`
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| tenant_id | uuid | → `tenants` · **IDX** |
+| user_id | uuid | → `directus_users` CASCADE |
+| job_id | uuid | → `jobs` SET NULL |
+| connection_id | uuid | → `connections` SET NULL |
+| message | string(500) | |
+| read | boolean | DEF: false · **IDX** |
+| severity | enum[info\|warning] | DEF: `info` |
+
+### `audit_logs`
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| tenant_id | uuid | → `tenants` |
+| user_id | uuid | → `directus_users` |
+| action | enum[create\|update\|delete] | |
+| entity_type | string(50) | |
+| entity_id | string(36) | |
+| changes | json | |
+| ip_address | string(50) | |
+| user_agent | string(500) | |
+
+### `invite_links`
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| tenant_id | uuid | → `tenants` CASCADE |
+| code | string(32) | **UNQ** |
+| email | string(255) | |
+| role | enum[admin\|member] | |
+| status | enum[pending\|accepted\|cancelled\|expired] | DEF: `pending` |
+| invited_by | uuid | → `directus_users` |
+| expires_at | timestamp | |
+| accepted_at | timestamp | |
+| accepted_by | uuid | → `directus_users` |
+
+### `user_preferences`
+| Alan | Tip | Not |
+|---|---|---|
+| id | uuid | PK |
+| user_id | uuid | → `directus_users` CASCADE |
+| theme | enum[light\|dark\|system] | DEF: `system` |
+| color_theme | string(50) | |
+
+## 5. İş akışı (jobs lifecycle)
+
+```
+Klinik açar (pending)
+ → Lab "İşleme Al" (in_progress, currentStep: alt_yapi_prova, location: at_lab)
+ → Lab "Kliniğe Gönder" (location: at_clinic) — prova için
+ → Klinik "Provayı Onayla" (currentStep++, location: at_lab)
+ → Klinik "Düzeltme İste" (location: at_lab, step aynı)
+ → [Cila/Bitim sonrası] Lab "Kliniğe Gönder" (status: sent, location: at_clinic)
+ → Klinik "Teslim Al" (status: delivered)
+ → finance-sync tetiklenir
+ → job_files arşivlenir (archived_at set)
+```
+
+**Adım sırası:** `olcu → alt_yapi_prova → ust_yapi_prova → cila_bitim`
+
+> Not: `acceptJob` = olcu tamamlandı anlamına gelir; `currentStep` direkt `alt_yapi_prova`'ya atlar.
+
+## 6. Query Optimizasyon Kuralları (Flutter)
+
+### Zorunlu filtreler — hiç ihmal etme
+```dart
+// Her jobs sorgusunda tenant filtresi ZORUNLU
+filter: {
+ 'lab_tenant_id': {'_eq': tenantId}, // lab tarafı
+ // veya
+ 'clinic_tenant_id': {'_eq': tenantId}, // klinik tarafı
+}
+```
+
+### Sayfalama — sonsuz liste / cursor
+```dart
+// İlk yükleme
+limit: 30, page: 1
+
+// Sonraki sayfa (offset bazlı)
+limit: 30, offset: 30
+
+// Toplam sayı için ayrı istek (pahalı — sadece gerektiğinde)
+meta: 'filter_count'
+```
+
+### Field projection — sadece gerekeni çek
+```dart
+// Jobs listesi — detay alanlarını çekme
+fields: ['id', 'patient_code', 'prosthetic_type', 'status',
+ 'current_step', 'location', 'date_created', 'due_date',
+ 'clinic_tenant_id.company_name', 'lab_tenant_id.company_name']
+
+// Jobs detay — tam veri
+fields: ['*', 'patient_id.*', 'job_files.*']
+```
+
+### Relation join — N+1 önleme
+```dart
+// Kötü: jobs çek → her iş için ayrı tenant sorgusu
+// İyi: nested fields ile tek sorguda
+fields: ['*', 'clinic_tenant_id.company_name', 'lab_tenant_id.company_name']
+```
+
+### Finance listesi — tarih aralığı ile kes
+```dart
+filter: {
+ 'tenant_id': {'_eq': tenantId},
+ 'date': {'_gte': '2026-01-01'}, // son 6 ay gibi
+ 'status': {'_neq': 'cancelled'},
+}
+sort: ['-date']
+limit: 50
+```
+
+## 7. Klinik vs Lab — Ayrı Akışlar
+
+| Ekran | Klinik | Lab |
+|---|---|---|
+| Ana sayfa | Gönderilen işler özeti, bekleyen ödemeler | Gelen işler özeti, işlemdeki işler |
+| İşler ana liste | Giden işler (`clinic_tenant_id`) | Gelen işler (`lab_tenant_id`) |
+| İş aksiyon butonu | Provayı Onayla / Düzeltme İste / Teslim Al | İşleme Al / Kliniğe Gönder |
+| Ürünler | — | Katalog CRUD |
+| Hastalar | Hasta kayıtları | — |
+| Bağlantı kur | Lab'ı `member_number` ile ara | Gelen talepleri onayla/reddet |
+| Finans | Borçlar (payable) | Alacaklar (receivable) |
+
+## 8. Flutter → Directus API pattern
+
+```dart
+// Auth
+POST /auth/login
+ body: { email, password }
+ returns: { access_token, refresh_token, expires }
+
+// Token yenileme
+POST /auth/refresh
+ body: { refresh_token }
+
+// Koleksiyon okuma
+GET /items/{collection}?filter[field][_eq]=value&limit=30&sort=-date_created
+
+// Tekil kayıt
+GET /items/{collection}/{id}?fields=*,relation.*
+
+// Oluşturma
+POST /items/{collection}
+ body: { field: value, ... }
+
+// Güncelleme
+PATCH /items/{collection}/{id}
+ body: { field: value }
+
+// Dosya yükleme
+POST /files
+ Content-Type: multipart/form-data
+ field: file (binary)
+ returns: { id, filename_download, ... }
+```
+
+## 9. Directus Flows (server-side otomasyonlar)
+
+Aşağıdaki iş mantıkları Flutter client'tan değil Directus Flow'dan tetiklenmeli:
+
+| Tetikleyici | Flow | Açıklama |
+|---|---|---|
+| `jobs.status → sent\|delivered` | finance-sync | Lab receivable + klinik payable oluştur (idempotent) |
+| `jobs.status → delivered` | archive-job-files | `job_files.archived_at` set et |
+| `jobs` UPDATE | audit-log | `audit_logs` satır yaz |
+| `connections.status → approved\|rejected` | notify-connection | İlgili tarafa bildirim gönder |
+
+> Flows henüz oluşturulmadı — bir sonraki adım.
+
+## 10. Eksik kısıtlamalar (SQL ile eklenecek)
+
+Directus MCP composite unique constraint desteklemiyor; veritabanına direkt SQL ile eklenecek:
+
+```sql
+-- connections çifti unique
+ALTER TABLE connections
+ ADD CONSTRAINT connections_pair_unique UNIQUE (clinic_tenant_id, lab_tenant_id);
+
+-- clinic_pricing üçlüsü unique
+ALTER TABLE clinic_pricing
+ ADD CONSTRAINT clinic_pricing_triple_unique
+ UNIQUE (lab_tenant_id, clinic_tenant_id, prosthetic_type);
+```
diff --git a/installer/setup.iss b/installer/setup.iss
new file mode 100644
index 0000000..75c1cb4
--- /dev/null
+++ b/installer/setup.iss
@@ -0,0 +1,49 @@
+; DLS - Dental Lab System Installer
+; Developed by kovakyazilim.com
+; Inno Setup Script
+
+#define MyAppName "DLS - Dental Lab System"
+#define MyAppVersion "1.0.0"
+#define MyAppPublisher "kovakyazilim.com"
+#define MyAppURL "https://kovakyazilim.com"
+#define MyAppExeName "lab_app.exe"
+
+[Setup]
+AppId={{A1B2C3D4-E5F6-7890-ABCD-EF1234567890}
+AppName={#MyAppName}
+AppVersion={#MyAppVersion}
+AppPublisher={#MyAppPublisher}
+AppPublisherURL={#MyAppURL}
+AppSupportURL={#MyAppURL}
+AppUpdatesURL={#MyAppURL}
+DefaultDirName={autopf}\DLS
+DefaultGroupName=DLS
+DisableProgramGroupPage=yes
+OutputDir=..\build\installer
+OutputBaseFilename=DLS_Setup_v{#MyAppVersion}
+SetupIconFile=..\windows\runner\resources\app_icon.ico
+Compression=lzma
+SolidCompression=yes
+WizardStyle=modern
+PrivilegesRequired=admin
+
+[Languages]
+Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl"
+Name: "english"; MessagesFile: "compiler:Default.isl"
+
+[Tasks]
+Name: "desktopicon"; Description: "Masa&üstü kısayolu oluştur"; GroupDescription: "Kısayollar:"
+
+[Files]
+Source: "..\build\windows\x64\runner\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
+Source: "..\build\windows\x64\runner\Release\flutter_windows.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "..\build\windows\x64\runner\Release\share_plus_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "..\build\windows\x64\runner\Release\url_launcher_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
+Source: "..\build\windows\x64\runner\Release\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs
+
+[Icons]
+Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
+Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
+
+[Run]
+Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
diff --git a/ios/.gitignore b/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..1dc6cf7
--- /dev/null
+++ b/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 13.0
+
+
diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..ec97fc6
--- /dev/null
+++ b/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/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..c4855bf
--- /dev/null
+++ b/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/ios/Podfile b/ios/Podfile
new file mode 100644
index 0000000..f11ec86
--- /dev/null
+++ b/ios/Podfile
@@ -0,0 +1,46 @@
+# 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)
+ target.build_configurations.each do |config|
+ config.build_settings['DEBUG_INFORMATION_FORMAT'] = 'dwarf-with-dsym' if config.name == 'Release'
+ end
+ end
+end
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
new file mode 100644
index 0000000..bb6c76d
--- /dev/null
+++ b/ios/Podfile.lock
@@ -0,0 +1,147 @@
+PODS:
+ - DKImagePickerController/Core (4.3.9):
+ - DKImagePickerController/ImageDataManager
+ - DKImagePickerController/Resource
+ - DKImagePickerController/ImageDataManager (4.3.9)
+ - DKImagePickerController/PhotoGallery (4.3.9):
+ - DKImagePickerController/Core
+ - DKPhotoGallery
+ - DKImagePickerController/Resource (4.3.9)
+ - DKPhotoGallery (0.0.19):
+ - DKPhotoGallery/Core (= 0.0.19)
+ - DKPhotoGallery/Model (= 0.0.19)
+ - DKPhotoGallery/Preview (= 0.0.19)
+ - DKPhotoGallery/Resource (= 0.0.19)
+ - SDWebImage
+ - SwiftyGif
+ - DKPhotoGallery/Core (0.0.19):
+ - DKPhotoGallery/Model
+ - DKPhotoGallery/Preview
+ - SDWebImage
+ - SwiftyGif
+ - DKPhotoGallery/Model (0.0.19):
+ - SDWebImage
+ - SwiftyGif
+ - DKPhotoGallery/Preview (0.0.19):
+ - DKPhotoGallery/Model
+ - DKPhotoGallery/Resource
+ - SDWebImage
+ - SwiftyGif
+ - DKPhotoGallery/Resource (0.0.19):
+ - SDWebImage
+ - SwiftyGif
+ - file_picker (0.0.1):
+ - DKImagePickerController/PhotoGallery
+ - Flutter
+ - Flutter (1.0.0)
+ - onesignal_flutter (5.5.8):
+ - Flutter
+ - OneSignalXCFramework (= 5.5.2)
+ - OneSignalXCFramework (5.5.2):
+ - OneSignalXCFramework/OneSignalComplete (= 5.5.2)
+ - OneSignalXCFramework/OneSignal (5.5.2):
+ - OneSignalXCFramework/OneSignalCore
+ - OneSignalXCFramework/OneSignalExtension
+ - OneSignalXCFramework/OneSignalLiveActivities
+ - OneSignalXCFramework/OneSignalNotifications
+ - OneSignalXCFramework/OneSignalOSCore
+ - OneSignalXCFramework/OneSignalOutcomes
+ - OneSignalXCFramework/OneSignalUser
+ - OneSignalXCFramework/OneSignalComplete (5.5.2):
+ - OneSignalXCFramework/OneSignal
+ - OneSignalXCFramework/OneSignalInAppMessages
+ - OneSignalXCFramework/OneSignalLocation
+ - OneSignalXCFramework/OneSignalCore (5.5.2)
+ - OneSignalXCFramework/OneSignalExtension (5.5.2):
+ - OneSignalXCFramework/OneSignalCore
+ - OneSignalXCFramework/OneSignalOSCore
+ - OneSignalXCFramework/OneSignalOutcomes
+ - OneSignalXCFramework/OneSignalInAppMessages (5.5.2):
+ - OneSignalXCFramework/OneSignalCore
+ - OneSignalXCFramework/OneSignalNotifications
+ - OneSignalXCFramework/OneSignalOSCore
+ - OneSignalXCFramework/OneSignalOutcomes
+ - OneSignalXCFramework/OneSignalUser
+ - OneSignalXCFramework/OneSignalLiveActivities (5.5.2):
+ - OneSignalXCFramework/OneSignalCore
+ - OneSignalXCFramework/OneSignalOSCore
+ - OneSignalXCFramework/OneSignalUser
+ - OneSignalXCFramework/OneSignalLocation (5.5.2):
+ - OneSignalXCFramework/OneSignalCore
+ - OneSignalXCFramework/OneSignalNotifications
+ - OneSignalXCFramework/OneSignalOSCore
+ - OneSignalXCFramework/OneSignalUser
+ - OneSignalXCFramework/OneSignalNotifications (5.5.2):
+ - OneSignalXCFramework/OneSignalCore
+ - OneSignalXCFramework/OneSignalExtension
+ - OneSignalXCFramework/OneSignalOSCore
+ - OneSignalXCFramework/OneSignalOutcomes
+ - OneSignalXCFramework/OneSignalOSCore (5.5.2):
+ - OneSignalXCFramework/OneSignalCore
+ - OneSignalXCFramework/OneSignalOutcomes (5.5.2):
+ - OneSignalXCFramework/OneSignalCore
+ - OneSignalXCFramework/OneSignalOSCore
+ - OneSignalXCFramework/OneSignalUser (5.5.2):
+ - OneSignalXCFramework/OneSignalCore
+ - OneSignalXCFramework/OneSignalNotifications
+ - OneSignalXCFramework/OneSignalOSCore
+ - OneSignalXCFramework/OneSignalOutcomes
+ - SDWebImage (5.21.7):
+ - SDWebImage/Core (= 5.21.7)
+ - SDWebImage/Core (5.21.7)
+ - share_plus (0.0.1):
+ - Flutter
+ - shared_preferences_foundation (0.0.1):
+ - Flutter
+ - FlutterMacOS
+ - sqflite_darwin (0.0.4):
+ - Flutter
+ - FlutterMacOS
+ - SwiftyGif (5.4.5)
+
+DEPENDENCIES:
+ - file_picker (from `.symlinks/plugins/file_picker/ios`)
+ - Flutter (from `Flutter`)
+ - onesignal_flutter (from `.symlinks/plugins/onesignal_flutter/ios`)
+ - share_plus (from `.symlinks/plugins/share_plus/ios`)
+ - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`)
+ - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`)
+
+SPEC REPOS:
+ trunk:
+ - DKImagePickerController
+ - DKPhotoGallery
+ - OneSignalXCFramework
+ - SDWebImage
+ - SwiftyGif
+
+EXTERNAL SOURCES:
+ file_picker:
+ :path: ".symlinks/plugins/file_picker/ios"
+ Flutter:
+ :path: Flutter
+ onesignal_flutter:
+ :path: ".symlinks/plugins/onesignal_flutter/ios"
+ share_plus:
+ :path: ".symlinks/plugins/share_plus/ios"
+ shared_preferences_foundation:
+ :path: ".symlinks/plugins/shared_preferences_foundation/darwin"
+ sqflite_darwin:
+ :path: ".symlinks/plugins/sqflite_darwin/darwin"
+
+SPEC CHECKSUMS:
+ DKImagePickerController: 946cec48c7873164274ecc4624d19e3da4c1ef3c
+ DKPhotoGallery: b3834fecb755ee09a593d7c9e389d8b5d6deed60
+ file_picker: a0560bc09d61de87f12d246fc47d2119e6ef37be
+ Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467
+ onesignal_flutter: 75c70a45a8d97e685273a14f04521ec121611458
+ OneSignalXCFramework: 2f46ff87ccefd9afe8e3b5f9fe357072191205ff
+ SDWebImage: e9fc87c1aab89a8ab1bbd74eba378c6f53be8abf
+ share_plus: 50da8cb520a8f0f65671c6c6a99b3617ed10a58a
+ shared_preferences_foundation: 7036424c3d8ec98dfe75ff1667cb0cd531ec82bb
+ sqflite_darwin: 20b2a3a3b70e43edae938624ce550a3cbf66a3d0
+ SwiftyGif: 706c60cf65fa2bc5ee0313beece843c8eb8194d4
+
+PODFILE CHECKSUM: d106a30630b099793eceddfd6e3c64af8abe90f1
+
+COCOAPODS: 1.16.2
diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..8df3ce8
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,746 @@
+// !$*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 */; };
+ 604C3E861E9F106B3AA6CCEF /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9221FFF6D01C1D6BF22E5ADA /* Pods_Runner.framework */; };
+ 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 */; };
+ C9B4075C0256AC482F1CDD77 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AFD5D57E8CDD24E2D84F3E9B /* Pods_RunnerTests.framework */; };
+/* 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 */
+ 0E5C1D2C3B5E98A6A4BF3DE7 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; };
+ 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 = ""; };
+ 468E8F6599C9CD0A40663335 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; };
+ 58AF9370CD56571E93F6935E /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; };
+ 5EDEE6A633E332DED57944E4 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; 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 = ""; };
+ 7A46E2402004ACC00F45B6B1 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9221FFF6D01C1D6BF22E5ADA /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ 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 = ""; };
+ AFD5D57E8CDD24E2D84F3E9B /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ F2CF6120D4E22FEE6FB14E1F /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; };
+ F766D9502FD64D820017E914 /* RunnerDebug.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = RunnerDebug.entitlements; sourceTree = ""; };
+ F766D9512FD64D820017E916 /* Runner.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = Runner.entitlements; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 604C3E861E9F106B3AA6CCEF /* Pods_Runner.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ D66E69B2ECA4A5318EDFF043 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ C9B4075C0256AC482F1CDD77 /* Pods_RunnerTests.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
+ );
+ path = RunnerTests;
+ sourceTree = "";
+ };
+ 61E03C992BD404E58CDC96E8 /* Pods */ = {
+ isa = PBXGroup;
+ children = (
+ 468E8F6599C9CD0A40663335 /* Pods-Runner.debug.xcconfig */,
+ 0E5C1D2C3B5E98A6A4BF3DE7 /* Pods-Runner.release.xcconfig */,
+ 5EDEE6A633E332DED57944E4 /* Pods-Runner.profile.xcconfig */,
+ 7A46E2402004ACC00F45B6B1 /* Pods-RunnerTests.debug.xcconfig */,
+ F2CF6120D4E22FEE6FB14E1F /* Pods-RunnerTests.release.xcconfig */,
+ 58AF9370CD56571E93F6935E /* Pods-RunnerTests.profile.xcconfig */,
+ );
+ path = Pods;
+ sourceTree = "";
+ };
+ 6F5B57133C9496CF920C3E25 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 9221FFF6D01C1D6BF22E5ADA /* Pods_Runner.framework */,
+ AFD5D57E8CDD24E2D84F3E9B /* Pods_RunnerTests.framework */,
+ );
+ name = Frameworks;
+ 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 */,
+ 61E03C992BD404E58CDC96E8 /* Pods */,
+ 6F5B57133C9496CF920C3E25 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ F766D9502FD64D820017E914 /* RunnerDebug.entitlements */,
+ F766D9512FD64D820017E916 /* Runner.entitlements */,
+ 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 = (
+ 416DB929131C2E55EE26F9D1 /* [CP] Check Pods Manifest.lock */,
+ 331C807D294A63A400263BE5 /* Sources */,
+ 331C807F294A63A400263BE5 /* Resources */,
+ D66E69B2ECA4A5318EDFF043 /* Frameworks */,
+ );
+ 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 = (
+ 42D030382DFE9994547FE992 /* [CP] Check Pods Manifest.lock */,
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ 7B78FAA6FA9F3F82D81A2E70 /* [CP] Embed Pods Frameworks */,
+ );
+ 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";
+ };
+ 416DB929131C2E55EE26F9D1 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 42D030382DFE9994547FE992 /* [CP] Check Pods Manifest.lock */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ );
+ inputPaths = (
+ "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+ "${PODS_ROOT}/Manifest.lock",
+ );
+ name = "[CP] Check Pods Manifest.lock";
+ outputFileListPaths = (
+ );
+ outputPaths = (
+ "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 7B78FAA6FA9F3F82D81A2E70 /* [CP] Embed Pods Frameworks */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist",
+ );
+ name = "[CP] Embed Pods Frameworks";
+ outputFileListPaths = (
+ "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist",
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
+ showEnvVarsInLog = 0;
+ };
+ 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ 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;
+ STRING_CATALOG_GENERATE_SYMBOLS = YES;
+ 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;
+ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = XP74C5889V;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.kovakyazilim.labapp;
+ PRODUCT_NAME = DLS;
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 331C8088294A63A400263BE5 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7A46E2402004ACC00F45B6B1 /* Pods-RunnerTests.debug.xcconfig */;
+ 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.kovakyazilim.labapp.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;
+ baseConfigurationReference = F2CF6120D4E22FEE6FB14E1F /* Pods-RunnerTests.release.xcconfig */;
+ 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.kovakyazilim.labapp.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;
+ baseConfigurationReference = 58AF9370CD56571E93F6935E /* Pods-RunnerTests.profile.xcconfig */;
+ 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.kovakyazilim.labapp.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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ 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;
+ STRING_CATALOG_GENERATE_SYMBOLS = YES;
+ 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_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
+ 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;
+ STRING_CATALOG_GENERATE_SYMBOLS = YES;
+ 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;
+ CODE_SIGN_ENTITLEMENTS = Runner/RunnerDebug.entitlements;
+ CODE_SIGN_IDENTITY = "Apple Development";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = XP74C5889V;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.kovakyazilim.labapp;
+ PRODUCT_NAME = DLS;
+ PROVISIONING_PROFILE_SPECIFIER = "";
+ 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;
+ CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ DEVELOPMENT_TEAM = XP74C5889V;
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.kovakyazilim.labapp;
+ PRODUCT_NAME = DLS;
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 331C8088294A63A400263BE5 /* Debug */,
+ 331C8089294A63A400263BE5 /* Release */,
+ 331C808A294A63A400263BE5 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..a27d68e
--- /dev/null
+++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..21a3cc1
--- /dev/null
+++ b/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..6266644
--- /dev/null
+++ b/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/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..3b8f85c
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..abe70cc
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..a82d9fd
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..52cf2b1
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..0e9616e
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..aad87ad
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..52bb7ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..a82d9fd
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..b01c035
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..7cbbbf0
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..7cbbbf0
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..cab8411
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..5184411
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..72b812f
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..a2a9f95
Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..0bedcf2
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage.png",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "filename" : "LaunchImage@3x.png",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..9da19ea
Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..f2e259c
--- /dev/null
+++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ios/Runner/GoogleService-Info.plist b/ios/Runner/GoogleService-Info.plist
new file mode 100644
index 0000000..b58464b
--- /dev/null
+++ b/ios/Runner/GoogleService-Info.plist
@@ -0,0 +1,30 @@
+
+
+
+
+ API_KEY
+ AIzaSyBoMcoZAInKHTvsmg-4jakJxzP_YnRfQ6k
+ GCM_SENDER_ID
+ 751114036897
+ PLIST_VERSION
+ 1
+ BUNDLE_ID
+ com.kovakyazilim.labapp
+ PROJECT_ID
+ dlslabapp
+ STORAGE_BUCKET
+ dlslabapp.firebasestorage.app
+ IS_ADS_ENABLED
+
+ IS_ANALYTICS_ENABLED
+
+ IS_APPINVITE_ENABLED
+
+ IS_GCM_ENABLED
+
+ IS_SIGNIN_ENABLED
+
+ GOOGLE_APP_ID
+ 1:751114036897:ios:aae969759ebc15a199f2e0
+
+
\ No newline at end of file
diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist
new file mode 100644
index 0000000..5f331be
--- /dev/null
+++ b/ios/Runner/Info.plist
@@ -0,0 +1,53 @@
+
+
+
+
+ CADisableMinimumFrameDurationOnPhone
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ DLS
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ DLS
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UIApplicationSupportsIndirectInputEvents
+
+ UIBackgroundModes
+
+ remote-notification
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+
+
diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/ios/Runner/Runner.entitlements b/ios/Runner/Runner.entitlements
new file mode 100644
index 0000000..903def2
--- /dev/null
+++ b/ios/Runner/Runner.entitlements
@@ -0,0 +1,8 @@
+
+
+
+
+ aps-environment
+ development
+
+
diff --git a/ios/Runner/RunnerDebug.entitlements b/ios/Runner/RunnerDebug.entitlements
new file mode 100644
index 0000000..903def2
--- /dev/null
+++ b/ios/Runner/RunnerDebug.entitlements
@@ -0,0 +1,8 @@
+
+
+
+
+ aps-environment
+ development
+
+
diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 0000000..86a7c3b
--- /dev/null
+++ b/ios/RunnerTests/RunnerTests.swift
@@ -0,0 +1,12 @@
+import Flutter
+import UIKit
+import XCTest
+
+class RunnerTests: XCTestCase {
+
+ func testExample() {
+ // If you add code to the Runner application, consider adding tests here.
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+ }
+
+}
diff --git a/lib/core/api/pocketbase_client.dart b/lib/core/api/pocketbase_client.dart
new file mode 100644
index 0000000..78f2dc2
--- /dev/null
+++ b/lib/core/api/pocketbase_client.dart
@@ -0,0 +1,25 @@
+import 'package:pocketbase/pocketbase.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+
+const _kAuthKey = 'pb_auth';
+
+class PocketBaseClient {
+ PocketBaseClient._({required this.pb});
+ static PocketBaseClient? _instance;
+ static PocketBaseClient get instance => _instance!;
+ final PocketBase pb;
+
+ static Future init() async {
+ final prefs = await SharedPreferences.getInstance();
+ final stored = prefs.getString(_kAuthKey);
+
+ final store = AsyncAuthStore(
+ save: (String data) => prefs.setString(_kAuthKey, data),
+ initial: stored,
+ );
+
+ _instance = PocketBaseClient._(
+ pb: PocketBase('https://pocket.kovaksoft.com', authStore: store),
+ );
+ }
+}
diff --git a/lib/core/auth/auth_repository.dart b/lib/core/auth/auth_repository.dart
new file mode 100644
index 0000000..a9f687b
--- /dev/null
+++ b/lib/core/auth/auth_repository.dart
@@ -0,0 +1,100 @@
+import 'package:pocketbase/pocketbase.dart';
+import '../api/pocketbase_client.dart';
+import '../../models/tenant.dart';
+import '../../models/user_profile.dart';
+
+class AuthRepository {
+ AuthRepository._();
+ static final instance = AuthRepository._();
+
+ PocketBase get _pb => PocketBaseClient.instance.pb;
+
+ Future login(String email, String password) async {
+ await _pb.collection('users').authWithPassword(email, password);
+ return _buildAuthResult();
+ }
+
+ Future logout() async {
+ _pb.authStore.clear();
+ }
+
+ Future isLoggedIn() async {
+ if (!_pb.authStore.isValid) return false;
+ try {
+ await _pb.collection('users').authRefresh();
+ return true;
+ } catch (_) {
+ _pb.authStore.clear();
+ return false;
+ }
+ }
+
+ Future register({
+ required String email,
+ required String password,
+ String? firstName,
+ String? lastName,
+ }) async {
+ await _pb.collection('users').create(body: {
+ 'email': email,
+ 'password': password,
+ 'passwordConfirm': password,
+ 'emailVisibility': true,
+ if (firstName != null && firstName.isNotEmpty) 'first_name': firstName,
+ if (lastName != null && lastName.isNotEmpty) 'last_name': lastName,
+ });
+ return login(email, password);
+ }
+
+ Future refreshSession() async {
+ try {
+ await _pb.collection('users').authRefresh();
+ } catch (_) {}
+ return _buildAuthResult();
+ }
+
+ Future updateUserLanguage(String userId, String languageCode) async {
+ await _pb.collection('users').update(userId, body: {
+ 'preferred_language': languageCode,
+ });
+ }
+
+ Future updateTenant(
+ String id, {
+ String? companyName,
+ String? defaultCurrency,
+ }) async {
+ final body = {};
+ if (companyName != null) body['company_name'] = companyName;
+ if (defaultCurrency != null) body['default_currency'] = defaultCurrency;
+ if (body.isEmpty) return;
+ await _pb.collection('tenants').update(id, body: body);
+ }
+
+ Future _buildAuthResult() async {
+ final record = _pb.authStore.record!;
+ final user = UserProfile.fromJson(record.toJson());
+ List tenants = [];
+ try {
+ tenants = await _fetchUserTenants(record.id);
+ } catch (_) {}
+ return AuthResult(user: user, tenants: tenants);
+ }
+
+ Future> _fetchUserTenants(String userId) async {
+ final result = await _pb.collection('tenant_members').getList(
+ filter: 'user_id = "$userId"',
+ expand: 'tenant_id',
+ perPage: 50,
+ );
+ return result.items
+ .map((r) => TenantMembership.fromJson(r.toJson()))
+ .toList();
+ }
+}
+
+class AuthResult {
+ const AuthResult({required this.user, required this.tenants});
+ final UserProfile user;
+ final List tenants;
+}
diff --git a/lib/core/l10n/app_strings.dart b/lib/core/l10n/app_strings.dart
new file mode 100644
index 0000000..4643e1f
--- /dev/null
+++ b/lib/core/l10n/app_strings.dart
@@ -0,0 +1,777 @@
+// ignore_for_file: lines_longer_than_80_chars
+class AppStrings {
+ const AppStrings({
+ required this.settings,
+ required this.userInfo,
+ required this.labInfo,
+ required this.clinicInfo,
+ required this.labName,
+ required this.clinicName,
+ required this.currency,
+ required this.status,
+ required this.active,
+ required this.role,
+ required this.connections,
+ required this.clinicConnections,
+ required this.clinicConnectionsSub,
+ required this.labConnections,
+ required this.labConnectionsSub,
+ required this.otherMemberships,
+ required this.management,
+ required this.team,
+ required this.teamSub,
+ required this.discounts,
+ required this.discountsSub,
+ required this.reports,
+ required this.reportsSub,
+ required this.aiAssistant,
+ required this.aiAssistantSub,
+ required this.signOut,
+ required this.signOutTitle,
+ required this.signOutConfirm,
+ required this.cancel,
+ required this.save,
+ required this.edit,
+ required this.editLabInfo,
+ required this.editClinicInfo,
+ required this.labNameHint,
+ required this.clinicNameHint,
+ required this.preferences,
+ required this.appLanguage,
+ required this.languageSelection,
+ required this.currencySelection,
+ required this.languageTurkish,
+ required this.languageEnglish,
+ required this.languageRussian,
+ required this.languageArabic,
+ required this.languageGerman,
+ required this.type,
+ required this.roleOwner,
+ required this.roleAdmin,
+ required this.roleTechnician,
+ required this.roleDelivery,
+ required this.roleFinance,
+ required this.roleDoctor,
+ required this.roleMember,
+ required this.tenantKindClinic,
+ required this.tenantKindLab,
+ required this.signInWelcome,
+ required this.signInSubtitle,
+ required this.emailAddress,
+ required this.password,
+ required this.emailRequired,
+ required this.passwordRequired,
+ required this.signIn,
+ required this.noAccount,
+ required this.signUp,
+ required this.signInHeadline,
+ required this.signInTagline,
+ required this.footerCopyright,
+ required this.signUpTitle,
+ required this.signUpSubtitle,
+ required this.firstName,
+ required this.lastName,
+ required this.firstNameHint,
+ required this.lastNameHint,
+ required this.emailHint,
+ required this.passwordHint,
+ required this.confirmPassword,
+ required this.confirmPasswordHint,
+ required this.passwordMismatch,
+ required this.alreadyHaveAccount,
+ required this.finance,
+ required this.pendingReceivable,
+ required this.collected,
+ required this.pending,
+ required this.sortNewest,
+ required this.sortAmountDesc,
+ required this.sortAmountAsc,
+ required this.noPendingEntries,
+ required this.noPaidEntries,
+ required this.sort,
+ required this.retry,
+ required this.errorPrefix,
+ required this.laboratoryCategory,
+ required this.clinicCategory,
+ required this.jobsTitle,
+ required this.dashboardTitle,
+ required this.productsTitle,
+ required this.patientsTitle,
+ required this.close,
+ required this.confirm,
+ required this.currencyTRY,
+ required this.currencyUSD,
+ required this.currencyEUR,
+ required this.currencyGBP,
+ required this.currencyAED,
+ });
+
+ // ── General ───────────────────────────────────────────────────────────────
+ final String cancel;
+ final String save;
+ final String edit;
+ final String preferences;
+ final String close;
+ final String confirm;
+ final String retry;
+ final String errorPrefix;
+ final String sort;
+
+ // ── Settings ──────────────────────────────────────────────────────────────
+ final String settings;
+ final String userInfo;
+ final String labInfo;
+ final String clinicInfo;
+ final String labName;
+ final String clinicName;
+ final String currency;
+ final String status;
+ final String active;
+ final String role;
+ final String connections;
+ final String clinicConnections;
+ final String clinicConnectionsSub;
+ final String labConnections;
+ final String labConnectionsSub;
+ final String otherMemberships;
+ final String management;
+ final String team;
+ final String teamSub;
+ final String discounts;
+ final String discountsSub;
+ final String reports;
+ final String reportsSub;
+ final String aiAssistant;
+ final String aiAssistantSub;
+ final String signOut;
+ final String signOutTitle;
+ final String signOutConfirm;
+ final String editLabInfo;
+ final String editClinicInfo;
+ final String labNameHint;
+ final String clinicNameHint;
+ final String appLanguage;
+ final String languageSelection;
+ final String currencySelection;
+ final String languageTurkish;
+ final String languageEnglish;
+ final String languageRussian;
+ final String languageArabic;
+ final String languageGerman;
+ final String type;
+
+ // ── Roles & tenant ────────────────────────────────────────────────────────
+ final String roleOwner;
+ final String roleAdmin;
+ final String roleTechnician;
+ final String roleDelivery;
+ final String roleFinance;
+ final String roleDoctor;
+ final String roleMember;
+ final String tenantKindClinic;
+ final String tenantKindLab;
+
+ // ── Auth ──────────────────────────────────────────────────────────────────
+ final String signInWelcome;
+ final String signInSubtitle;
+ final String emailAddress;
+ final String password;
+ final String emailRequired;
+ final String passwordRequired;
+ final String signIn;
+ final String noAccount;
+ final String signUp;
+ final String signInHeadline;
+ final String signInTagline;
+ final String footerCopyright;
+ final String signUpTitle;
+ final String signUpSubtitle;
+ final String firstName;
+ final String lastName;
+ final String firstNameHint;
+ final String lastNameHint;
+ final String emailHint;
+ final String passwordHint;
+ final String confirmPassword;
+ final String confirmPasswordHint;
+ final String passwordMismatch;
+ final String alreadyHaveAccount;
+
+ // ── Finance ───────────────────────────────────────────────────────────────
+ final String finance;
+ final String pendingReceivable;
+ final String collected;
+ final String pending;
+ final String sortNewest;
+ final String sortAmountDesc;
+ final String sortAmountAsc;
+ final String noPendingEntries;
+ final String noPaidEntries;
+
+ // ── Navigation / categories ───────────────────────────────────────────────
+ final String laboratoryCategory;
+ final String clinicCategory;
+ final String jobsTitle;
+ final String dashboardTitle;
+ final String productsTitle;
+ final String patientsTitle;
+
+ // ── Currencies ────────────────────────────────────────────────────────────
+ final String currencyTRY;
+ final String currencyUSD;
+ final String currencyEUR;
+ final String currencyGBP;
+ final String currencyAED;
+
+ // ── Helpers ───────────────────────────────────────────────────────────────
+ String tenantSelected(String name) {
+ if (this == ar) return '$name تم الاختيار.';
+ if (this == ru) return '$name выбрана.';
+ if (this == de) return '$name ausgewählt.';
+ if (this == en) return '$name selected.';
+ return '$name seçildi.';
+ }
+
+ static AppStrings of(String languageCode) => switch (languageCode) {
+ 'en' => en,
+ 'ru' => ru,
+ 'ar' => ar,
+ 'de' => de,
+ _ => tr,
+ };
+
+ // ── Turkish ───────────────────────────────────────────────────────────────
+ static const tr = AppStrings(
+ cancel: 'İptal',
+ save: 'Kaydet',
+ edit: 'Düzenle',
+ preferences: 'Tercihler',
+ close: 'Kapat',
+ confirm: 'Onayla',
+ retry: 'Tekrar Dene',
+ errorPrefix: 'Hata',
+ sort: 'Sıralama',
+ settings: 'Ayarlar',
+ userInfo: 'Kullanıcı Bilgileri',
+ labInfo: 'Laboratuvar Bilgileri',
+ clinicInfo: 'Klinik Bilgileri',
+ labName: 'Laboratuvar Adı',
+ clinicName: 'Klinik Adı',
+ currency: 'Para Birimi',
+ status: 'Durum',
+ active: 'Aktif',
+ role: 'Rol',
+ connections: 'Bağlantılar',
+ clinicConnections: 'Klinik Bağlantıları',
+ clinicConnectionsSub: 'Bağlı klinikler ve istekler',
+ labConnections: 'Laboratuvar Bağlantıları',
+ labConnectionsSub: 'Bağlı lablar ve talepler',
+ otherMemberships: 'Diğer Üyelikler',
+ management: 'Yönetim',
+ team: 'Ekip',
+ teamSub: 'Üyeler ve davetler',
+ discounts: 'İndirimler',
+ discountsSub: 'Klinik ve ürün bazlı özel indirimler',
+ reports: 'Raporlar',
+ reportsSub: 'İş geçmişi, finans ve analiz',
+ aiAssistant: 'AI Asistan',
+ aiAssistantSub: 'İşler ve finans hakkında soru sor',
+ signOut: 'Çıkış Yap',
+ signOutTitle: 'Çıkış Yap',
+ signOutConfirm: 'Hesabınızdan çıkış yapmak istiyor musunuz?',
+ editLabInfo: 'Laboratuvar Bilgilerini Düzenle',
+ editClinicInfo: 'Klinik Bilgilerini Düzenle',
+ labNameHint: 'Laboratuvar adını girin',
+ clinicNameHint: 'Klinik adını girin',
+ appLanguage: 'Uygulama Dili',
+ languageSelection: 'Dil Seçimi',
+ currencySelection: 'Para Birimi Seçimi',
+ languageTurkish: 'Türkçe',
+ languageEnglish: 'English',
+ languageRussian: 'Русский',
+ languageArabic: 'العربية',
+ languageGerman: 'Deutsch',
+ type: 'Tür',
+ roleOwner: 'Sahibi',
+ roleAdmin: 'Yönetici',
+ roleTechnician: 'Teknisyen',
+ roleDelivery: 'Teslimat Elemanı',
+ roleFinance: 'Finans Elemanı',
+ roleDoctor: 'Hekim',
+ roleMember: 'Üye',
+ tenantKindClinic: 'Klinik',
+ tenantKindLab: 'Laboratuvar',
+ signInWelcome: 'Tekrar hoş geldiniz',
+ signInSubtitle: 'Hesabınıza giriş yapın',
+ emailAddress: 'E-posta adresi',
+ password: 'Şifre',
+ emailRequired: 'E-posta gereklidir',
+ passwordRequired: 'Şifre gereklidir',
+ signIn: 'Giriş Yap',
+ noAccount: 'Hesabın yok mu?',
+ signUp: 'Kayıt Ol',
+ signInHeadline: 'Dental Lab\nYönetimini\nBasitleştirin.',
+ signInTagline: 'İş takibi, klinik bağlantısı ve\ngerçek zamanlı durum izleme.',
+ footerCopyright: '© 2026 kovakyazilim.com · Dental Lab Sistemi',
+ signUpTitle: 'Hesap Oluştur',
+ signUpSubtitle: 'DLS\'e kaydolun',
+ firstName: 'Ad',
+ lastName: 'Soyad',
+ firstNameHint: 'Adınızı girin',
+ lastNameHint: 'Soyadınızı girin',
+ emailHint: 'E-posta adresinizi girin',
+ passwordHint: 'Şifrenizi girin',
+ confirmPassword: 'Şifre Tekrar',
+ confirmPasswordHint: 'Şifrenizi tekrar girin',
+ passwordMismatch: 'Şifreler eşleşmiyor',
+ alreadyHaveAccount: 'Zaten hesabın var mı?',
+ finance: 'Finans',
+ pendingReceivable: 'Bekleyen Alacak',
+ collected: 'Tahsil Edilen',
+ pending: 'Bekleyen',
+ sortNewest: 'Yeniden Eskiye',
+ sortAmountDesc: 'Tutara Göre (Büyükten Küçüğe)',
+ sortAmountAsc: 'Tutara Göre (Küçükten Büyüğe)',
+ noPendingEntries: 'Bekleyen alacak yok',
+ noPaidEntries: 'Tahsil edilen kayıt yok',
+ laboratoryCategory: 'LABORATUVAR',
+ clinicCategory: 'KLİNİK',
+ jobsTitle: 'İşler',
+ dashboardTitle: 'Özet',
+ productsTitle: 'Ürünler',
+ patientsTitle: 'Hastalar',
+ currencyTRY: 'Türk Lirası (₺)',
+ currencyUSD: 'US Dollar (\$)',
+ currencyEUR: 'Euro (€)',
+ currencyGBP: 'British Pound (£)',
+ currencyAED: 'UAE Dirham (د.إ)',
+ );
+
+ // ── English ───────────────────────────────────────────────────────────────
+ static const en = AppStrings(
+ cancel: 'Cancel',
+ save: 'Save',
+ edit: 'Edit',
+ preferences: 'Preferences',
+ close: 'Close',
+ confirm: 'Confirm',
+ retry: 'Retry',
+ errorPrefix: 'Error',
+ sort: 'Sort',
+ settings: 'Settings',
+ userInfo: 'User Information',
+ labInfo: 'Laboratory Information',
+ clinicInfo: 'Clinic Information',
+ labName: 'Laboratory Name',
+ clinicName: 'Clinic Name',
+ currency: 'Currency',
+ status: 'Status',
+ active: 'Active',
+ role: 'Role',
+ connections: 'Connections',
+ clinicConnections: 'Clinic Connections',
+ clinicConnectionsSub: 'Connected clinics and requests',
+ labConnections: 'Laboratory Connections',
+ labConnectionsSub: 'Connected labs and requests',
+ otherMemberships: 'Other Memberships',
+ management: 'Management',
+ team: 'Team',
+ teamSub: 'Members and invitations',
+ discounts: 'Discounts',
+ discountsSub: 'Custom discounts by clinic and product',
+ reports: 'Reports',
+ reportsSub: 'Job history, finance and analytics',
+ aiAssistant: 'AI Assistant',
+ aiAssistantSub: 'Ask about jobs and finance',
+ signOut: 'Sign Out',
+ signOutTitle: 'Sign Out',
+ signOutConfirm: 'Are you sure you want to sign out?',
+ editLabInfo: 'Edit Laboratory Info',
+ editClinicInfo: 'Edit Clinic Info',
+ labNameHint: 'Enter laboratory name',
+ clinicNameHint: 'Enter clinic name',
+ appLanguage: 'App Language',
+ languageSelection: 'Language Selection',
+ currencySelection: 'Currency Selection',
+ languageTurkish: 'Türkçe',
+ languageEnglish: 'English',
+ languageRussian: 'Русский',
+ languageArabic: 'العربية',
+ languageGerman: 'Deutsch',
+ type: 'Type',
+ roleOwner: 'Owner',
+ roleAdmin: 'Admin',
+ roleTechnician: 'Technician',
+ roleDelivery: 'Delivery Staff',
+ roleFinance: 'Finance Staff',
+ roleDoctor: 'Doctor',
+ roleMember: 'Member',
+ tenantKindClinic: 'Clinic',
+ tenantKindLab: 'Laboratory',
+ signInWelcome: 'Welcome back',
+ signInSubtitle: 'Sign in to your account',
+ emailAddress: 'Email address',
+ password: 'Password',
+ emailRequired: 'Email is required',
+ passwordRequired: 'Password is required',
+ signIn: 'Sign In',
+ noAccount: "Don't have an account?",
+ signUp: 'Sign Up',
+ signInHeadline: 'Simplify Dental\nLab Management.',
+ signInTagline: 'Job tracking, clinic connections, and\nreal-time status monitoring.',
+ footerCopyright: '© 2026 kovakyazilim.com · Dental Lab System',
+ signUpTitle: 'Create Account',
+ signUpSubtitle: 'Sign up for DLS',
+ firstName: 'First Name',
+ lastName: 'Last Name',
+ firstNameHint: 'Enter your first name',
+ lastNameHint: 'Enter your last name',
+ emailHint: 'Enter your email address',
+ passwordHint: 'Enter your password',
+ confirmPassword: 'Confirm Password',
+ confirmPasswordHint: 'Re-enter your password',
+ passwordMismatch: 'Passwords do not match',
+ alreadyHaveAccount: 'Already have an account?',
+ finance: 'Finance',
+ pendingReceivable: 'Outstanding Balance',
+ collected: 'Collected',
+ pending: 'Pending',
+ sortNewest: 'Newest to Oldest',
+ sortAmountDesc: 'By Amount (High to Low)',
+ sortAmountAsc: 'By Amount (Low to High)',
+ noPendingEntries: 'No outstanding balance',
+ noPaidEntries: 'No collected records',
+ laboratoryCategory: 'LABORATORY',
+ clinicCategory: 'CLINIC',
+ jobsTitle: 'Jobs',
+ dashboardTitle: 'Overview',
+ productsTitle: 'Products',
+ patientsTitle: 'Patients',
+ currencyTRY: 'Turkish Lira (₺)',
+ currencyUSD: 'US Dollar (\$)',
+ currencyEUR: 'Euro (€)',
+ currencyGBP: 'British Pound (£)',
+ currencyAED: 'UAE Dirham (د.إ)',
+ );
+
+ // ── Russian ───────────────────────────────────────────────────────────────
+ static const ru = AppStrings(
+ cancel: 'Отмена',
+ save: 'Сохранить',
+ edit: 'Изменить',
+ preferences: 'Предпочтения',
+ close: 'Закрыть',
+ confirm: 'Подтвердить',
+ retry: 'Повторить',
+ errorPrefix: 'Ошибка',
+ sort: 'Сортировка',
+ settings: 'Настройки',
+ userInfo: 'Информация о пользователе',
+ labInfo: 'Информация о лаборатории',
+ clinicInfo: 'Информация о клинике',
+ labName: 'Название лаборатории',
+ clinicName: 'Название клиники',
+ currency: 'Валюта',
+ status: 'Статус',
+ active: 'Активный',
+ role: 'Роль',
+ connections: 'Подключения',
+ clinicConnections: 'Подключения к клиникам',
+ clinicConnectionsSub: 'Подключённые клиники и запросы',
+ labConnections: 'Подключения к лабораториям',
+ labConnectionsSub: 'Подключённые лаборатории и запросы',
+ otherMemberships: 'Другие членства',
+ management: 'Управление',
+ team: 'Команда',
+ teamSub: 'Участники и приглашения',
+ discounts: 'Скидки',
+ discountsSub: 'Специальные скидки по клинике и продукту',
+ reports: 'Отчёты',
+ reportsSub: 'История заказов, финансы и аналитика',
+ aiAssistant: 'ИИ-ассистент',
+ aiAssistantSub: 'Задавайте вопросы о заказах и финансах',
+ signOut: 'Выйти',
+ signOutTitle: 'Выйти',
+ signOutConfirm: 'Вы уверены, что хотите выйти из аккаунта?',
+ editLabInfo: 'Редактировать информацию о лаборатории',
+ editClinicInfo: 'Редактировать информацию о клинике',
+ labNameHint: 'Введите название лаборатории',
+ clinicNameHint: 'Введите название клиники',
+ appLanguage: 'Язык приложения',
+ languageSelection: 'Выбор языка',
+ currencySelection: 'Выбор валюты',
+ languageTurkish: 'Türkçe',
+ languageEnglish: 'English',
+ languageRussian: 'Русский',
+ languageArabic: 'العربية',
+ languageGerman: 'Deutsch',
+ type: 'Тип',
+ roleOwner: 'Владелец',
+ roleAdmin: 'Администратор',
+ roleTechnician: 'Техник',
+ roleDelivery: 'Сотрудник доставки',
+ roleFinance: 'Финансовый сотрудник',
+ roleDoctor: 'Врач',
+ roleMember: 'Участник',
+ tenantKindClinic: 'Клиника',
+ tenantKindLab: 'Лаборатория',
+ signInWelcome: 'Добро пожаловать',
+ signInSubtitle: 'Войдите в свой аккаунт',
+ emailAddress: 'Адрес эл. почты',
+ password: 'Пароль',
+ emailRequired: 'Эл. почта обязательна',
+ passwordRequired: 'Пароль обязателен',
+ signIn: 'Войти',
+ noAccount: 'Нет аккаунта?',
+ signUp: 'Зарегистрироваться',
+ signInHeadline: 'Упростите управление\nзубной лабораторией.',
+ signInTagline: 'Отслеживание заказов, связь с клиниками\nи мониторинг в реальном времени.',
+ footerCopyright: '© 2026 kovakyazilim.com · Dental Lab System',
+ signUpTitle: 'Создать аккаунт',
+ signUpSubtitle: 'Зарегистрироваться в DLS',
+ firstName: 'Имя',
+ lastName: 'Фамилия',
+ firstNameHint: 'Введите ваше имя',
+ lastNameHint: 'Введите вашу фамилию',
+ emailHint: 'Введите адрес эл. почты',
+ passwordHint: 'Введите ваш пароль',
+ confirmPassword: 'Подтверждение пароля',
+ confirmPasswordHint: 'Повторите ваш пароль',
+ passwordMismatch: 'Пароли не совпадают',
+ alreadyHaveAccount: 'Уже есть аккаунт?',
+ finance: 'Финансы',
+ pendingReceivable: 'Задолженность',
+ collected: 'Получено',
+ pending: 'Ожидающие',
+ sortNewest: 'Сначала новые',
+ sortAmountDesc: 'По сумме (убывание)',
+ sortAmountAsc: 'По сумме (возрастание)',
+ noPendingEntries: 'Нет задолженностей',
+ noPaidEntries: 'Нет оплаченных записей',
+ laboratoryCategory: 'ЛАБОРАТОРИЯ',
+ clinicCategory: 'КЛИНИКА',
+ jobsTitle: 'Заказы',
+ dashboardTitle: 'Обзор',
+ productsTitle: 'Продукты',
+ patientsTitle: 'Пациенты',
+ currencyTRY: 'Турецкая лира (₺)',
+ currencyUSD: 'Доллар США (\$)',
+ currencyEUR: 'Евро (€)',
+ currencyGBP: 'Британский фунт (£)',
+ currencyAED: 'Дирхам ОАЭ (د.إ)',
+ );
+
+ // ── Arabic ────────────────────────────────────────────────────────────────
+ static const ar = AppStrings(
+ cancel: 'إلغاء',
+ save: 'حفظ',
+ edit: 'تعديل',
+ preferences: 'التفضيلات',
+ close: 'إغلاق',
+ confirm: 'تأكيد',
+ retry: 'إعادة المحاولة',
+ errorPrefix: 'خطأ',
+ sort: 'ترتيب',
+ settings: 'الإعدادات',
+ userInfo: 'معلومات المستخدم',
+ labInfo: 'معلومات المختبر',
+ clinicInfo: 'معلومات العيادة',
+ labName: 'اسم المختبر',
+ clinicName: 'اسم العيادة',
+ currency: 'العملة',
+ status: 'الحالة',
+ active: 'نشط',
+ role: 'الدور',
+ connections: 'الاتصالات',
+ clinicConnections: 'اتصالات العيادة',
+ clinicConnectionsSub: 'العيادات المتصلة والطلبات',
+ labConnections: 'اتصالات المختبر',
+ labConnectionsSub: 'المختبرات المتصلة والطلبات',
+ otherMemberships: 'عضويات أخرى',
+ management: 'الإدارة',
+ team: 'الفريق',
+ teamSub: 'الأعضاء والدعوات',
+ discounts: 'الخصومات',
+ discountsSub: 'خصومات مخصصة حسب العيادة والمنتج',
+ reports: 'التقارير',
+ reportsSub: 'تاريخ الأعمال والمالية والتحليلات',
+ aiAssistant: 'مساعد الذكاء الاصطناعي',
+ aiAssistantSub: 'اسأل عن الأعمال والمالية',
+ signOut: 'تسجيل الخروج',
+ signOutTitle: 'تسجيل الخروج',
+ signOutConfirm: 'هل أنت متأكد من تسجيل الخروج؟',
+ editLabInfo: 'تعديل معلومات المختبر',
+ editClinicInfo: 'تعديل معلومات العيادة',
+ labNameHint: 'أدخل اسم المختبر',
+ clinicNameHint: 'أدخل اسم العيادة',
+ appLanguage: 'لغة التطبيق',
+ languageSelection: 'اختيار اللغة',
+ currencySelection: 'اختيار العملة',
+ languageTurkish: 'Türkçe',
+ languageEnglish: 'English',
+ languageRussian: 'Русский',
+ languageArabic: 'العربية',
+ languageGerman: 'Deutsch',
+ type: 'النوع',
+ roleOwner: 'المالك',
+ roleAdmin: 'المسؤول',
+ roleTechnician: 'فني',
+ roleDelivery: 'موظف توصيل',
+ roleFinance: 'موظف مالي',
+ roleDoctor: 'طبيب',
+ roleMember: 'عضو',
+ tenantKindClinic: 'عيادة',
+ tenantKindLab: 'مختبر',
+ signInWelcome: 'مرحباً بعودتك',
+ signInSubtitle: 'سجّل دخولك إلى حسابك',
+ emailAddress: 'البريد الإلكتروني',
+ password: 'كلمة المرور',
+ emailRequired: 'البريد الإلكتروني مطلوب',
+ passwordRequired: 'كلمة المرور مطلوبة',
+ signIn: 'تسجيل الدخول',
+ noAccount: 'ليس لديك حساب؟',
+ signUp: 'إنشاء حساب',
+ signInHeadline: 'بسّط إدارة\nمختبر الأسنان.',
+ signInTagline: 'تتبع الأعمال والتواصل مع العيادات\nومراقبة الحالة في الوقت الفعلي.',
+ footerCopyright: '© 2026 kovakyazilim.com · Dental Lab System',
+ signUpTitle: 'إنشاء حساب',
+ signUpSubtitle: 'سجّل في DLS',
+ firstName: 'الاسم الأول',
+ lastName: 'اسم العائلة',
+ firstNameHint: 'أدخل اسمك الأول',
+ lastNameHint: 'أدخل اسم عائلتك',
+ emailHint: 'أدخل بريدك الإلكتروني',
+ passwordHint: 'أدخل كلمة مرورك',
+ confirmPassword: 'تأكيد كلمة المرور',
+ confirmPasswordHint: 'أعد إدخال كلمة مرورك',
+ passwordMismatch: 'كلمتا المرور غير متطابقتين',
+ alreadyHaveAccount: 'لديك حساب بالفعل؟',
+ finance: 'المالية',
+ pendingReceivable: 'المستحقات',
+ collected: 'المحصّل',
+ pending: 'معلّق',
+ sortNewest: 'الأحدث أولاً',
+ sortAmountDesc: 'حسب المبلغ (تنازلي)',
+ sortAmountAsc: 'حسب المبلغ (تصاعدي)',
+ noPendingEntries: 'لا توجد مستحقات',
+ noPaidEntries: 'لا توجد سجلات محصّلة',
+ laboratoryCategory: 'المختبر',
+ clinicCategory: 'العيادة',
+ jobsTitle: 'الأعمال',
+ dashboardTitle: 'نظرة عامة',
+ productsTitle: 'المنتجات',
+ patientsTitle: 'المرضى',
+ currencyTRY: 'ليرة تركية (₺)',
+ currencyUSD: 'دولار أمريكي (\$)',
+ currencyEUR: 'يورو (€)',
+ currencyGBP: 'جنيه إسترليني (£)',
+ currencyAED: 'درهم إماراتي (د.إ)',
+ );
+
+ // ── German ────────────────────────────────────────────────────────────────
+ static const de = AppStrings(
+ cancel: 'Abbrechen',
+ save: 'Speichern',
+ edit: 'Bearbeiten',
+ preferences: 'Einstellungen',
+ close: 'Schließen',
+ confirm: 'Bestätigen',
+ retry: 'Wiederholen',
+ errorPrefix: 'Fehler',
+ sort: 'Sortieren',
+ settings: 'Einstellungen',
+ userInfo: 'Benutzerinformationen',
+ labInfo: 'Laborinformationen',
+ clinicInfo: 'Klinikinformationen',
+ labName: 'Laborname',
+ clinicName: 'Klinikname',
+ currency: 'Währung',
+ status: 'Status',
+ active: 'Aktiv',
+ role: 'Rolle',
+ connections: 'Verbindungen',
+ clinicConnections: 'Klinikverbindungen',
+ clinicConnectionsSub: 'Verbundene Kliniken und Anfragen',
+ labConnections: 'Laborverbindungen',
+ labConnectionsSub: 'Verbundene Labore und Anfragen',
+ otherMemberships: 'Andere Mitgliedschaften',
+ management: 'Verwaltung',
+ team: 'Team',
+ teamSub: 'Mitglieder und Einladungen',
+ discounts: 'Rabatte',
+ discountsSub: 'Individuelle Rabatte nach Klinik und Produkt',
+ reports: 'Berichte',
+ reportsSub: 'Auftragsverlauf, Finanzen und Analysen',
+ aiAssistant: 'KI-Assistent',
+ aiAssistantSub: 'Fragen zu Aufträgen und Finanzen stellen',
+ signOut: 'Abmelden',
+ signOutTitle: 'Abmelden',
+ signOutConfirm: 'Sind Sie sicher, dass Sie sich abmelden möchten?',
+ editLabInfo: 'Laborinformationen bearbeiten',
+ editClinicInfo: 'Klinikinformationen bearbeiten',
+ labNameHint: 'Laborname eingeben',
+ clinicNameHint: 'Klinikname eingeben',
+ appLanguage: 'App-Sprache',
+ languageSelection: 'Sprachauswahl',
+ currencySelection: 'Währungsauswahl',
+ languageTurkish: 'Türkçe',
+ languageEnglish: 'English',
+ languageRussian: 'Русский',
+ languageArabic: 'العربية',
+ languageGerman: 'Deutsch',
+ type: 'Typ',
+ roleOwner: 'Inhaber',
+ roleAdmin: 'Administrator',
+ roleTechnician: 'Techniker',
+ roleDelivery: 'Liefermitarbeiter',
+ roleFinance: 'Finanzmitarbeiter',
+ roleDoctor: 'Arzt',
+ roleMember: 'Mitglied',
+ tenantKindClinic: 'Klinik',
+ tenantKindLab: 'Labor',
+ signInWelcome: 'Willkommen zurück',
+ signInSubtitle: 'Melden Sie sich in Ihrem Konto an',
+ emailAddress: 'E-Mail-Adresse',
+ password: 'Passwort',
+ emailRequired: 'E-Mail ist erforderlich',
+ passwordRequired: 'Passwort ist erforderlich',
+ signIn: 'Anmelden',
+ noAccount: 'Kein Konto?',
+ signUp: 'Registrieren',
+ signInHeadline: 'Dental-Labor-Verwaltung\nvereinfachen.',
+ signInTagline: 'Auftragsverfolgung, Klinikverbindungen\nund Echtzeitüberwachung.',
+ footerCopyright: '© 2026 kovakyazilim.com · Dental Lab System',
+ signUpTitle: 'Konto erstellen',
+ signUpSubtitle: 'Bei DLS registrieren',
+ firstName: 'Vorname',
+ lastName: 'Nachname',
+ firstNameHint: 'Vornamen eingeben',
+ lastNameHint: 'Nachnamen eingeben',
+ emailHint: 'E-Mail-Adresse eingeben',
+ passwordHint: 'Passwort eingeben',
+ confirmPassword: 'Passwort bestätigen',
+ confirmPasswordHint: 'Passwort erneut eingeben',
+ passwordMismatch: 'Passwörter stimmen nicht überein',
+ alreadyHaveAccount: 'Haben Sie bereits ein Konto?',
+ finance: 'Finanzen',
+ pendingReceivable: 'Ausstehende Forderungen',
+ collected: 'Eingezogen',
+ pending: 'Ausstehend',
+ sortNewest: 'Neueste zuerst',
+ sortAmountDesc: 'Nach Betrag (absteigend)',
+ sortAmountAsc: 'Nach Betrag (aufsteigend)',
+ noPendingEntries: 'Keine ausstehenden Forderungen',
+ noPaidEntries: 'Keine eingezogenen Einträge',
+ laboratoryCategory: 'LABOR',
+ clinicCategory: 'KLINIK',
+ jobsTitle: 'Aufträge',
+ dashboardTitle: 'Übersicht',
+ productsTitle: 'Produkte',
+ patientsTitle: 'Patienten',
+ currencyTRY: 'Türkische Lira (₺)',
+ currencyUSD: 'US-Dollar (\$)',
+ currencyEUR: 'Euro (€)',
+ currencyGBP: 'Britisches Pfund (£)',
+ currencyAED: 'VAE-Dirham (د.إ)',
+ );
+}
diff --git a/lib/core/providers/auth_provider.dart b/lib/core/providers/auth_provider.dart
new file mode 100644
index 0000000..3fe3ee9
--- /dev/null
+++ b/lib/core/providers/auth_provider.dart
@@ -0,0 +1,195 @@
+import 'package:flutter/widgets.dart' show Locale;
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:pocketbase/pocketbase.dart';
+import '../auth/auth_repository.dart';
+import '../services/notification_service.dart';
+import '../../models/tenant.dart';
+import '../../models/user_profile.dart';
+import 'locale_provider.dart';
+
+class AuthState {
+ const AuthState({
+ this.profile,
+ this.activeTenant,
+ this.memberships = const [],
+ this.isLoading = true,
+ this.error,
+ });
+
+ final UserProfile? profile;
+ final TenantMembership? activeTenant;
+ final List memberships;
+ final bool isLoading;
+ final String? error;
+
+ bool get isAuthenticated => profile != null;
+
+ AuthState copyWith({
+ UserProfile? profile,
+ TenantMembership? activeTenant,
+ List? memberships,
+ bool? isLoading,
+ String? error,
+ bool clearError = false,
+ }) =>
+ AuthState(
+ profile: profile ?? this.profile,
+ activeTenant: activeTenant ?? this.activeTenant,
+ memberships: memberships ?? this.memberships,
+ isLoading: isLoading ?? this.isLoading,
+ error: clearError ? null : (error ?? this.error),
+ );
+}
+
+class AuthNotifier extends StateNotifier {
+ AuthNotifier({this.onLocaleLoaded}) : super(const AuthState()) {
+ _init();
+ }
+
+ final void Function(String languageCode)? onLocaleLoaded;
+ final _repo = AuthRepository.instance;
+
+ Future _init() async {
+ final loggedIn = await _repo.isLoggedIn();
+ if (!loggedIn) {
+ state = const AuthState(isLoading: false);
+ return;
+ }
+ try {
+ final result = await _repo.refreshSession();
+ state = AuthState(
+ profile: result.user,
+ memberships: result.tenants,
+ activeTenant:
+ result.tenants.isEmpty ? null : result.tenants.first,
+ isLoading: false,
+ );
+ final isLab = result.tenants.isNotEmpty && result.tenants.first.tenant.isLab;
+ NotificationService.loginUser(result.user.id, isLab: isLab);
+ _applyLocale(result.user.preferredLanguage);
+ } catch (_) {
+ state = const AuthState(isLoading: false);
+ }
+ }
+
+ void _applyLocale(String? code) {
+ if (code != null && code.isNotEmpty) {
+ onLocaleLoaded?.call(code);
+ }
+ }
+
+ Future signIn(String email, String password) async {
+ state = state.copyWith(isLoading: true, clearError: true);
+ try {
+ final result = await _repo.login(email, password);
+ state = AuthState(
+ profile: result.user,
+ memberships: result.tenants,
+ activeTenant:
+ result.tenants.isEmpty ? null : result.tenants.first,
+ isLoading: false,
+ );
+ final isLab = result.tenants.isNotEmpty && result.tenants.first.tenant.isLab;
+ NotificationService.loginUser(result.user.id, isLab: isLab);
+ _applyLocale(result.user.preferredLanguage);
+ } catch (e) {
+ state = state.copyWith(isLoading: false, error: _parseError(e));
+ }
+ }
+
+ Future register({
+ required String email,
+ required String password,
+ String? firstName,
+ String? lastName,
+ }) async {
+ state = state.copyWith(isLoading: true, clearError: true);
+ try {
+ final result = await _repo.register(
+ email: email,
+ password: password,
+ firstName: firstName,
+ lastName: lastName,
+ );
+ state = AuthState(
+ profile: result.user,
+ memberships: result.tenants,
+ activeTenant:
+ result.tenants.isEmpty ? null : result.tenants.first,
+ isLoading: false,
+ );
+ } catch (e) {
+ state = state.copyWith(isLoading: false, error: _parseError(e));
+ rethrow;
+ }
+ }
+
+ Future signOut() async {
+ await _repo.logout();
+ await NotificationService.logoutUser();
+ state = const AuthState(isLoading: false);
+ }
+
+ void setActiveTenant(TenantMembership membership) {
+ state = state.copyWith(activeTenant: membership);
+ }
+
+ Future refresh() async {
+ try {
+ final result = await _repo.refreshSession();
+ final currentId = state.activeTenant?.tenant.id;
+ final newActive = currentId != null
+ ? result.tenants.firstWhere(
+ (m) => m.tenant.id == currentId,
+ orElse: () => result.tenants.isNotEmpty
+ ? result.tenants.first
+ : state.activeTenant!,
+ )
+ : (result.tenants.isNotEmpty ? result.tenants.first : null);
+ state = state.copyWith(
+ profile: result.user,
+ memberships: result.tenants,
+ activeTenant: newActive,
+ );
+ } catch (_) {}
+ }
+
+ Future updateLanguage(String languageCode) async {
+ final userId = state.profile?.id;
+ if (userId == null) return;
+ await _repo.updateUserLanguage(userId, languageCode);
+ }
+
+ Future updateTenantInfo({
+ required String tenantId,
+ required String companyName,
+ String? defaultCurrency,
+ }) async {
+ await _repo.updateTenant(
+ tenantId,
+ companyName: companyName,
+ defaultCurrency: defaultCurrency,
+ );
+ await refresh();
+ }
+
+ String _parseError(Object e) {
+ if (e is ClientException) {
+ final code = e.statusCode;
+ if (code == 400 || code == 401 || code == 403) {
+ return 'E-posta veya şifre hatalı.';
+ }
+ final msg = e.response['message'] as String? ?? '';
+ if (msg.isNotEmpty) return msg;
+ }
+ return 'Bağlantı hatası. Lütfen tekrar deneyin.';
+ }
+}
+
+final authProvider =
+ StateNotifierProvider((ref) {
+ return AuthNotifier(
+ onLocaleLoaded: (code) =>
+ ref.read(localeProvider.notifier).setLocale(Locale(code)),
+ );
+});
diff --git a/lib/core/providers/locale_provider.dart b/lib/core/providers/locale_provider.dart
new file mode 100644
index 0000000..b21a1a6
--- /dev/null
+++ b/lib/core/providers/locale_provider.dart
@@ -0,0 +1,39 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+import '../l10n/app_strings.dart';
+
+const _kLocaleKey = 'app_locale';
+
+class LocaleNotifier extends StateNotifier {
+ LocaleNotifier(Locale initial) : super(initial);
+
+ Future setLocale(Locale locale) async {
+ state = locale;
+ final prefs = await SharedPreferences.getInstance();
+ await prefs.setString(_kLocaleKey, locale.languageCode);
+ }
+
+ static Future load() async {
+ final prefs = await SharedPreferences.getInstance();
+ final code = prefs.getString(_kLocaleKey) ?? 'tr';
+ return Locale(code);
+ }
+}
+
+final localeProvider = StateNotifierProvider(
+ (ref) => LocaleNotifier(const Locale('tr')),
+);
+
+final stringsProvider = Provider((ref) {
+ final locale = ref.watch(localeProvider);
+ return AppStrings.of(locale.languageCode);
+});
+
+const supportedLocales = [
+ Locale('tr'),
+ Locale('en'),
+ Locale('ru'),
+ Locale('ar'),
+ Locale('de'),
+];
diff --git a/lib/core/router/app_router.dart b/lib/core/router/app_router.dart
new file mode 100644
index 0000000..e942c67
--- /dev/null
+++ b/lib/core/router/app_router.dart
@@ -0,0 +1,496 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:go_router/go_router.dart';
+import '../theme/app_theme.dart';
+import '../widgets/tooth_logo.dart';
+import '../providers/auth_provider.dart';
+import '../../models/tenant.dart';
+import '../../features/auth/sign_in_screen.dart';
+import '../../features/auth/sign_up_screen.dart';
+import '../../features/auth/onboarding_screen.dart';
+import '../../features/clinic/dashboard/clinic_dashboard_screen.dart';
+import '../../features/clinic/jobs/clinic_jobs_screen.dart';
+import '../../features/clinic/jobs/clinic_job_detail_screen.dart';
+import '../../features/clinic/jobs/new_job_screen.dart';
+import '../../features/clinic/patients/clinic_patients_screen.dart';
+import '../../features/clinic/patients/clinic_patient_detail_screen.dart';
+import '../../features/clinic/connections/clinic_connections_screen.dart';
+import '../../features/clinic/finance/clinic_finance_screen.dart';
+import '../../features/clinic/settings/clinic_settings_screen.dart';
+import '../../features/lab/dashboard/lab_dashboard_screen.dart';
+import '../../features/lab/jobs/lab_jobs_inbound_screen.dart';
+import '../../features/lab/jobs/lab_all_jobs_screen.dart';
+import '../../features/lab/jobs/lab_job_detail_screen.dart';
+import '../../features/lab/products/lab_products_screen.dart';
+import '../../features/lab/connections/lab_connections_screen.dart';
+import '../../features/lab/finance/lab_finance_screen.dart';
+import '../../features/lab/settings/lab_settings_screen.dart';
+import '../../features/shared/reports_screen.dart';
+import '../../features/shared/ai_chat_screen.dart';
+import '../../features/lab/discounts/discounts_screen.dart';
+import '../../features/lab/connections/connection_detail_screen.dart';
+import '../../models/connection.dart';
+
+// Auth routes
+const routeSignIn = '/sign-in';
+const routeSignUp = '/sign-up';
+const routeOnboarding = '/onboarding';
+
+// Clinic routes
+const routeClinicDashboard = '/clinic/dashboard';
+const routeClinicJobs = '/clinic/jobs';
+const routeClinicJobDetail = '/clinic/jobs/:jobId';
+const routeClinicJobNew = '/clinic/jobs/new';
+const routeClinicPatients = '/clinic/patients';
+const routeClinicPatientDetail = '/clinic/patients/:patientId';
+const routeClinicConnections = '/clinic/connections';
+const routeClinicFinance = '/clinic/finance';
+const routeClinicSettings = '/clinic/settings';
+const routeClinicReports = '/clinic/reports';
+const routeClinicAi = '/clinic/ai';
+
+// Lab routes
+const routeLabDashboard = '/lab/dashboard';
+const routeLabJobsInbound = '/lab/jobs/inbound';
+const routeLabJobsAll = '/lab/jobs';
+const routeLabJobDetail = '/lab/jobs/:jobId';
+const routeLabProducts = '/lab/products';
+const routeLabConnections = '/lab/connections';
+const routeLabFinance = '/lab/finance';
+const routeLabSettings = '/lab/settings';
+const routeLabReports = '/lab/reports';
+const routeLabAi = '/lab/ai';
+const routeLabDiscounts = '/lab/discounts';
+
+List buildRoutes() => [
+ GoRoute(path: routeSignIn, builder: (_, __) => const SignInScreen()),
+ GoRoute(path: routeSignUp, builder: (_, __) => const SignUpScreen()),
+ GoRoute(path: routeOnboarding, builder: (_, __) => const OnboardingScreen()),
+
+ // ── Clinic shell ──────────────────────────────────────────────────────
+ ShellRoute(
+ builder: (context, state, child) => _ClinicShell(child: child),
+ routes: [
+ GoRoute(path: routeClinicDashboard, builder: (_, __) => const ClinicDashboardScreen()),
+ GoRoute(
+ path: routeClinicJobs,
+ builder: (_, __) => const ClinicJobsScreen(),
+ routes: [
+ GoRoute(path: 'new', builder: (_, __) => const NewJobScreen()),
+ GoRoute(
+ path: ':jobId',
+ builder: (_, s) => ClinicJobDetailScreen(jobId: s.pathParameters['jobId']!),
+ ),
+ ],
+ ),
+ GoRoute(
+ path: routeClinicPatients,
+ builder: (_, __) => const ClinicPatientsScreen(),
+ routes: [
+ GoRoute(
+ path: ':patientId',
+ builder: (_, s) => ClinicPatientDetailScreen(patientId: s.pathParameters['patientId']!),
+ ),
+ ],
+ ),
+ GoRoute(path: routeClinicConnections, builder: (_, __) => const ClinicConnectionsScreen()),
+ GoRoute(path: routeClinicFinance, builder: (_, __) => const ClinicFinanceScreen()),
+ GoRoute(path: routeClinicSettings, builder: (_, __) => const ClinicSettingsScreen()),
+ GoRoute(path: routeClinicReports, builder: (_, __) => const ReportsScreen()),
+ GoRoute(path: routeClinicAi, builder: (_, __) => const AiChatScreen()),
+ ],
+ ),
+
+ // ── Lab shell ─────────────────────────────────────────────────────────
+ ShellRoute(
+ builder: (context, state, child) => _LabShell(child: child),
+ routes: [
+ GoRoute(path: routeLabDashboard, builder: (_, __) => const LabDashboardScreen()),
+ GoRoute(path: routeLabJobsInbound, builder: (_, __) => const LabJobsInboundScreen()),
+ GoRoute(
+ path: routeLabJobsAll,
+ builder: (_, __) => const LabAllJobsScreen(),
+ routes: [
+ GoRoute(
+ path: ':jobId',
+ builder: (_, s) => LabJobDetailScreen(jobId: s.pathParameters['jobId']!),
+ ),
+ ],
+ ),
+ GoRoute(path: routeLabProducts, builder: (_, __) => const LabProductsScreen()),
+ GoRoute(
+ path: routeLabConnections,
+ builder: (_, __) => const LabConnectionsScreen(),
+ routes: [
+ GoRoute(
+ path: ':connectionId/detail',
+ builder: (_, s) {
+ final extra = s.extra as Map?;
+ final connection = extra?['connection'] as Connection?;
+ final labTenantId = extra?['labTenantId'] as String? ?? '';
+ if (connection == null) {
+ return const Scaffold(
+ body: Center(child: Text('Bağlantı bulunamadı')),
+ );
+ }
+ return ConnectionDetailScreen(
+ connection: connection, labTenantId: labTenantId);
+ },
+ ),
+ ],
+ ),
+ GoRoute(path: routeLabDiscounts, builder: (_, __) => const DiscountsScreen()),
+ GoRoute(path: routeLabFinance, builder: (_, __) => const LabFinanceScreen()),
+ GoRoute(path: routeLabSettings, builder: (_, __) => const LabSettingsScreen()),
+ GoRoute(path: routeLabReports, builder: (_, __) => const ReportsScreen()),
+ GoRoute(path: routeLabAi, builder: (_, __) => const AiChatScreen()),
+ ],
+ ),
+ ];
+
+// ── Nav item descriptor ───────────────────────────────────────────────────────
+
+class _NavItem {
+ const _NavItem({
+ required this.route,
+ required this.icon,
+ required this.selectedIcon,
+ required this.label,
+ required this.visible,
+ });
+ final String route;
+ final Icon icon;
+ final Icon selectedIcon;
+ final String label;
+ final bool Function(TenantMembership?) visible;
+}
+
+// ── Clinic shell ──────────────────────────────────────────────────────────────
+
+class _ClinicShell extends ConsumerStatefulWidget {
+ const _ClinicShell({required this.child});
+ final Widget child;
+
+ @override
+ ConsumerState<_ClinicShell> createState() => _ClinicShellState();
+}
+
+class _ClinicShellState extends ConsumerState<_ClinicShell> {
+ int _index = 0;
+
+ static final _allItems = [
+ _NavItem(route: routeClinicDashboard, icon: const Icon(Icons.home_outlined), selectedIcon: const Icon(Icons.home_rounded), label: 'Ana Sayfa', visible: (_) => true),
+ _NavItem(route: routeClinicJobs, icon: const Icon(Icons.work_outline_rounded), selectedIcon: const Icon(Icons.work_rounded), label: 'İşler', visible: (m) => m?.showJobs ?? true),
+ _NavItem(route: routeClinicPatients, icon: const Icon(Icons.people_outline_rounded), selectedIcon: const Icon(Icons.people_rounded), label: 'Hastalar', visible: (m) => m?.showPatients ?? true),
+ _NavItem(route: routeClinicFinance, icon: const Icon(Icons.account_balance_outlined), selectedIcon: const Icon(Icons.account_balance_rounded), label: 'Finans', visible: (m) => m?.showFinance ?? true),
+ _NavItem(route: routeClinicSettings, icon: const Icon(Icons.settings_outlined), selectedIcon: const Icon(Icons.settings_rounded), label: 'Ayarlar', visible: (_) => true),
+ ];
+
+ @override
+ Widget build(BuildContext context) {
+ final membership = ref.watch(authProvider).activeTenant;
+ final items = _allItems.where((it) => it.visible(membership)).toList();
+ final clampedIndex = _index.clamp(0, items.length - 1);
+ final isDesktop = MediaQuery.sizeOf(context).width > AppLayout.sidebarBreakpoint;
+
+ void onTap(int i) {
+ setState(() => _index = i);
+ context.go(items[i].route);
+ }
+
+ if (isDesktop) {
+ return Scaffold(
+ backgroundColor: AppColors.background,
+ body: Row(
+ children: [
+ _DesktopSidebar(destinations: items, selectedIndex: clampedIndex, onTap: onTap),
+ Expanded(child: widget.child),
+ ],
+ ),
+ );
+ }
+
+ return Scaffold(
+ body: widget.child,
+ bottomNavigationBar: NavigationBar(
+ selectedIndex: clampedIndex,
+ onDestinationSelected: onTap,
+ destinations: [
+ for (final it in items)
+ Semantics(
+ label: it.label,
+ button: true,
+ child: NavigationDestination(icon: it.icon, selectedIcon: it.selectedIcon, label: it.label),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+// ── Lab shell ─────────────────────────────────────────────────────────────────
+
+class _LabShell extends ConsumerStatefulWidget {
+ const _LabShell({required this.child});
+ final Widget child;
+
+ @override
+ ConsumerState<_LabShell> createState() => _LabShellState();
+}
+
+class _LabShellState extends ConsumerState<_LabShell> {
+ int _index = 0;
+
+ static final _allItems = [
+ _NavItem(route: routeLabDashboard, icon: const Icon(Icons.home_outlined), selectedIcon: const Icon(Icons.home_rounded), label: 'Ana Sayfa', visible: (_) => true),
+ _NavItem(route: routeLabJobsAll, icon: const Icon(Icons.work_outline_rounded), selectedIcon: const Icon(Icons.work_rounded), label: 'İşler', visible: (m) => m?.showJobs ?? true),
+ _NavItem(route: routeLabProducts, icon: const Icon(Icons.inventory_2_outlined), selectedIcon: const Icon(Icons.inventory_2_rounded), label: 'Ürünler', visible: (m) => m?.showProducts ?? true),
+ _NavItem(route: routeLabFinance, icon: const Icon(Icons.account_balance_outlined), selectedIcon: const Icon(Icons.account_balance_rounded), label: 'Finans', visible: (m) => m?.showFinance ?? true),
+ _NavItem(route: routeLabSettings, icon: const Icon(Icons.settings_outlined), selectedIcon: const Icon(Icons.settings_rounded), label: 'Ayarlar', visible: (_) => true),
+ ];
+
+ @override
+ Widget build(BuildContext context) {
+ final membership = ref.watch(authProvider).activeTenant;
+ final items = _allItems.where((it) => it.visible(membership)).toList();
+ final clampedIndex = _index.clamp(0, items.length - 1);
+ final isDesktop = MediaQuery.sizeOf(context).width > AppLayout.sidebarBreakpoint;
+
+ void onTap(int i) {
+ setState(() => _index = i);
+ context.go(items[i].route);
+ }
+
+ if (isDesktop) {
+ return Scaffold(
+ backgroundColor: AppColors.background,
+ body: Row(
+ children: [
+ _DesktopSidebar(destinations: items, selectedIndex: clampedIndex, onTap: onTap),
+ Expanded(child: widget.child),
+ ],
+ ),
+ );
+ }
+
+ return Scaffold(
+ body: widget.child,
+ bottomNavigationBar: NavigationBar(
+ selectedIndex: clampedIndex,
+ onDestinationSelected: onTap,
+ destinations: [
+ for (final it in items)
+ Semantics(
+ label: it.label,
+ button: true,
+ child: NavigationDestination(icon: it.icon, selectedIcon: it.selectedIcon, label: it.label),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+// ── Desktop sidebar ───────────────────────────────────────────────────────────
+
+class _DesktopSidebar extends StatefulWidget {
+ const _DesktopSidebar({
+ required this.destinations,
+ required this.selectedIndex,
+ required this.onTap,
+ });
+
+ final List<_NavItem> destinations;
+ final int selectedIndex;
+ final ValueChanged onTap;
+
+ // Must match the toolbarHeight used in desktop SliverAppBar headers
+ static const double headerHeight = 64;
+ static const double _openWidth = 220;
+ static const double _closedWidth = 64;
+
+ @override
+ State<_DesktopSidebar> createState() => _DesktopSidebarState();
+}
+
+class _DesktopSidebarState extends State<_DesktopSidebar> {
+ bool _open = true;
+
+ @override
+ Widget build(BuildContext context) {
+ return AnimatedContainer(
+ duration: const Duration(milliseconds: 220),
+ curve: Curves.easeInOut,
+ width: _open ? _DesktopSidebar._openWidth : _DesktopSidebar._closedWidth,
+ decoration: const BoxDecoration(
+ color: AppColors.surface,
+ border: Border(right: BorderSide(color: AppColors.border)),
+ boxShadow: [BoxShadow(color: Color(0x08000000), blurRadius: 8, offset: Offset(2, 0))],
+ ),
+ child: ClipRect(
+ child: Column(
+ children: [
+ // Header
+ Container(
+ height: _DesktopSidebar.headerHeight,
+ decoration: const BoxDecoration(
+ gradient: LinearGradient(colors: [AppColors.primary, AppColors.accent]),
+ border: Border(bottom: BorderSide(color: AppColors.border)),
+ ),
+ padding: const EdgeInsets.symmetric(horizontal: 16),
+ child: Row(
+ children: [
+ Container(
+ width: 32,
+ height: 32,
+ decoration: BoxDecoration(
+ color: Colors.white.withValues(alpha: 0.15),
+ borderRadius: BorderRadius.circular(9),
+ border: Border.all(color: Colors.white.withValues(alpha: 0.25)),
+ ),
+ child: const Center(child: ToothLogo(size: 18, color: Colors.white)),
+ ),
+ if (_open) ...[
+ const SizedBox(width: 10),
+ const Text(
+ 'DLS',
+ style: TextStyle(color: Colors.white, fontSize: 17, fontWeight: FontWeight.w800, letterSpacing: 1),
+ ),
+ ],
+ ],
+ ),
+ ),
+
+ // Nav items
+ Expanded(
+ child: SingleChildScrollView(
+ child: Column(
+ children: [
+ const SizedBox(height: 8),
+ for (int i = 0; i < widget.destinations.length; i++)
+ _SidebarItem(
+ icon: widget.destinations[i].icon,
+ selectedIcon: widget.destinations[i].selectedIcon,
+ label: widget.destinations[i].label,
+ selected: widget.selectedIndex == i,
+ open: _open,
+ onTap: () => widget.onTap(i),
+ ),
+ const SizedBox(height: 8),
+ ],
+ ),
+ ),
+ ),
+
+ // Toggle button
+ Container(
+ decoration: const BoxDecoration(
+ border: Border(top: BorderSide(color: AppColors.border)),
+ ),
+ child: Material(
+ color: Colors.transparent,
+ child: InkWell(
+ onTap: () => setState(() => _open = !_open),
+ child: SizedBox(
+ height: 48,
+ child: Row(
+ mainAxisAlignment: _open ? MainAxisAlignment.start : MainAxisAlignment.center,
+ children: [
+ if (_open) const SizedBox(width: 20),
+ AnimatedRotation(
+ duration: const Duration(milliseconds: 220),
+ turns: _open ? 0.5 : 0,
+ child: const Icon(Icons.chevron_right_rounded, color: AppColors.textMuted, size: 20),
+ ),
+ if (_open) ...[
+ const SizedBox(width: 8),
+ const Text('Daralt', style: TextStyle(fontSize: 13, fontWeight: FontWeight.w500, color: AppColors.textMuted)),
+ ],
+ ],
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+// ── Sidebar nav item ──────────────────────────────────────────────────────────
+
+class _SidebarItem extends StatelessWidget {
+ const _SidebarItem({
+ required this.icon,
+ required this.selectedIcon,
+ required this.label,
+ required this.selected,
+ required this.open,
+ required this.onTap,
+ });
+
+ final Widget icon;
+ final Widget selectedIcon;
+ final String label;
+ final bool selected;
+ final bool open;
+ final VoidCallback onTap;
+
+ @override
+ Widget build(BuildContext context) {
+ final item = Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
+ child: Material(
+ color: selected ? const Color(0xFFDBEAFE) : Colors.transparent,
+ borderRadius: BorderRadius.circular(10),
+ child: InkWell(
+ onTap: onTap,
+ borderRadius: BorderRadius.circular(10),
+ child: SizedBox(
+ height: 40,
+ child: open
+ ? Padding(
+ padding: const EdgeInsets.symmetric(horizontal: 12),
+ child: Row(
+ children: [
+ IconTheme(
+ data: IconThemeData(
+ color: selected ? AppColors.primary : AppColors.textSecondary,
+ size: 20,
+ ),
+ child: selected ? selectedIcon : icon,
+ ),
+ const SizedBox(width: 12),
+ Text(
+ label,
+ style: TextStyle(
+ fontSize: 14,
+ fontWeight: selected ? FontWeight.w600 : FontWeight.w500,
+ color: selected ? AppColors.primary : AppColors.textSecondary,
+ ),
+ ),
+ ],
+ ),
+ )
+ : Center(
+ child: IconTheme(
+ data: IconThemeData(
+ color: selected ? AppColors.primary : AppColors.textSecondary,
+ size: 20,
+ ),
+ child: selected ? selectedIcon : icon,
+ ),
+ ),
+ ),
+ ),
+ ),
+ );
+
+ if (!open) {
+ return Tooltip(message: label, preferBelow: false, child: item);
+ }
+ return item;
+ }
+}
diff --git a/lib/core/router/router_provider.dart b/lib/core/router/router_provider.dart
new file mode 100644
index 0000000..379b867
--- /dev/null
+++ b/lib/core/router/router_provider.dart
@@ -0,0 +1,52 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_riverpod/flutter_riverpod.dart';
+import 'package:go_router/go_router.dart';
+import '../providers/auth_provider.dart';
+import 'app_router.dart';
+
+// Bridges Riverpod auth state changes to GoRouter's Listenable interface
+class _AuthRouterNotifier extends ChangeNotifier {
+ _AuthRouterNotifier(this._ref) {
+ _ref.listen(authProvider, (_, __) => notifyListeners());
+ }
+ final Ref _ref;
+}
+
+final routerProvider = Provider((ref) {
+ final notifier = _AuthRouterNotifier(ref);
+
+ return GoRouter(
+ refreshListenable: notifier,
+ initialLocation: routeSignIn,
+ redirect: (context, state) {
+ final auth = ref.read(authProvider);
+
+ if (auth.isLoading) return null;
+
+ final loc = state.matchedLocation;
+ final onLoginOrRegister = loc == routeSignIn || loc == routeSignUp;
+ final onAuthPage = onLoginOrRegister || loc == routeOnboarding;
+
+ if (!auth.isAuthenticated) {
+ return onAuthPage ? null : routeSignIn;
+ }
+
+ // Authenticated but no tenant → onboarding
+ if (auth.activeTenant == null) {
+ return loc == routeOnboarding ? null : routeOnboarding;
+ }
+
+ final isLab = auth.activeTenant!.tenant.isLab;
+
+ if (onAuthPage) {
+ return isLab ? routeLabDashboard : routeClinicDashboard;
+ }
+
+ if (isLab && loc.startsWith('/clinic')) return routeLabDashboard;
+ if (!isLab && loc.startsWith('/lab')) return routeClinicDashboard;
+
+ return null;
+ },
+ routes: buildRoutes(),
+ );
+});
diff --git a/lib/core/services/ai_actions.dart b/lib/core/services/ai_actions.dart
new file mode 100644
index 0000000..de40cd9
--- /dev/null
+++ b/lib/core/services/ai_actions.dart
@@ -0,0 +1,171 @@
+import '../../features/shared/job_files_repository.dart';
+import '../../features/shared/tenant_team_repository.dart';
+import '../../models/job_file.dart';
+import '../../models/tenant.dart';
+import '../api/pocketbase_client.dart';
+
+// ── Message segments ──────────────────────────────────────────────────────────
+
+sealed class MessageSegment {}
+
+class TextSegment extends MessageSegment {
+ TextSegment(this.text);
+ final String text;
+}
+
+class ActionSegment extends MessageSegment {
+ ActionSegment(this.action);
+ final AiAction action;
+}
+
+// ── Action model ──────────────────────────────────────────────────────────────
+
+class AiAction {
+ const AiAction({
+ required this.type,
+ required this.params,
+ required this.label,
+ });
+ final String type;
+ final Map params;
+ final String label;
+
+ bool get isDangerous => type == 'cancel_job';
+ bool get isFileAction => type == 'job_files';
+}
+
+// ── Action outcome ────────────────────────────────────────────────────────────
+
+sealed class ActionOutcome {}
+
+class ActionSuccess extends ActionOutcome {
+ ActionSuccess(this.message);
+ final String message;
+}
+
+class ActionError extends ActionOutcome {
+ ActionError(this.error);
+ final String error;
+}
+
+class ActionFiles extends ActionOutcome {
+ ActionFiles(this.files);
+ final List files;
+}
+
+// ── Parser ────────────────────────────────────────────────────────────────────
+
+List parseSegments(String text) {
+ // Strip code fences wrapping tags that the AI sometimes emits.
+ // Handles: ```xml\n\n``` and ```\n\n```
+ text = text.replaceAllMapped(
+ RegExp(r'```(?:xml)?\s*\n(\s*]*/>)\s*\n\s*```'),
+ (m) => m.group(1)!,
+ );
+ // Also handle inline variant: ```xml ```
+ text = text.replaceAllMapped(
+ RegExp(r'```(?:xml)?\s*(]*/>)\s*```'),
+ (m) => m.group(1)!,
+ );
+
+ final pattern = RegExp(r'', dotAll: true);
+ final segments = [];
+ int last = 0;
+
+ for (final m in pattern.allMatches(text)) {
+ final before = text.substring(last, m.start).trim();
+ if (before.isNotEmpty) segments.add(TextSegment(before));
+
+ final attrs = _parseAttrs(m.group(1) ?? '');
+ segments.add(ActionSegment(AiAction(
+ type: attrs['type'] ?? '',
+ params: attrs,
+ label: attrs['label'] ?? attrs['type'] ?? 'İşlem',
+ )));
+ last = m.end;
+ }
+
+ final rest = text.substring(last).trim();
+ if (rest.isNotEmpty) segments.add(TextSegment(rest));
+ return segments;
+}
+
+Map _parseAttrs(String s) {
+ final result = {};
+ for (final m in RegExp(r'(\w+)="([^"]*)"').allMatches(s)) {
+ result[m.group(1)!] = m.group(2)!;
+ }
+ return result;
+}
+
+// ── Executor ──────────────────────────────────────────────────────────────────
+
+class AiActionExecutor {
+ static final _pb = PocketBaseClient.instance.pb;
+
+ static Future execute(
+ AiAction action,
+ TenantMembership membership,
+ ) async {
+ try {
+ return switch (action.type) {
+ 'cancel_job' => await _cancelJob(action.params),
+ 'mark_delivered' => await _markDelivered(action.params),
+ 'job_files' => await _jobFiles(action.params),
+ 'add_member' => await _addMember(action.params, membership),
+ _ => ActionError('Bilinmeyen işlem türü: ${action.type}'),
+ };
+ } catch (e) {
+ final msg = e.toString();
+ if (msg.length > 120) return ActionError('Sunucu hatası');
+ return ActionError(msg);
+ }
+ }
+
+ static Future _cancelJob(Map p) async {
+ final id = p['job_id'];
+ if (id == null || id.isEmpty) return ActionError('İş ID bulunamadı.');
+ await _pb.collection('jobs').update(id, body: {'status': 'cancelled'});
+ return ActionSuccess('İş başarıyla iptal edildi.');
+ }
+
+ static Future _markDelivered(Map p) async {
+ final id = p['job_id'];
+ if (id == null || id.isEmpty) return ActionError('İş ID bulunamadı.');
+ await _pb.collection('jobs').update(id, body: {'status': 'delivered'});
+ return ActionSuccess('İş teslim edildi olarak işaretlendi.');
+ }
+
+ static Future _jobFiles(Map p) async {
+ final id = p['job_id'];
+ if (id == null || id.isEmpty) return ActionError('İş ID bulunamadı.');
+ final files = await JobFilesRepository.instance.listForJob(id);
+ if (files.isEmpty) return ActionSuccess('Bu iş için henüz dosya yüklenmemiş.');
+ return ActionFiles(files);
+ }
+
+ static Future _addMember(
+ Map p,
+ TenantMembership membership,
+ ) async {
+ final email = p['email'];
+ final firstName = p['first_name'];
+ final lastName = p['last_name'] ?? '';
+ final role = p['role'];
+ final password = p['password'];
+
+ if (email == null || firstName == null || role == null || password == null) {
+ return ActionError('Eksik bilgi: e-posta, ad, rol ve şifre gerekli.');
+ }
+
+ await TenantTeamRepository.instance.addMember(
+ tenantId: membership.tenant.id,
+ email: email,
+ password: password,
+ firstName: firstName,
+ lastName: lastName,
+ role: TenantMembership.parseRole(role),
+ );
+ return ActionSuccess('$firstName $lastName ekibe eklendi.');
+ }
+}
diff --git a/lib/core/services/ai_context_builder.dart b/lib/core/services/ai_context_builder.dart
new file mode 100644
index 0000000..e99a798
--- /dev/null
+++ b/lib/core/services/ai_context_builder.dart
@@ -0,0 +1,226 @@
+import 'package:pocketbase/pocketbase.dart';
+import '../api/pocketbase_client.dart';
+import '../../models/tenant.dart';
+
+class AiContextBuilder {
+ AiContextBuilder._();
+ static final instance = AiContextBuilder._();
+
+ PocketBase get _pb => PocketBaseClient.instance.pb;
+
+ Future build(TenantMembership membership) async {
+ final tenant = membership.tenant;
+ final tenantId = tenant.id;
+ final isLab = tenant.kind == TenantKind.lab;
+
+ final now = DateTime.now();
+ final dateStr = '${now.day}.${now.month}.${now.year}';
+
+ final results = await Future.wait([
+ _fetchActiveJobs(tenantId, isLab),
+ _fetchRecentDelivered(tenantId, isLab),
+ _fetchFinance(tenantId, isLab),
+ _fetchTeam(tenantId),
+ ]);
+
+ final actions = _actionsPrompt(isLab);
+
+ return 'Sen DLS (Dental Lab System) uygulamasinin akilli asistanisin.\n'
+ '${tenant.companyName} adli ${isLab ? 'dental laboratuvarinin' : 'dis kliniginin'} verilerine erisebilirsin.\n'
+ 'Kullanici rolu: ${isLab ? 'LABORATUVAR' : 'KLINIK'}\n'
+ '\n'
+ 'Tarih: $dateStr\n'
+ '\n'
+ '${results[0]}\n'
+ '\n'
+ '${results[1]}\n'
+ '\n'
+ '${results[2]}\n'
+ '\n'
+ '${results[3]}\n'
+ '\n'
+ '$actions\n'
+ '\n'
+ 'Yanit kurallari:\n'
+ '- Turkce, kisa ve net yaz\n'
+ '- Sadece yukaridaki verilerden hareketle yorum yap\n'
+ '- Listelerde madde isareti (- ) kullan\n'
+ '- Onemli bilgileri **kalin** yaz\n'
+ '- Aksiyon etiketlerini HERZAMAN metnin sonuna koy\n'
+ '- ${isLab ? 'Is kodlari icin [ID:...] formatini kullan' : 'Hasta kodlari ve is durumlarini net belirt'}\n';
+ }
+
+ static String _actionsPrompt(bool isLab) {
+ final buf = StringBuffer();
+ buf.writeln('## EYLEM YETKILERIN');
+ buf.writeln('Kullanici bir islem yapmak istediginde asagidaki XML etiketlerini yanita ekle:');
+ buf.writeln('');
+ buf.writeln('Is dosyalarini gostermek:');
+ buf.writeln('');
+ buf.writeln('');
+ buf.writeln('Is iptal etmek:');
+ buf.writeln('');
+ if (!isLab) {
+ buf.writeln('');
+ buf.writeln('Teslim edildi isaretlemek (sadece klinik):');
+ buf.writeln('');
+ }
+ buf.writeln('');
+ buf.writeln('Ekip uyesi eklemek (TUM bilgiler alindiktan sonra):');
+ buf.writeln('');
+ buf.writeln('');
+ buf.writeln('KURALLAR:');
+ buf.writeln('- Etiketi SADECE kullanici acikca islem istediginde ekle');
+ buf.writeln('- Sifre sorulursa kullanicidan al, ASLA uydurma');
+ buf.writeln('- iptal gibi geri alinmaz islemleri acikca belirt');
+ buf.writeln('- Etiket icindeki job_id degerini yukaridaki is listesinden al');
+ buf.writeln('- etiketlerini KESINLİKLE kod blogu (```xml veya ```) icine ALMA, duz metin olarak yaz');
+ return buf.toString();
+ }
+
+ Future _fetchActiveJobs(String tenantId, bool isLab) async {
+ try {
+ final tenantField = isLab ? 'lab_tenant_id' : 'clinic_tenant_id';
+ final counterpartField = isLab ? 'clinic_tenant_id' : 'lab_tenant_id';
+ final result = await _pb.collection('jobs').getList(
+ filter: '$tenantField = "$tenantId" && status != "delivered" && status != "cancelled"',
+ perPage: 60,
+ sort: '-created',
+ expand: counterpartField,
+ );
+
+ if (result.items.isEmpty) return '## Aktif Isler\nSu an aktif is yok.';
+
+ final counterpartLabel = isLab ? 'Klinik' : 'Lab';
+ final lines = result.items.map((r) {
+ final j = r.toJson();
+ final jobId = j['id'] as String? ?? '';
+ final expand = j['expand'] as Map?;
+ final counterpart =
+ (expand?[counterpartField] as Map?)?['company_name'] as String? ?? '-';
+ final status = _statusTr(j['status'] as String? ?? '');
+ final prosthetic = j['prosthetic_type'] as String? ?? '-';
+ final patient = j['patient_code'] as String? ?? '-';
+ final step = j['current_step'] as String?;
+ final stepPart = (step != null && step.isNotEmpty) ? ' | Adim: $step' : '';
+ final due = j['due_date'] as String? ?? '';
+ final duePart = due.isNotEmpty ? ' | Termin: ${due.substring(0, 10)}' : '';
+ return '- [ID:$jobId] Hasta: $patient | $prosthetic | $status$stepPart | $counterpartLabel: $counterpart$duePart';
+ }).join('\n');
+
+ return '## Aktif Isler (${result.items.length})\n$lines';
+ } catch (e) {
+ return '## Aktif Isler\n(Veri alinamadi: $e)';
+ }
+ }
+
+ Future _fetchRecentDelivered(String tenantId, bool isLab) async {
+ try {
+ final tenantField = isLab ? 'lab_tenant_id' : 'clinic_tenant_id';
+ final counterpartField = isLab ? 'clinic_tenant_id' : 'lab_tenant_id';
+ final result = await _pb.collection('jobs').getList(
+ filter: '$tenantField = "$tenantId" && status = "delivered"',
+ perPage: 10,
+ sort: '-updated',
+ expand: counterpartField,
+ );
+
+ if (result.items.isEmpty) return '## Son Teslim Edilenler\nHenuz teslim edilen is yok.';
+
+ final counterpartLabel = isLab ? 'Klinik' : 'Lab';
+ final lines = result.items.map((r) {
+ final j = r.toJson();
+ final jobId = j['id'] as String? ?? '';
+ final expand = j['expand'] as Map?;
+ final counterpart =
+ (expand?[counterpartField] as Map?)?['company_name'] as String? ?? '-';
+ final prosthetic = j['prosthetic_type'] as String? ?? '-';
+ final patient = j['patient_code'] as String? ?? '-';
+ final updated = (j['updated'] as String? ?? '');
+ final datePart = updated.length >= 10 ? updated.substring(0, 10) : '';
+ return '- [ID:$jobId] Hasta: $patient | $prosthetic | $counterpartLabel: $counterpart${datePart.isNotEmpty ? ' | Tarih: $datePart' : ''}';
+ }).join('\n');
+
+ return '## Son Teslim Edilenler (son 10)\n$lines';
+ } catch (_) {
+ return '## Son Teslim Edilenler\n(Veri alinamadi)';
+ }
+ }
+
+ Future _fetchFinance(String tenantId, bool isLab) async {
+ try {
+ final type = isLab ? 'receivable' : 'payable';
+ final result = await _pb.collection('finance_entries').getList(
+ filter: 'tenant_id = "$tenantId" && type = "$type"',
+ perPage: 200,
+ );
+
+ double pending = 0, paid = 0;
+ for (final r in result.items) {
+ final j = r.toJson();
+ final amount = (j['amount'] as num?)?.toDouble() ?? 0;
+ if (j['status'] == 'pending') {
+ pending += amount;
+ } else {
+ paid += amount;
+ }
+ }
+
+ final label = isLab ? 'alacak' : 'borc';
+ return '## Finans\n'
+ '- Bekleyen $label: ${pending.toStringAsFixed(0)} TL\n'
+ '- Tahsil edilen: ${paid.toStringAsFixed(0)} TL';
+ } catch (_) {
+ return '## Finans\n(Veri alinamadi)';
+ }
+ }
+
+ Future _fetchTeam(String tenantId) async {
+ try {
+ final result = await _pb.collection('tenant_members').getList(
+ filter: 'tenant_id = "$tenantId"',
+ expand: 'user_id',
+ perPage: 50,
+ );
+
+ if (result.items.isEmpty) return '## Ekip\nUye yok.';
+
+ final lines = result.items.map((r) {
+ final j = r.toJson();
+ final expand = j['expand'] as Map?;
+ final user = expand?['user_id'] as Map?;
+ final first = (user?['first_name'] as String?) ?? '';
+ final last = (user?['last_name'] as String?) ?? '';
+ final email = (user?['email'] as String?) ?? '';
+ final name =
+ '$first $last'.trim().isNotEmpty ? '$first $last'.trim() : email;
+ final role = _roleTr(j['role'] as String? ?? '');
+ return '- $name ($role)';
+ }).join('\n');
+
+ return '## Ekip (${result.items.length} uye)\n$lines';
+ } catch (_) {
+ return '## Ekip\n(Veri alinamadi)';
+ }
+ }
+
+ static String _statusTr(String s) => switch (s) {
+ 'pending' => 'Bekliyor',
+ 'in_progress' => 'Devam ediyor',
+ 'sent' => 'Gonderildi',
+ 'revision' => 'Revizyon',
+ 'delivered' => 'Teslim edildi',
+ 'cancelled' => 'Iptal',
+ _ => s,
+ };
+
+ static String _roleTr(String s) => switch (s) {
+ 'owner' => 'Sahibi',
+ 'admin' => 'Yonetici',
+ 'technician' => 'Teknisyen',
+ 'delivery' => 'Teslimat',
+ 'finance' => 'Finans',
+ 'doctor' => 'Hekim',
+ _ => 'Uye',
+ };
+}
diff --git a/lib/core/services/ai_service.dart b/lib/core/services/ai_service.dart
new file mode 100644
index 0000000..7ceeb48
--- /dev/null
+++ b/lib/core/services/ai_service.dart
@@ -0,0 +1,71 @@
+import 'dart:async';
+import 'dart:convert';
+import 'package:http/http.dart' as http;
+
+class AiService {
+ static const _baseUrl = 'https://api.featherless.ai/v1';
+ static const _apiKey =
+ 'rc_e10f49aaa4f7af03dcd9da115cfc12cc1988665e895955c11f77788ee5ad93c6';
+ static const _model = 'Qwen/Qwen2.5-7B-Instruct';
+
+ AiService._();
+ static final instance = AiService._();
+
+ Stream streamChat({
+ required String systemPrompt,
+ required List