feat(proj): init

This commit is contained in:
vl.arkhangelskii
2026-09-21 04:06:43 +03:00
commit c956b94983
1076 changed files with 50876 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
# Optional. Empty keys fall back to https://please-pay-me.ru
# run.ps1 passes this file via --dart-define-from-file.
PPM_API_BASE_URL=https://please-pay-me.ru/
PPM_WEB_URL=https://please-pay-me.ru/
PPM_DEMO=false
+52
View File
@@ -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-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
# Widget Preview related
.widget_preview/
# Local runtime config (see .env.example)
.env
+39
View File
@@ -0,0 +1,39 @@
# 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: "6a19cca56475dbfba1478ee68d7bd0c2ef891da1"
channel: "stable"
project_type: app
# Tracks metadata for the flutter migrate command
migration:
platforms:
- platform: root
create_revision: 6a19cca56475dbfba1478ee68d7bd0c2ef891da1
base_revision: 6a19cca56475dbfba1478ee68d7bd0c2ef891da1
- platform: android
create_revision: 6a19cca56475dbfba1478ee68d7bd0c2ef891da1
base_revision: 6a19cca56475dbfba1478ee68d7bd0c2ef891da1
- platform: ios
create_revision: 6a19cca56475dbfba1478ee68d7bd0c2ef891da1
base_revision: 6a19cca56475dbfba1478ee68d7bd0c2ef891da1
- platform: web
create_revision: 6a19cca56475dbfba1478ee68d7bd0c2ef891da1
base_revision: 6a19cca56475dbfba1478ee68d7bd0c2ef891da1
- platform: windows
create_revision: 6a19cca56475dbfba1478ee68d7bd0c2ef891da1
base_revision: 6a19cca56475dbfba1478ee68d7bd0c2ef891da1
# 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'
+93
View File
@@ -0,0 +1,93 @@
# Please Pay Me — Flutter mobile
Мобильный кабинет для бюджета «от зарплаты до зарплаты». UI построен на
iOS-ките (Cupertino, Apple HIG), данные — REST API из `src/PleasePayMe.Api`.
## Запуск
```powershell
cd mobile
copy .env.example .env # один раз
# отредактируй PPM_API_BASE_URL в .env
.\run.ps1
.\run.ps1 -Device chrome
.\run.ps1 -Target widgetbook
```
`run.ps1` читает `mobile/.env` и передаёт его во Flutter как
`--dart-define-from-file`. Если файла нет — копирует `.env.example`.
```bash
export PATH="$HOME/flutter/bin:$PATH"
cd mobile
flutter pub get
flutter run -d windows --dart-define-from-file=.env
```
### Конфигурация (`mobile/.env`)
| Переменная | Назначение |
| --- | --- |
| `PPM_API_BASE_URL` | адрес API; если пусто — `https://please-pay-me.ru` |
| `PPM_WEB_URL` | веб-кабинет; если пусто — тот же origin, что API |
| `PPM_DEMO` | `true` — принудительный in-memory backend |
### Авторизация
На iOS и Android:
- **Telegram** — кабинет в WebView, JWT забирается из
`localStorage.ppm_session_jwt` через канал `PpmAuth`.
- **Яндекс** — WebView на `oauth.yandex.ru`. Код возвращается на
`{кабинет}/` (как Callback URL в кабинете Яндекса), приложение шлёт
его в `POST /api/auth/yandex`. Client secret живёт только на API.
Приложение проверяет JWT через `GET /api/me` и кладёт сессию в
`SharedPreferences`.
На Windows / в браузере WebView нет: остаётся ручной ввод токена. Альтернатива
на любой платформе — «Демо-режим» (`DemoBackend` без сети).
В кабинете Яндекса должен быть Redirect URI `https://<домен>/`
(для продакшена — `https://please-pay-me.ru/`). BotFather → `/setdomain`
для Telegram — тот же домен.
## Экраны
| Вкладка | Что делает |
| --- | --- |
| Обзор | остаток бюджета, дневной лимит, трата в один тап, ближайшая выплата |
| Журнал | операции по дням, фильтр «текущий / все бюджеты», подгрузка страниц |
| Бюджеты | выбор активного конверта, создание, редактирование, архив, удаление |
| Работа | оклад, дни выплат, правило выходных, график ближайших зарплат |
| Профиль | пользователь, режим подключения, выход |
## Структура
```
mobile/
├── lib/
│ ├── app/ # CupertinoApp, session gate, таб-бар
│ ├── core/ # config, storage, AsyncValue, форматтеры
│ ├── data/
│ │ ├── api/ # ApiClient (http + маппинг ошибок)
│ │ ├── models/ # Budget/Expense/Job/AuthUser + JSON-хелперы
│ │ ├── repositories/ # интерфейсы + REST-реализации
│ │ └── demo/ # in-memory backend (превью, тесты, демо-режим)
│ ├── features/ # overview / journal / budgets / work / profile / auth
│ ├── theme/ # токены Apple HIG + CupertinoThemeData
│ └── ui/ # дизайн-система (atoms → molecules → navigation)
└── widgetbook/ # переносимый каталог компонентов и экранов
```
Слои связаны через интерфейсы репозиториев: экраны знают только
`BudgetRepository` / `ExpenseRepository` / `JobRepository`, а `SessionController`
подставляет REST- или demo-реализацию. Поэтому и Widgetbook, и виджет-тесты
гоняют настоящие экраны без сети.
## Тесты
```bash
cd mobile && flutter test # модели, форматтеры, контроллеры, сквозной сценарий
cd mobile/widgetbook && flutter test # рендер каждого use-case в light и dark
```
+36
View File
@@ -0,0 +1,36 @@
# 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
analyzer:
exclude:
- build/**
- android/**
- ios/**
- web/**
- windows/**
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
+14
View File
@@ -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
+49
View File
@@ -0,0 +1,49 @@
plugins {
id("com.android.application")
// The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
id("dev.flutter.flutter-gradle-plugin")
}
android {
namespace = "com.pleasepayme.please_pay_me"
compileSdk = flutter.compileSdkVersion
ndkVersion = flutter.ndkVersion
compileOptions {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId = "com.pleasepayme.please_pay_me"
// 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
// Uses the version code from pubspec.yaml. When using split APKs, 1000 * ABI_VERSION
// is added automatically by Flutter. (https://developer.android.com/studio/build/configure-apk-splits#configure-APK-versions)
// You can force using the value of versionCode by specifying the `-P force-version-code-ignoring-abi=true`
// flag during build.
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")
}
}
}
kotlin {
compilerOptions {
jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_17
}
}
flutter {
source = "../.."
}
@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
@@ -0,0 +1,58 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="@string/app_name"
android:name="${applicationName}"
android:icon="@mipmap/ic_launcher">
<activity
android:name=".MainActivity"
android:exported="true"
android:launchMode="singleTop"
android:taskAffinity=""
android:theme="@style/LaunchTheme"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
android:windowSoftInputMode="adjustResize">
<!-- Specifies an Android theme to apply to this Activity as soon as
the Android process has started. This theme is visible to the user
while the Flutter UI initializes. After that, this theme continues
to determine the Window background behind the Flutter UI. -->
<meta-data
android:name="io.flutter.embedding.android.NormalTheme"
android:resource="@style/NormalTheme"
/>
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<!-- Don't delete the meta-data below.
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
<meta-data
android:name="flutterEmbedding"
android:value="2" />
</application>
<!-- Required to query activities that can process text, see:
https://developer.android.com/training/package-visibility and
https://developer.android.com/reference/android/content/Intent#ACTION_PROCESS_TEXT.
In particular, this is used by the Flutter engine in io.flutter.plugin.text.ProcessTextPlugin. -->
<queries>
<intent>
<action android:name="android.intent.action.PROCESS_TEXT"/>
<data android:mimeType="text/plain"/>
</intent>
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="https"/>
</intent>
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="tg"/>
</intent>
<intent>
<action android:name="android.intent.action.VIEW"/>
<data android:scheme="telegram"/>
</intent>
</queries>
</manifest>
@@ -0,0 +1,5 @@
package com.pleasepayme.please_pay_me
import io.flutter.embedding.android.FlutterActivity
class MainActivity : FlutterActivity()
Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.6 KiB

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/splash_background" />
<item
android:width="96dp"
android:height="96dp"
android:gravity="center"
android:drawable="@drawable/ic_splash_mark" />
</layer-list>
Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 94 KiB

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="96dp"
android:height="96dp"
android:viewportWidth="96"
android:viewportHeight="96">
<path
android:fillColor="@color/splash_accent"
android:pathData="M22,0 L74,0 A22,22 0 0,1 96,22 L96,74 A22,22 0 0,1 74,96 L22,96 A22,22 0 0,1 0,74 L0,22 A22,22 0 0,1 22,0 Z" />
<path
android:fillColor="#FFFFFF"
android:pathData="M36,26 h22 c11,0 18,7 18,17 c0,10 -7,17 -18,17 h-10 v6 h18 v8 h-18 v10 h-12 v-10 h-8 v-8 h8 v-6 h-8 v-8 h8 V26 z M48,34 v18 h10 c5,0 8,-4 8,-9 c0,-5 -3,-9 -8,-9 H48 z" />
</vector>
@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#FFFFFF"
android:pathData="M38,28 h26 c13,0 21,8 21,20 c0,12 -8,20 -21,20 H50 v6 h22 v9 H50 v10 H38 v-10 h-8 v-9 h8 v-6 h-8 v-9 h8 V28 z M50,37 v22 h14 c6,0 10,-5 10,-11 c0,-6 -4,-11 -10,-11 H50 z" />
</vector>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@color/splash_background" />
<item
android:width="96dp"
android:height="96dp"
android:gravity="center"
android:drawable="@drawable/ic_splash_mark" />
</layer-list>
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@color/ic_launcher_background"/>
<foreground>
<inset
android:drawable="@drawable/ic_launcher_foreground"
android:inset="16%" />
</foreground>
</adaptive-icon>
Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowSplashScreenBackground">@color/splash_background</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_splash_ruble</item>
<item name="android:windowSplashScreenIconBackgroundColor">@color/splash_accent</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowLightNavigationBar">false</item>
<item name="android:enforceNavigationBarContrast">false</item>
</style>
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@color/splash_background</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowLightStatusBar">false</item>
<item name="android:windowLightNavigationBar">false</item>
<item name="android:enforceStatusBarContrast">false</item>
<item name="android:enforceNavigationBarContrast">false</item>
</style>
</resources>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="splash_background">#000000</color>
<color name="splash_accent">#3CD68C</color>
</resources>
@@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowLightNavigationBar">false</item>
<item name="android:enforceNavigationBarContrast">false</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
<item name="android:windowBackground">@color/splash_background</item>
<item name="android:statusBarColor">@android:color/transparent</item>
<item name="android:navigationBarColor">@android:color/transparent</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
<item name="android:windowLightStatusBar">false</item>
<item name="android:windowLightNavigationBar">false</item>
<item name="android:enforceStatusBarContrast">false</item>
<item name="android:enforceNavigationBarContrast">false</item>
</style>
</resources>
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">@drawable/launch_background</item>
<item name="android:windowSplashScreenBackground">@color/splash_background</item>
<item name="android:windowSplashScreenAnimatedIcon">@drawable/ic_splash_ruble</item>
<item name="android:windowSplashScreenIconBackgroundColor">@color/splash_accent</item>
</style>
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">@color/splash_background</item>
</style>
</resources>
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="splash_background">#F2F2F7</color>
<color name="splash_accent">#12885A</color>
<color name="ic_launcher_background">#12885A</color>
</resources>
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Дожить до ЗП</string>
</resources>
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
<!-- Show a splash screen on the activity. Automatically removed when
the Flutter engine draws its first frame -->
<item name="android:windowBackground">@drawable/launch_background</item>
</style>
<!-- Theme applied to the Android Window as soon as the process has started.
This theme determines the color of the Android Window while your
Flutter UI initializes, as well as behind your Flutter UI while its
running.
This Theme is only used starting with V2 of Flutter's Android embedding. -->
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
<item name="android:windowBackground">@color/splash_background</item>
</style>
</resources>
@@ -0,0 +1,7 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
<!-- The INTERNET permission is required for development. Specifically,
the Flutter tool needs it to communicate with the running application
to allow setting breakpoints, to provide hot reload, etc.
-->
<uses-permission android:name="android.permission.INTERNET"/>
</manifest>
+24
View File
@@ -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<Delete>("clean") {
delete(rootProject.layout.buildDirectory)
}
+6
View File
@@ -0,0 +1,6 @@
org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
android.useAndroidX=true
# This newDsl flag was added by the Flutter template
android.newDsl=false
# This builtInKotlin flag was added by the Flutter template
android.builtInKotlin=false
@@ -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-9.3.1-all.zip
+26
View File
@@ -0,0 +1,26 @@
pluginManagement {
val flutterSdkPath =
run {
val properties = java.util.Properties()
file("local.properties").inputStream().use { properties.load(it) }
val flutterSdkPath = properties.getProperty("flutter.sdk")
require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
flutterSdkPath
}
includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}
plugins {
id("dev.flutter.flutter-plugin-loader") version "1.0.0"
id("com.android.application") version "9.1.0" apply false
id("org.jetbrains.kotlin.android") version "2.4.0" apply false
}
include(":app")
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 145 KiB

+34
View File
@@ -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
+24
View File
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
<string>App</string>
<key>CFBundleIdentifier</key>
<string>io.flutter.flutter.app</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>App</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
</dict>
</plist>
+1
View File
@@ -0,0 +1 @@
#include "Generated.xcconfig"
+1
View File
@@ -0,0 +1 @@
#include "Generated.xcconfig"
+647
View File
@@ -0,0 +1,647 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
7884E8682EC3CC0700C636F2 /* SceneDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */; };
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */ = {isa = PBXBuildFile; productRef = 78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */; };
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 97C146E61CF9000F007C117D /* Project object */;
proxyType = 1;
remoteGlobalIDString = 97C146ED1CF9000F007C117D;
remoteInfo = Runner;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
);
name = "Embed Frameworks";
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = "<group>"; };
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 = "<group>"; };
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SceneDelegate.swift; sourceTree = "<group>"; };
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = FlutterGeneratedPluginSwiftPackage; path = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage; sourceTree = "<group>"; };
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
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 = "<group>"; };
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
97C146EB1CF9000F007C117D /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
78A318202AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
331C8082294A63A400263BE5 /* RunnerTests */ = {
isa = PBXGroup;
children = (
331C807B294A618700263BE5 /* RunnerTests.swift */,
);
path = RunnerTests;
sourceTree = "<group>";
};
9740EEB11CF90186004384FC /* Flutter */ = {
isa = PBXGroup;
children = (
78E0A7A72DC9AD7400C4905E /* FlutterGeneratedPluginSwiftPackage */,
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
9740EEB21CF90195004384FC /* Debug.xcconfig */,
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
9740EEB31CF90195004384FC /* Generated.xcconfig */,
);
name = Flutter;
sourceTree = "<group>";
};
97C146E51CF9000F007C117D = {
isa = PBXGroup;
children = (
9740EEB11CF90186004384FC /* Flutter */,
97C146F01CF9000F007C117D /* Runner */,
97C146EF1CF9000F007C117D /* Products */,
331C8082294A63A400263BE5 /* RunnerTests */,
);
sourceTree = "<group>";
};
97C146EF1CF9000F007C117D /* Products */ = {
isa = PBXGroup;
children = (
97C146EE1CF9000F007C117D /* Runner.app */,
331C8081294A63A400263BE5 /* RunnerTests.xctest */,
);
name = Products;
sourceTree = "<group>";
};
97C146F01CF9000F007C117D /* Runner */ = {
isa = PBXGroup;
children = (
97C146FA1CF9000F007C117D /* Main.storyboard */,
97C146FD1CF9000F007C117D /* Assets.xcassets */,
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
97C147021CF9000F007C117D /* Info.plist */,
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
7884E8672EC3CC0400C636F2 /* SceneDelegate.swift */,
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
);
path = Runner;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
331C8080294A63A400263BE5 /* RunnerTests */ = {
isa = PBXNativeTarget;
buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
buildPhases = (
331C807D294A63A400263BE5 /* Sources */,
331C807F294A63A400263BE5 /* Resources */,
);
buildRules = (
);
dependencies = (
331C8086294A63A400263BE5 /* PBXTargetDependency */,
);
name = RunnerTests;
productName = RunnerTests;
productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
productType = "com.apple.product-type.bundle.unit-test";
};
97C146ED1CF9000F007C117D /* Runner */ = {
isa = PBXNativeTarget;
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
buildPhases = (
9740EEB61CF901F6004384FC /* Run Script */,
97C146EA1CF9000F007C117D /* Sources */,
97C146EB1CF9000F007C117D /* Frameworks */,
97C146EC1CF9000F007C117D /* Resources */,
9705A1C41CF9048500538489 /* Embed Frameworks */,
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
);
buildRules = (
);
dependencies = (
);
name = Runner;
packageProductDependencies = (
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */,
);
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;
packageReferences = (
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */,
);
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
97C146ED1CF9000F007C117D /* Runner */,
331C8080294A63A400263BE5 /* RunnerTests */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
331C807F294A63A400263BE5 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
);
runOnlyForDeploymentPostprocessing = 0;
};
97C146EC1CF9000F007C117D /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
);
name = "Thin Binary";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
};
9740EEB61CF901F6004384FC /* Run Script */ = {
isa = PBXShellScriptBuildPhase;
alwaysOutOfDate = 1;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Run Script";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
331C807D294A63A400263BE5 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
97C146EA1CF9000F007C117D /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
7884E8682EC3CC0700C636F2 /* SceneDelegate.swift 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 = "<group>";
};
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
isa = PBXVariantGroup;
children = (
97C147001CF9000F007C117D /* Base */,
);
name = LaunchScreen.storyboard;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
249021D3217E4FDB00AE95B9 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.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;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.pleasepayme.pleasePayMe;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Profile;
};
331C8088294A63A400263BE5 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.pleasepayme.pleasePayMe.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Debug;
};
331C8089294A63A400263BE5 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.pleasepayme.pleasePayMe.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
};
name = Release;
};
331C808A294A63A400263BE5 /* Profile */ = {
isa = XCBuildConfiguration;
buildSettings = {
BUNDLE_LOADER = "$(TEST_HOST)";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.pleasepayme.pleasePayMe.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 = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.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 = AppIcon;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = NO;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 15.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;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.pleasepayme.pleasePayMe;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Debug;
};
97C147071CF9000F007C117D /* Release */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Runner/Info.plist;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.pleasepayme.pleasePayMe;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
VERSIONING_SYSTEM = "apple-generic";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
isa = XCConfigurationList;
buildConfigurations = (
331C8088294A63A400263BE5 /* Debug */,
331C8089294A63A400263BE5 /* Release */,
331C808A294A63A400263BE5 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147031CF9000F007C117D /* Debug */,
97C147041CF9000F007C117D /* Release */,
249021D3217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
isa = XCConfigurationList;
buildConfigurations = (
97C147061CF9000F007C117D /* Debug */,
97C147071CF9000F007C117D /* Release */,
249021D4217E4FDB00AE95B9 /* Profile */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
/* Begin XCLocalSwiftPackageReference section */
781AD8BC2B33823900A9FFBB /* XCLocalSwiftPackageReference "Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage" */ = {
isa = XCLocalSwiftPackageReference;
relativePath = Flutter/ephemeral/Packages/FlutterGeneratedPluginSwiftPackage;
};
/* End XCLocalSwiftPackageReference section */
/* Begin XCSwiftPackageProductDependency section */
78A3181F2AECB46A00862997 /* FlutterGeneratedPluginSwiftPackage */ = {
isa = XCSwiftPackageProductDependency;
productName = FlutterGeneratedPluginSwiftPackage;
};
/* End XCSwiftPackageProductDependency section */
};
rootObject = 97C146E61CF9000F007C117D /* Project object */;
}
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:">
</FileRef>
</Workspace>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
@@ -0,0 +1,119 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
buildImplicitDependencies = "YES">
<PreActions>
<ExecutionAction
ActionType = "Xcode.IDEStandardExecutionActionsCore.ExecutionActionType.ShellScriptAction">
<ActionContent
title = "Run Prepare Flutter Framework Script"
scriptText = "/bin/sh &quot;$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh&quot; prepare&#10;">
<EnvironmentBuildable>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</EnvironmentBuildable>
</ActionContent>
</ExecutionAction>
</PreActions>
<BuildActionEntries>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
shouldUseLaunchSchemeArgsEnv = "YES">
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</MacroExpansion>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "331C8080294A63A400263BE5"
BuildableName = "RunnerTests.xctest"
BlueprintName = "RunnerTests"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
customLLDBInitFile = "$(SRCROOT)/Flutter/ephemeral/flutter_lldbinit"
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
debugDocumentVersioning = "YES"
debugServiceExtension = "internal"
enableGPUValidationMode = "1"
allowLocationSimulation = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</LaunchAction>
<ProfileAction
buildConfiguration = "Profile"
shouldUseLaunchSchemeArgsEnv = "YES"
savedToolIdentifier = ""
useCustomWorkingDirectory = "NO"
debugDocumentVersioning = "YES">
<BuildableProductRunnable
runnableDebuggingMode = "0">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
BuildableName = "Runner.app"
BlueprintName = "Runner"
ReferencedContainer = "container:Runner.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
</ProfileAction>
<AnalyzeAction
buildConfiguration = "Debug">
</AnalyzeAction>
<ArchiveAction
buildConfiguration = "Release"
revealArchiveInOrganizer = "YES">
</ArchiveAction>
</Scheme>
+7
View File
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "group:Runner.xcodeproj">
</FileRef>
</Workspace>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>
@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>PreviewsEnabled</key>
<false/>
</dict>
</plist>
+16
View File
@@ -0,0 +1,16 @@
import Flutter
import UIKit
@main
@objc class AppDelegate: FlutterAppDelegate, FlutterImplicitEngineDelegate {
override func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
func didInitializeImplicitFlutterEngine(_ engineBridge: FlutterImplicitEngineBridge) {
GeneratedPluginRegistrant.register(with: engineBridge.pluginRegistry)
}
}
@@ -0,0 +1 @@
{"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":"57x57","idiom":"iphone","filename":"Icon-App-57x57@1x.png","scale":"1x"},{"size":"57x57","idiom":"iphone","filename":"Icon-App-57x57@2x.png","scale":"2x"},{"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":"50x50","idiom":"ipad","filename":"Icon-App-50x50@1x.png","scale":"1x"},{"size":"50x50","idiom":"ipad","filename":"Icon-App-50x50@2x.png","scale":"2x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@1x.png","scale":"1x"},{"size":"72x72","idiom":"ipad","filename":"Icon-App-72x72@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"}}
Binary file not shown.

After

Width:  |  Height:  |  Size: 261 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 679 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

@@ -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"
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 B

@@ -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.
@@ -0,0 +1,38 @@
{
"colors" : [
{
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.969",
"green" : "0.949",
"red" : "0.949"
}
},
"idiom" : "universal"
},
{
"appearances" : [
{
"appearance" : "luminosity",
"value" : "dark"
}
],
"color" : {
"color-space" : "srgb",
"components" : {
"alpha" : "1.000",
"blue" : "0.000",
"green" : "0.000",
"red" : "0.000"
}
},
"idiom" : "universal"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
@@ -0,0 +1,31 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
</dependencies>
<scenes>
<!--View Controller-->
<scene sceneID="EHf-IW-A2E">
<objects>
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" name="SplashBackground"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
</objects>
<point key="canvasLocation" x="53" y="375"/>
</scene>
</scenes>
<resources>
<namedColor name="SplashBackground">
<color red="0.949" green="0.949" blue="0.969" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources>
</document>
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
</dependencies>
<scenes>
<!--Flutter View Controller-->
<scene sceneID="tne-QT-ifu">
<objects>
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
<layoutGuides>
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
</layoutGuides>
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
</objects>
</scene>
</scenes>
</document>
+77
View File
@@ -0,0 +1,77 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CADisableMinimumFrameDurationOnPhone</key>
<true/>
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Дожить до ЗП</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>please_pay_me</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>$(FLUTTER_BUILD_NAME)</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>$(FLUTTER_BUILD_NUMBER)</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>LSApplicationQueriesSchemes</key>
<array>
<string>tg</string>
<string>telegram</string>
<string>https</string>
<string>http</string>
</array>
<key>UIApplicationSceneManifest</key>
<dict>
<key>UIApplicationSupportsMultipleScenes</key>
<false/>
<key>UISceneConfigurations</key>
<dict>
<key>UIWindowSceneSessionRoleApplication</key>
<array>
<dict>
<key>UISceneClassName</key>
<string>UIWindowScene</string>
<key>UISceneConfigurationName</key>
<string>flutter</string>
<key>UISceneDelegateClassName</key>
<string>$(PRODUCT_MODULE_NAME).SceneDelegate</string>
<key>UISceneStoryboardFile</key>
<string>Main</string>
</dict>
</array>
</dict>
</dict>
<key>UIApplicationSupportsIndirectInputEvents</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIMainStoryboardFile</key>
<string>Main</string>
<key>UISupportedInterfaceOrientations</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
<key>UISupportedInterfaceOrientations~ipad</key>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationPortraitUpsideDown</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
@@ -0,0 +1 @@
#import "GeneratedPluginRegistrant.h"
+6
View File
@@ -0,0 +1,6 @@
import Flutter
import UIKit
class SceneDelegate: FlutterSceneDelegate {
}
+12
View File
@@ -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.
}
}
+115
View File
@@ -0,0 +1,115 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/services.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:please_pay_me/app/home_tabs.dart';
import 'package:please_pay_me/features/auth/login_screen.dart';
import 'package:please_pay_me/features/auth/session_controller.dart';
import 'package:please_pay_me/features/splash/splash_screen.dart';
import 'package:please_pay_me/features/budgets/budgets_controller.dart';
import 'package:please_pay_me/features/journal/journal_controller.dart';
import 'package:please_pay_me/features/work/jobs_controller.dart';
import 'package:please_pay_me/core/branding/app_brand.dart';
import 'package:please_pay_me/theme/theme.dart';
import 'package:provider/provider.dart';
class PleasePayMeApp extends StatelessWidget {
PleasePayMeApp({super.key, required this.session, ThemeController? theme})
: theme = theme ?? ThemeController(store: MemoryThemeStore());
final SessionController session;
final ThemeController theme;
@override
Widget build(BuildContext context) {
return MultiProvider(
providers: [
ChangeNotifierProvider<SessionController>.value(value: session),
ChangeNotifierProvider<ThemeController>.value(value: theme),
],
child: Consumer<ThemeController>(
builder: (context, theme, _) {
final platform = MediaQuery.platformBrightnessOf(context);
final brightness = theme.resolve(platform);
return CupertinoApp(
title: AppBrand.name,
theme: brightness == Brightness.dark ? buildDarkTheme() : buildLightTheme(),
locale: const Locale('ru'),
supportedLocales: const [Locale('ru'), Locale('en')],
localizationsDelegates: const [
GlobalCupertinoLocalizations.delegate,
GlobalMaterialLocalizations.delegate,
GlobalWidgetsLocalizations.delegate,
],
builder: (context, child) {
final overlay = systemUiOverlayFor(brightness);
SystemChrome.setSystemUIOverlayStyle(overlay);
return AnnotatedRegion<SystemUiOverlayStyle>(
value: overlay,
child: MediaQuery(
data: MediaQuery.of(context).copyWith(platformBrightness: brightness),
child: child!,
),
);
},
home: const _SessionGate(),
);
},
),
);
}
}
class _SessionGate extends StatelessWidget {
const _SessionGate();
@override
Widget build(BuildContext context) {
final session = context.watch<SessionController>();
return switch (session.status) {
SessionStatus.restoring => const SplashScreen(),
SessionStatus.signedOut => const LoginScreen(),
SessionStatus.signedIn => AppDataScope(
key: ValueKey(session.sessionKey),
session: session,
child: const HomeTabs(),
),
};
}
}
/// Feature controllers bound to the current session. Rebuilt from scratch when
/// the session changes, so no stale data survives a re-login.
class AppDataScope extends StatelessWidget {
const AppDataScope({
super.key,
required this.session,
required this.child,
});
final SessionController session;
final Widget child;
@override
Widget build(BuildContext context) {
return MultiProvider(
providers: [
ChangeNotifierProvider(
create: (_) => BudgetsController(
budgets: session.budgets,
expenses: session.expenses,
)..load(),
),
ChangeNotifierProvider(
create: (_) => JournalController(expenses: session.expenses)..load(),
),
ChangeNotifierProvider(
create: (_) => JobsController(jobs: session.jobs)..load(),
),
],
child: child,
);
}
}
+56
View File
@@ -0,0 +1,56 @@
import 'package:flutter/cupertino.dart';
import 'package:please_pay_me/features/budgets/budgets_screen.dart';
import 'package:please_pay_me/features/journal/journal_screen.dart';
import 'package:please_pay_me/features/overview/overview_screen.dart';
import 'package:please_pay_me/features/profile/profile_screen.dart';
import 'package:please_pay_me/features/work/work_screen.dart';
import 'package:please_pay_me/ui/ui.dart';
/// Root tab bar. Each tab keeps its own navigator so modal sheets and alerts
/// stay inside the tab, as iOS expects.
class HomeTabs extends StatelessWidget {
const HomeTabs({super.key});
static const _tabs = [
AppTabItem(
icon: CupertinoIcons.chart_pie,
activeIcon: CupertinoIcons.chart_pie_fill,
label: 'Обзор',
),
AppTabItem(
icon: CupertinoIcons.list_bullet,
label: 'Журнал',
),
AppTabItem(
icon: CupertinoIcons.money_rubl_circle,
activeIcon: CupertinoIcons.money_rubl_circle_fill,
label: 'Бюджеты',
),
AppTabItem(
icon: CupertinoIcons.briefcase,
activeIcon: CupertinoIcons.briefcase_fill,
label: 'Работа',
),
AppTabItem(
icon: CupertinoIcons.person,
activeIcon: CupertinoIcons.person_fill,
label: 'Профиль',
),
];
@override
Widget build(BuildContext context) {
return CupertinoTabScaffold(
tabBar: AppTabBar(items: _tabs, currentIndex: 0, onTap: (_) {}),
tabBuilder: (context, index) => CupertinoTabView(
builder: (context) => switch (index) {
0 => const OverviewScreen(),
1 => const JournalScreen(),
2 => const BudgetsScreen(),
3 => const WorkScreen(),
_ => const ProfileScreen(),
},
),
);
}
}
+4
View File
@@ -0,0 +1,4 @@
/// User-facing product name on the home screen and in the UI.
abstract final class AppBrand {
static const name = 'Дожить до ЗП';
}
+58
View File
@@ -0,0 +1,58 @@
import 'package:please_pay_me/core/config/env_file.dart';
/// Runtime configuration.
///
/// Values are resolved in this order:
/// 1. `--dart-define=PPM_*` / `--dart-define-from-file=.env` (CI and `run.ps1`)
/// 2. key/value map parsed from `mobile/.env` (tests and explicit loaders)
/// 3. production cabinet if nothing is set
class AppConfig {
static const productionOrigin = 'https://please-pay-me.ru';
const AppConfig({
required this.apiBaseUrl,
required this.webCabinetUrl,
this.demoMode = false,
});
factory AppConfig.fromEnvironment({Map<String, String> file = const {}}) {
const definedApi = String.fromEnvironment('PPM_API_BASE_URL');
const definedWeb = String.fromEnvironment('PPM_WEB_URL');
const definedDemo = String.fromEnvironment('PPM_DEMO');
return AppConfig.fromMap({
...file,
if (definedApi.isNotEmpty) 'PPM_API_BASE_URL': definedApi,
if (definedWeb.isNotEmpty) 'PPM_WEB_URL': definedWeb,
if (definedDemo.isNotEmpty) 'PPM_DEMO': definedDemo,
});
}
factory AppConfig.fromMap(Map<String, String> values) {
final apiBase = normalizeUrl(values['PPM_API_BASE_URL'] ?? '');
final webUrl = normalizeUrl(values['PPM_WEB_URL'] ?? '');
final demoForced = parseEnvFlag(values['PPM_DEMO']);
final resolvedApi = apiBase.isEmpty ? productionOrigin : apiBase;
final resolvedWeb = webUrl.isEmpty ? resolvedApi : webUrl;
return AppConfig(
apiBaseUrl: resolvedApi,
webCabinetUrl: resolvedWeb,
demoMode: demoForced,
);
}
static const demo = AppConfig(apiBaseUrl: '', webCabinetUrl: '', demoMode: true);
final String apiBaseUrl;
final String webCabinetUrl;
final bool demoMode;
AppConfig copyWith({String? apiBaseUrl, String? webCabinetUrl, bool? demoMode}) {
return AppConfig(
apiBaseUrl: apiBaseUrl ?? this.apiBaseUrl,
webCabinetUrl: webCabinetUrl ?? this.webCabinetUrl,
demoMode: demoMode ?? this.demoMode,
);
}
}
+41
View File
@@ -0,0 +1,41 @@
/// Minimal `.env` parser (KEY=VALUE, `#` comments, optional quotes).
///
/// Kept tiny and dependency-free so config loading is easy to test and does
/// not pull `flutter_dotenv` into the production graph.
Map<String, String> parseEnvFile(String source) {
final values = <String, String>{};
for (final raw in source.split(RegExp(r'\r?\n'))) {
final line = raw.trim();
if (line.isEmpty || line.startsWith('#')) continue;
final separator = line.indexOf('=');
if (separator <= 0) continue;
final key = line.substring(0, separator).trim();
if (key.isEmpty) continue;
var value = line.substring(separator + 1).trim();
if (value.length >= 2) {
final quote = value[0];
if ((quote == '"' || quote == "'") && value.endsWith(quote)) {
value = value.substring(1, value.length - 1);
}
}
values[key] = value;
}
return values;
}
String normalizeUrl(String url) => url.trim().replaceAll(RegExp(r'/$'), '');
bool parseEnvFlag(String? raw, {bool fallback = false}) {
if (raw == null || raw.trim().isEmpty) return fallback;
return switch (raw.trim().toLowerCase()) {
'1' || 'true' || 'yes' || 'on' => true,
'0' || 'false' || 'no' || 'off' => false,
_ => fallback,
};
}
+3
View File
@@ -0,0 +1,3 @@
import 'env_loader_stub.dart' if (dart.library.io) 'env_loader_io.dart' as impl;
Future<Map<String, String>> loadEnvFile() => impl.loadEnvFileImpl();
+15
View File
@@ -0,0 +1,15 @@
import 'dart:io';
import 'package:please_pay_me/core/config/env_file.dart';
/// Reads `mobile/.env` when the process cwd is the package or the repo root.
/// Dart-defines from `run.ps1` still win in [AppConfig.fromEnvironment].
Future<Map<String, String>> loadEnvFileImpl() async {
for (final path in const ['.env', 'mobile/.env']) {
final file = File(path);
if (await file.exists()) {
return parseEnvFile(await file.readAsString());
}
}
return const {};
}
@@ -0,0 +1 @@
Future<Map<String, String>> loadEnvFileImpl() async => const {};
+60
View File
@@ -0,0 +1,60 @@
import 'package:intl/intl.dart';
/// `1 234,50 ₽` — same shape as the web cabinet.
String formatMoney(double amount, {String currency = 'RUB', bool compact = false}) {
final symbol = switch (currency) {
'RUB' => '',
'USD' => r'$',
'EUR' => '',
_ => currency,
};
final formatter = compact
? NumberFormat.decimalPattern('ru')
: NumberFormat('#,##0.00', 'ru');
final value = compact ? amount.round() : amount;
return '${formatter.format(value)} $symbol'.replaceAll('\u00A0', ' ');
}
String formatSignedMoney(double amount, {String currency = 'RUB'}) {
final sign = amount < 0 ? '+' : '';
return '$sign${formatMoney(amount.abs(), currency: currency)}';
}
String formatDay(DateTime date) => DateFormat('d MMMM', 'ru').format(date);
String formatShortDate(DateTime date) => DateFormat('dd.MM.yyyy').format(date);
String formatWeekday(DateTime date) => DateFormat('EEEE', 'ru').format(date);
/// `Сегодня` / `Вчера` / `12 сентября` — headers of the journal.
String formatRelativeDay(DateTime date, {DateTime? now}) {
final today = _dayOf(now ?? DateTime.now());
final day = _dayOf(date);
final diff = today.difference(day).inDays;
return switch (diff) {
0 => 'Сегодня',
1 => 'Вчера',
_ => formatDay(day),
};
}
/// `осталось 5 дней` — Russian plural rules.
String formatDaysLeft(int days) {
if (days <= 0) return 'период завершён';
return 'осталось ${plural(days, 'день', 'дня', 'дней')}';
}
String plural(int count, String one, String few, String many) {
final mod100 = count % 100;
final mod10 = count % 10;
if (mod100 >= 11 && mod100 <= 14) return '$count $many';
if (mod10 == 1) return '$count $one';
if (mod10 >= 2 && mod10 <= 4) return '$count $few';
return '$count $many';
}
DateTime _dayOf(DateTime value) => DateTime(value.year, value.month, value.day);
+24
View File
@@ -0,0 +1,24 @@
import 'package:flutter/cupertino.dart';
import 'package:please_pay_me/core/config/app_config.dart';
import 'package:please_pay_me/core/config/env_file.dart';
import 'package:please_pay_me/ui/ui.dart';
import 'package:url_launcher/url_launcher.dart';
abstract final class LegalLinks {
static const offer = '/legal/offer';
static const privacy = '/legal/privacy';
static const consent = '/legal/consent';
static const cookies = '/legal/cookies';
static Uri resolve(String cabinetUrl, String path) {
final base = cabinetUrl.isEmpty ? AppConfig.productionOrigin : cabinetUrl;
return Uri.parse('${normalizeUrl(base)}$path');
}
}
Future<void> openLegalDocument(BuildContext context, Uri uri) async {
final opened = await launchUrl(uri, mode: LaunchMode.externalApplication);
if (!opened && context.mounted) {
await showAppToast(context, message: 'Не удалось открыть документ');
}
}
+41
View File
@@ -0,0 +1,41 @@
/// Minimal async state container so screens can pattern-match over
/// loading / data / error instead of juggling three nullable fields.
sealed class AsyncValue<T> {
const AsyncValue();
const factory AsyncValue.loading() = AsyncLoading<T>;
const factory AsyncValue.data(T value) = AsyncData<T>;
const factory AsyncValue.error(String message) = AsyncError<T>;
T? get valueOrNull => this is AsyncData<T> ? (this as AsyncData<T>).value : null;
bool get isLoading => this is AsyncLoading<T>;
R map<R>({
required R Function() loading,
required R Function(T value) data,
required R Function(String message) error,
}) {
return switch (this) {
AsyncLoading<T>() => loading(),
AsyncData<T>(value: final v) => data(v),
AsyncError<T>(message: final m) => error(m),
};
}
}
final class AsyncLoading<T> extends AsyncValue<T> {
const AsyncLoading();
}
final class AsyncData<T> extends AsyncValue<T> {
const AsyncData(this.value);
final T value;
}
final class AsyncError<T> extends AsyncValue<T> {
const AsyncError(this.message);
final String message;
}
@@ -0,0 +1,78 @@
import 'package:shared_preferences/shared_preferences.dart';
/// Persisted session: JWT, API address and the cached user profile.
abstract interface class SessionStorage {
Future<Map<String, String?>> readAll();
Future<void> write({
required String token,
required String baseUrl,
required String user,
});
Future<void> clear();
}
class PrefsSessionStorage implements SessionStorage {
const PrefsSessionStorage();
static const _tokenKey = 'ppm_token';
static const _baseUrlKey = 'ppm_base_url';
static const _userKey = 'ppm_user';
@override
Future<Map<String, String?>> readAll() async {
final prefs = await SharedPreferences.getInstance();
return {
'token': prefs.getString(_tokenKey),
'baseUrl': prefs.getString(_baseUrlKey),
'user': prefs.getString(_userKey),
};
}
@override
Future<void> write({
required String token,
required String baseUrl,
required String user,
}) async {
final prefs = await SharedPreferences.getInstance();
await prefs.setString(_tokenKey, token);
await prefs.setString(_baseUrlKey, baseUrl);
await prefs.setString(_userKey, user);
}
@override
Future<void> clear() async {
final prefs = await SharedPreferences.getInstance();
await prefs.remove(_tokenKey);
await prefs.remove(_baseUrlKey);
await prefs.remove(_userKey);
}
}
/// Used by tests and previews — no platform channels involved.
class InMemorySessionStorage implements SessionStorage {
InMemorySessionStorage([Map<String, String?>? initial])
: _values = {...?initial};
final Map<String, String?> _values;
@override
Future<Map<String, String?>> readAll() async => Map.of(_values);
@override
Future<void> write({
required String token,
required String baseUrl,
required String user,
}) async {
_values
..['token'] = token
..['baseUrl'] = baseUrl
..['user'] = user;
}
@override
Future<void> clear() async => _values.clear();
}
+124
View File
@@ -0,0 +1,124 @@
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:please_pay_me/data/models/json.dart';
class ApiException implements Exception {
const ApiException(this.message, {this.statusCode});
final String message;
final int? statusCode;
bool get isUnauthorized => statusCode == 401;
@override
String toString() => message;
}
/// Thin JSON transport over the PleasePayMe REST API.
///
/// Keeps auth concerns out of repositories: the token is supplied lazily so a
/// re-login does not require rebuilding the whole object graph.
class ApiClient {
ApiClient({
required String baseUrl,
required String? Function() tokenProvider,
http.Client? httpClient,
this.onUnauthorized,
this.timeout = const Duration(seconds: 15),
}) : _baseUrl = baseUrl.replaceAll(RegExp(r'/$'), ''),
_tokenProvider = tokenProvider,
_http = httpClient ?? http.Client();
final String _baseUrl;
final String? Function() _tokenProvider;
final http.Client _http;
final void Function()? onUnauthorized;
final Duration timeout;
Future<Map<String, dynamic>> getJson(String path, {Map<String, String>? query}) async {
return asMap(await _send('GET', path, query: query));
}
Future<Map<String, dynamic>> postJson(
String path, {
Map<String, dynamic>? body,
Map<String, String>? query,
}) async {
return asMap(await _send('POST', path, body: body, query: query));
}
Future<Map<String, dynamic>> putJson(String path, {Map<String, dynamic>? body}) async {
return asMap(await _send('PUT', path, body: body));
}
Future<Map<String, dynamic>> patchJson(String path, {Map<String, dynamic>? body}) async {
return asMap(await _send('PATCH', path, body: body));
}
Future<Map<String, dynamic>> deleteJson(String path, {Map<String, String>? query}) async {
return asMap(await _send('DELETE', path, query: query));
}
Future<Object?> _send(
String method,
String path, {
Map<String, dynamic>? body,
Map<String, String>? query,
}) async {
final uri = Uri.parse('$_baseUrl$path').replace(
queryParameters: query?.isEmpty ?? true ? null : query,
);
final request = http.Request(method, uri);
request.headers['Accept'] = 'application/json';
final token = _tokenProvider();
if (token != null && token.isNotEmpty) {
request.headers['Authorization'] = 'Bearer $token';
}
if (body != null) {
request.headers['Content-Type'] = 'application/json';
request.body = jsonEncode(body);
}
late final http.Response response;
try {
final streamed = await _http.send(request).timeout(timeout);
response = await http.Response.fromStream(streamed);
} on Exception catch (error) {
throw ApiException('Нет связи с сервером: $error');
}
if (response.statusCode == 401) {
onUnauthorized?.call();
throw const ApiException('Сессия истекла, войдите заново', statusCode: 401);
}
final raw = utf8.decode(response.bodyBytes);
if (response.statusCode >= 400) {
throw ApiException(_extractError(raw, response.statusCode), statusCode: response.statusCode);
}
if (response.statusCode == 204 || raw.trim().isEmpty) return null;
try {
return jsonDecode(raw);
} on FormatException {
throw ApiException('Сервер вернул не JSON (HTTP ${response.statusCode})');
}
}
String _extractError(String raw, int statusCode) {
try {
final parsed = asMap(jsonDecode(raw));
final detail = asStringOrNull(parsed['detail']) ?? asStringOrNull(parsed['title']);
if (detail != null) return detail;
} on FormatException {
// Fall through to the raw payload.
}
return raw.trim().isEmpty ? 'Ошибка запроса (HTTP $statusCode)' : raw.trim();
}
void close() => _http.close();
}
+413
View File
@@ -0,0 +1,413 @@
import 'package:please_pay_me/data/api/api_client.dart';
import 'package:please_pay_me/data/models/auth_user.dart';
import 'package:please_pay_me/data/models/budget.dart';
import 'package:please_pay_me/data/models/expense.dart';
import 'package:please_pay_me/data/models/job.dart';
import 'package:please_pay_me/data/repositories/repositories.dart';
/// In-memory backend used for Widgetbook previews, widget tests and for
/// running the app without a server (`PPM_DEMO=true`).
///
/// Mirrors the envelope math of `IBudgetService` closely enough that screens
/// behave the same as against the real API.
class DemoBackend {
DemoBackend({DateTime? today, bool seed = true})
: _today = _dayOf(today ?? DateTime.now()) {
if (seed) _seed();
}
/// Backend without any data — used for empty-state previews and tests.
factory DemoBackend.empty({DateTime? today}) =>
DemoBackend(today: today, seed: false);
final DateTime _today;
final List<Budget> _budgets = [];
final List<Expense> _expenses = [];
final List<Job> _jobs = [];
int _selectedBudgetId = 1;
int _nextExpenseId = 100;
int _nextBudgetId = 3;
int _nextJobId = 2;
static const user = AuthUser(
userId: 1,
firstName: 'Владимир',
username: 'pleasepayme',
);
BudgetRepository get budgets => _DemoBudgetRepository(this);
ExpenseRepository get expenses => _DemoExpenseRepository(this);
JobRepository get jobs => _DemoJobRepository(this);
UserRepository get users => _DemoUserRepository();
void _seed() {
_budgets.addAll([
Budget(
id: 1,
userId: 1,
name: 'До аванса',
totalAmount: 42000,
startDate: _today.subtract(const Duration(days: 6)),
endDate: _today.add(const Duration(days: 8)),
currency: 'RUB',
isActive: true,
),
Budget(
id: 2,
userId: 1,
name: 'Отпуск',
totalAmount: 90000,
startDate: _today.subtract(const Duration(days: 40)),
endDate: _today.subtract(const Duration(days: 5)),
currency: 'RUB',
isActive: false,
),
]);
_expenses.addAll([
Expense(id: 1, budgetId: 1, amount: 1840, note: 'Продукты', spentAt: _today),
Expense(id: 2, budgetId: 1, amount: 250, note: 'Кофе', spentAt: _today),
Expense(
id: 3,
budgetId: 1,
amount: 640,
note: 'Такси',
spentAt: _today.subtract(const Duration(days: 1)),
),
Expense(
id: 4,
budgetId: 1,
amount: 3200,
note: 'Аптека',
spentAt: _today.subtract(const Duration(days: 2)),
),
Expense(
id: 5,
budgetId: 2,
amount: 15000,
note: 'Билеты',
spentAt: _today.subtract(const Duration(days: 20)),
),
]);
_jobs.add(
Job(
id: 1,
userId: 1,
name: 'Основная работа',
salaryAmount: 180000,
currency: 'RUB',
payDays: const [5, 20],
firstPayPercent: 40,
weekendPolicy: WeekendPolicy.beforeWeekend,
isActive: true,
nextPays: [
UpcomingPay(
date: _today.add(const Duration(days: 8)),
scheduledDay: 20,
percent: 60,
amount: 108000,
),
UpcomingPay(
date: _today.add(const Duration(days: 23)),
scheduledDay: 5,
percent: 40,
amount: 72000,
),
],
),
);
}
Budget _budgetById(int? id) {
if (_budgets.isEmpty) {
throw const ApiException('Сначала создайте бюджет');
}
final budgetId = id ?? _selectedBudgetId;
return _budgets.firstWhere(
(budget) => budget.id == budgetId,
orElse: () => _budgets.first,
);
}
BudgetStatus statusOf(Budget budget) {
final spent = _expenses
.where((expense) => expense.budgetId == budget.id)
.fold<double>(0, (sum, expense) => sum + expense.amount);
final spentToday = _expenses
.where((e) => e.budgetId == budget.id && _dayOf(e.spentAt) == _today)
.fold<double>(0, (sum, expense) => sum + expense.amount);
final daysLeft = budget.endDate.difference(_today).inDays + 1;
final safeDays = daysLeft < 1 ? 0 : daysLeft;
final remaining = budget.totalAmount - spent;
final dailyLimit = safeDays == 0 ? 0.0 : (remaining <= 0 ? 0.0 : remaining / safeDays);
return BudgetStatus(
budget: budget,
today: _today,
daysLeft: safeDays,
totalSpent: spent,
remaining: remaining,
dailyLimit: dailyLimit,
spentToday: spentToday,
remainingToday: dailyLimit - spentToday,
isOverDaily: spentToday > dailyLimit,
isOverBudget: remaining < 0,
isExpired: safeDays == 0,
selected: budget.id == _selectedBudgetId,
);
}
static DateTime _dayOf(DateTime value) => DateTime(value.year, value.month, value.day);
}
class _DemoBudgetRepository implements BudgetRepository {
const _DemoBudgetRepository(this._backend);
final DemoBackend _backend;
@override
Future<List<BudgetStatus>> list() async {
return _backend._budgets.map(_backend.statusOf).toList()
..sort((a, b) {
if (a.selected != b.selected) return a.selected ? -1 : 1;
return b.budget.endDate.compareTo(a.budget.endDate);
});
}
@override
Future<BudgetStatus> status({int? budgetId}) async {
return _backend.statusOf(_backend._budgetById(budgetId));
}
@override
Future<BudgetStatus> create({
required String name,
required double totalAmount,
required DateTime endDate,
DateTime? startDate,
}) async {
final budget = Budget(
id: _backend._nextBudgetId++,
userId: 1,
name: name,
totalAmount: totalAmount,
startDate: startDate ?? _backend._today,
endDate: endDate,
currency: 'RUB',
isActive: true,
);
_backend._budgets.add(budget);
_backend._selectedBudgetId = budget.id;
return _backend.statusOf(budget);
}
@override
Future<BudgetStatus> update({
required int budgetId,
String? name,
double? totalAmount,
DateTime? endDate,
DateTime? startDate,
bool resetExpenses = false,
}) async {
final index = _backend._budgets.indexWhere((budget) => budget.id == budgetId);
final current = _backend._budgets[index];
final updated = Budget(
id: current.id,
userId: current.userId,
name: name ?? current.name,
totalAmount: totalAmount ?? current.totalAmount,
startDate: startDate ?? current.startDate,
endDate: endDate ?? current.endDate,
currency: current.currency,
isActive: current.isActive,
);
_backend._budgets[index] = updated;
if (resetExpenses) {
_backend._expenses.removeWhere((expense) => expense.budgetId == budgetId);
}
return _backend.statusOf(updated);
}
@override
Future<BudgetStatus> select(int budgetId) async {
_backend._selectedBudgetId = budgetId;
return _backend.statusOf(_backend._budgetById(budgetId));
}
@override
Future<BudgetStatus> setActive(int budgetId, {required bool isActive}) async {
final index = _backend._budgets.indexWhere((budget) => budget.id == budgetId);
final current = _backend._budgets[index];
final updated = Budget(
id: current.id,
userId: current.userId,
name: current.name,
totalAmount: current.totalAmount,
startDate: current.startDate,
endDate: current.endDate,
currency: current.currency,
isActive: isActive,
);
_backend._budgets[index] = updated;
return _backend.statusOf(updated);
}
@override
Future<void> delete(int budgetId) async {
_backend._budgets.removeWhere((budget) => budget.id == budgetId);
_backend._expenses.removeWhere((expense) => expense.budgetId == budgetId);
if (_backend._selectedBudgetId == budgetId && _backend._budgets.isNotEmpty) {
_backend._selectedBudgetId = _backend._budgets.first.id;
}
}
}
class _DemoExpenseRepository implements ExpenseRepository {
const _DemoExpenseRepository(this._backend);
final DemoBackend _backend;
@override
Future<ExpensesPage> page({
required int page,
int pageSize = 20,
int? budgetId,
bool all = false,
}) async {
final scope = all
? _backend._expenses
: _backend._expenses
.where((e) => e.budgetId == (budgetId ?? _backend._selectedBudgetId));
final sorted = scope.toList()
..sort((a, b) {
final byDate = b.spentAt.compareTo(a.spentAt);
return byDate != 0 ? byDate : b.id.compareTo(a.id);
});
final from = (page - 1) * pageSize;
final items = from >= sorted.length
? <Expense>[]
: sorted.sublist(from, (from + pageSize).clamp(0, sorted.length));
return ExpensesPage(
page: page,
totalPages: sorted.isEmpty ? 1 : (sorted.length / pageSize).ceil(),
totalCount: sorted.length,
pageSize: pageSize,
totalSum: sorted.fold<double>(0, (sum, expense) => sum + expense.amount),
budgetId: all ? null : (budgetId ?? _backend._selectedBudgetId),
items: items,
);
}
@override
Future<BudgetStatus> create({
required double amount,
String? note,
DateTime? spentAt,
int? budgetId,
}) async {
final budget = _backend._budgetById(budgetId);
_backend._expenses.add(
Expense(
id: _backend._nextExpenseId++,
budgetId: budget.id,
amount: amount,
note: note,
spentAt: spentAt ?? _backend._today,
),
);
return _backend.statusOf(budget);
}
@override
Future<double> undoLast({int? budgetId}) async {
final budget = _backend._budgetById(budgetId);
final scoped = _backend._expenses.where((e) => e.budgetId == budget.id).toList();
if (scoped.isEmpty) return 0;
scoped.sort((a, b) => b.id.compareTo(a.id));
final last = scoped.first;
_backend._expenses.removeWhere((expense) => expense.id == last.id);
return last.amount;
}
}
class _DemoJobRepository implements JobRepository {
const _DemoJobRepository(this._backend);
final DemoBackend _backend;
@override
Future<List<Job>> list() async => List.unmodifiable(_backend._jobs);
@override
Future<Job> create({
required String name,
required double salaryAmount,
required List<int> payDays,
required double firstPayPercent,
required WeekendPolicy weekendPolicy,
}) async {
final job = Job(
id: _backend._nextJobId++,
userId: 1,
name: name,
salaryAmount: salaryAmount,
currency: 'RUB',
payDays: payDays,
firstPayPercent: firstPayPercent,
weekendPolicy: weekendPolicy,
isActive: true,
nextPays: const [],
);
_backend._jobs.add(job);
return job;
}
@override
Future<Job> update({
required int jobId,
required String name,
required double salaryAmount,
required List<int> payDays,
required double firstPayPercent,
required WeekendPolicy weekendPolicy,
bool isActive = true,
}) async {
final index = _backend._jobs.indexWhere((job) => job.id == jobId);
final current = _backend._jobs[index];
final updated = Job(
id: current.id,
userId: current.userId,
name: name,
salaryAmount: salaryAmount,
currency: current.currency,
payDays: payDays,
firstPayPercent: firstPayPercent,
weekendPolicy: weekendPolicy,
isActive: isActive,
nextPays: current.nextPays,
);
_backend._jobs[index] = updated;
return updated;
}
@override
Future<void> delete(int jobId) async {
_backend._jobs.removeWhere((job) => job.id == jobId);
}
}
class _DemoUserRepository implements UserRepository {
@override
Future<AuthUser> me() async => DemoBackend.user;
}

Some files were not shown because too many files have changed in this diff Show More