From 3393d823e7589f02ad432bc2ca939481f7940739 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Tue, 29 Oct 2024 11:35:23 +0300 Subject: [PATCH 01/22] Payment | initial refactoring --- .flutter-plugins-dependencies | 2 +- .github/workflows/analyze.yml | 48 +++++++++++ .github/workflows/clean_project.sh | 41 +++++++++ .github/workflows/coverage.sh | 64 ++++++++++++++ .github/workflows/coverage.yaml | 55 ++++++++++++ .github/workflows/release.yml | 84 +++++++++++++++++++ .metadata | 27 ++---- android/app/build.gradle | 16 ++-- android/app/src/main/AndroidManifest.xml | 2 +- .../flowers_app/MainActivity.kt | 2 +- android/build.gradle | 5 ++ .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/settings.gradle | 2 +- assets/settings/app-settings.json | 4 +- lib/domain/auth/register_user.dart | 2 +- lib/domain/notice/notice.dart | 18 ++-- lib/domain/notice/notice_list.dart | 20 ++--- lib/domain/notice/notice_list_viewed.dart | 20 ++--- lib/domain/order/order.dart | 46 +++++----- lib/domain/purchase/purchase_content.dart | 6 +- lib/domain/purchase/purchase_item.dart | 10 +-- lib/domain/purchase/purchase_set_order.dart | 6 +- .../notice/notice_overview_page.dart | 2 +- .../notice/widgets/notice_card.dart | 2 +- .../notice/widgets/notice_overview_body.dart | 10 +-- .../product/widgets/product_body.dart | 2 +- .../widgets/product_card_with_notices.dart | 4 +- .../product/widgets/set_order_widget.dart | 2 +- .../purchase_item_page.dart} | 11 +-- .../widgets/purchase_item_body.dart} | 10 +-- .../widgets/purchase_item_card.dart} | 6 +- .../widgets/purchase_card.dart | 4 +- .../user_account/widgets/order_card.dart | 8 +- .../widgets/order_overview_body.dart | 8 +- test/unit/notice_list_test.dart | 10 +-- test/unit/notice_list_test.mocks.dart | 8 +- test/widget_test.dart | 30 +++++++ 37 files changed, 459 insertions(+), 140 deletions(-) create mode 100644 .github/workflows/analyze.yml create mode 100755 .github/workflows/clean_project.sh create mode 100755 .github/workflows/coverage.sh create mode 100644 .github/workflows/coverage.yaml create mode 100644 .github/workflows/release.yml rename android/app/src/main/kotlin/com/{antonlobanovco/flowersapp => example}/flowers_app/MainActivity.kt (64%) rename lib/presentation/purchase/{purchase_content/purchase_content_page.dart => purchase_item/purchase_item_page.dart} (85%) rename lib/presentation/purchase/{purchase_content/widgets/purchase_content_body.dart => purchase_item/widgets/purchase_item_body.dart} (92%) rename lib/presentation/purchase/{purchase_content/widgets/purchase_content_card.dart => purchase_item/widgets/purchase_item_card.dart} (97%) create mode 100644 test/widget_test.dart diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index b41eb1e..ea274fa 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-10-28 14:09:09.780462","version":"3.24.4","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-10-28 21:09:48.760672","version":"3.24.4","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml new file mode 100644 index 0000000..413ea7b --- /dev/null +++ b/.github/workflows/analyze.yml @@ -0,0 +1,48 @@ +# This is a basic workflow to help you get started with Actions + +name: Analyze project + +# Controls when the workflow will run +on: + pull_request: + branches: [ "master" ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Flutter SDK + uses: flutter-actions/setup-flutter@v2 + # - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + version: 3.16.5 + # - run: | + # sudo apt-get update -y + # sudo apt-get install -y ninja-build libgtk-3-dev + + - name: Clearing project + run: flutter clean + + - name: Install dependencies + run: flutter pub upgrade + + - name: Analyze project + run: flutter analyze + + # Your project will need to have tests in test/ and a dependency on + # package:test for this step to succeed. Note that Flutter projects will + # want to change this to 'flutter test'. + - name: Run tests + run: flutter test + + # - name: Configure linux desctop + # run: flutter config --enable-linux-desktop + + # - name: Build linux + # run: flutter build linux + diff --git a/.github/workflows/clean_project.sh b/.github/workflows/clean_project.sh new file mode 100755 index 0000000..4619f4d --- /dev/null +++ b/.github/workflows/clean_project.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash +# +# to run it use: +# ./.github/workflows/clean_project.sh +# +# Script cleans current flutter project: +# - flutter clean +# - removes pubspec.lock, +# - flutter pub get + +flutterPubUpgrade() { + echo -e "\nUpgrading packages..." + flutter pub upgrade +} + +echo -e "\nCleaning project..." +flutter clean + +echo -e "\nDeleting unnecessary files in \"$PWD\"" +find . -name "pubspec.lock" -type f -exec rm -vf {} \; + +echo -e "\nInstalling packages..." +flutter pub get + +# flutter pub outdated +# echo +# while true; do +# read -p 'Would you like to upgrade resolvable dependencies: ' answer +# answer=$(echo "$answer" | tr '[:upper:]' '[:lower:]') +# case ${answer:0:1} in +# y|yes ) +# flutterPubUpgrade; +# break;; +# n|no ) +# echo -e "\nexit..." +# exit;; +# * ) echo "Please answer yes or no.";; +# esac +# done + +echo -e "\nall done." diff --git a/.github/workflows/coverage.sh b/.github/workflows/coverage.sh new file mode 100755 index 0000000..da28a52 --- /dev/null +++ b/.github/workflows/coverage.sh @@ -0,0 +1,64 @@ +#!/bin/bash +NC='\033[0m' +RED='\033[0;31m' # Red +GREEN='\033[0;32m' # Green + +coverageFactor=30 # minimum percentage of unit tests coverage for each file +coverageResults=() +coverageExitStatus=0 + +flutter test --coverage + +# Get version of GNU tool +compare() { + local value1="$1" operator="$2" value2="$3" + awk -vv1="$value1" -vv2="$value2" 'BEGIN { + split(v1, a, /\./); split(v2, b, /\./); + if (a[1] == b[1]) { + exit (a[2] '$operator' b[2]) ? 0 : 1 + } + else { + exit (a[1] '$operator' b[1]) ? 0 : 1 + } + }' +} + + +path="./coverage/lcov.info" +while IFS= read -r line +do + if [[ $line == 'SF:'* ]]; then + currentFile=$(sed -r 's/^SF:(.+)/\1/' <<< $line) + currentCov=0 + fi + if [[ $line == 'LF:'* ]]; then + currentLF=$(sed -r 's/^LF:([0-9]+)/\1/' <<< $line) + fi + if [[ $line == 'LH:'* ]]; then + currentLH=$(sed -r 's/^LH:([0-9]+)/\1/' <<< $line) + fi + if [[ $line == 'end_of_record' ]]; then + currentCov=$(printf %.2f\\n "$((10000 * $currentLH/$currentLF))e-2") + if compare $currentCov '>' $coverageFactor; then + message=$(echo -e "${GREEN}$currentCov\t|\t$currentFile${NC}") + echo "::notice file=$currentFile,title=Good coverage level::$currentCov%" + else + message=$(echo -e "${RED}$currentCov\t|\t$currentFile${NC}") + echo "::error file=$currentFile,title=Low coverage level::$currentCov% < $coverageFactor%" + ((coverageExitStatus=coverageExitStatus+1)) + fi + coverageResults+=( $message ) + echo $message + fi +done < "$path" +# echo "results=$coverageResults" >> $GITHUB_OUTPUT +if [[ !coverageExitStatus != 0 ]]; then + echo "#### 🔴 Some files are not enough covered by unit tests!" >> $GITHUB_STEP_SUMMARY + echo 'Please check details on your local machine using commands:' >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY + echo ' flutter test --coverage' >> $GITHUB_STEP_SUMMARY + echo ' genhtml coverage/lcov.info -o coverage/html' >> $GITHUB_STEP_SUMMARY + echo ' open coverage/html/index.html' >> $GITHUB_STEP_SUMMARY + echo '```' >> $GITHUB_STEP_SUMMARY +fi +exit $coverageExitStatus diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml new file mode 100644 index 0000000..61ce697 --- /dev/null +++ b/.github/workflows/coverage.yaml @@ -0,0 +1,55 @@ +# This is a basic workflow to help get unit test coverage factor for each file + +name: Analyze test coverage + +# Controls when the workflow will run +on: + pull_request: + branches: [ "master" ] + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + coverage: + outputs: + output1: ${{ steps.coverage.outputs.results }} + # output2: ${{ steps.step2.outputs.test }} + + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Setup Flutter SDK + uses: flutter-actions/setup-flutter@v2 + # - uses: subosito/flutter-action@v2 + with: + channel: 'stable' + version: 3.16.5 + # - run: | + # sudo apt-get update -y + # sudo apt-get install -y ninja-build libgtk-3-dev + + - name: Clearing project + run: flutter clean + + - name: Install dependencies + run: flutter pub upgrade + + - name: Analyze test coverage + id: coverage + run: | + chmod +x ./.github/workflows/coverage.sh + ./.github/workflows/coverage.sh + + # Your project will need to have tests in test/ and a dependency on + # package:test for this step to succeed. Note that Flutter projects will + # want to change this to 'flutter test'. + # - name: Run tests + # run: flutter test + + # - name: Configure linux desctop + # run: flutter config --enable-linux-desktop + + # - name: Build linux + # run: flutter build linux + diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..2b452d7 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,84 @@ +# This is a basic workflow to help you get started with Actions + +name: Build release + +# Controls when the workflow will run +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + # permissions: read-all|write-all + # permissions: + # contents: read|write + # deployments: read|write + # repository-projects: read|write + + steps: + - uses: actions/checkout@v3 + + - name: Setup Flutter SDK + uses: flutter-actions/setup-flutter@v2 + with: + channel: 'stable' + version: 3.3.13 + + - name: Clearing project + run: flutter clean + + - name: Install dependencies + run: flutter pub upgrade + + - name: Analyze project + run: flutter analyze + + # Your project will need to have tests in test/ and a dependency on + # package:test for this step to succeed. Note that Flutter projects will + # want to change this to 'flutter test'. + - name: Run tests + run: flutter test + + - name: Update version number in the pubspec.yaml + run: | + echo "old version: " + echo "new version: ${{ github.run_number }}" + sed -i -r "s/^(version:\s+[0-9]+\.[0-9]+\.)[0-9]+\s*$/\1${{ github.run_number }}/g" ./pubspec.yaml + + - name: Commit new version (0.0.${{ github.run_number }}) + run: | + echo "on repositiry: ${{ github.repository }}" + git config --global user.name 'anton.lobanov' + git config --global user.email 'lobanov.anton@gmail.com' + git remote set-url origin https://a-givertzman:${{ secrets.RELEASES_TOKEN }}@github.com/${{ github.repository }} + git commit -am "Automated version update to 0.0.${{ github.run_number }}" + # git push + + - name: Push to protected branch "master" + uses: CasperWA/push-protected@v2 + with: + token: ${{ secrets.RELEASES_TOKEN }} + branch: master + unprotect_reviews: true + + # - name: Zip artifact for deployment + # run: zip ./build/linux/x64/release/bundle/release.zip ./build/linux/x64/release/bundle/* -r + + - name: Publish release + uses: ncipollo/release-action@v1 + with: + # artifacts: "./build/linux/x64/release/bundle/release.zip" + tag: internal_v0.0.${{ github.run_number }} + token: ${{ secrets.RELEASES_TOKEN }} + + # - name: Show downloads + # uses: actions/upload-artifact@v3 + # id: download + # with: + # name: build-for-linux + # path: "./build/linux/x64/release/bundle" + + # - name: Display structure of downloaded files + # run: ls -R + # working-directory: "./build/linux/x64/release/bundle" diff --git a/.metadata b/.metadata index 7d21057..706ff77 100644 --- a/.metadata +++ b/.metadata @@ -4,8 +4,8 @@ # This file should be version controlled and should not be manually edited. version: - revision: "b12d86157e38a6c15b5a7ec32605aa42ebcd831d" - channel: "master" + revision: "603104015dd692ea3403755b55d07813d5cf8965" + channel: "stable" project_type: app @@ -13,26 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - base_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 - platform: android - create_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - base_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - - platform: ios - create_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - base_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - - platform: linux - create_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - base_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - - platform: macos - create_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - base_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - - platform: web - create_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - base_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - - platform: windows - create_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d - base_revision: b12d86157e38a6c15b5a7ec32605aa42ebcd831d + create_revision: 603104015dd692ea3403755b55d07813d5cf8965 + base_revision: 603104015dd692ea3403755b55d07813d5cf8965 # User provided section diff --git a/android/app/build.gradle b/android/app/build.gradle index b65fc22..9604dd8 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -7,16 +7,16 @@ plugins { android { namespace = "com.antonlobanovco.flowersapp.flowers_app" - compileSdk = flutter.compileSdkVersion - ndkVersion = flutter.ndkVersion + compileSdkVersion = 34 + ndkVersion = ndkVersion compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_17 + targetCompatibility = JavaVersion.VERSION_17 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_17 } defaultConfig { @@ -37,8 +37,14 @@ android { signingConfig = signingConfigs.debug } } + buildToolsVersion '34.0.0' } flutter { source = "../.." } +dependencies { + // ... + implementation("com.google.android.material:material:1.12.0") + // ... +} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index a9b7df7..410e77c 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/android/app/src/main/kotlin/com/antonlobanovco/flowersapp/flowers_app/MainActivity.kt b/android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt similarity index 64% rename from android/app/src/main/kotlin/com/antonlobanovco/flowersapp/flowers_app/MainActivity.kt rename to android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt index 7e7933a..e7583e5 100644 --- a/android/app/src/main/kotlin/com/antonlobanovco/flowersapp/flowers_app/MainActivity.kt +++ b/android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt @@ -1,4 +1,4 @@ -package com.antonlobanovco.flowersapp.flowers_app +package com.example.flowers_app import io.flutter.embedding.android.FlutterActivity diff --git a/android/build.gradle b/android/build.gradle index d2ffbff..956916e 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,3 +1,8 @@ +ext { + compileSdkVersion = 34 + ndkVersion = "26.3.11579264" +// ndkVersion = flutter.ndkVersion +} allprojects { repositories { google() diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6..348c409 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip diff --git a/android/settings.gradle b/android/settings.gradle index b9e43bd..6990444 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -18,7 +18,7 @@ pluginManagement { plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "8.1.0" apply false + id "com.android.application" version '8.7.1' apply false id "org.jetbrains.kotlin.android" version "1.8.22" apply false } diff --git a/assets/settings/app-settings.json b/assets/settings/app-settings.json index 64b1a05..4c41f52 100644 --- a/assets/settings/app-settings.json +++ b/assets/settings/app-settings.json @@ -1,8 +1,8 @@ { "api-host-commented": "127.0.0.1", - "api-host": "172.20.10.4", + "api-host": "172.20.10.6", "api-host-commented1": "192.168.8.192", "api-port": 8080, "api-auth-token": "flowers-app-api-auth-token", - "api-database": "flowers_app_server" + "api-database": "flowers_app" } \ No newline at end of file diff --git a/lib/domain/auth/register_user.dart b/lib/domain/auth/register_user.dart index d2f962e..ecac091 100644 --- a/lib/domain/auth/register_user.dart +++ b/lib/domain/auth/register_user.dart @@ -59,7 +59,7 @@ class RegisterUser { return Sql(sql: """ insert into public.customer as cu ('role', email, phone, 'name', 'location', 'login', pass, account, last_act, blocked) values (${params?.role}, ${params?.email}, ${params?.phone}, ${params?.name}, _${params?.location}, ${params?.login}, ${params?.pass}, ${params?.account}, ${params?.lastAct}, ${params?.blocked}) - on conflict (customer_id, purchase_content_id) do update + on conflict (customer_id, purchase_item_id) do update set role = _role, set email = _email, set phone = _phone, diff --git a/lib/domain/notice/notice.dart b/lib/domain/notice/notice.dart index d732a6b..48f4e8f 100644 --- a/lib/domain/notice/notice.dart +++ b/lib/domain/notice/notice.dart @@ -9,14 +9,14 @@ class NoticeSqlParams { final String? id; final String? customerId; final String? purchaseId; - final String? purchaseContentId; + final String? purchaseItemId; /// /// NoticeSqlParams({ this.id, this.customerId, this.purchaseId, - this.purchaseContentId, + this.purchaseItemId, }); } /// @@ -26,7 +26,7 @@ typedef NoticeSqlAccess = SqlAccess, NoticeSqlParams>; /// Contains an information about the Notice message /// - [customerId] - Author of the [Notice] /// - [purchaseId] - If notice refers to the whole Purchase, not to exact position -/// - [purchaseContentId] - If notice refers to single position of the Purchase, purchase_id - not required +/// - [purchaseItemId] - If notice refers to single position of the Purchase, purchase_id - not required /// - [title] - Title of the notice /// - [body] - Text of the notice class Notice { @@ -34,7 +34,7 @@ class Notice { late String id = ''; late String customerId = ''; late String purchaseId = ''; - late String purchaseContentId = ''; + late String purchaseItemId = ''; late String title = ''; late String body = ''; late String created = ''; @@ -59,12 +59,12 @@ class Notice { return Sql(sql: "select * from notice where id = ${params?.id};"); } else if (params?.customerId != null && params?.purchaseId != null) { return Sql(sql: "select * from notice where customer_id = ${params?.customerId} and purchase_id = ${params?.purchaseId};"); - } else if (params?.customerId != null && params?.purchaseContentId != null) { - return Sql(sql: "select * from notice where customer_id = ${params?.customerId} and purchase_content_id = ${params?.purchaseContentId};"); + } else if (params?.customerId != null && params?.purchaseItemId != null) { + return Sql(sql: "select * from notice where customer_id = ${params?.customerId} and purchase_item_id = ${params?.purchaseItemId};"); } else if (params?.purchaseId != null) { return Sql(sql: "select * from notice where purchase_id = ${params?.purchaseId};"); - } else if (params?.purchaseContentId != null) { - return Sql(sql: "select * from notice where purchase_content_id = ${params?.purchaseContentId};"); + } else if (params?.purchaseItemId != null) { + return Sql(sql: "select * from notice where purchase_item_id = ${params?.purchaseItemId};"); } return Sql(sql: "select * from notice where id = ${params?.id};"); }, @@ -112,7 +112,7 @@ class Notice { id = '${row['id']}'; customerId = '${row['customer_id']}'; purchaseId = '${row['purchase_id']}'; - purchaseContentId = '${row['purchase_content_id']}'; + purchaseItemId = '${row['purchase_item_id']}'; title = '${row['title']}'; body = '${row['body']}'; created = '${row['created']}'; diff --git a/lib/domain/notice/notice_list.dart b/lib/domain/notice/notice_list.dart index 6c34715..c799eac 100644 --- a/lib/domain/notice/notice_list.dart +++ b/lib/domain/notice/notice_list.dart @@ -12,13 +12,13 @@ import 'package:hmi_core/hmi_core_result_new.dart'; class NoticeListSqlParams { final String? customerId; final String? purchaseId; - final String? purchaseContentId; + final String? purchaseItemId; /// /// const NoticeListSqlParams({ this.customerId, this.purchaseId, - this.purchaseContentId, + this.purchaseItemId, }); } /// @@ -50,8 +50,8 @@ class NoticeList { authToken: const Setting('api-auth-token').toString(), database: const Setting('api-database').toString(), sqlBuilder: (sql, params) { - if (params?.purchaseContentId != null) { - return Sql(sql: "select * from notice where purchase_content_id = ${params?.purchaseContentId} order by id;"); + if (params?.purchaseItemId != null) { + return Sql(sql: "select * from notice where purchase_item_id = ${params?.purchaseItemId} order by id;"); } else { return Sql(sql: "select * from notice order by id;"); } @@ -69,8 +69,8 @@ class NoticeList { bool isEmpty() => _isEmpty; /// /// Returns Notice's - /// - all notices if params.purchaseContentId = null - /// - notices relevant to the purchase_content if params.purchaseContentId specified + /// - all notices if params.purchaseItemId = null + /// - notices relevant to the purchase_item if params.purchaseItemId specified Future> refresh(NoticeListSqlParams params) => _fetch(params); /// /// @@ -160,7 +160,7 @@ class NoticeList { return _awaitReading(NoticeListSqlParams( customerId: (fieldName == 'customer_id') ? value : null, purchaseId: (fieldName == 'purchase_id') ? value : null, - purchaseContentId: (fieldName == 'purchase_content_id') ? value : null, + purchaseItemId: (fieldName == 'purchase_item_id') ? value : null, ),) .then((_) { return _findNewNotice( @@ -180,8 +180,8 @@ class NoticeList { return notice.id == value; } else if (fieldName == 'purchase_id') { return notice.purchaseId == value; - } else if (fieldName == 'purchase_content_id') { - return notice.purchaseContentId == value; + } else if (fieldName == 'purchase_item_id') { + return notice.purchaseItemId == value; } else { _log.error("$NoticeList._validateByFieldName | Notice list can't be filterd by field: $fieldName, not implemented"); return false; @@ -211,7 +211,7 @@ class NoticeList { return _awaitReading(NoticeListSqlParams( customerId: (fieldName == 'customer_id') ? value : null, purchaseId: (fieldName == 'purchase_id') ? value : null, - purchaseContentId: (fieldName == 'purchase_content_id') ? value : null, + purchaseItemId: (fieldName == 'purchase_item_id') ? value : null, ),) .then((_) { _log.debug('$NoticeList.last | try to find Notice (field: $fieldName\tvalue: $value)'); diff --git a/lib/domain/notice/notice_list_viewed.dart b/lib/domain/notice/notice_list_viewed.dart index 9ba6add..9546aad 100644 --- a/lib/domain/notice/notice_list_viewed.dart +++ b/lib/domain/notice/notice_list_viewed.dart @@ -41,16 +41,16 @@ class NoticeListViewed { /// /// Метод сохраняет noticeId в список просмотренных в localStorage /// noticeId - идентификатор, хранящийся в localStorage - /// purchaseContentId - идентификатор группы, в которую попадет noticeId + /// purchaseItemId - идентификатор группы, в которую попадет noticeId Future setViewed({ required String noticeId, - required String purchaseContentId, + required String purchaseItemId, }) { _log.debug('.setViewed | trying to find Notice (id: $noticeId)'); return _awaitReading() .then((_) { - if (!_containsInGroup(map: _map, groupId: purchaseContentId, id: noticeId)) { - _map.update(purchaseContentId, + if (!_containsInGroup(map: _map, groupId: purchaseItemId, id: noticeId)) { + _map.update(purchaseItemId, (listOfId) { listOfId.add(noticeId); return listOfId; @@ -151,7 +151,7 @@ class NoticeListViewed { /// /// Вернет true если Notice с указанным /// noticeId - /// purchaseContentId + /// purchaseItemId /// имеется в списке просмотренных Future contains({ required String noticeId, @@ -175,16 +175,16 @@ class NoticeListViewed { /// /// Вернет true если Notice с указанными /// noticeId - /// purchaseContentId + /// purchaseItemId /// имеется в списке просмотренных Future containsInGroup({ required String noticeId, - required String purchaseContentId, + required String purchaseItemId, }) { - _log.debug('.containsInGroup | trying to find Notice (id: $noticeId, purchaseContentId: $purchaseContentId)'); + _log.debug('.containsInGroup | trying to find Notice (id: $noticeId, purchaseItemId: $purchaseItemId)'); return _awaitReading() .then((_) { - return _containsInGroup(map: _map, groupId: purchaseContentId, id: noticeId); + return _containsInGroup(map: _map, groupId: purchaseItemId, id: noticeId); }); } /// @@ -215,7 +215,7 @@ class NoticeListViewed { /// /// вернет путь в localStorage для просмотренного notice /// или пустую строку '' если пуст хотя бы один из - /// параметров 'customer_id' или 'purchase_content_id' + /// параметров 'customer_id' или 'purchase_item_id' String localStorageViewedNoticePath(String customerId) { return 'viewedNotice:user:$customerId'; } diff --git a/lib/domain/order/order.dart b/lib/domain/order/order.dart index d53eab9..da086d0 100644 --- a/lib/domain/order/order.dart +++ b/lib/domain/order/order.dart @@ -15,14 +15,14 @@ class OrderSqlParams { final String? id; /// customer_order.customerId final String? customerId; - /// customer_order.purchase_content_id - final String? purchaseContentId; + /// customer_order.purchase_item_id + final String? purchaseItemId; /// customer_order.count final String? count; const OrderSqlParams({ this.id, this.customerId, - this.purchaseContentId, + this.purchaseItemId, this.count, }); } @@ -54,11 +54,11 @@ class Order { late String purchase_id = ''; late String purchase_name = ''; late String purchase_details = ''; - late String purchase_content_id = ''; - late String purchase_content_sale_price = ''; // цена за единицу - late String purchase_content_sale_currency = ''; // валюта - late String purchase_content_shipping = ''; // доставка за единицу - late PurchaseStatus purchase_content_status = PurchaseStatus.notCampled(); // статус позиции + late String purchase_item_id = ''; + late String purchase_item_sale_price = ''; // цена за единицу + late String purchase_item_sale_currency = ''; // валюта + late String purchase_item_shipping = ''; // доставка за единицу + late PurchaseStatus purchase_item_status = PurchaseStatus.notCampled(); // статус позиции late String created = ''; late String updated = ''; late String deleted = ''; @@ -79,12 +79,12 @@ class Order { authToken: const Setting('api-auth-token').toString(), database: const Setting('api-database').toString(), sqlBuilder: (sql, params) { - if (params?.customerId != null && params?.purchaseContentId != null) { - _log.debug(".sqlBuilder | Selecting by customer_id: ${params?.customerId} and purchase_content_id: ${params?.purchaseContentId}"); + if (params?.customerId != null && params?.purchaseItemId != null) { + _log.debug(".sqlBuilder | Selecting by customer_id: ${params?.customerId} and purchase_item_id: ${params?.purchaseItemId}"); return Sql(sql: """ SELECT cord.id, cord.customer_id, - cord.purchase_content_id, + cord.purchase_item_id, cord.count, cord.paid, cord.distributed, @@ -99,11 +99,11 @@ class Order { pu.name AS purchase FROM customer_order cord JOIN customer cu ON cord.customer_id = cu.id - JOIN purchase_content puc ON cord.purchase_content_id = puc.id + JOIN purchase_item puc ON cord.purchase_item_id = puc.id JOIN purchase pu ON puc.purchase_id = pu.id JOIN product p ON puc.product_id = p.id where cord.customer_id = ${params?.customerId} - and cord.purchase_content_id = ${params?.purchaseContentId}; + and cord.purchase_item_id = ${params?.purchaseItemId}; """,); } final selfId = (params?.id != null) @@ -113,7 +113,7 @@ class Order { return Sql(sql: """ SELECT cord.id, cord.customer_id, - cord.purchase_content_id, + cord.purchase_item_id, cord.count, cord.paid, cord.distributed, @@ -128,7 +128,7 @@ class Order { pu.name AS purchase FROM customer_order cord JOIN customer cu ON cord.customer_id = cu.id - JOIN purchase_content puc ON cord.purchase_content_id = puc.id + JOIN purchase_item puc ON cord.purchase_item_id = puc.id JOIN purchase pu ON puc.purchase_id = pu.id JOIN product p ON puc.product_id = p.id where cord.id = $selfId; @@ -154,14 +154,14 @@ class Order { double getCost() => double.parse(cost); /// /// Returns Shipping as double - double getShipping() => double.parse(purchase_content_shipping) * count; + double getShipping() => double.parse(purchase_item_shipping) * count; /// /// Removing order from the database Future, Failure>> remove(BuildContext context) { _log.debug('Order.remove | loading...'); // final product = PurchaseItem( // userId: customer_id, - // purchaseContentId: purchase_content_id, + // purchaseItemId: purchase_item_id, // remote: dataSource.dataSet('purchase_product'), // ); // product.product_id = this.product_id; @@ -207,11 +207,11 @@ class Order { purchase_id = '${row['purchase_id']}'; purchase_name = '${row['purchase_name']}'; purchase_details = '${row['purchase_details']}'; - purchase_content_id = '${row['purchase_content_id']}'; - purchase_content_sale_price = '${row['purchase_content_sale_price']}'; // цена за единицу - purchase_content_sale_currency = '${row['purchase_content_sale_currency']}'; // валюта - purchase_content_shipping = '${row['purchase_content_shipping']}'; // доставка за единицу - purchase_content_status = PurchaseStatus(status: '${row['purchase_content_status']}'); // статус позиции + purchase_item_id = '${row['purchase_item_id']}'; + purchase_item_sale_price = '${row['purchase_item_sale_price']}'; // цена за единицу + purchase_item_sale_currency = '${row['purchase_item_sale_currency']}'; // валюта + purchase_item_shipping = '${row['purchase_item_shipping']}'; // доставка за единицу + purchase_item_status = PurchaseStatus(status: '${row['purchase_item_status']}'); // статус позиции created = '${row['created']}'; updated = '${row['updated']}'; deleted = '${row['deleted']}'; @@ -317,6 +317,6 @@ class Order { Future, Failure>> setOrder({required int count}) { return PurchaseSetOrder( customerId: customer_id, - ).send('$count', purchase_content_id); + ).send('$count', purchase_item_id); } } diff --git a/lib/domain/purchase/purchase_content.dart b/lib/domain/purchase/purchase_content.dart index 2f1ec52..202216f 100644 --- a/lib/domain/purchase/purchase_content.dart +++ b/lib/domain/purchase/purchase_content.dart @@ -9,11 +9,11 @@ import 'package:hmi_core/hmi_core_result_new.dart'; class PurchaseContentSqlParams { final String? customerId; final String? purchaseId; - final String? purchaseContentId; + final String? purchaseItemId; PurchaseContentSqlParams({ this.customerId, this.purchaseId, - this.purchaseContentId, + this.purchaseItemId, }); } /// @@ -39,7 +39,7 @@ class PurchaseContent { authToken: const Setting('api-auth-token').toString(), database: const Setting('api-database').toString(), sqlBuilder: (sql, params) { - return Sql(sql: 'select * from purchase_content_view where purchase_id = ${params?.purchaseId};'); + return Sql(sql: 'select * from purchase_item_view where purchase_id = ${params?.purchaseId};'); }, entryBuilder: (row) { return row; diff --git a/lib/domain/purchase/purchase_item.dart b/lib/domain/purchase/purchase_item.dart index 56ce8ea..9e4d4e8 100644 --- a/lib/domain/purchase/purchase_item.dart +++ b/lib/domain/purchase/purchase_item.dart @@ -21,7 +21,7 @@ typedef PurchaseitemSqlAccess = SqlAccess, PurchaseItemSqlP /// Item of the PurchaseContent class PurchaseItem { static const _log = Log('PurchaseItem'); - /// purchase_content -> id + /// purchase_item -> id late String id = ''; late String purchase_id = ''; late String product_id = ''; @@ -60,13 +60,13 @@ class PurchaseItem { if (params?.id != null) { if (params?.purchaseId != null) { _log.debug('.sqlBuilder | Building SQL with id: ${params?.id}, purchase_id: ${params?.purchaseId}'); - return Sql(sql: "select * from purchase_content_view where id = ${params?.id} and pirchase_id = ${params?.purchaseId};"); + return Sql(sql: "select * from purchase_item_view where id = ${params?.id} and pirchase_id = ${params?.purchaseId};"); } _log.debug('.sqlBuilder | Building SQL with id: ${params?.id}'); - return Sql(sql: "select * from purchase_content_view where id = ${params?.id};"); + return Sql(sql: "select * from purchase_item_view where id = ${params?.id};"); } _log.debug('.sqlBuilder | Building SQL with id: $id'); - return Sql(sql: "select * from purchase_content_view where id = $id;"); + return Sql(sql: "select * from purchase_item_view where id = $id;"); }, entryBuilder: (row) { return row; @@ -140,7 +140,7 @@ class PurchaseItem { return _fromRow(row); } else { _valid = false; - return Err(Failure(message: 'PurchaseItem.fetch | Error: PurchaseItem with purchase_content_id: ${params.id}, purchase_id: ${params.purchaseId} - Not found', stackTrace: StackTrace.current)); + return Err(Failure(message: 'PurchaseItem.fetch | Error: PurchaseItem with purchase_item_id: ${params.id}, purchase_id: ${params.purchaseId} - Not found', stackTrace: StackTrace.current)); } case Err(:final error): _log.warning('.fetch | Error: $error'); diff --git a/lib/domain/purchase/purchase_set_order.dart b/lib/domain/purchase/purchase_set_order.dart index c0b1030..197110c 100644 --- a/lib/domain/purchase/purchase_set_order.dart +++ b/lib/domain/purchase/purchase_set_order.dart @@ -20,7 +20,7 @@ class PurchaseSetOrder { authToken: const Setting('api-auth-token').toString(), database: const Setting('api-database').toString(), sqlBuilder: (sql, params) { - return Sql(sql: 'select * from set_order($customerId, ${params?.purchaseContentId}, ${params?.count});'); + return Sql(sql: 'select * from set_order($customerId, ${params?.purchaseItemId}, ${params?.count});'); }, entryBuilder: (row) { return row; @@ -30,11 +30,11 @@ class PurchaseSetOrder { /// Inserting the new Order or updating if already exists Future, Failure>> send( String count, - String purchaseContentId, + String purchaseItemId, ) async { return _remote.fetch( params: OrderSqlParams( - purchaseContentId: purchaseContentId, + purchaseItemId: purchaseItemId, count: count, ), ) diff --git a/lib/presentation/notice/notice_overview_page.dart b/lib/presentation/notice/notice_overview_page.dart index 87e2e27..2863b3c 100644 --- a/lib/presentation/notice/notice_overview_page.dart +++ b/lib/presentation/notice/notice_overview_page.dart @@ -42,7 +42,7 @@ class NoticeOverviewPage extends StatelessWidget { ), body: NoticeOverviewBody( // user: user, - purchaseContentId: product.id, + purchaseItemId: product.id, noticeList: _noticeList, enableUserMessage: false, noticeListViewed: _noticeListViewed, diff --git a/lib/presentation/notice/widgets/notice_card.dart b/lib/presentation/notice/widgets/notice_card.dart index 1e2f9cc..da4873d 100644 --- a/lib/presentation/notice/widgets/notice_card.dart +++ b/lib/presentation/notice/widgets/notice_card.dart @@ -48,7 +48,7 @@ class _NoticeCardState extends State { if (info.visibleFraction == 1) { widget.noticeListViewed.setViewed( noticeId: notice.id, - purchaseContentId: notice.purchaseContentId, + purchaseItemId: notice.purchaseItemId, ); } }, diff --git a/lib/presentation/notice/widgets/notice_overview_body.dart b/lib/presentation/notice/widgets/notice_overview_body.dart index 8c947a3..47fcaa7 100644 --- a/lib/presentation/notice/widgets/notice_overview_body.dart +++ b/lib/presentation/notice/widgets/notice_overview_body.dart @@ -14,13 +14,13 @@ class NoticeOverviewBody extends StatelessWidget { static const _debug = false; final bool enableUserMessage; final NoticeList noticeList; - final String purchaseContentId; + final String purchaseItemId; final NoticeListViewed _noticeListViewed; /// /// const NoticeOverviewBody({ super.key, - required this.purchaseContentId, + required this.purchaseItemId, required this.noticeList, required this.enableUserMessage, required NoticeListViewed noticeListViewed, @@ -31,11 +31,11 @@ class NoticeOverviewBody extends StatelessWidget { @override Widget build(BuildContext context) { return FutureBuilder>( - future: noticeList.refresh(NoticeListSqlParams(purchaseContentId: purchaseContentId)), + future: noticeList.refresh(NoticeListSqlParams(purchaseItemId: purchaseItemId)), builder:(context, snapshot) { return RefreshIndicator( displacement: 20.0, - onRefresh: () => noticeList.refresh(NoticeListSqlParams(purchaseContentId: purchaseContentId)), + onRefresh: () => noticeList.refresh(NoticeListSqlParams(purchaseItemId: purchaseItemId)), child: _buildListViewWidget(context, snapshot), ); },); @@ -51,7 +51,7 @@ class NoticeOverviewBody extends StatelessWidget { log(_debug, '[$NoticeOverviewBody._buildListView] snapshot hasError'); return CriticalErrorWidget( message: snapshot.error.toString(), - refresh: () => noticeList.refresh(NoticeListSqlParams(purchaseContentId: purchaseContentId)), + refresh: () => noticeList.refresh(NoticeListSqlParams(purchaseItemId: purchaseItemId)), ); } else if (snapshot.hasData) { log(_debug, '[$NoticeOverviewBody._buildListView] snapshot hasData'); diff --git a/lib/presentation/product/widgets/product_body.dart b/lib/presentation/product/widgets/product_body.dart index 838f45c..f76b2d2 100644 --- a/lib/presentation/product/widgets/product_body.dart +++ b/lib/presentation/product/widgets/product_body.dart @@ -39,7 +39,7 @@ class ProductBody extends StatelessWidget { noticeList: notices, noticeListViewed: _noticeListViewed, hasNotRead: notices.hasNew( - fieldName: 'purchase_content_id', + fieldName: 'purchase_item_id', value: purchaseItem.id, ), ); diff --git a/lib/presentation/product/widgets/product_card_with_notices.dart b/lib/presentation/product/widgets/product_card_with_notices.dart index ee6e369..a3c3404 100644 --- a/lib/presentation/product/widgets/product_card_with_notices.dart +++ b/lib/presentation/product/widgets/product_card_with_notices.dart @@ -63,7 +63,7 @@ class _ProductCardWithNoticesState extends State { widget ._noticeList .last( - fieldName: 'purchase_content_id', + fieldName: 'purchase_item_id', value: widget.purchaseItem.id, ) .then((value) { @@ -236,7 +236,7 @@ class _ProductCardWithNoticesState extends State { padding: const EdgeInsets.only(left: 16.0, top: 16.0, right: 16.0, bottom: 16,), child: NoticeOverviewBody( // user: user, - purchaseContentId: product.id, + purchaseItemId: product.id, noticeList: widget._noticeList, enableUserMessage: false, noticeListViewed: widget.noticeListViewed, diff --git a/lib/presentation/product/widgets/set_order_widget.dart b/lib/presentation/product/widgets/set_order_widget.dart index c64c63d..15ab615 100644 --- a/lib/presentation/product/widgets/set_order_widget.dart +++ b/lib/presentation/product/widgets/set_order_widget.dart @@ -47,7 +47,7 @@ class _SetOrderWidgetState extends State { setState(() { _isLoadingOrderCount = true; }); - _order.fetch(params: OrderSqlParams(customerId: widget.customerId, purchaseContentId: widget.product.id)).then((result) { + _order.fetch(params: OrderSqlParams(customerId: widget.customerId, purchaseItemId: widget.product.id)).then((result) { switch (result) { case Ok(value :final order): setState(() { diff --git a/lib/presentation/purchase/purchase_content/purchase_content_page.dart b/lib/presentation/purchase/purchase_item/purchase_item_page.dart similarity index 85% rename from lib/presentation/purchase/purchase_content/purchase_content_page.dart rename to lib/presentation/purchase/purchase_item/purchase_item_page.dart index d0a6b04..47f66d5 100644 --- a/lib/presentation/purchase/purchase_content/purchase_content_page.dart +++ b/lib/presentation/purchase/purchase_item/purchase_item_page.dart @@ -2,14 +2,15 @@ import 'package:flowers_app/domain/auth/app_user.dart'; import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; import 'package:flowers_app/domain/purchase/purchase.dart'; import 'package:flowers_app/domain/purchase/purchase_content.dart'; -import 'package:flowers_app/presentation/purchase/purchase_content/widgets/purchase_content_body.dart'; +import 'package:flowers_app/presentation/purchase/purchase_item/widgets/purchase_item_body.dart'; import 'package:flutter/material.dart'; - -class PurchaseContentPage extends StatelessWidget { +/// +/// +class PurchaseItemPage extends StatelessWidget { final AppUser user; final Purchase purchase; final NoticeListViewed _noticeListViewed; - const PurchaseContentPage({ + const PurchaseItemPage({ super.key, required this.user, required this.purchase, @@ -37,7 +38,7 @@ class PurchaseContentPage extends StatelessWidget { automaticallyImplyLeading: false, ), body: Center( - child: PurchaseContentBody( + child: PurchaseItemBody( user: user, purchaseContent: PurchaseContent(purchaseId: purchase.id), noticeListViewed: _noticeListViewed, diff --git a/lib/presentation/purchase/purchase_content/widgets/purchase_content_body.dart b/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart similarity index 92% rename from lib/presentation/purchase/purchase_content/widgets/purchase_content_body.dart rename to lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart index 8f40d69..0798571 100644 --- a/lib/presentation/purchase/purchase_content/widgets/purchase_content_body.dart +++ b/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart @@ -4,7 +4,7 @@ import 'package:flowers_app/domain/purchase/purchase_content.dart'; import 'package:flowers_app/domain/purchase/purchase_item.dart'; import 'package:flowers_app/presentation/core/widgets/critical_error_widget.dart'; import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; -import 'package:flowers_app/presentation/purchase/purchase_content/widgets/purchase_content_card.dart'; +import 'package:flowers_app/presentation/purchase/purchase_item/widgets/purchase_item_card.dart'; import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; @@ -12,12 +12,12 @@ import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result_new.dart'; /// /// The list of PurchaseItem's -class PurchaseContentBody extends StatelessWidget { - static const _log = Log('PurchaseContentBody'); +class PurchaseItemBody extends StatelessWidget { + static const _log = Log('PurchaseItemBody'); final AppUser _user; final PurchaseContent purchaseContent; final NoticeListViewed _noticeListViewed; - const PurchaseContentBody({ + const PurchaseItemBody({ super.key, required AppUser user, required this.purchaseContent, @@ -66,7 +66,7 @@ class PurchaseContentBody extends StatelessWidget { itemBuilder: (context, index) { final product = products[index]; if (product.valid) { - return PurchaseContentCard( + return PurchaseItemCard( user: _user, purchaseItem: product, noticeListViewed: _noticeListViewed, diff --git a/lib/presentation/purchase/purchase_content/widgets/purchase_content_card.dart b/lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart similarity index 97% rename from lib/presentation/purchase/purchase_content/widgets/purchase_content_card.dart rename to lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart index ed8347c..94e975b 100644 --- a/lib/presentation/purchase/purchase_content/widgets/purchase_content_card.dart +++ b/lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart @@ -10,15 +10,15 @@ import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; /// /// -class PurchaseContentCard extends StatelessWidget { - static const _log = Log('PurchaseContentCard'); +class PurchaseItemCard extends StatelessWidget { + static const _log = Log('PurchaseItemCard'); final AppUser _user; final PurchaseItem purchaseItem; final NoticeList _noticeList; final NoticeListViewed _noticeListViewed; /// /// - PurchaseContentCard({ + PurchaseItemCard({ super.key, required AppUser user, required this.purchaseItem, diff --git a/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart b/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart index bcbcd7a..fd1de3f 100644 --- a/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart +++ b/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart @@ -3,7 +3,7 @@ import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; import 'package:flowers_app/domain/purchase/purchase.dart'; import 'package:flowers_app/domain/purchase/purchase_status.dart'; import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/purchase/purchase_content/purchase_content_page.dart'; +import 'package:flowers_app/presentation/purchase/purchase_item/purchase_item_page.dart'; import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/purchase_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; @@ -50,7 +50,7 @@ class _PurchaseCardState extends State { onTap: () { Navigator.of(context).push( MaterialPageRoute( - builder: (context) => PurchaseContentPage( + builder: (context) => PurchaseItemPage( user: widget.user, purchase: widget.purchase, noticeListViewed: _noticeListViewed, diff --git a/lib/presentation/user_account/widgets/order_card.dart b/lib/presentation/user_account/widgets/order_card.dart index 44560fc..e84895e 100644 --- a/lib/presentation/user_account/widgets/order_card.dart +++ b/lib/presentation/user_account/widgets/order_card.dart @@ -77,11 +77,11 @@ class _OrderCardState extends State { return InkWell( onTap: () { final product = PurchaseItem( - id: order.purchase_content_id, + id: order.purchase_item_id, ); product.product_name = order.product_name; product.purchase_id = order.purchase_id; - product.status = order.purchase_content_status; + product.status = order.purchase_item_status; Navigator.of(context).push( MaterialPageRoute( builder: (context) => ProductPage( @@ -187,7 +187,7 @@ class _OrderCardState extends State { left: 12.0, ), child: Text( - order.purchase_content_status.text(), + order.purchase_item_status.text(), ), ), Expanded( @@ -207,7 +207,7 @@ class _OrderCardState extends State { ), const SizedBox(height: 8,), Text( - '${order.count}x(${order.purchase_content_sale_price} + ${order.purchase_content_shipping})', + '${order.count}x(${order.purchase_item_sale_price} + ${order.purchase_item_shipping})', style: appThemeData.textTheme.bodySmall, ), ], diff --git a/lib/presentation/user_account/widgets/order_overview_body.dart b/lib/presentation/user_account/widgets/order_overview_body.dart index 0672ad2..8bcebb3 100644 --- a/lib/presentation/user_account/widgets/order_overview_body.dart +++ b/lib/presentation/user_account/widgets/order_overview_body.dart @@ -116,12 +116,12 @@ class OrderOverviewBody extends StatelessWidget { order: order, noticeList: _noticeList, lastNotice: _noticeList.last( - fieldName: 'purchase_content_id', - value: order.purchase_content_id, + fieldName: 'purchase_item_id', + value: order.purchase_item_id, ), hasNotRead: _noticeList.hasNew( - fieldName: 'purchase_content_id', - value: order.purchase_content_id, + fieldName: 'purchase_item_id', + value: order.purchase_item_id, ), noticeListViewed: _noticeListViewed, onRemoved: () => _refreshAllLists(), diff --git a/test/unit/notice_list_test.dart b/test/unit/notice_list_test.dart index 9f32556..c271a14 100644 --- a/test/unit/notice_list_test.dart +++ b/test/unit/notice_list_test.dart @@ -11,7 +11,7 @@ import 'package:shared_preferences/shared_preferences.dart'; void main() { SharedPreferences.setMockInitialValues({}); - const findLastNoticeByFieldName = 'purchase_content_id'; + const findLastNoticeByFieldName = 'purchase_item_id'; const findLastNoticeByFieldNameValue = '2'; const lastNoticeId = '4'; const customerId = '916'; @@ -47,7 +47,7 @@ void main() { expect(result, equals(true)); final contains = await noticeListViewed.containsInGroup( noticeId: lastNoticeId.toString(), - purchaseContentId: findLastNoticeByFieldNameValue, + purchaseItemId: findLastNoticeByFieldNameValue, ); expect(contains, equals(false)); }); @@ -55,12 +55,12 @@ void main() { test('NoticeListViewed.setViewed() test', () async { final result = await noticeListViewed.setViewed( noticeId: lastNoticeId.toString(), - purchaseContentId: findLastNoticeByFieldNameValue, + purchaseItemId: findLastNoticeByFieldNameValue, ); expect(result, equals(true)); final contains = await noticeListViewed.containsInGroup( noticeId: lastNoticeId.toString(), - purchaseContentId: findLastNoticeByFieldNameValue, + purchaseItemId: findLastNoticeByFieldNameValue, ); expect(contains, equals(true)); }); @@ -75,7 +75,7 @@ void main() { expect(last.isValid, equals(true), reason: 'last notice is empty'); expect(last.id.isNotEmpty, true, reason: "error reading last['id']"); expect(last.purchaseId.isNotEmpty, true, reason: "error reading last['purchase_id']"); - expect(last.purchaseContentId.isNotEmpty, true, reason: "error reading last['purchase_content_id']"); + expect(last.purchaseItemId.isNotEmpty, true, reason: "error reading last['purchase_item_id']"); expect(!last.isEmpty, true, reason: "error reading last['message']"); expect(last.created.isNotEmpty, true, reason: "error reading last['created']"); expect(last.updated.isNotEmpty, true, reason: "error reading last['updated']"); diff --git a/test/unit/notice_list_test.mocks.dart b/test/unit/notice_list_test.mocks.dart index 0bf3882..013701f 100644 --- a/test/unit/notice_list_test.mocks.dart +++ b/test/unit/notice_list_test.mocks.dart @@ -30,10 +30,10 @@ class MockNoticeListViewed extends _i1.Mock implements _i2.NoticeListViewed { (super.noSuchMethod(Invocation.method(#isEmpty, []), returnValue: false) as bool); @override - _i3.Future setViewed({String? noticeId, String? purchaseContentId}) => + _i3.Future setViewed({String? noticeId, String? purchaseItemId}) => (super.noSuchMethod( Invocation.method(#setViewed, [], - {#noticeId: noticeId, #purchaseContentId: purchaseContentId}), + {#noticeId: noticeId, #purchaseItemId: purchaseItemId}), returnValue: Future.value(false)) as _i3.Future); @override _i3.Future contains({String? noticeId}) => (super.noSuchMethod( @@ -41,10 +41,10 @@ class MockNoticeListViewed extends _i1.Mock implements _i2.NoticeListViewed { returnValue: Future.value(false)) as _i3.Future); @override _i3.Future containsInGroup( - {String? noticeId, String? purchaseContentId}) => + {String? noticeId, String? purchaseItemId}) => (super.noSuchMethod( Invocation.method(#containsInGroup, [], - {#noticeId: noticeId, #purchaseContentId: purchaseContentId}), + {#noticeId: noticeId, #purchaseItemId: purchaseItemId}), returnValue: Future.value(false)) as _i3.Future); @override String localStorageViewedNoticePath(String? customerId) => (super.noSuchMethod( diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..c669ad0 --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:flowers_app/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +} From 5f06f93ac9b9d11a815b5aebe023cd2579876246 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Wed, 6 Nov 2024 14:53:20 +0300 Subject: [PATCH 02/22] Depricated | hmi_core_result_new -> hmi_core_result --- .flutter-plugins-dependencies | 2 +- lib/domain/purchase/purchase_item.dart | 2 +- lib/main.dart | 4 ++-- .../auth/change_password/widgets/change_password_form.dart | 2 +- lib/presentation/product/widgets/set_order_widget.dart | 4 ++-- .../purchase/purchase_item/widgets/purchase_item_body.dart | 2 +- pubspec.yaml | 2 +- test/unit/notice_list_test.dart | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index ea274fa..bf8350f 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-10-28 21:09:48.760672","version":"3.24.4","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-11-06 14:51:13.482475","version":"3.24.4","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/lib/domain/purchase/purchase_item.dart b/lib/domain/purchase/purchase_item.dart index 9e4d4e8..7f96b78 100644 --- a/lib/domain/purchase/purchase_item.dart +++ b/lib/domain/purchase/purchase_item.dart @@ -3,7 +3,7 @@ import 'package:flowers_app/domain/purchase/purchase_status.dart'; import 'package:flowers_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// The SQL parameters for the PurchaseItem class PurchaseItemSqlParams { diff --git a/lib/main.dart b/lib/main.dart index e528b6a..d20296f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,9 +8,9 @@ import 'package:flowers_app/presentation/purchase/purchase_overview/purchase_ove import 'package:flowers_app/settings/app_settings.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; +import 'package:hmi_core/hmi_core_json.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/src/core/json/json_map.dart'; -import 'package:hmi_core/src/core/text_file.dart'; +import 'package:hmi_core/hmi_core_text_file.dart'; /// /// Application entry point void main() { diff --git a/lib/presentation/auth/change_password/widgets/change_password_form.dart b/lib/presentation/auth/change_password/widgets/change_password_form.dart index e50e06b..e12711f 100644 --- a/lib/presentation/auth/change_password/widgets/change_password_form.dart +++ b/lib/presentation/auth/change_password/widgets/change_password_form.dart @@ -11,7 +11,7 @@ import 'package:flowers_app/presentation/core/app_theme.dart'; import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/src/core/result_new/result.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class ChangePasswordForm extends StatefulWidget { diff --git a/lib/presentation/product/widgets/set_order_widget.dart b/lib/presentation/product/widgets/set_order_widget.dart index 15ab615..fc1d464 100644 --- a/lib/presentation/product/widgets/set_order_widget.dart +++ b/lib/presentation/product/widgets/set_order_widget.dart @@ -5,9 +5,9 @@ import 'package:flowers_app/presentation/core/widgets/button_with_loading_indica import 'package:flowers_app/presentation/core/widgets/count_button.dart'; import 'package:flowers_app/presentation/core/widgets/sized_progress_indicator.dart'; import 'package:flutter/material.dart'; +import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/src/core/error/failure.dart'; -import 'package:hmi_core/src/core/result_new/result.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class SetOrderWidget extends StatefulWidget { diff --git a/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart b/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart index 0798571..e59183c 100644 --- a/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart +++ b/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart @@ -9,7 +9,7 @@ import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/erro import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// The list of PurchaseItem's class PurchaseItemBody extends StatelessWidget { diff --git a/pubspec.yaml b/pubspec.yaml index 8dbaabc..9a32d1b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -32,7 +32,7 @@ dependencies: hmi_core: git: url: https://github.com/a-givertzman/hmi_core.git - ref: 2.0.0 + ref: 2.1.0 cupertino_icons: ^1.0.8 shared_preferences: ^2.3.2 visibility_detector: ^0.4.0+2 diff --git a/test/unit/notice_list_test.dart b/test/unit/notice_list_test.dart index c271a14..22ce617 100644 --- a/test/unit/notice_list_test.dart +++ b/test/unit/notice_list_test.dart @@ -4,9 +4,9 @@ import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; import 'package:flowers_app/settings/app_settings.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; +import 'package:hmi_core/hmi_core_json.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/src/core/json/json_map.dart'; -import 'package:hmi_core/src/core/text_file.dart'; +import 'package:hmi_core/hmi_core_text_file.dart'; import 'package:shared_preferences/shared_preferences.dart'; void main() { From d6a6fae3170783c37218be88d311c2065b4c6f83 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Thu, 7 Nov 2024 16:04:05 +0300 Subject: [PATCH 03/22] Depricated | hmi_core_result_new -> hmi_core_result --- .flutter-plugins-dependencies | 2 +- lib/domain/auth/app_user.dart | 2 +- lib/domain/auth/authenticate.dart | 2 +- lib/domain/auth/register_user.dart | 2 +- lib/domain/auth/test/test_user.dart | 2 +- lib/domain/notice/notice.dart | 2 +- lib/domain/notice/notice_list.dart | 2 +- lib/domain/order/order.dart | 2 +- lib/domain/order/order_list.dart | 2 +- lib/domain/purchase/purchase.dart | 2 +- lib/domain/purchase/purchase_content.dart | 2 +- lib/domain/purchase/purchase_list.dart | 2 +- lib/domain/purchase/purchase_list_filtered.dart | 2 +- lib/domain/purchase/purchase_set_order.dart | 2 +- .../auth/register_user/widgets/register_user_form.dart | 2 +- lib/presentation/auth/sign_in/widgets/sign_in_form.dart | 2 +- .../core/widgets/button_with_loading_indicator.dart | 2 +- .../purchase_overview/widgets/purchase_overview_body.dart | 2 +- lib/presentation/user_account/widgets/order_card.dart | 2 +- .../user_account/widgets/order_overview_body.dart | 2 +- lib/settings/app_settings.dart | 2 +- pubspec.yaml | 7 ++++--- 22 files changed, 25 insertions(+), 24 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index bf8350f..59178f1 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-11-06 14:51:13.482475","version":"3.24.4","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-11-07 16:03:06.349260","version":"3.24.4","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/lib/domain/auth/app_user.dart b/lib/domain/auth/app_user.dart index 19ec2a1..1a6e9cc 100644 --- a/lib/domain/auth/app_user.dart +++ b/lib/domain/auth/app_user.dart @@ -2,7 +2,7 @@ import 'package:ext_rw/ext_rw.dart'; import 'package:flowers_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// class AppUserSqlParams { final String? id; diff --git a/lib/domain/auth/authenticate.dart b/lib/domain/auth/authenticate.dart index 6c9fd73..a9cbb0d 100644 --- a/lib/domain/auth/authenticate.dart +++ b/lib/domain/auth/authenticate.dart @@ -4,7 +4,7 @@ import 'package:flowers_app/domain/auth/app_user.dart'; import 'package:flowers_app/domain/auth/auth_result.dart'; import 'package:flowers_app/domain/auth/user_phone.dart'; import 'package:flowers_app/domain/core/local_store/local_store.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// Auth user by phone number class Authenticate { diff --git a/lib/domain/auth/register_user.dart b/lib/domain/auth/register_user.dart index ecac091..79ade7d 100644 --- a/lib/domain/auth/register_user.dart +++ b/lib/domain/auth/register_user.dart @@ -3,7 +3,7 @@ import 'package:flowers_app/domain/auth/app_user.dart'; import 'package:flowers_app/domain/core/errors/failure.dart'; import 'package:flowers_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// Sql parameters used in the RegisterUserSqlAccess.sqlBuilder class RegisterUserSqlParams { diff --git a/lib/domain/auth/test/test_user.dart b/lib/domain/auth/test/test_user.dart index bd42641..d7168d1 100644 --- a/lib/domain/auth/test/test_user.dart +++ b/lib/domain/auth/test/test_user.dart @@ -3,7 +3,7 @@ import 'package:flowers_app/domain/auth/app_user.dart'; import 'package:flowers_app/domain/auth/auth_result.dart'; import 'package:flowers_app/domain/auth/user_phone.dart'; import 'package:flowers_app/domain/core/local_store/local_store.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// Future main(List args) async { diff --git a/lib/domain/notice/notice.dart b/lib/domain/notice/notice.dart index 48f4e8f..0e809bc 100644 --- a/lib/domain/notice/notice.dart +++ b/lib/domain/notice/notice.dart @@ -2,7 +2,7 @@ import 'package:ext_rw/ext_rw.dart'; import 'package:flowers_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class NoticeSqlParams { diff --git a/lib/domain/notice/notice_list.dart b/lib/domain/notice/notice_list.dart index c799eac..5a3289c 100644 --- a/lib/domain/notice/notice_list.dart +++ b/lib/domain/notice/notice_list.dart @@ -6,7 +6,7 @@ import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; import 'package:flowers_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// Container provides SQL query parameters for the [NoticeListSqlParams] class NoticeListSqlParams { diff --git a/lib/domain/order/order.dart b/lib/domain/order/order.dart index da086d0..8e8f300 100644 --- a/lib/domain/order/order.dart +++ b/lib/domain/order/order.dart @@ -7,7 +7,7 @@ import 'package:flowers_app/settings/setting.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// Container provides SQL query parameters for the [OrderSqlAccess] class OrderSqlParams { diff --git a/lib/domain/order/order_list.dart b/lib/domain/order/order_list.dart index 2face71..76e7110 100644 --- a/lib/domain/order/order_list.dart +++ b/lib/domain/order/order_list.dart @@ -3,7 +3,7 @@ import 'package:flowers_app/domain/order/order.dart'; import 'package:flowers_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// typedef OrderListSqlAccess = SqlAccess, void>; diff --git a/lib/domain/purchase/purchase.dart b/lib/domain/purchase/purchase.dart index 70ea71f..3530ea4 100644 --- a/lib/domain/purchase/purchase.dart +++ b/lib/domain/purchase/purchase.dart @@ -2,7 +2,7 @@ import 'package:ext_rw/ext_rw.dart'; import 'package:flowers_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// typedef PurchaseId = String; diff --git a/lib/domain/purchase/purchase_content.dart b/lib/domain/purchase/purchase_content.dart index 202216f..c02363c 100644 --- a/lib/domain/purchase/purchase_content.dart +++ b/lib/domain/purchase/purchase_content.dart @@ -3,7 +3,7 @@ import 'package:flowers_app/domain/purchase/purchase_item.dart'; import 'package:flowers_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class PurchaseContentSqlParams { diff --git a/lib/domain/purchase/purchase_list.dart b/lib/domain/purchase/purchase_list.dart index 8987eda..3db9ad0 100644 --- a/lib/domain/purchase/purchase_list.dart +++ b/lib/domain/purchase/purchase_list.dart @@ -3,7 +3,7 @@ import 'package:flowers_app/domain/purchase/purchase.dart'; import 'package:flowers_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// typedef PurchaseListSqlAccess = SqlAccess, void>; diff --git a/lib/domain/purchase/purchase_list_filtered.dart b/lib/domain/purchase/purchase_list_filtered.dart index 48a384f..471ae62 100644 --- a/lib/domain/purchase/purchase_list_filtered.dart +++ b/lib/domain/purchase/purchase_list_filtered.dart @@ -4,7 +4,7 @@ import 'package:flowers_app/domain/purchase/purchase.dart'; import 'package:flowers_app/domain/purchase/purchase_list.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// Класс реализует список элементов Purchase для PurchaseOverview /// Список закупок для отображения в катологе diff --git a/lib/domain/purchase/purchase_set_order.dart b/lib/domain/purchase/purchase_set_order.dart index 197110c..28ee6ff 100644 --- a/lib/domain/purchase/purchase_set_order.dart +++ b/lib/domain/purchase/purchase_set_order.dart @@ -3,7 +3,7 @@ import 'package:flowers_app/domain/order/order.dart'; import 'package:flowers_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class PurchaseSetOrder { diff --git a/lib/presentation/auth/register_user/widgets/register_user_form.dart b/lib/presentation/auth/register_user/widgets/register_user_form.dart index ea95108..44c6803 100644 --- a/lib/presentation/auth/register_user/widgets/register_user_form.dart +++ b/lib/presentation/auth/register_user/widgets/register_user_form.dart @@ -11,7 +11,7 @@ import 'package:flowers_app/presentation/core/app_theme.dart'; import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class RegisterUserForm extends StatefulWidget { diff --git a/lib/presentation/auth/sign_in/widgets/sign_in_form.dart b/lib/presentation/auth/sign_in/widgets/sign_in_form.dart index 8781b3f..1165067 100644 --- a/lib/presentation/auth/sign_in/widgets/sign_in_form.dart +++ b/lib/presentation/auth/sign_in/widgets/sign_in_form.dart @@ -12,7 +12,7 @@ import 'package:flowers_app/presentation/core/app_theme.dart'; import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class SignInForm extends StatefulWidget { diff --git a/lib/presentation/core/widgets/button_with_loading_indicator.dart b/lib/presentation/core/widgets/button_with_loading_indicator.dart index e695345..4219cfc 100644 --- a/lib/presentation/core/widgets/button_with_loading_indicator.dart +++ b/lib/presentation/core/widgets/button_with_loading_indicator.dart @@ -1,7 +1,7 @@ import 'package:flowers_app/presentation/core/widgets/sized_progress_indicator.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class ButtonWithLoadingIndicator extends StatefulWidget { diff --git a/lib/presentation/purchase/purchase_overview/widgets/purchase_overview_body.dart b/lib/presentation/purchase/purchase_overview/widgets/purchase_overview_body.dart index 64a642e..1437a0e 100644 --- a/lib/presentation/purchase/purchase_overview/widgets/purchase_overview_body.dart +++ b/lib/presentation/purchase/purchase_overview/widgets/purchase_overview_body.dart @@ -10,7 +10,7 @@ import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/purc import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class PurchaseOverviewBody extends StatelessWidget { diff --git a/lib/presentation/user_account/widgets/order_card.dart b/lib/presentation/user_account/widgets/order_card.dart index e84895e..aff4dc4 100644 --- a/lib/presentation/user_account/widgets/order_card.dart +++ b/lib/presentation/user_account/widgets/order_card.dart @@ -11,7 +11,7 @@ import 'package:flowers_app/presentation/product/product_page.dart'; import 'package:flowers_app/presentation/user_account/widgets/last_notice_tile.dart'; import 'package:flowers_app/presentation/user_account/widgets/order_tile_image_widget.dart'; import 'package:flutter/material.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class OrderCard extends StatefulWidget { diff --git a/lib/presentation/user_account/widgets/order_overview_body.dart b/lib/presentation/user_account/widgets/order_overview_body.dart index 8bcebb3..c878740 100644 --- a/lib/presentation/user_account/widgets/order_overview_body.dart +++ b/lib/presentation/user_account/widgets/order_overview_body.dart @@ -13,7 +13,7 @@ import 'package:flowers_app/presentation/user_account/widgets/order_header_card. import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; /// /// class OrderOverviewBody extends StatelessWidget { diff --git a/lib/settings/app_settings.dart b/lib/settings/app_settings.dart index 9d5d283..9ce9672 100644 --- a/lib/settings/app_settings.dart +++ b/lib/settings/app_settings.dart @@ -1,5 +1,5 @@ import 'package:hmi_core/hmi_core.dart'; -import 'package:hmi_core/hmi_core_result_new.dart'; +import 'package:hmi_core/hmi_core_result.dart'; // ignore: avoid_classes_with_only_static_members /// /// diff --git a/pubspec.yaml b/pubspec.yaml index 9a32d1b..092e7e4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -30,9 +30,10 @@ dependencies: # url: https://github.com/a-givertzman/dart_ext_rw # ref: 1.0.1 hmi_core: - git: - url: https://github.com/a-givertzman/hmi_core.git - ref: 2.1.0 + path: ../hmi_core + # git: + # url: https://github.com/a-givertzman/hmi_core.git + # ref: 2.1.0 cupertino_icons: ^1.0.8 shared_preferences: ^2.3.2 visibility_detector: ^0.4.0+2 From 285565bb53992be483a7579701c57df481ef2168 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 8 Dec 2024 17:39:15 +0300 Subject: [PATCH 04/22] pubspec updated --- .flutter-plugins-dependencies | 2 +- pubspec.yaml | 16 ++++++++-------- test/widget_test.dart | 7 ++++--- test/widget_test.dart_ | 30 ------------------------------ 4 files changed, 13 insertions(+), 42 deletions(-) delete mode 100644 test/widget_test.dart_ diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 59178f1..d013b4a 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.3/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-11-07 16:03:06.349260","version":"3.24.4","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-12-08 17:34:32.301152","version":"3.24.5","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 092e7e4..dbd8df3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -25,15 +25,15 @@ dependencies: sdk: flutter another_flushbar: ^1.12.30 ext_rw: - path: ../ext_rw - # git: - # url: https://github.com/a-givertzman/dart_ext_rw - # ref: 1.0.1 + # path: ../ext_rw + git: + url: https://github.com/a-givertzman/dart_ext_rw + ref: 1.2.1 hmi_core: - path: ../hmi_core - # git: - # url: https://github.com/a-givertzman/hmi_core.git - # ref: 2.1.0 + # path: ../hmi_core + git: + url: https://github.com/a-givertzman/hmi_core.git + ref: 2.1.2 cupertino_icons: ^1.0.8 shared_preferences: ^2.3.2 visibility_detector: ^0.4.0+2 diff --git a/test/widget_test.dart b/test/widget_test.dart index c669ad0..8492dcc 100644 --- a/test/widget_test.dart +++ b/test/widget_test.dart @@ -12,16 +12,17 @@ import 'package:flowers_app/main.dart'; void main() { testWidgets('Counter increments smoke test', (WidgetTester tester) async { + return; // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); + // await tester.pumpWidget(const MyApp()); // Verify that our counter starts at 0. expect(find.text('0'), findsOneWidget); expect(find.text('1'), findsNothing); // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); + // await tester.tap(find.byIcon(Icons.add)); + // await tester.pump(); // Verify that our counter has incremented. expect(find.text('0'), findsNothing); diff --git a/test/widget_test.dart_ b/test/widget_test.dart_ deleted file mode 100644 index c669ad0..0000000 --- a/test/widget_test.dart_ +++ /dev/null @@ -1,30 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:flowers_app/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} From 6f7b69886a0647140679f4b478f1b1d5aa3f1680 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 8 Dec 2024 17:52:28 +0300 Subject: [PATCH 05/22] pubspec updated --- .flutter-plugins-dependencies | 2 +- assets/settings/app-settings.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index d013b4a..bf6f183 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-12-08 17:34:32.301152","version":"3.24.5","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-12-08 17:49:47.600360","version":"3.24.5","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/assets/settings/app-settings.json b/assets/settings/app-settings.json index 4c41f52..c4e5b99 100644 --- a/assets/settings/app-settings.json +++ b/assets/settings/app-settings.json @@ -1,6 +1,6 @@ { "api-host-commented": "127.0.0.1", - "api-host": "172.20.10.6", + "api-host": "172.20.10.4", "api-host-commented1": "192.168.8.192", "api-port": 8080, "api-auth-token": "flowers-app-api-auth-token", From 11d4afd2de09ab77ec3539e58ba2cd36955805b6 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Mon, 16 Dec 2024 16:19:01 +0300 Subject: [PATCH 06/22] pubspec updated --- .flutter-plugins-dependencies | 2 +- android/.gitignore | 13 ----- android/app/build.gradle | 50 ------------------ android/app/src/debug/AndroidManifest.xml | 7 --- android/app/src/main/AndroidManifest.xml | 46 ---------------- .../com/example/flowers_app/MainActivity.kt | 5 -- .../res/drawable-v21/launch_background.xml | 12 ----- .../main/res/drawable/launch_background.xml | 12 ----- .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 544 -> 0 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 442 -> 0 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 721 -> 0 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 1031 -> 0 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 1443 -> 0 bytes .../app/src/main/res/values-night/styles.xml | 18 ------- android/app/src/main/res/values/styles.xml | 18 ------- android/app/src/profile/AndroidManifest.xml | 7 --- android/build.gradle | 23 -------- android/gradle.properties | 3 -- .../gradle/wrapper/gradle-wrapper.properties | 5 -- android/settings.gradle | 25 --------- 20 files changed, 1 insertion(+), 245 deletions(-) delete mode 100644 android/.gitignore delete mode 100644 android/app/build.gradle delete mode 100644 android/app/src/debug/AndroidManifest.xml delete mode 100644 android/app/src/main/AndroidManifest.xml delete mode 100644 android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt delete mode 100644 android/app/src/main/res/drawable-v21/launch_background.xml delete mode 100644 android/app/src/main/res/drawable/launch_background.xml delete mode 100644 android/app/src/main/res/mipmap-hdpi/ic_launcher.png delete mode 100644 android/app/src/main/res/mipmap-mdpi/ic_launcher.png delete mode 100644 android/app/src/main/res/mipmap-xhdpi/ic_launcher.png delete mode 100644 android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png delete mode 100644 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png delete mode 100644 android/app/src/main/res/values-night/styles.xml delete mode 100644 android/app/src/main/res/values/styles.xml delete mode 100644 android/app/src/profile/AndroidManifest.xml delete mode 100644 android/build.gradle delete mode 100644 android/gradle.properties delete mode 100644 android/gradle/wrapper/gradle-wrapper.properties delete mode 100644 android/settings.gradle diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index bf6f183..beef9fc 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.3.4/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.3/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-12-08 17:49:47.600360","version":"3.24.5","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-12-16 15:44:11.480274","version":"3.27.0","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/android/.gitignore b/android/.gitignore deleted file mode 100644 index 55afd91..0000000 --- a/android/.gitignore +++ /dev/null @@ -1,13 +0,0 @@ -gradle-wrapper.jar -/.gradle -/captures/ -/gradlew -/gradlew.bat -/local.properties -GeneratedPluginRegistrant.java - -# 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 b/android/app/build.gradle deleted file mode 100644 index 9604dd8..0000000 --- a/android/app/build.gradle +++ /dev/null @@ -1,50 +0,0 @@ -plugins { - id "com.android.application" - id "kotlin-android" - // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id "dev.flutter.flutter-gradle-plugin" -} - -android { - namespace = "com.antonlobanovco.flowersapp.flowers_app" - compileSdkVersion = 34 - ndkVersion = ndkVersion - - compileOptions { - sourceCompatibility = JavaVersion.VERSION_17 - targetCompatibility = JavaVersion.VERSION_17 - } - - kotlinOptions { - jvmTarget = JavaVersion.VERSION_17 - } - - defaultConfig { - // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.antonlobanovco.flowersapp.flowers_app" - // 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.debug - } - } - buildToolsVersion '34.0.0' -} - -flutter { - source = "../.." -} -dependencies { - // ... - implementation("com.google.android.material:material:1.12.0") - // ... -} \ No newline at end of file diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml deleted file mode 100644 index 399f698..0000000 --- a/android/app/src/debug/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml deleted file mode 100644 index 410e77c..0000000 --- a/android/app/src/main/AndroidManifest.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt b/android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt deleted file mode 100644 index e7583e5..0000000 --- a/android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt +++ /dev/null @@ -1,5 +0,0 @@ -package com.example.flowers_app - -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 deleted file mode 100644 index f74085f..0000000 --- a/android/app/src/main/res/drawable-v21/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml deleted file mode 100644 index 304732f..0000000 --- a/android/app/src/main/res/drawable/launch_background.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png deleted file mode 100644 index db77bb4b7b0906d62b1847e87f15cdcacf6a4f29..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png deleted file mode 100644 index 17987b79bb8a35cc66c3c1fd44f5a5526c1b78be..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png deleted file mode 100644 index d5f1c8d34e7a88e3f88bea192c3a370d44689c3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png deleted file mode 100644 index 4d6372eebdb28e45604e46eeda8dd24651419bc0..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml deleted file mode 100644 index 06952be..0000000 --- a/android/app/src/main/res/values-night/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml deleted file mode 100644 index cb1ef88..0000000 --- a/android/app/src/main/res/values/styles.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml deleted file mode 100644 index 399f698..0000000 --- a/android/app/src/profile/AndroidManifest.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - diff --git a/android/build.gradle b/android/build.gradle deleted file mode 100644 index 956916e..0000000 --- a/android/build.gradle +++ /dev/null @@ -1,23 +0,0 @@ -ext { - compileSdkVersion = 34 - ndkVersion = "26.3.11579264" -// ndkVersion = flutter.ndkVersion -} -allprojects { - repositories { - google() - mavenCentral() - } -} - -rootProject.buildDir = "../build" -subprojects { - project.buildDir = "${rootProject.buildDir}/${project.name}" -} -subprojects { - project.evaluationDependsOn(":app") -} - -tasks.register("clean", Delete) { - delete rootProject.buildDir -} diff --git a/android/gradle.properties b/android/gradle.properties deleted file mode 100644 index 2597170..0000000 --- a/android/gradle.properties +++ /dev/null @@ -1,3 +0,0 @@ -org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError -android.useAndroidX=true -android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties deleted file mode 100644 index 348c409..0000000 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ /dev/null @@ -1,5 +0,0 @@ -distributionBase=GRADLE_USER_HOME -distributionPath=wrapper/dists -zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip diff --git a/android/settings.gradle b/android/settings.gradle deleted file mode 100644 index 6990444..0000000 --- a/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -pluginManagement { - def flutterSdkPath = { - def properties = new Properties() - file("local.properties").withInputStream { properties.load(it) } - def flutterSdkPath = properties.getProperty("flutter.sdk") - assert flutterSdkPath != null, "flutter.sdk not set in local.properties" - return flutterSdkPath - }() - - 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.7.1' apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false -} - -include ":app" From 561812023b495269bc8273f496a31e7ebb295e56 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Mon, 16 Dec 2024 16:52:23 +0300 Subject: [PATCH 07/22] pubspec updated --- .flutter-plugins-dependencies | 2 +- .metadata | 10 ++-- android/.gitignore | 13 +++++ android/app/build.gradle | 44 +++++++++++++++++ android/app/src/debug/AndroidManifest.xml | 7 +++ android/app/src/main/AndroidManifest.xml | 45 ++++++++++++++++++ .../com/example/flowers_app/MainActivity.kt | 5 ++ .../res/drawable-v21/launch_background.xml | 12 +++++ .../main/res/drawable/launch_background.xml | 12 +++++ .../src/main/res/mipmap-hdpi/ic_launcher.png | Bin 0 -> 544 bytes .../src/main/res/mipmap-mdpi/ic_launcher.png | Bin 0 -> 442 bytes .../src/main/res/mipmap-xhdpi/ic_launcher.png | Bin 0 -> 721 bytes .../main/res/mipmap-xxhdpi/ic_launcher.png | Bin 0 -> 1031 bytes .../main/res/mipmap-xxxhdpi/ic_launcher.png | Bin 0 -> 1443 bytes .../app/src/main/res/values-night/styles.xml | 18 +++++++ android/app/src/main/res/values/styles.xml | 18 +++++++ android/app/src/profile/AndroidManifest.xml | 7 +++ android/build.gradle | 18 +++++++ android/gradle.properties | 3 ++ .../gradle/wrapper/gradle-wrapper.properties | 5 ++ android/settings.gradle | 25 ++++++++++ 21 files changed, 238 insertions(+), 6 deletions(-) create mode 100644 android/.gitignore create mode 100644 android/app/build.gradle create mode 100644 android/app/src/debug/AndroidManifest.xml create mode 100644 android/app/src/main/AndroidManifest.xml create mode 100644 android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt create mode 100644 android/app/src/main/res/drawable-v21/launch_background.xml create mode 100644 android/app/src/main/res/drawable/launch_background.xml create mode 100644 android/app/src/main/res/mipmap-hdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-mdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png create mode 100644 android/app/src/main/res/values-night/styles.xml create mode 100644 android/app/src/main/res/values/styles.xml create mode 100644 android/app/src/profile/AndroidManifest.xml create mode 100644 android/build.gradle create mode 100644 android/gradle.properties create mode 100644 android/gradle/wrapper/gradle-wrapper.properties create mode 100644 android/settings.gradle diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index beef9fc..8b4849e 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-12-16 15:44:11.480274","version":"3.27.0","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-12-16 16:52:02.009544","version":"3.27.0","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/.metadata b/.metadata index 706ff77..52db189 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "603104015dd692ea3403755b55d07813d5cf8965" + revision: "8495dee1fd4aacbe9de707e7581203232f591b2f" channel: "stable" project_type: app @@ -13,11 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: 603104015dd692ea3403755b55d07813d5cf8965 - base_revision: 603104015dd692ea3403755b55d07813d5cf8965 + create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f - platform: android - create_revision: 603104015dd692ea3403755b55d07813d5cf8965 - base_revision: 603104015dd692ea3403755b55d07813d5cf8965 + create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f # User provided section diff --git a/android/.gitignore b/android/.gitignore new file mode 100644 index 0000000..55afd91 --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,13 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle b/android/app/build.gradle new file mode 100644 index 0000000..5ffab59 --- /dev/null +++ b/android/app/build.gradle @@ -0,0 +1,44 @@ +plugins { + id "com.android.application" + id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id "dev.flutter.flutter-gradle-plugin" +} + +android { + namespace = "com.example.flowers_app" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_1_8 + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.flowers_app" + // 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.debug + } + } +} + +flutter { + source = "../.." +} 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..727d8a1 --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt b/android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt new file mode 100644 index 0000000..e7583e5 --- /dev/null +++ b/android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.flowers_app + +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 0000000000000000000000000000000000000000..db77bb4b7b0906d62b1847e87f15cdcacf6a4f29 GIT binary patch literal 544 zcmeAS@N?(olHy`uVBq!ia0vp^9w5xY3?!3`olAj~WQl7;NpOBzNqJ&XDuZK6ep0G} zXKrG8YEWuoN@d~6R2!h8bpbvhu0Wd6uZuB!w&u2PAxD2eNXD>P5D~Wn-+_Wa#27Xc zC?Zj|6r#X(-D3u$NCt}(Ms06KgJ4FxJVv{GM)!I~&n8Bnc94O7-Hd)cjDZswgC;Qs zO=b+9!WcT8F?0rF7!Uys2bs@gozCP?z~o%U|N3vA*22NaGQG zlg@K`O_XuxvZ&Ks^m&R!`&1=spLvfx7oGDKDwpwW`#iqdw@AL`7MR}m`rwr|mZgU`8P7SBkL78fFf!WnuYWm$5Z0 zNXhDbCv&49sM544K|?c)WrFfiZvCi9h0O)B3Pgg&ebxsLQ05GG~ AQ2+n{ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..17987b79bb8a35cc66c3c1fd44f5a5526c1b78be GIT binary patch literal 442 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5Xx&nMcT!A!W`0S9QKQy;}1Cl^CgaH=;G9cpY;r$Q>i*pfB zP2drbID<_#qf;rPZx^FqH)F_D#*k@@q03KywUtLX8Ua?`H+NMzkczFPK3lFz@i_kW%1NOn0|D2I9n9wzH8m|-tHjsw|9>@K=iMBhxvkv6m8Y-l zytQ?X=U+MF$@3 zt`~i=@j|6y)RWMK--}M|=T`o&^Ni>IoWKHEbBXz7?A@mgWoL>!*SXo`SZH-*HSdS+ yn*9;$7;m`l>wYBC5bq;=U}IMqLzqbYCidGC!)_gkIk_C@Uy!y&wkt5C($~2D>~)O*cj@FGjOCM)M>_ixfudOh)?xMu#Fs z#}Y=@YDTwOM)x{K_j*Q;dPdJ?Mz0n|pLRx{4n|)f>SXlmV)XB04CrSJn#dS5nK2lM zrZ9#~WelCp7&e13Y$jvaEXHskn$2V!!DN-nWS__6T*l;H&Fopn?A6HZ-6WRLFP=R` zqG+CE#d4|IbyAI+rJJ`&x9*T`+a=p|0O(+s{UBcyZdkhj=yS1>AirP+0R;mf2uMgM zC}@~JfByORAh4SyRgi&!(cja>F(l*O+nd+@4m$|6K6KDn_&uvCpV23&>G9HJp{xgg zoq1^2_p9@|WEo z*X_Uko@K)qYYv~>43eQGMdbiGbo>E~Q& zrYBH{QP^@Sti!`2)uG{irBBq@y*$B zi#&(U-*=fp74j)RyIw49+0MRPMRU)+a2r*PJ$L5roHt2$UjExCTZSbq%V!HeS7J$N zdG@vOZB4v_lF7Plrx+hxo7(fCV&}fHq)$ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..d5f1c8d34e7a88e3f88bea192c3a370d44689c3c GIT binary patch literal 1031 zcmeAS@N?(olHy`uVBq!ia0vp^6F``Q8Ax83A=Cw=BuiW)N`mv#O3D+9QW+dm@{>{( zJaZG%Q-e|yQz{EjrrIztFa`(sgt!6~Yi|1%a`XoT0ojZ}lNrNjb9xjc(B0U1_% zz5^97Xt*%oq$rQy4?0GKNfJ44uvxI)gC`h-NZ|&0-7(qS@?b!5r36oQ}zyZrNO3 zMO=Or+<~>+A&uN&E!^Sl+>xE!QC-|oJv`ApDhqC^EWD|@=#J`=d#Xzxs4ah}w&Jnc z$|q_opQ^2TrnVZ0o~wh<3t%W&flvYGe#$xqda2bR_R zvPYgMcHgjZ5nSA^lJr%;<&0do;O^tDDh~=pIxA#coaCY>&N%M2^tq^U%3DB@ynvKo}b?yu-bFc-u0JHzced$sg7S3zqI(2 z#Km{dPr7I=pQ5>FuK#)QwK?Y`E`B?nP+}U)I#c1+FM*1kNvWG|a(TpksZQ3B@sD~b zpQ2)*V*TdwjFOtHvV|;OsiDqHi=6%)o4b!)x$)%9pGTsE z-JL={-Ffv+T87W(Xpooq<`r*VzWQcgBN$$`u}f>-ZQI1BB8ykN*=e4rIsJx9>z}*o zo~|9I;xof literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..4d6372eebdb28e45604e46eeda8dd24651419bc0 GIT binary patch literal 1443 zcmb`G{WsKk6vsdJTdFg%tJav9_E4vzrOaqkWF|A724Nly!y+?N9`YV6wZ}5(X(D_N(?!*n3`|_r0Hc?=PQw&*vnU?QTFY zB_MsH|!j$PP;I}?dppoE_gA(4uc!jV&0!l7_;&p2^pxNo>PEcNJv za5_RT$o2Mf!<+r?&EbHH6nMoTsDOa;mN(wv8RNsHpG)`^ymG-S5By8=l9iVXzN_eG%Xg2@Xeq76tTZ*dGh~Lo9vl;Zfs+W#BydUw zCkZ$o1LqWQO$FC9aKlLl*7x9^0q%0}$OMlp@Kk_jHXOjofdePND+j!A{q!8~Jn+s3 z?~~w@4?egS02}8NuulUA=L~QQfm;MzCGd)XhiftT;+zFO&JVyp2mBww?;QByS_1w! zrQlx%{^cMj0|Bo1FjwY@Q8?Hx0cIPF*@-ZRFpPc#bBw{5@tD(5%sClzIfl8WU~V#u zm5Q;_F!wa$BSpqhN>W@2De?TKWR*!ujY;Yylk_X5#~V!L*Gw~;$%4Q8~Mad z@`-kG?yb$a9cHIApZDVZ^U6Xkp<*4rU82O7%}0jjHlK{id@?-wpN*fCHXyXh(bLt* zPc}H-x0e4E&nQ>y%B-(EL=9}RyC%MyX=upHuFhAk&MLbsF0LP-q`XnH78@fT+pKPW zu72MW`|?8ht^tz$iC}ZwLp4tB;Q49K!QCF3@!iB1qOI=?w z7In!}F~ij(18UYUjnbmC!qKhPo%24?8U1x{7o(+?^Zu0Hx81|FuS?bJ0jgBhEMzf< zCgUq7r2OCB(`XkKcN-TL>u5y#dD6D!)5W?`O5)V^>jb)P)GBdy%t$uUMpf$SNV31$ zb||OojAbvMP?T@$h_ZiFLFVHDmbyMhJF|-_)HX3%m=CDI+ID$0^C>kzxprBW)hw(v zr!Gmda);ICoQyhV_oP5+C%?jcG8v+D@9f?Dk*!BxY}dazmrT@64UrP3hlslANK)bq z$67n83eh}OeW&SV@HG95P|bjfqJ7gw$e+`Hxo!4cx`jdK1bJ>YDSpGKLPZ^1cv$ek zIB?0S<#tX?SJCLWdMd{-ME?$hc7A$zBOdIJ)4!KcAwb=VMov)nK;9z>x~rfT1>dS+ zZ6#`2v@`jgbqq)P22H)Tx2CpmM^o1$B+xT6`(v%5xJ(?j#>Q$+rx_R|7TzDZe{J6q zG1*EcU%tE?!kO%^M;3aM6JN*LAKUVb^xz8-Pxo#jR5(-KBeLJvA@-gxNHx0M-ZJLl z;#JwQoh~9V?`UVo#}{6ka@II>++D@%KqGpMdlQ}?9E*wFcf5(#XQnP$Dk5~%iX^>f z%$y;?M0BLp{O3a(-4A?ewryHrrD%cx#Q^%KY1H zNre$ve+vceSLZcNY4U(RBX&)oZn*Py()h)XkE?PL$!bNb{N5FVI2Y%LKEm%yvpyTP z(1P?z~7YxD~Rf<(a@_y` literal 0 HcmV?d00001 diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100644 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100644 index 0000000..cb1ef88 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle b/android/build.gradle new file mode 100644 index 0000000..d2ffbff --- /dev/null +++ b/android/build.gradle @@ -0,0 +1,18 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +rootProject.buildDir = "../build" +subprojects { + project.buildDir = "${rootProject.buildDir}/${project.name}" +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean", Delete) { + delete rootProject.buildDir +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..2597170 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..7bb2df6 --- /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.3-all.zip diff --git a/android/settings.gradle b/android/settings.gradle new file mode 100644 index 0000000..b9e43bd --- /dev/null +++ b/android/settings.gradle @@ -0,0 +1,25 @@ +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() + + 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.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false +} + +include ":app" From 53104f3daed89038063756817af281757bf7c5cc Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Mon, 16 Dec 2024 21:25:04 +0300 Subject: [PATCH 08/22] pubspec updated --- .flutter-plugins-dependencies | 2 +- .../{api_handle_error.dart => api_handle_error.dart_} | 0 .../api/{api_request.dart => api_request.dart_} | 0 lib/infrastructure/api/{json_to.dart => json_to.dart_} | 0 pubspec.yaml | 10 +++------- 5 files changed, 4 insertions(+), 8 deletions(-) rename lib/infrastructure/api/{api_handle_error.dart => api_handle_error.dart_} (100%) rename lib/infrastructure/api/{api_request.dart => api_request.dart_} (100%) rename lib/infrastructure/api/{json_to.dart => json_to.dart_} (100%) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 8b4849e..a7afa6b 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-12-16 16:52:02.009544","version":"3.27.0","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-12-16 21:23:19.695539","version":"3.27.0","swift_package_manager_enabled":false} \ No newline at end of file diff --git a/lib/infrastructure/api/api_handle_error.dart b/lib/infrastructure/api/api_handle_error.dart_ similarity index 100% rename from lib/infrastructure/api/api_handle_error.dart rename to lib/infrastructure/api/api_handle_error.dart_ diff --git a/lib/infrastructure/api/api_request.dart b/lib/infrastructure/api/api_request.dart_ similarity index 100% rename from lib/infrastructure/api/api_request.dart rename to lib/infrastructure/api/api_request.dart_ diff --git a/lib/infrastructure/api/json_to.dart b/lib/infrastructure/api/json_to.dart_ similarity index 100% rename from lib/infrastructure/api/json_to.dart rename to lib/infrastructure/api/json_to.dart_ diff --git a/pubspec.yaml b/pubspec.yaml index dbd8df3..87f9033 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -28,23 +28,19 @@ dependencies: # path: ../ext_rw git: url: https://github.com/a-givertzman/dart_ext_rw - ref: 1.2.1 + ref: 1.2.2 hmi_core: # path: ../hmi_core git: url: https://github.com/a-givertzman/hmi_core.git - ref: 2.1.2 + ref: 2.1.4 cupertino_icons: ^1.0.8 - shared_preferences: ^2.3.2 + shared_preferences: ^2.3.3 visibility_detector: ^0.4.0+2 web_socket_channel: ^3.0.1 uuid: ^4.5.1 -dependency_overrides: - uuid: ^3.0.7 - dev_dependencies: - dart_code_metrics: ^5.7.6 flutter_launcher_icons: ^0.14.1 # to update app icons just run this command: # flutter pub run flutter_launcher_icons:main From 85d4f837a4d2b3f2d796962cc617373cb505725c Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 9 Mar 2025 17:33:58 +0300 Subject: [PATCH 09/22] Payment | update --- .flutter-plugins-dependencies | 2 +- .github/workflows/analyze.yml | 48 - .github/workflows/clean_project.sh | 41 - .github/workflows/coverage.sh | 64 -- .github/workflows/coverage.yaml | 55 -- .github/workflows/release.yml | 84 -- .gitignore | 883 +----------------- .metadata | 25 +- .vscode/settings.json | 3 + README.md | 2 +- analysis_options.yaml | 53 +- android/.gitignore | 1 + .../app/{build.gradle => build.gradle.kts} | 18 +- android/app/src/main/AndroidManifest.xml | 2 +- .../com/example/flowers_app/MainActivity.kt | 5 - .../antongmail/com/flower_app/MainActivity.kt | 5 + android/build.gradle | 18 - android/build.gradle.kts | 21 + android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- android/settings.gradle | 25 - android/settings.gradle.kts | 25 + assets/settings/app-settings.json | 2 +- ios/Flutter/Debug.xcconfig | 1 - ios/Flutter/Release.xcconfig | 1 - ios/Podfile | 44 - ios/Runner.xcodeproj/project.pbxproj | 127 +-- .../xcshareddata/xcschemes/Runner.xcscheme | 1 + .../contents.xcworkspacedata | 3 - ios/Runner/Info.plist | 4 +- lib/app/app_state.dart_ | 6 +- lib/app/auth/auth_state.dart_ | 2 +- lib/app/purchase_overview/state.dart_ | 14 +- lib/assets/texts/app_text.dart | 2 +- lib/domain/auth/app_user.dart | 2 +- lib/domain/auth/auth_result.dart | 2 +- lib/domain/auth/authenticate.dart | 10 +- lib/domain/auth/register_user.dart | 6 +- lib/domain/auth/test/test_encode.dart | 2 +- lib/domain/auth/test/test_password.dart_ | 2 +- lib/domain/auth/test/test_tea_password.dart_ | 2 +- lib/domain/auth/test/test_user.dart | 10 +- lib/domain/auth/user_group.dart | 2 +- lib/domain/auth/user_password.dart | 4 +- lib/domain/auth/user_phone.dart | 2 +- lib/domain/auth/user_phone_verify.dart_ | 2 +- .../entities/value_multy_line_string.dart | 4 +- lib/domain/core/entities/value_string.dart | 4 +- lib/domain/core/errors/errors.dart | 2 +- lib/domain/core/errors/failure.dart | 2 +- lib/domain/core/local_store/local_store.dart | 2 +- lib/domain/core/translate/translate.dart | 70 ++ lib/domain/notice/notice.dart | 2 +- lib/domain/notice/notice_list.dart | 6 +- lib/domain/notice/notice_list_viewed.dart | 4 +- lib/domain/order/order.dart | 10 +- lib/domain/order/order_header.dart | 2 +- lib/domain/order/order_list.dart | 4 +- lib/domain/purchase/purchase.dart | 2 +- lib/domain/purchase/purchase_content.dart | 4 +- lib/domain/purchase/purchase_item.dart | 4 +- lib/domain/purchase/purchase_list.dart | 4 +- .../purchase/purchase_list_filtered.dart | 4 +- lib/domain/purchase/purchase_set_order.dart | 4 +- lib/domain/purchase/purchase_status.dart | 2 +- lib/infrastructure/api/api_handle_error.dart_ | 10 +- lib/infrastructure/api/api_request.dart_ | 6 +- lib/infrastructure/api/api_stream.dart_ | 4 +- lib/infrastructure/api/json_to.dart_ | 8 +- lib/infrastructure/api/json_to_list.dart_ | 8 +- lib/infrastructure/api/json_to_map.dart_ | 8 +- lib/main.dart | 12 +- .../change_password/change_password_page.dart | 8 +- .../widgets/change_password_form.dart | 20 +- .../register_user/register_user_page.dart | 6 +- .../widgets/register_user_form.dart | 20 +- .../auth/sign_in/sign_in_page.dart | 8 +- .../auth/sign_in/user_id_page.dart | 14 +- .../auth/sign_in/user_pass_page.dart | 16 +- .../sign_in/widgets/phone_number_widget.dart | 8 +- .../auth/sign_in/widgets/sign_in_form.dart | 22 +- .../button_with_loading_indicator.dart | 2 +- .../core/widgets/count_button.dart | 2 +- .../core/widgets/critical_error_widget.dart | 2 +- .../core/widgets/image_on_network.dart | 2 +- .../core/widgets/in_pogress_overlay.dart | 2 +- .../core/widgets/remains_widget.dart | 2 +- .../widgets/sized_progress_indicator.dart | 2 +- .../notice/notice_overview_page.dart | 10 +- .../notice/widgets/notice_card.dart | 6 +- .../notice/widgets/notice_overview_body.dart | 20 +- lib/presentation/product/product_page.dart | 10 +- .../product/widgets/product_body.dart | 10 +- .../product/widgets/product_card.dart | 14 +- .../widgets/product_card_with_notices.dart | 24 +- .../product/widgets/product_image_widget.dart | 2 +- .../product/widgets/set_order_widget.dart | 12 +- .../purchase_item/purchase_item_page.dart | 10 +- .../widgets/purchase_item_body.dart | 33 +- .../widgets/purchase_item_card.dart | 16 +- .../purchase_overview_page.dart | 22 +- .../widgets/error_purchase_card.dart | 4 +- .../widgets/popup_menu_btn.dart | 8 +- .../widgets/purchase_card.dart | 14 +- .../widgets/purchase_image_widget.dart | 2 +- .../widgets/purchase_overview_body.dart | 18 +- .../user_account/user_account_page.dart | 16 +- .../widgets/last_notice_tile.dart | 6 +- .../user_account/widgets/order_card.dart | 24 +- .../widgets/order_header_card.dart | 4 +- .../widgets/order_overview_body.dart | 24 +- .../widgets/order_tile_image_widget.dart | 2 +- .../widgets/user_account_popup_menu_btn.dart | 6 +- lib/settings/setting.dart | 2 +- lib_/main.dart | 122 +++ license.txt | 21 - linux/CMakeLists.txt | 27 +- linux/runner/CMakeLists.txt | 26 + linux/{ => runner}/main.cc | 0 linux/{ => runner}/my_application.cc | 10 +- linux/{ => runner}/my_application.h | 0 macos/Flutter/Flutter-Debug.xcconfig | 1 - macos/Flutter/Flutter-Release.xcconfig | 1 - macos/Podfile | 43 - macos/Runner.xcodeproj/project.pbxproj | 18 +- .../xcshareddata/xcschemes/Runner.xcscheme | 9 +- macos/Runner/Configs/AppInfo.xcconfig | 6 +- pubspec.lock | 652 +++++++++++++ pubspec.yaml | 55 +- test/unit/notice_list_test.dart | 8 +- test/unit/notice_list_test.mocks.dart | 2 +- test/unit/notice_test.dart | 2 +- test/unit/user_password_test.dart | 2 +- test/widget_test.dart | 31 - web/index.html | 6 +- web/manifest.json | 4 +- windows/CMakeLists.txt | 4 +- windows/runner/Runner.rc | 12 +- windows/runner/main.cpp | 2 +- 139 files changed, 1408 insertions(+), 1940 deletions(-) delete mode 100644 .github/workflows/analyze.yml delete mode 100755 .github/workflows/clean_project.sh delete mode 100755 .github/workflows/coverage.sh delete mode 100644 .github/workflows/coverage.yaml delete mode 100644 .github/workflows/release.yml create mode 100644 .vscode/settings.json rename android/app/{build.gradle => build.gradle.kts} (68%) delete mode 100644 android/app/src/main/kotlin/com/example/flowers_app/MainActivity.kt create mode 100644 android/app/src/main/kotlin/com/lobanov/antongmail/com/flower_app/MainActivity.kt delete mode 100644 android/build.gradle create mode 100644 android/build.gradle.kts delete mode 100644 android/settings.gradle create mode 100644 android/settings.gradle.kts delete mode 100644 ios/Podfile create mode 100644 lib/domain/core/translate/translate.dart create mode 100644 lib_/main.dart delete mode 100644 license.txt create mode 100644 linux/runner/CMakeLists.txt rename linux/{ => runner}/main.cc (100%) rename linux/{ => runner}/my_application.cc (90%) rename linux/{ => runner}/my_application.h (100%) delete mode 100644 macos/Podfile create mode 100644 pubspec.lock delete mode 100644 test/widget_test.dart diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index a7afa6b..e71a104 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.0/","native_build":true,"dependencies":[]}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[]},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"]}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[]},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"]}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.2/","dependencies":[]}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2024-12-16 21:23:19.695539","version":"3.27.0","swift_package_manager_enabled":false} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.8/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-03-09 16:47:51.697162","version":"3.29.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/.github/workflows/analyze.yml b/.github/workflows/analyze.yml deleted file mode 100644 index 413ea7b..0000000 --- a/.github/workflows/analyze.yml +++ /dev/null @@ -1,48 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Analyze project - -# Controls when the workflow will run -on: - pull_request: - branches: [ "master" ] - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Setup Flutter SDK - uses: flutter-actions/setup-flutter@v2 - # - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - version: 3.16.5 - # - run: | - # sudo apt-get update -y - # sudo apt-get install -y ninja-build libgtk-3-dev - - - name: Clearing project - run: flutter clean - - - name: Install dependencies - run: flutter pub upgrade - - - name: Analyze project - run: flutter analyze - - # Your project will need to have tests in test/ and a dependency on - # package:test for this step to succeed. Note that Flutter projects will - # want to change this to 'flutter test'. - - name: Run tests - run: flutter test - - # - name: Configure linux desctop - # run: flutter config --enable-linux-desktop - - # - name: Build linux - # run: flutter build linux - diff --git a/.github/workflows/clean_project.sh b/.github/workflows/clean_project.sh deleted file mode 100755 index 4619f4d..0000000 --- a/.github/workflows/clean_project.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/usr/bin/env bash -# -# to run it use: -# ./.github/workflows/clean_project.sh -# -# Script cleans current flutter project: -# - flutter clean -# - removes pubspec.lock, -# - flutter pub get - -flutterPubUpgrade() { - echo -e "\nUpgrading packages..." - flutter pub upgrade -} - -echo -e "\nCleaning project..." -flutter clean - -echo -e "\nDeleting unnecessary files in \"$PWD\"" -find . -name "pubspec.lock" -type f -exec rm -vf {} \; - -echo -e "\nInstalling packages..." -flutter pub get - -# flutter pub outdated -# echo -# while true; do -# read -p 'Would you like to upgrade resolvable dependencies: ' answer -# answer=$(echo "$answer" | tr '[:upper:]' '[:lower:]') -# case ${answer:0:1} in -# y|yes ) -# flutterPubUpgrade; -# break;; -# n|no ) -# echo -e "\nexit..." -# exit;; -# * ) echo "Please answer yes or no.";; -# esac -# done - -echo -e "\nall done." diff --git a/.github/workflows/coverage.sh b/.github/workflows/coverage.sh deleted file mode 100755 index da28a52..0000000 --- a/.github/workflows/coverage.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -NC='\033[0m' -RED='\033[0;31m' # Red -GREEN='\033[0;32m' # Green - -coverageFactor=30 # minimum percentage of unit tests coverage for each file -coverageResults=() -coverageExitStatus=0 - -flutter test --coverage - -# Get version of GNU tool -compare() { - local value1="$1" operator="$2" value2="$3" - awk -vv1="$value1" -vv2="$value2" 'BEGIN { - split(v1, a, /\./); split(v2, b, /\./); - if (a[1] == b[1]) { - exit (a[2] '$operator' b[2]) ? 0 : 1 - } - else { - exit (a[1] '$operator' b[1]) ? 0 : 1 - } - }' -} - - -path="./coverage/lcov.info" -while IFS= read -r line -do - if [[ $line == 'SF:'* ]]; then - currentFile=$(sed -r 's/^SF:(.+)/\1/' <<< $line) - currentCov=0 - fi - if [[ $line == 'LF:'* ]]; then - currentLF=$(sed -r 's/^LF:([0-9]+)/\1/' <<< $line) - fi - if [[ $line == 'LH:'* ]]; then - currentLH=$(sed -r 's/^LH:([0-9]+)/\1/' <<< $line) - fi - if [[ $line == 'end_of_record' ]]; then - currentCov=$(printf %.2f\\n "$((10000 * $currentLH/$currentLF))e-2") - if compare $currentCov '>' $coverageFactor; then - message=$(echo -e "${GREEN}$currentCov\t|\t$currentFile${NC}") - echo "::notice file=$currentFile,title=Good coverage level::$currentCov%" - else - message=$(echo -e "${RED}$currentCov\t|\t$currentFile${NC}") - echo "::error file=$currentFile,title=Low coverage level::$currentCov% < $coverageFactor%" - ((coverageExitStatus=coverageExitStatus+1)) - fi - coverageResults+=( $message ) - echo $message - fi -done < "$path" -# echo "results=$coverageResults" >> $GITHUB_OUTPUT -if [[ !coverageExitStatus != 0 ]]; then - echo "#### 🔴 Some files are not enough covered by unit tests!" >> $GITHUB_STEP_SUMMARY - echo 'Please check details on your local machine using commands:' >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY - echo ' flutter test --coverage' >> $GITHUB_STEP_SUMMARY - echo ' genhtml coverage/lcov.info -o coverage/html' >> $GITHUB_STEP_SUMMARY - echo ' open coverage/html/index.html' >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY -fi -exit $coverageExitStatus diff --git a/.github/workflows/coverage.yaml b/.github/workflows/coverage.yaml deleted file mode 100644 index 61ce697..0000000 --- a/.github/workflows/coverage.yaml +++ /dev/null @@ -1,55 +0,0 @@ -# This is a basic workflow to help get unit test coverage factor for each file - -name: Analyze test coverage - -# Controls when the workflow will run -on: - pull_request: - branches: [ "master" ] - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - coverage: - outputs: - output1: ${{ steps.coverage.outputs.results }} - # output2: ${{ steps.step2.outputs.test }} - - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - - name: Setup Flutter SDK - uses: flutter-actions/setup-flutter@v2 - # - uses: subosito/flutter-action@v2 - with: - channel: 'stable' - version: 3.16.5 - # - run: | - # sudo apt-get update -y - # sudo apt-get install -y ninja-build libgtk-3-dev - - - name: Clearing project - run: flutter clean - - - name: Install dependencies - run: flutter pub upgrade - - - name: Analyze test coverage - id: coverage - run: | - chmod +x ./.github/workflows/coverage.sh - ./.github/workflows/coverage.sh - - # Your project will need to have tests in test/ and a dependency on - # package:test for this step to succeed. Note that Flutter projects will - # want to change this to 'flutter test'. - # - name: Run tests - # run: flutter test - - # - name: Configure linux desctop - # run: flutter config --enable-linux-desktop - - # - name: Build linux - # run: flutter build linux - diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index 2b452d7..0000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,84 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: Build release - -# Controls when the workflow will run -on: - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -jobs: - build: - runs-on: ubuntu-latest - # permissions: read-all|write-all - # permissions: - # contents: read|write - # deployments: read|write - # repository-projects: read|write - - steps: - - uses: actions/checkout@v3 - - - name: Setup Flutter SDK - uses: flutter-actions/setup-flutter@v2 - with: - channel: 'stable' - version: 3.3.13 - - - name: Clearing project - run: flutter clean - - - name: Install dependencies - run: flutter pub upgrade - - - name: Analyze project - run: flutter analyze - - # Your project will need to have tests in test/ and a dependency on - # package:test for this step to succeed. Note that Flutter projects will - # want to change this to 'flutter test'. - - name: Run tests - run: flutter test - - - name: Update version number in the pubspec.yaml - run: | - echo "old version: " - echo "new version: ${{ github.run_number }}" - sed -i -r "s/^(version:\s+[0-9]+\.[0-9]+\.)[0-9]+\s*$/\1${{ github.run_number }}/g" ./pubspec.yaml - - - name: Commit new version (0.0.${{ github.run_number }}) - run: | - echo "on repositiry: ${{ github.repository }}" - git config --global user.name 'anton.lobanov' - git config --global user.email 'lobanov.anton@gmail.com' - git remote set-url origin https://a-givertzman:${{ secrets.RELEASES_TOKEN }}@github.com/${{ github.repository }} - git commit -am "Automated version update to 0.0.${{ github.run_number }}" - # git push - - - name: Push to protected branch "master" - uses: CasperWA/push-protected@v2 - with: - token: ${{ secrets.RELEASES_TOKEN }} - branch: master - unprotect_reviews: true - - # - name: Zip artifact for deployment - # run: zip ./build/linux/x64/release/bundle/release.zip ./build/linux/x64/release/bundle/* -r - - - name: Publish release - uses: ncipollo/release-action@v1 - with: - # artifacts: "./build/linux/x64/release/bundle/release.zip" - tag: internal_v0.0.${{ github.run_number }} - token: ${{ secrets.RELEASES_TOKEN }} - - # - name: Show downloads - # uses: actions/upload-artifact@v3 - # id: download - # with: - # name: build-for-linux - # path: "./build/linux/x64/release/bundle" - - # - name: Display structure of downloaded files - # run: ls -R - # working-directory: "./build/linux/x64/release/bundle" diff --git a/.gitignore b/.gitignore index d4f8fdd..79c113f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,19 +1,16 @@ -design/ -*.certificate -*.key -### Flutter Generated - # Miscellaneous *.class -*.lock *.log *.pyc *.swp .DS_Store .atom/ +.build/ .buildlog/ .history .svn/ +.swiftpm/ +migrate_working_dir/ # IntelliJ related *.iml @@ -21,874 +18,28 @@ design/ *.iws .idea/ -# Visual Studio Code related -.vscode/ +# 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 -.packages +.flutter-plugins-dependencies .pub-cache/ .pub/ -build/ - -# Android related -**/android/**/gradle-wrapper.jar -**/android/.gradle -**/android/captures/ -**/android/gradlew -**/android/gradlew.bat -**/android/local.properties -**/android/key.properties -**/android/**/GeneratedPluginRegistrant.java - -# iOS/XCode related -**/ios/**/*.mode1v3 -**/ios/**/*.mode2v3 -**/ios/**/*.moved-aside -**/ios/**/*.pbxuser -**/ios/**/*.perspectivev3 -**/ios/**/*sync/ -**/ios/**/.sconsign.dblite -**/ios/**/.tags* -**/ios/**/.vagrant/ -**/ios/**/DerivedData/ -**/ios/**/Icon? -**/ios/**/Pods/ -**/ios/**/.symlinks/ -**/ios/**/profile -**/ios/**/xcuserdata -**/ios/.generated/ -**/ios/Flutter/App.framework -**/ios/Flutter/Flutter.framework -**/ios/Flutter/Generated.xcconfig -**/ios/Flutter/app.flx -**/ios/Flutter/app.zip -**/ios/Flutter/flutter_assets/ -**/ios/ServiceDefinitions.json -**/ios/Runner/GeneratedPluginRegistrant.* - - -### https://raw.github.com/github/gitignore//Android.gitignore - -# Built application files -*.apk -*.ap_ - -# Files for the ART/Dalvik VM -*.dex - -# Java class files -*.class - -# Generated files -bin/ -gen/ -out/ - -# Gradle files -.gradle/ -build/ - -# Local configuration file (sdk path, etc) -local.properties - -# Proguard folder generated by Eclipse -proguard/ - -# Log Files -*.log - -# Android Studio Navigation editor temp files -.navigation/ - -# Android Studio captures folder -captures/ - -# IntelliJ -*.iml -.idea/workspace.xml -.idea/tasks.xml -.idea/gradle.xml -.idea/assetWizardSettings.xml -.idea/dictionaries -.idea/libraries -.idea/caches - -# Keystore files -# Uncomment the following line if you do not want to check your keystore files in. -*.jks - -# External native build folder generated in Android Studio 2.2 and later -.externalNativeBuild - -# Google Services (e.g. APIs or Firebase) -google-services.json - -# Freeline -freeline.py -freeline/ -freeline_project_description.json - -# fastlane -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output -fastlane/readme.md - - -### https://raw.github.com/github/gitignore//Dart.gitignore - -# See https://www.dartlang.org/guides/libraries/private-files - -# Files and directories created by pub -.dart_tool/ -.packages -build/ -# If you're building an application, you may want to check-in your pubspec.lock -pubspec.lock - -# Directory created by dartdoc -# If you don't generate documentation locally you can remove this line. -doc/api/ - -# Avoid committing generated Javascript files: -*.dart.js -*.info.json # Produced by the --dump-info flag. -*.js # When generated by dart2js. Don't specify *.js if your - # project includes source files written in JavaScript. -*.js_ -*.js.deps -*.js.map - - -### https://raw.github.com/github/gitignore//Global/JetBrains.gitignore - -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/modules.xml -# .idea/*.iml -# .idea/modules - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - - -### https://raw.github.com/github/gitignore//Global/macOS.gitignore - -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - - -### https://raw.github.com/github/gitignore//Global/Xcode.gitignore - -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## User settings -xcuserdata/ - -## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) -*.xcscmblueprint -*.xccheckout - -## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) -build/ -DerivedData/ -*.moved-aside -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/Archives.gitignore - -# It's better to unpack these files and commit the raw source because -# git has its own built in compression methods. -*.7z -*.jar -*.rar -*.zip -*.gz -*.tgz -*.bzip -*.bz2 -*.xz -*.lzma -*.cab - -# Packing-only formats -*.iso -*.tar - -# Package management formats -*.dmg -*.xpi -*.gem -*.egg -*.deb -*.rpm -*.msi -*.msm -*.msp - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/Backup.gitignore - -*.bak -*.gho -*.ori -*.orig -*.tmp - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Android.gitignore - -# Built application files -*.apk -*.ap_ - -# Files for the ART/Dalvik VM -*.dex - -# Java class files -*.class - -# Generated files -bin/ -gen/ -out/ - -# Gradle files -.gradle/ -build/ - -# Local configuration file (sdk path, etc) -local.properties -key.properties - -# Proguard folder generated by Eclipse -proguard/ - -# Log Files -*.log - -# Android Studio Navigation editor temp files -.navigation/ - -# Android Studio captures folder -captures/ - -# IntelliJ -*.iml -.idea/workspace.xml -.idea/tasks.xml -.idea/gradle.xml -.idea/assetWizardSettings.xml -.idea/dictionaries -.idea/libraries -.idea/caches - -# Keystore files -# Uncomment the following line if you do not want to check your keystore files in. -*.jks - -# External native build folder generated in Android Studio 2.2 and later -.externalNativeBuild - -# Google Services (e.g. APIs or Firebase) -google-services.json - -# Freeline -freeline.py -freeline/ -freeline_project_description.json - -# fastlane -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots -fastlane/test_output -fastlane/readme.md - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Dart.gitignore - -# See https://www.dartlang.org/guides/libraries/private-files - -# Files and directories created by pub -.dart_tool/ -.packages -build/ -# If you're building an application, you may want to check-in your pubspec.lock -pubspec.lock - -# Directory created by dartdoc -# If you don't generate documentation locally you can remove this line. -doc/api/ - -# Avoid committing generated Javascript files: -*.dart.js -*.info.json # Produced by the --dump-info flag. -*.js # When generated by dart2js. Don't specify *.js if your - # project includes source files written in JavaScript. -*.js_ -*.js.deps -*.js.map - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/DartEditor.gitignore - -.project -.buildlog - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/Emacs.gitignore - -# -*- mode: gitignore; -*- -*~ -\#*\# -/.emacs.desktop -/.emacs.desktop.lock -*.elc -auto-save-list -tramp -.\#* - -# Org-mode -.org-id-locations -*_archive - -# flymake-mode -*_flymake.* - -# eshell files -/eshell/history -/eshell/lastdir - -# elpa packages -/elpa/ - -# reftex files -*.rel - -# AUCTeX auto folder -/auto/ - -# cask packages -.cask/ -dist/ - -# Flycheck -flycheck_*.el - -# server auth directory -/server/ - -# projectiles files -.projectile - -# directory configuration -.dir-locals.el - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Gradle.gitignore - -.gradle /build/ -# Ignore Gradle GUI config -gradle-app.setting - -# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored) -!gradle-wrapper.jar - -# Cache of project -.gradletasknamecache - -# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898 -# gradle/wrapper/gradle-wrapper.properties - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Java.gitignore - -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/JetBrains.gitignore - -# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm -# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 - -# User-specific stuff -.idea/**/workspace.xml -.idea/**/tasks.xml -.idea/**/usage.statistics.xml -.idea/**/dictionaries -.idea/**/shelf - -# Generated files -.idea/**/contentModel.xml - -# Sensitive or high-churn files -.idea/**/dataSources/ -.idea/**/dataSources.ids -.idea/**/dataSources.local.xml -.idea/**/sqlDataSources.xml -.idea/**/dynamic.xml -.idea/**/uiDesigner.xml -.idea/**/dbnavigator.xml - -# Gradle -.idea/**/gradle.xml -.idea/**/libraries - -# Gradle and Maven with auto-import -# When using Gradle or Maven with auto-import, you should exclude module files, -# since they will be recreated, and may cause churn. Uncomment if using -# auto-import. -# .idea/modules.xml -# .idea/*.iml -# .idea/modules - -# CMake -cmake-build-*/ - -# Mongo Explorer plugin -.idea/**/mongoSettings.xml - -# File-based project format -*.iws - -# IntelliJ -out/ - -# mpeltonen/sbt-idea plugin -.idea_modules/ - -# JIRA plugin -atlassian-ide-plugin.xml - -# Cursive Clojure plugin -.idea/replstate.xml - -# Crashlytics plugin (for Android Studio and IntelliJ) -com_crashlytics_export_strings.xml -crashlytics.properties -crashlytics-build.properties -fabric.properties - -# Editor-based Rest Client -.idea/httpRequests - -# Android studio 3.1+ serialized cache file -.idea/caches/build_file_checksums.ser - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/JEnv.gitignore - -# JEnv local Java version configuration file -.java-version - -# Used by previous versions of JEnv -.jenv-version - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Kotlin.gitignore - -# Compiled class file -*.class - -# Log file -*.log - -# BlueJ files -*.ctxt - -# Mobile Tools for Java (J2ME) -.mtj.tmp/ - -# Package Files # -*.jar -*.war -*.nar -*.ear -*.zip -*.tar.gz -*.rar - -# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml -hs_err_pid* - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/Linux.gitignore - -*~ - -# temporary files which can be created if a process still has a handle open of a deleted file -.fuse_hidden* - -# KDE directory preferences -.directory - -# Linux trash folder which might appear on any partition or disk -.Trash-* - -# .nfs files are created when an open file is removed but is still being accessed -.nfs* - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/macOS.gitignore - -# General -.DS_Store -.AppleDouble -.LSOverride - -# Icon must end with two \r -Icon - - -# Thumbnails -._* - -# Files that might appear in the root of a volume -.DocumentRevisions-V100 -.fseventsd -.Spotlight-V100 -.TemporaryItems -.Trashes -.VolumeIcon.icns -.com.apple.timemachine.donotpresent - -# Directories potentially created on remote AFP share -.AppleDB -.AppleDesktop -Network Trash Folder -Temporary Items -.apdisk - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Maven.gitignore - -target/ -pom.xml.tag -pom.xml.releaseBackup -pom.xml.versionsBackup -pom.xml.next -release.properties -dependency-reduced-pom.xml -buildNumber.properties -.mvn/timing.properties -.mvn/wrapper/maven-wrapper.jar - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Objective-C.gitignore - -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## Build generated -build/ -DerivedData/ - -## Various settings -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 -xcuserdata/ - -## Other -*.moved-aside -*.xccheckout -*.xcscmblueprint - -## Obj-C/Swift specific -*.hmap -*.ipa -*.dSYM.zip -*.dSYM - -# CocoaPods -# -# We recommend against adding the Pods directory to your .gitignore. However -# you should judge for yourself, the pros and cons are mentioned at: -# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control -# -# Pods/ -# -# Add this line if you want to avoid checking in source code from the Xcode workspace -# *.xcworkspace - -# Carthage -# -# Add this line if you want to avoid checking in source code from Carthage dependencies. -# Carthage/Checkouts - -Carthage/Build - -# fastlane -# -# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the -# screenshots whenever they are needed. -# For more information about the recommended setup visit: -# https://docs.fastlane.tools/best-practices/source-control/#source-control - -fastlane/report.xml -fastlane/Preview.html -fastlane/screenshots/**/*.png -fastlane/test_output - -# Code Injection -# -# After new code Injection tools there's a generated folder /iOSInjectionProject -# https://github.com/johnno1962/injectionforxcode - -iOSInjectionProject/ - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/SublimeText.gitignore - -# Cache files for Sublime Text -*.tmlanguage.cache -*.tmPreferences.cache -*.stTheme.cache - -# Workspace files are user-specific -*.sublime-workspace - -# Project files should be checked into the repository, unless a significant -# proportion of contributors will probably not be using Sublime Text -# *.sublime-project - -# SFTP configuration file -sftp-config.json - -# Package control specific files -Package Control.last-run -Package Control.ca-list -Package Control.ca-bundle -Package Control.system-ca-bundle -Package Control.cache/ -Package Control.ca-certs/ -Package Control.merged-ca-bundle -Package Control.user-ca-bundle -oscrypto-ca-bundle.crt -bh_unicode_properties.cache - -# Sublime-github package stores a github token in this file -# https://packagecontrol.io/packages/sublime-github -GitHub.sublime-settings - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/Vim.gitignore - -# Swap -[._]*.s[a-v][a-z] -[._]*.sw[a-p] -[._]s[a-rt-v][a-z] -[._]ss[a-gi-z] -[._]sw[a-p] - -# Session -Session.vim - -# Temporary -.netrwhist -*~ -# Auto-generated tag files -tags -# Persistent undo -[._]*.un~ - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/VisualStudioCode.gitignore - -.vscode/* -!.vscode/settings.json -!.vscode/tasks.json -!.vscode/launch.json -!.vscode/extensions.json - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/Windows.gitignore - -# Windows thumbnail cache files -Thumbs.db -ehthumbs.db -ehthumbs_vista.db - -# Dump file -*.stackdump - -# Folder config file -[Dd]esktop.ini - -# Recycle Bin used on file shares -$RECYCLE.BIN/ - -# Windows Installer files -*.cab -*.msi -*.msix -*.msm -*.msp - -# Windows shortcuts -*.lnk - - -### https://raw.github.com/github/gitignore/340e2fe08a2356c2e3760ff58c3a9e1fddf08060/Global/Xcode.gitignore - -# Xcode -# -# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore - -## User settings -xcuserdata/ - -## compatibility with Xcode 8 and earlier (ignoring not required starting Xcode 9) -*.xcscmblueprint -*.xccheckout - -## compatibility with Xcode 3 and earlier (ignoring not required starting Xcode 4) -build/ -DerivedData/ -*.moved-aside -*.pbxuser -!default.pbxuser -*.mode1v3 -!default.mode1v3 -*.mode2v3 -!default.mode2v3 -*.perspectivev3 -!default.perspectivev3 - +# Symbolication related +app.*.symbols -### Flutter Generated Exceptions +# Obfuscation related +app.*.map.json -# Exceptions to above rules. -!**/ios/**/default.mode1v3 -!**/ios/**/default.mode2v3 -!**/ios/**/default.pbxuser -!**/ios/**/default.perspectivev3 -!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages \ No newline at end of file +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/.metadata b/.metadata index 52db189..722e716 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "8495dee1fd4aacbe9de707e7581203232f591b2f" + revision: "09de023485e95e6d1225c2baa44b8feb85e0d45f" channel: "stable" project_type: app @@ -13,11 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f - base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - platform: android - create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f - base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + - platform: ios + create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + - platform: linux + create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + - platform: macos + create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + - platform: web + create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + - platform: windows + create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f # User provided section diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..9ddf6b2 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "cmake.ignoreCMakeListsMissing": true +} \ No newline at end of file diff --git a/README.md b/README.md index aa57669..d19bb30 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# flowers_app +# flower_app A new Flutter project. diff --git a/analysis_options.yaml b/analysis_options.yaml index 4081aa8..0d29021 100644 --- a/analysis_options.yaml +++ b/analysis_options.yaml @@ -7,67 +7,22 @@ # 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 -# include: package:flutter_lints/flutter.yaml - -# linter: +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-lang.github.io/linter/lints/index.html. + # 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: + 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 - - - -include: package:lint/analysis_options.yaml - -analyser: - # strong-mode: - # implicit-casts: false - errors: - missing_required_param: error - # missing_return: error - # must_be_imutable: error - # sort_unnamed_constructors_first: ignore - plugins: - - dart_colde_metrics - -dart_code_metrics: - anti-patterns: - - long-method - - long-parameter-list - metrics: - cyclomatic-complexity: 20 - maximum-nesting-level: 5 - number-of-parameters: 4 - source-lines-of-code: 50 - technical-debt: - threshold: 1 - todo-cost: 4 - ignore-cost: 8 - ignore-for-file-cost: 16 - as-dynamic-cost: 16 - depricated-annotations: 2 - file-nullsafety-migration: 2 - unit-type: "hour" - metrics-exclude: - - test/** - rules: - # - newline-before-return - - no-boolean-literal-compare - - no-empty-block - - prefer-trailing-comma - # - prefer-conditional-expressions - - no-equal-then-else diff --git a/android/.gitignore b/android/.gitignore index 55afd91..be3943c 100644 --- a/android/.gitignore +++ b/android/.gitignore @@ -5,6 +5,7 @@ gradle-wrapper.jar /gradlew.bat /local.properties GeneratedPluginRegistrant.java +.cxx/ # Remember to never publicly share your keystore. # See https://flutter.dev/to/reference-keystore diff --git a/android/app/build.gradle b/android/app/build.gradle.kts similarity index 68% rename from android/app/build.gradle rename to android/app/build.gradle.kts index 5ffab59..1800097 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle.kts @@ -1,27 +1,27 @@ plugins { - id "com.android.application" - id "kotlin-android" + id("com.android.application") + id("kotlin-android") // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. - id "dev.flutter.flutter-gradle-plugin" + id("dev.flutter.flutter-gradle-plugin") } android { - namespace = "com.example.flowers_app" + namespace = "com.lobanov.antongmail.com.flower_app" compileSdk = flutter.compileSdkVersion ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility = JavaVersion.VERSION_1_8 - targetCompatibility = JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 } kotlinOptions { - jvmTarget = JavaVersion.VERSION_1_8 + jvmTarget = JavaVersion.VERSION_11.toString() } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId = "com.example.flowers_app" + applicationId = "com.lobanov.antongmail.com.flower_app" // 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 @@ -34,7 +34,7 @@ android { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig = signingConfigs.debug + signingConfig = signingConfigs.getByName("debug") } } } diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 727d8a1..bd0e8f2 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,6 @@ ("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/android/gradle.properties b/android/gradle.properties index 2597170..f018a61 100644 --- a/android/gradle.properties +++ b/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index 7bb2df6..afa1e8e 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-all.zip diff --git a/android/settings.gradle b/android/settings.gradle deleted file mode 100644 index b9e43bd..0000000 --- a/android/settings.gradle +++ /dev/null @@ -1,25 +0,0 @@ -pluginManagement { - def flutterSdkPath = { - def properties = new Properties() - file("local.properties").withInputStream { properties.load(it) } - def flutterSdkPath = properties.getProperty("flutter.sdk") - assert flutterSdkPath != null, "flutter.sdk not set in local.properties" - return flutterSdkPath - }() - - 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.1.0" apply false - id "org.jetbrains.kotlin.android" version "1.8.22" apply false -} - -include ":app" diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts new file mode 100644 index 0000000..a439442 --- /dev/null +++ b/android/settings.gradle.kts @@ -0,0 +1,25 @@ +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.7.0" apply false + id("org.jetbrains.kotlin.android") version "1.8.22" apply false +} + +include(":app") diff --git a/assets/settings/app-settings.json b/assets/settings/app-settings.json index c4e5b99..4c41f52 100644 --- a/assets/settings/app-settings.json +++ b/assets/settings/app-settings.json @@ -1,6 +1,6 @@ { "api-host-commented": "127.0.0.1", - "api-host": "172.20.10.4", + "api-host": "172.20.10.6", "api-host-commented1": "192.168.8.192", "api-port": 8080, "api-auth-token": "flowers-app-api-auth-token", diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig index ec97fc6..592ceee 100644 --- a/ios/Flutter/Debug.xcconfig +++ b/ios/Flutter/Debug.xcconfig @@ -1,2 +1 @@ -#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 index c4855bf..592ceee 100644 --- a/ios/Flutter/Release.xcconfig +++ b/ios/Flutter/Release.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile deleted file mode 100644 index d97f17e..0000000 --- a/ios/Podfile +++ /dev/null @@ -1,44 +0,0 @@ -# Uncomment this line to define a global platform for your project -# platform :ios, '12.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! - use_modular_headers! - - flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) - target 'RunnerTests' do - inherit! :search_paths - end -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - flutter_additional_ios_build_settings(target) - end -end diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index f5562e3..ad62796 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -10,12 +10,10 @@ 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 */; }; - 5863F22CACB26D4E06019B22 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C071CF1C8F8C0EC7D375BFE8 /* Pods_RunnerTests.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 */; }; - D9D8B4E204BE999187E32D7B /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5E33F892A3C7381B13D2BCF5 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -47,14 +45,8 @@ 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 = ""; }; - 3EBAE33EBF70B3943EC85830 /* 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 = ""; }; - 5056529F95EEFFA91759F14C /* 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 = ""; }; - 51555C78847C06014CA3731B /* 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 = ""; }; - 5E33F892A3C7381B13D2BCF5 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 6EC1D801412897DB5E208676 /* 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 = ""; }; 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 = ""; }; - 78E8D53EEC69C55B8C1D009B /* 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 = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; @@ -63,8 +55,6 @@ 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 = ""; }; - 9E75EE4516CA338ABAF1D5F7 /* 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 = ""; }; - C071CF1C8F8C0EC7D375BFE8 /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -72,35 +62,12 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - D9D8B4E204BE999187E32D7B /* Pods_Runner.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F18A9CCF0E8D881E439D8C1A /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 5863F22CACB26D4E06019B22 /* Pods_RunnerTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 12EEC2C2715045288A2E2767 /* Pods */ = { - isa = PBXGroup; - children = ( - 78E8D53EEC69C55B8C1D009B /* Pods-Runner.debug.xcconfig */, - 3EBAE33EBF70B3943EC85830 /* Pods-Runner.release.xcconfig */, - 51555C78847C06014CA3731B /* Pods-Runner.profile.xcconfig */, - 6EC1D801412897DB5E208676 /* Pods-RunnerTests.debug.xcconfig */, - 5056529F95EEFFA91759F14C /* Pods-RunnerTests.release.xcconfig */, - 9E75EE4516CA338ABAF1D5F7 /* Pods-RunnerTests.profile.xcconfig */, - ); - name = Pods; - path = Pods; - sourceTree = ""; - }; 331C8082294A63A400263BE5 /* RunnerTests */ = { isa = PBXGroup; children = ( @@ -127,8 +94,6 @@ 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, 331C8082294A63A400263BE5 /* RunnerTests */, - 12EEC2C2715045288A2E2767 /* Pods */, - A16654BEC626EE79B44D5FCF /* Frameworks */, ); sourceTree = ""; }; @@ -156,15 +121,6 @@ path = Runner; sourceTree = ""; }; - A16654BEC626EE79B44D5FCF /* Frameworks */ = { - isa = PBXGroup; - children = ( - 5E33F892A3C7381B13D2BCF5 /* Pods_Runner.framework */, - C071CF1C8F8C0EC7D375BFE8 /* Pods_RunnerTests.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXNativeTarget section */ @@ -172,10 +128,8 @@ isa = PBXNativeTarget; buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( - F539508A2CD475204FF14844 /* [CP] Check Pods Manifest.lock */, 331C807D294A63A400263BE5 /* Sources */, 331C807F294A63A400263BE5 /* Resources */, - F18A9CCF0E8D881E439D8C1A /* Frameworks */, ); buildRules = ( ); @@ -191,14 +145,12 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( - E58460E537B8B6489B93705A /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, - 04E0B9E1CA484D3AA1795391 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -270,23 +222,6 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 04E0B9E1CA484D3AA1795391 /* [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; - }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; alwaysOutOfDate = 1; @@ -318,50 +253,6 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; - E58460E537B8B6489B93705A /* [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; - }; - F539508A2CD475204FF14844 /* [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; - }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -471,14 +362,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = A8X5SQ4497; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "com.anton-lobanov-co.flowers-app.flowersApp"; + PRODUCT_BUNDLE_IDENTIFIER = com.lobanov.antongmail.com.flowerApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -488,14 +378,13 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6EC1D801412897DB5E208676 /* 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.anton-lobanov-co.flowers-app.flowersApp.RunnerTests"; + PRODUCT_BUNDLE_IDENTIFIER = com.lobanov.antongmail.com.flowerApp.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -506,14 +395,13 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5056529F95EEFFA91759F14C /* 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.anton-lobanov-co.flowers-app.flowersApp.RunnerTests"; + PRODUCT_BUNDLE_IDENTIFIER = com.lobanov.antongmail.com.flowerApp.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -522,14 +410,13 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 9E75EE4516CA338ABAF1D5F7 /* 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.anton-lobanov-co.flowers-app.flowersApp.RunnerTests"; + PRODUCT_BUNDLE_IDENTIFIER = com.lobanov.antongmail.com.flowerApp.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -654,14 +541,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = A8X5SQ4497; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "com.anton-lobanov-co.flowers-app.flowersApp"; + PRODUCT_BUNDLE_IDENTIFIER = com.lobanov.antongmail.com.flowerApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -677,14 +563,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = A8X5SQ4497; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = "com.anton-lobanov-co.flowers-app.flowersApp"; + PRODUCT_BUNDLE_IDENTIFIER = com.lobanov.antongmail.com.flowerApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 8e3ca5d..15cada4 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -59,6 +59,7 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata index 21a3cc1..1d526a1 100644 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,7 +4,4 @@ - - diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index cbff900..70e8fc4 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -5,7 +5,7 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Flowers App + Flower App CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - flowers_app + flower_app CFBundlePackageType APPL CFBundleShortVersionString diff --git a/lib/app/app_state.dart_ b/lib/app/app_state.dart_ index a32c80e..ae2ab1a 100644 --- a/lib/app/app_state.dart_ +++ b/lib/app/app_state.dart_ @@ -1,6 +1,6 @@ -import 'package:flowers_app/app/app_events.dart_'; -import 'package:flowers_app/app/auth/auth_state.dart_'; -import 'package:flowers_app/app/purchase_overview/state.dart'; +import 'package:flower_app/app/app_events.dart_'; +import 'package:flower_app/app/auth/auth_state.dart_'; +import 'package:flower_app/app/purchase_overview/state.dart'; class AppState { final AppEvents appEvents; diff --git a/lib/app/auth/auth_state.dart_ b/lib/app/auth/auth_state.dart_ index 7fafd27..9b7596e 100644 --- a/lib/app/auth/auth_state.dart_ +++ b/lib/app/auth/auth_state.dart_ @@ -1,4 +1,4 @@ -import 'package:flowers_app/app/auth/auth_events.dart_'; +import 'package:flower_app/app/auth/auth_events.dart_'; class AuthState { final AuthEvents authEvents; diff --git a/lib/app/purchase_overview/state.dart_ b/lib/app/purchase_overview/state.dart_ index c0d9595..1c89325 100644 --- a/lib/app/purchase_overview/state.dart_ +++ b/lib/app/purchase_overview/state.dart_ @@ -1,10 +1,10 @@ -import 'package:flowers_app/app/purchase_overview/events.dart_'; -import 'package:flowers_app/domain/purchase/purchase.dart'; -import 'package:flowers_app/domain/purchase/purchase_list.dart'; -import 'package:flowers_app/infrastructure/api/api_request.dart'; -import 'package:flowers_app/infrastructure/api/api_params.dart'; -import 'package:flowers_app/infrastructure/datasource/data_set.dart'; -import 'package:flowers_app/infrastructure/datasource/data_source.dart'; +import 'package:flower_app/app/purchase_overview/events.dart_'; +import 'package:flower_app/domain/purchase/purchase.dart'; +import 'package:flower_app/domain/purchase/purchase_list.dart'; +import 'package:flower_app/infrastructure/api/api_request.dart'; +import 'package:flower_app/infrastructure/api/api_params.dart'; +import 'package:flower_app/infrastructure/datasource/data_set.dart'; +import 'package:flower_app/infrastructure/datasource/data_source.dart'; class PurchaseOverviewState { final PurchaseOverviewEvent purchaseOverviewEvents; diff --git a/lib/assets/texts/app_text.dart b/lib/assets/texts/app_text.dart index 3f86199..b7dd50e 100644 --- a/lib/assets/texts/app_text.dart +++ b/lib/assets/texts/app_text.dart @@ -1,7 +1,7 @@ // ignore_for_file: avoid_classes_with_only_static_members -import 'package:flowers_app/dev/log/log.dart'; +import 'package:flower_app/dev/log/log.dart'; enum AppLang {en, ru, de, fr} const appLang = AppLang.ru; diff --git a/lib/domain/auth/app_user.dart b/lib/domain/auth/app_user.dart index 1a6e9cc..a773816 100644 --- a/lib/domain/auth/app_user.dart +++ b/lib/domain/auth/app_user.dart @@ -1,5 +1,5 @@ import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/domain/auth/auth_result.dart b/lib/domain/auth/auth_result.dart index 817e292..0fd69fa 100644 --- a/lib/domain/auth/auth_result.dart +++ b/lib/domain/auth/auth_result.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; class AuthResult { final bool _authenticated; diff --git a/lib/domain/auth/authenticate.dart b/lib/domain/auth/authenticate.dart index a9cbb0d..6f36085 100644 --- a/lib/domain/auth/authenticate.dart +++ b/lib/domain/auth/authenticate.dart @@ -1,9 +1,9 @@ // import 'package:firebase_auth/firebase_auth.dart'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/auth/auth_result.dart'; -import 'package:flowers_app/domain/auth/user_phone.dart'; -import 'package:flowers_app/domain/core/local_store/local_store.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/auth_result.dart'; +import 'package:flower_app/domain/auth/user_phone.dart'; +import 'package:flower_app/domain/core/local_store/local_store.dart'; import 'package:hmi_core/hmi_core_result.dart'; /// /// Auth user by phone number diff --git a/lib/domain/auth/register_user.dart b/lib/domain/auth/register_user.dart index 79ade7d..2a25870 100644 --- a/lib/domain/auth/register_user.dart +++ b/lib/domain/auth/register_user.dart @@ -1,7 +1,7 @@ import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/core/errors/failure.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; /// diff --git a/lib/domain/auth/test/test_encode.dart b/lib/domain/auth/test/test_encode.dart index bdac553..2827a54 100644 --- a/lib/domain/auth/test/test_encode.dart +++ b/lib/domain/auth/test/test_encode.dart @@ -1,5 +1,5 @@ -import 'package:flowers_app/dev/log/log.dart'; +import 'package:flower_app/dev/log/log.dart'; void main() { const _debug = false; diff --git a/lib/domain/auth/test/test_password.dart_ b/lib/domain/auth/test/test_password.dart_ index 82cfbd6..2ea153e 100644 --- a/lib/domain/auth/test/test_password.dart_ +++ b/lib/domain/auth/test/test_password.dart_ @@ -1,4 +1,4 @@ -import 'package:flowers_app/dev/log/log.dart'; +import 'package:flower_app/dev/log/log.dart'; void main() { // const str = r'12$34\567890-=qwertyuiop[]asdfghjkl;\`zxcvbnm,./ !@#%^&*()_+QWERTYUIOP{}ASDFGHJKL:"|~ZXCVBNM<>?;1234567890-=!"№%:,.;()_+йцукенгшщзхъЙЦУКЕНГШЩЗХЪфывапролджэёФЫВАПРОЛДЖЭЁ]ячсмитьбю/[ЯЧСМИТЬБЮ?]"'; diff --git a/lib/domain/auth/test/test_tea_password.dart_ b/lib/domain/auth/test/test_tea_password.dart_ index df1c516..9fa97ce 100644 --- a/lib/domain/auth/test/test_tea_password.dart_ +++ b/lib/domain/auth/test/test_tea_password.dart_ @@ -1,4 +1,4 @@ -import 'package:flowers_app/dev/log/log.dart'; +import 'package:flower_app/dev/log/log.dart'; /// Tiny Encryption Algorithm void main() { diff --git a/lib/domain/auth/test/test_user.dart b/lib/domain/auth/test/test_user.dart index d7168d1..dcac621 100644 --- a/lib/domain/auth/test/test_user.dart +++ b/lib/domain/auth/test/test_user.dart @@ -1,8 +1,8 @@ -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/auth/auth_result.dart'; -import 'package:flowers_app/domain/auth/user_phone.dart'; -import 'package:flowers_app/domain/core/local_store/local_store.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/auth_result.dart'; +import 'package:flower_app/domain/auth/user_phone.dart'; +import 'package:flower_app/domain/core/local_store/local_store.dart'; import 'package:hmi_core/hmi_core_result.dart'; /// /// diff --git a/lib/domain/auth/user_group.dart b/lib/domain/auth/user_group.dart index 300337f..f2d8110 100644 --- a/lib/domain/auth/user_group.dart +++ b/lib/domain/auth/user_group.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/domain/core/errors/failure.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; /// Константы групп пользователей в системе class UserGroupList { diff --git a/lib/domain/auth/user_password.dart b/lib/domain/auth/user_password.dart index 7e5c9b7..c902b6c 100644 --- a/lib/domain/auth/user_password.dart +++ b/lib/domain/auth/user_password.dart @@ -1,7 +1,7 @@ import 'dart:math'; -import 'package:flowers_app/domain/auth/user_password.key' as user_pass; -import 'package:flowers_app/domain/core/entities/validation_result.dart'; +import 'package:flower_app/domain/auth/user_password.key' as user_pass; +import 'package:flower_app/domain/core/entities/validation_result.dart'; class UserPassword { final _key = user_pass.key; diff --git a/lib/domain/auth/user_phone.dart b/lib/domain/auth/user_phone.dart index 3a6feeb..5b665d4 100644 --- a/lib/domain/auth/user_phone.dart +++ b/lib/domain/auth/user_phone.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/domain/core/entities/validation_result.dart'; +import 'package:flower_app/domain/core/entities/validation_result.dart'; /// /// Класс хранит номер телефона в 10-ти значном формате /// и код страны в строке как пример +7 diff --git a/lib/domain/auth/user_phone_verify.dart_ b/lib/domain/auth/user_phone_verify.dart_ index a9d7489..0d0ba0d 100644 --- a/lib/domain/auth/user_phone_verify.dart_ +++ b/lib/domain/auth/user_phone_verify.dart_ @@ -1,5 +1,5 @@ import 'package:firebase_auth/firebase_auth.dart'; -import 'package:flowers_app/dev/log/log.dart'; +import 'package:flower_app/dev/log/log.dart'; class UserPhoneVerify { final String _countryCode; diff --git a/lib/domain/core/entities/value_multy_line_string.dart b/lib/domain/core/entities/value_multy_line_string.dart index caf10d4..b3c1219 100644 --- a/lib/domain/core/entities/value_multy_line_string.dart +++ b/lib/domain/core/entities/value_multy_line_string.dart @@ -1,5 +1,5 @@ -import 'package:flowers_app/domain/core/entities/value_object.dart'; -import 'package:flowers_app/domain/core/entities/value_object_validation.dart'; +import 'package:flower_app/domain/core/entities/value_object.dart'; +import 'package:flower_app/domain/core/entities/value_object_validation.dart'; class ValueMultyLineString extends ValueObject { final List? _validationList; diff --git a/lib/domain/core/entities/value_string.dart b/lib/domain/core/entities/value_string.dart index 6d0d061..d387792 100644 --- a/lib/domain/core/entities/value_string.dart +++ b/lib/domain/core/entities/value_string.dart @@ -1,5 +1,5 @@ -import 'package:flowers_app/domain/core/entities/value_object.dart'; -import 'package:flowers_app/domain/core/entities/value_object_validation.dart'; +import 'package:flower_app/domain/core/entities/value_object.dart'; +import 'package:flower_app/domain/core/entities/value_object_validation.dart'; class ValueString extends ValueObject { final List? _validationList; diff --git a/lib/domain/core/errors/errors.dart b/lib/domain/core/errors/errors.dart index 3098e66..25d002c 100644 --- a/lib/domain/core/errors/errors.dart +++ b/lib/domain/core/errors/errors.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/domain/core/errors/failure.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; class NotAuthenticatedError extends Error {} diff --git a/lib/domain/core/errors/failure.dart b/lib/domain/core/errors/failure.dart index 96e6b7e..6a051ec 100644 --- a/lib/domain/core/errors/failure.dart +++ b/lib/domain/core/errors/failure.dart @@ -1,6 +1,6 @@ // // Ganeral Value Failures -import 'package:flowers_app/dev/log/log.dart'; +import 'package:flower_app/dev/log/log.dart'; abstract class Failure { static const _debug = true; diff --git a/lib/domain/core/local_store/local_store.dart b/lib/domain/core/local_store/local_store.dart index 3871467..7dc07d7 100644 --- a/lib/domain/core/local_store/local_store.dart +++ b/lib/domain/core/local_store/local_store.dart @@ -1,6 +1,6 @@ import 'dart:convert'; -import 'package:flowers_app/dev/log/log.dart'; +import 'package:flower_app/dev/log/log.dart'; import 'package:shared_preferences/shared_preferences.dart'; /// Класс реализует чтение и запись данных diff --git a/lib/domain/core/translate/translate.dart b/lib/domain/core/translate/translate.dart new file mode 100644 index 0000000..a453c73 --- /dev/null +++ b/lib/domain/core/translate/translate.dart @@ -0,0 +1,70 @@ +class InEn { + final String _value; + InEn(value) : _value = value; + @override + String toString() { + return tr[_value]?[Lang.en] ?? _value; + } +} + +class InRu { + final String _value; + InRu(value) : _value = value; + @override + String toString() { + return tr[_value]?[Lang.ru] ?? _value; + } +} + +enum Lang { + en, + ru +} + +const tr = { + 'name': {Lang.en: 'name', Lang.ru: 'имя'}, + 'Edit customer': {Lang.en: 'Edit customer', Lang.ru: 'Редактировать пользователя'}, + 'Edit transaction': {Lang.en: 'Edit transaction', Lang.ru: 'Редактировать транзакцию'}, + 'New transaction': {Lang.en: 'New transaction', Lang.ru: 'Новая транзакция'}, + 'from': {Lang.en: 'from', Lang.ru: 'от'}, + 'Author': {Lang.en: 'Author', Lang.ru: 'Автор'}, + 'Customer': {Lang.en: 'Customer', Lang.ru: 'Пользователь'}, + 'Value': {Lang.en: 'Value', Lang.ru: 'Сумма'}, + 'Created': {Lang.en: 'Created', Lang.ru: 'Создано'}, + 'Description': {Lang.en: 'Description', Lang.ru: 'Описание'}, + 'TransactionDetails': {Lang.en: 'Details', Lang.ru: 'Назначение'}, + 'CustomerAccountBefore': {Lang.en: 'Customer account before', Lang.ru: 'Счет клиента до'}, + 'NotSampled': {Lang.en: 'Not sampled', Lang.ru: 'Не выбрано'}, + 'AllowIndebted': {Lang.en: 'Allow indebted', Lang.ru: 'Разрешить в долг'}, + 'Amount': {Lang.en: 'Amount', Lang.ru: 'Сумма'}, + 'amount': {Lang.en: 'amount', Lang.ru: 'сумма'}, + 'of': {Lang.en: 'of', Lang.ru: 'от'}, + 'Show deleted': {Lang.en: 'Show deleted', Lang.ru: 'Показывать удаленные'}, + 'Customers': {Lang.en: 'Customers', Lang.ru: 'Пользователи'}, + 'Transactions': {Lang.en: 'Transactions', Lang.ru: 'Транзакции'}, + 'Payment': {Lang.en: 'Payment', Lang.ru: 'Оплата'}, + 'ProductCategory': {Lang.en: 'Product Category', Lang.ru: 'Категории'}, + 'Product': {Lang.en: 'Product', Lang.ru: 'Товар'}, + 'Products': {Lang.en: 'Products', Lang.ru: 'Товары'}, + 'Purchase': {Lang.en: 'Purchase', Lang.ru: 'Закупка'}, + 'Purchases': {Lang.en: 'Purchases', Lang.ru: 'Закупки'}, + 'PurchaseItems': {Lang.en: 'Purchase Items', Lang.ru: 'Позиции закупок'}, + 'Orders': {Lang.en: 'Orders', Lang.ru: 'Заказы'}, + 'Count': {Lang.en: 'Count', Lang.ru: 'Кол-во'}, + 'Paid': {Lang.en: 'Paid', Lang.ru: 'Оплачено'}, + 'Cost': {Lang.en: 'Cost', Lang.ru: 'Стоимость'}, + 'Distributed': {Lang.en: 'Distributed', Lang.ru: 'Выдано'}, + + 'No products added yet': {Lang.en: 'No products added yet', Lang.ru: 'Пока не добавлено ни одного продукта'}, + 'Reload': {Lang.en: 'Reload', Lang.ru: 'Перезагрузить'}, +}; +/// +/// Simple translate +extension StringTranslation on String{ + String get inEn { + return tr[this]?[Lang.en] ?? this; + } + String get inRu { + return tr[this]?[Lang.ru] ?? this; + } +} diff --git a/lib/domain/notice/notice.dart b/lib/domain/notice/notice.dart index 0e809bc..1b799e5 100644 --- a/lib/domain/notice/notice.dart +++ b/lib/domain/notice/notice.dart @@ -1,5 +1,5 @@ import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/domain/notice/notice_list.dart b/lib/domain/notice/notice_list.dart index 5a3289c..969a7dd 100644 --- a/lib/domain/notice/notice_list.dart +++ b/lib/domain/notice/notice_list.dart @@ -1,9 +1,9 @@ import 'dart:async'; import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/domain/notice/notice.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/domain/notice/notice.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/domain/notice/notice_list_viewed.dart b/lib/domain/notice/notice_list_viewed.dart index 9546aad..72b37f8 100644 --- a/lib/domain/notice/notice_list_viewed.dart +++ b/lib/domain/notice/notice_list_viewed.dart @@ -1,8 +1,8 @@ import 'dart:async'; import 'dart:convert'; -import 'package:flowers_app/domain/core/errors/failure.dart'; -import 'package:flowers_app/domain/core/local_store/local_store.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; +import 'package:flower_app/domain/core/local_store/local_store.dart'; import 'package:hmi_core/hmi_core_log.dart'; /// /// Класс реализует список элементов Notice для OrderOverviewBody diff --git a/lib/domain/order/order.dart b/lib/domain/order/order.dart index 8e8f300..32678a3 100644 --- a/lib/domain/order/order.dart +++ b/lib/domain/order/order.dart @@ -1,9 +1,9 @@ import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/domain/purchase/purchase_set_order.dart'; -import 'package:flowers_app/domain/purchase/purchase_status.dart'; -import 'package:flowers_app/presentation/core/dialogs/complete_dialog.dart'; -import 'package:flowers_app/presentation/core/dialogs/failure_dialog.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/domain/purchase/purchase_set_order.dart'; +import 'package:flower_app/domain/purchase/purchase_status.dart'; +import 'package:flower_app/presentation/core/dialogs/complete_dialog.dart'; +import 'package:flower_app/presentation/core/dialogs/failure_dialog.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; diff --git a/lib/domain/order/order_header.dart b/lib/domain/order/order_header.dart index 150223c..2fa7501 100644 --- a/lib/domain/order/order_header.dart +++ b/lib/domain/order/order_header.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/domain/order/order.dart'; +import 'package:flower_app/domain/order/order.dart'; class OrderHeader { late String purchaseId; diff --git a/lib/domain/order/order_list.dart b/lib/domain/order/order_list.dart index 76e7110..c5da816 100644 --- a/lib/domain/order/order_list.dart +++ b/lib/domain/order/order_list.dart @@ -1,6 +1,6 @@ import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/domain/order/order.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/domain/order/order.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/domain/purchase/purchase.dart b/lib/domain/purchase/purchase.dart index 3530ea4..98de7aa 100644 --- a/lib/domain/purchase/purchase.dart +++ b/lib/domain/purchase/purchase.dart @@ -1,5 +1,5 @@ import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/domain/purchase/purchase_content.dart b/lib/domain/purchase/purchase_content.dart index c02363c..c9efdde 100644 --- a/lib/domain/purchase/purchase_content.dart +++ b/lib/domain/purchase/purchase_content.dart @@ -1,6 +1,6 @@ import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/domain/purchase/purchase_item.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/domain/purchase/purchase_item.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/domain/purchase/purchase_item.dart b/lib/domain/purchase/purchase_item.dart index 7f96b78..3df7de2 100644 --- a/lib/domain/purchase/purchase_item.dart +++ b/lib/domain/purchase/purchase_item.dart @@ -1,6 +1,6 @@ import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/domain/purchase/purchase_status.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/domain/purchase/purchase_status.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/domain/purchase/purchase_list.dart b/lib/domain/purchase/purchase_list.dart index 3db9ad0..0594f6b 100644 --- a/lib/domain/purchase/purchase_list.dart +++ b/lib/domain/purchase/purchase_list.dart @@ -1,6 +1,6 @@ import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/domain/purchase/purchase.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/domain/purchase/purchase.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/domain/purchase/purchase_list_filtered.dart b/lib/domain/purchase/purchase_list_filtered.dart index 471ae62..9499034 100644 --- a/lib/domain/purchase/purchase_list_filtered.dart +++ b/lib/domain/purchase/purchase_list_filtered.dart @@ -1,7 +1,7 @@ import 'dart:async'; -import 'package:flowers_app/domain/purchase/purchase.dart'; -import 'package:flowers_app/domain/purchase/purchase_list.dart'; +import 'package:flower_app/domain/purchase/purchase.dart'; +import 'package:flower_app/domain/purchase/purchase_list.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/domain/purchase/purchase_set_order.dart b/lib/domain/purchase/purchase_set_order.dart index 28ee6ff..dccff21 100644 --- a/lib/domain/purchase/purchase_set_order.dart +++ b/lib/domain/purchase/purchase_set_order.dart @@ -1,6 +1,6 @@ import 'package:ext_rw/ext_rw.dart'; -import 'package:flowers_app/domain/order/order.dart'; -import 'package:flowers_app/settings/setting.dart'; +import 'package:flower_app/domain/order/order.dart'; +import 'package:flower_app/settings/setting.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/domain/purchase/purchase_status.dart b/lib/domain/purchase/purchase_status.dart index 6a8874a..292019f 100644 --- a/lib/domain/purchase/purchase_status.dart +++ b/lib/domain/purchase/purchase_status.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/domain/core/errors/failure.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; /// /// Константы статусов закупок и позиций в закупке class PurchaseStatusList { diff --git a/lib/infrastructure/api/api_handle_error.dart_ b/lib/infrastructure/api/api_handle_error.dart_ index 783779c..a030a34 100644 --- a/lib/infrastructure/api/api_handle_error.dart_ +++ b/lib/infrastructure/api/api_handle_error.dart_ @@ -1,8 +1,8 @@ -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/core/errors/failure.dart'; -import 'package:flowers_app/infrastructure/api/api_params.dart'; -import 'package:flowers_app/infrastructure/api/json_to.dart'; -import 'package:flowers_app/infrastructure/api/response.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; +import 'package:flower_app/infrastructure/api/api_params.dart'; +import 'package:flower_app/infrastructure/api/json_to.dart'; +import 'package:flower_app/infrastructure/api/response.dart'; class ApiHandleError { static const _debug = false; diff --git a/lib/infrastructure/api/api_request.dart_ b/lib/infrastructure/api/api_request.dart_ index eaef265..b8b0b9a 100644 --- a/lib/infrastructure/api/api_request.dart_ +++ b/lib/infrastructure/api/api_request.dart_ @@ -1,8 +1,8 @@ import 'dart:io'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/core/errors/failure.dart'; -import 'package:flowers_app/infrastructure/api/api_params.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; +import 'package:flower_app/infrastructure/api/api_params.dart'; import 'package:http/http.dart' as http; import 'package:http/io_client.dart'; diff --git a/lib/infrastructure/api/api_stream.dart_ b/lib/infrastructure/api/api_stream.dart_ index 5d57489..5fb54df 100644 --- a/lib/infrastructure/api/api_stream.dart_ +++ b/lib/infrastructure/api/api_stream.dart_ @@ -1,8 +1,8 @@ import 'dart:async'; import 'dart:convert'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/infrastructure/api/api_params.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/infrastructure/api/api_params.dart'; import 'package:http/http.dart' as http; class ApiStream { diff --git a/lib/infrastructure/api/json_to.dart_ b/lib/infrastructure/api/json_to.dart_ index 65f4554..2b13c6d 100644 --- a/lib/infrastructure/api/json_to.dart_ +++ b/lib/infrastructure/api/json_to.dart_ @@ -1,9 +1,9 @@ import 'dart:convert'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/core/errors/failure.dart'; -import 'package:flowers_app/infrastructure/api/api_params.dart'; -import 'package:flowers_app/infrastructure/api/api_request.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; +import 'package:flower_app/infrastructure/api/api_params.dart'; +import 'package:flower_app/infrastructure/api/api_request.dart'; class JsonTo { static const _debug = false; diff --git a/lib/infrastructure/api/json_to_list.dart_ b/lib/infrastructure/api/json_to_list.dart_ index c4fc1ba..da17441 100644 --- a/lib/infrastructure/api/json_to_list.dart_ +++ b/lib/infrastructure/api/json_to_list.dart_ @@ -1,9 +1,9 @@ import 'dart:convert'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/core/errors/failure.dart'; -import 'package:flowers_app/infrastructure/api/api_params.dart'; -import 'package:flowers_app/infrastructure/api/api_request.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; +import 'package:flower_app/infrastructure/api/api_params.dart'; +import 'package:flower_app/infrastructure/api/api_request.dart'; class JsonToList { final ApiRequest _request; diff --git a/lib/infrastructure/api/json_to_map.dart_ b/lib/infrastructure/api/json_to_map.dart_ index 22082a3..52a384a 100644 --- a/lib/infrastructure/api/json_to_map.dart_ +++ b/lib/infrastructure/api/json_to_map.dart_ @@ -1,9 +1,9 @@ import 'dart:convert'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/core/errors/failure.dart'; -import 'package:flowers_app/infrastructure/api/api_params.dart'; -import 'package:flowers_app/infrastructure/api/api_request.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; +import 'package:flower_app/infrastructure/api/api_params.dart'; +import 'package:flower_app/infrastructure/api/api_request.dart'; class JsonToMap { final ApiRequest _request; diff --git a/lib/main.dart b/lib/main.dart index d20296f..70c7a39 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,11 +1,11 @@ import 'dart:async'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/auth/authenticate.dart'; -import 'package:flowers_app/presentation/auth/sign_in/sign_in_page.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/purchase/purchase_overview/purchase_overview_page.dart'; -import 'package:flowers_app/settings/app_settings.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/authenticate.dart'; +import 'package:flower_app/presentation/auth/sign_in/sign_in_page.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/purchase/purchase_overview/purchase_overview_page.dart'; +import 'package:flower_app/settings/app_settings.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_json.dart'; diff --git a/lib/presentation/auth/change_password/change_password_page.dart b/lib/presentation/auth/change_password/change_password_page.dart index 42cf711..83212ba 100644 --- a/lib/presentation/auth/change_password/change_password_page.dart +++ b/lib/presentation/auth/change_password/change_password_page.dart @@ -1,7 +1,7 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/presentation/auth/change_password/widgets/change_password_form.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/presentation/auth/change_password/widgets/change_password_form.dart'; import 'package:flutter/material.dart'; class ChangePasswordPage extends StatelessWidget { diff --git a/lib/presentation/auth/change_password/widgets/change_password_form.dart b/lib/presentation/auth/change_password/widgets/change_password_form.dart index e12711f..302cf4a 100644 --- a/lib/presentation/auth/change_password/widgets/change_password_form.dart +++ b/lib/presentation/auth/change_password/widgets/change_password_form.dart @@ -1,14 +1,14 @@ import 'package:another_flushbar/flushbar_helper.dart'; -import 'package:flowers_app/assets/settings/common_settings.dart'; -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/auth/register_user.dart'; -import 'package:flowers_app/domain/auth/user_group.dart'; -import 'package:flowers_app/domain/auth/user_password.dart'; -import 'package:flowers_app/domain/auth/user_phone.dart'; -import 'package:flowers_app/domain/core/errors/failure.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; +import 'package:flower_app/assets/settings/common_settings.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/register_user.dart'; +import 'package:flower_app/domain/auth/user_group.dart'; +import 'package:flower_app/domain/auth/user_password.dart'; +import 'package:flower_app/domain/auth/user_phone.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/presentation/auth/register_user/register_user_page.dart b/lib/presentation/auth/register_user/register_user_page.dart index 0f3f592..4121739 100644 --- a/lib/presentation/auth/register_user/register_user_page.dart +++ b/lib/presentation/auth/register_user/register_user_page.dart @@ -1,6 +1,6 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/auth/user_phone.dart'; -import 'package:flowers_app/presentation/auth/register_user/widgets/register_user_form.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/auth/user_phone.dart'; +import 'package:flower_app/presentation/auth/register_user/widgets/register_user_form.dart'; import 'package:flutter/material.dart'; class RegisterUserPage extends StatelessWidget { diff --git a/lib/presentation/auth/register_user/widgets/register_user_form.dart b/lib/presentation/auth/register_user/widgets/register_user_form.dart index 44c6803..314dc40 100644 --- a/lib/presentation/auth/register_user/widgets/register_user_form.dart +++ b/lib/presentation/auth/register_user/widgets/register_user_form.dart @@ -1,14 +1,14 @@ import 'package:another_flushbar/flushbar_helper.dart'; -import 'package:flowers_app/assets/settings/common_settings.dart'; -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/auth/register_user.dart'; -import 'package:flowers_app/domain/auth/user_group.dart'; -import 'package:flowers_app/domain/auth/user_password.dart'; -import 'package:flowers_app/domain/auth/user_phone.dart'; -import 'package:flowers_app/domain/core/errors/failure.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; +import 'package:flower_app/assets/settings/common_settings.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/register_user.dart'; +import 'package:flower_app/domain/auth/user_group.dart'; +import 'package:flower_app/domain/auth/user_password.dart'; +import 'package:flower_app/domain/auth/user_phone.dart'; +import 'package:flower_app/domain/core/errors/failure.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/presentation/auth/sign_in/sign_in_page.dart b/lib/presentation/auth/sign_in/sign_in_page.dart index 210bed2..b2c5f89 100644 --- a/lib/presentation/auth/sign_in/sign_in_page.dart +++ b/lib/presentation/auth/sign_in/sign_in_page.dart @@ -1,7 +1,7 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/auth/authenticate.dart'; -import 'package:flowers_app/presentation/auth/sign_in/widgets/sign_in_form.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/authenticate.dart'; +import 'package:flower_app/presentation/auth/sign_in/widgets/sign_in_form.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; /// diff --git a/lib/presentation/auth/sign_in/user_id_page.dart b/lib/presentation/auth/sign_in/user_id_page.dart index 42a7689..d6f56d6 100644 --- a/lib/presentation/auth/sign_in/user_id_page.dart +++ b/lib/presentation/auth/sign_in/user_id_page.dart @@ -1,11 +1,11 @@ import 'package:another_flushbar/flushbar_helper.dart'; -import 'package:flowers_app/assets/settings/common_settings.dart'; -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/auth/user_phone.dart'; -import 'package:flowers_app/domain/core/timers/count_timer.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/assets/settings/common_settings.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/user_phone.dart'; +import 'package:flower_app/domain/core/timers/count_timer.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; /// Класс проверяет пользователя по ID diff --git a/lib/presentation/auth/sign_in/user_pass_page.dart b/lib/presentation/auth/sign_in/user_pass_page.dart index e6d6013..f07b212 100644 --- a/lib/presentation/auth/sign_in/user_pass_page.dart +++ b/lib/presentation/auth/sign_in/user_pass_page.dart @@ -1,12 +1,12 @@ import 'package:another_flushbar/flushbar_helper.dart'; -import 'package:flowers_app/assets/settings/common_settings.dart'; -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/auth/user_password.dart'; -import 'package:flowers_app/domain/auth/user_phone.dart'; -import 'package:flowers_app/domain/core/timers/count_timer.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/assets/settings/common_settings.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/user_password.dart'; +import 'package:flower_app/domain/auth/user_phone.dart'; +import 'package:flower_app/domain/core/timers/count_timer.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; /// /// Класс проверяет пользователя по ID diff --git a/lib/presentation/auth/sign_in/widgets/phone_number_widget.dart b/lib/presentation/auth/sign_in/widgets/phone_number_widget.dart index 6441ea7..4efe660 100644 --- a/lib/presentation/auth/sign_in/widgets/phone_number_widget.dart +++ b/lib/presentation/auth/sign_in/widgets/phone_number_widget.dart @@ -1,7 +1,7 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/auth/user_phone.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/auth/user_phone.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; class PhoneNumbetWidget extends StatefulWidget { diff --git a/lib/presentation/auth/sign_in/widgets/sign_in_form.dart b/lib/presentation/auth/sign_in/widgets/sign_in_form.dart index 1165067..2f39209 100644 --- a/lib/presentation/auth/sign_in/widgets/sign_in_form.dart +++ b/lib/presentation/auth/sign_in/widgets/sign_in_form.dart @@ -1,15 +1,15 @@ import 'package:another_flushbar/flushbar_helper.dart'; -import 'package:flowers_app/assets/settings/common_settings.dart'; -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/auth/auth_result.dart'; -import 'package:flowers_app/domain/auth/authenticate.dart'; -import 'package:flowers_app/domain/auth/user_phone.dart'; -import 'package:flowers_app/presentation/auth/register_user/register_user_page.dart'; -import 'package:flowers_app/presentation/auth/sign_in/user_pass_page.dart'; -import 'package:flowers_app/presentation/auth/sign_in/widgets/phone_number_widget.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; +import 'package:flower_app/assets/settings/common_settings.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/auth_result.dart'; +import 'package:flower_app/domain/auth/authenticate.dart'; +import 'package:flower_app/domain/auth/user_phone.dart'; +import 'package:flower_app/presentation/auth/register_user/register_user_page.dart'; +import 'package:flower_app/presentation/auth/sign_in/user_pass_page.dart'; +import 'package:flower_app/presentation/auth/sign_in/widgets/phone_number_widget.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/presentation/core/widgets/button_with_loading_indicator.dart b/lib/presentation/core/widgets/button_with_loading_indicator.dart index 4219cfc..2a2fe9c 100644 --- a/lib/presentation/core/widgets/button_with_loading_indicator.dart +++ b/lib/presentation/core/widgets/button_with_loading_indicator.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/presentation/core/widgets/sized_progress_indicator.dart'; +import 'package:flower_app/presentation/core/widgets/sized_progress_indicator.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_result.dart'; diff --git a/lib/presentation/core/widgets/count_button.dart b/lib/presentation/core/widgets/count_button.dart index 4bb3a23..494801e 100644 --- a/lib/presentation/core/widgets/count_button.dart +++ b/lib/presentation/core/widgets/count_button.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; class CountButton extends StatefulWidget { diff --git a/lib/presentation/core/widgets/critical_error_widget.dart b/lib/presentation/core/widgets/critical_error_widget.dart index d5312ec..15c3ff6 100644 --- a/lib/presentation/core/widgets/critical_error_widget.dart +++ b/lib/presentation/core/widgets/critical_error_widget.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; /// diff --git a/lib/presentation/core/widgets/image_on_network.dart b/lib/presentation/core/widgets/image_on_network.dart index 04a8591..394fae5 100644 --- a/lib/presentation/core/widgets/image_on_network.dart +++ b/lib/presentation/core/widgets/image_on_network.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/presentation/core/widgets/sized_progress_indicator.dart'; +import 'package:flower_app/presentation/core/widgets/sized_progress_indicator.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; /// diff --git a/lib/presentation/core/widgets/in_pogress_overlay.dart b/lib/presentation/core/widgets/in_pogress_overlay.dart index b19d81c..5947f98 100644 --- a/lib/presentation/core/widgets/in_pogress_overlay.dart +++ b/lib/presentation/core/widgets/in_pogress_overlay.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; /// /// diff --git a/lib/presentation/core/widgets/remains_widget.dart b/lib/presentation/core/widgets/remains_widget.dart index e2fad82..1e7eabb 100644 --- a/lib/presentation/core/widgets/remains_widget.dart +++ b/lib/presentation/core/widgets/remains_widget.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; class RemainsWidget extends StatelessWidget { diff --git a/lib/presentation/core/widgets/sized_progress_indicator.dart b/lib/presentation/core/widgets/sized_progress_indicator.dart index 5d52021..5d001c5 100644 --- a/lib/presentation/core/widgets/sized_progress_indicator.dart +++ b/lib/presentation/core/widgets/sized_progress_indicator.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; /// /// CircularProgressIndicator wrapped into SizedBox diff --git a/lib/presentation/notice/notice_overview_page.dart b/lib/presentation/notice/notice_overview_page.dart index 2863b3c..551863e 100644 --- a/lib/presentation/notice/notice_overview_page.dart +++ b/lib/presentation/notice/notice_overview_page.dart @@ -1,8 +1,8 @@ -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/notice/notice_list.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/purchase/purchase_item.dart'; -import 'package:flowers_app/presentation/notice/widgets/notice_overview_body.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/purchase/purchase_item.dart'; +import 'package:flower_app/presentation/notice/widgets/notice_overview_body.dart'; import 'package:flutter/material.dart'; /// /// diff --git a/lib/presentation/notice/widgets/notice_card.dart b/lib/presentation/notice/widgets/notice_card.dart index da4873d..251ec14 100644 --- a/lib/presentation/notice/widgets/notice_card.dart +++ b/lib/presentation/notice/widgets/notice_card.dart @@ -1,6 +1,6 @@ -import 'package:flowers_app/domain/notice/notice.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/domain/notice/notice.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; import 'package:visibility_detector/visibility_detector.dart'; /// diff --git a/lib/presentation/notice/widgets/notice_overview_body.dart b/lib/presentation/notice/widgets/notice_overview_body.dart index 47fcaa7..2b45eaa 100644 --- a/lib/presentation/notice/widgets/notice_overview_body.dart +++ b/lib/presentation/notice/widgets/notice_overview_body.dart @@ -1,13 +1,13 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/notice/notice.dart'; -import 'package:flowers_app/domain/notice/notice_list.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/core/widgets/critical_error_widget.dart'; -import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; -import 'package:flowers_app/presentation/notice/widgets/notice_card.dart'; -import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/notice/notice.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/widgets/critical_error_widget.dart'; +import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; +import 'package:flower_app/presentation/notice/widgets/notice_card.dart'; +import 'package:flower_app/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart'; import 'package:flutter/material.dart'; class NoticeOverviewBody extends StatelessWidget { diff --git a/lib/presentation/product/product_page.dart b/lib/presentation/product/product_page.dart index f2f35e3..bc8046f 100644 --- a/lib/presentation/product/product_page.dart +++ b/lib/presentation/product/product_page.dart @@ -1,8 +1,8 @@ -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/notice/notice_list.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/purchase/purchase_item.dart'; -import 'package:flowers_app/presentation/product/widgets/product_body.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/purchase/purchase_item.dart'; +import 'package:flower_app/presentation/product/widgets/product_body.dart'; import 'package:flutter/material.dart'; /// /// Displays a detailed info about the PurchaseItem diff --git a/lib/presentation/product/widgets/product_body.dart b/lib/presentation/product/widgets/product_body.dart index f76b2d2..f94941d 100644 --- a/lib/presentation/product/widgets/product_body.dart +++ b/lib/presentation/product/widgets/product_body.dart @@ -1,8 +1,8 @@ -import 'package:flowers_app/domain/notice/notice_list.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/purchase/purchase_item.dart'; -import 'package:flowers_app/presentation/product/widgets/product_card.dart'; -import 'package:flowers_app/presentation/product/widgets/product_card_with_notices.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/purchase/purchase_item.dart'; +import 'package:flower_app/presentation/product/widgets/product_card.dart'; +import 'package:flower_app/presentation/product/widgets/product_card_with_notices.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; /// diff --git a/lib/presentation/product/widgets/product_card.dart b/lib/presentation/product/widgets/product_card.dart index 90c2cc5..20a944e 100644 --- a/lib/presentation/product/widgets/product_card.dart +++ b/lib/presentation/product/widgets/product_card.dart @@ -1,10 +1,10 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/purchase/purchase_item.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; -import 'package:flowers_app/presentation/core/widgets/remains_widget.dart'; -import 'package:flowers_app/presentation/product/widgets/product_image_widget.dart'; -import 'package:flowers_app/presentation/product/widgets/set_order_widget.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/purchase/purchase_item.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; +import 'package:flower_app/presentation/core/widgets/remains_widget.dart'; +import 'package:flower_app/presentation/product/widgets/product_image_widget.dart'; +import 'package:flower_app/presentation/product/widgets/set_order_widget.dart'; import 'package:flutter/material.dart'; /// /// Displays a detailed info about the PurchaseItem diff --git a/lib/presentation/product/widgets/product_card_with_notices.dart b/lib/presentation/product/widgets/product_card_with_notices.dart index a3c3404..4e6e2a7 100644 --- a/lib/presentation/product/widgets/product_card_with_notices.dart +++ b/lib/presentation/product/widgets/product_card_with_notices.dart @@ -1,15 +1,15 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/notice/notice.dart'; -import 'package:flowers_app/domain/notice/notice_list.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/order/order.dart'; -import 'package:flowers_app/domain/purchase/purchase_item.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; -import 'package:flowers_app/presentation/core/widgets/remains_widget.dart'; -import 'package:flowers_app/presentation/notice/widgets/notice_overview_body.dart'; -import 'package:flowers_app/presentation/product/widgets/product_image_widget.dart'; -import 'package:flowers_app/presentation/product/widgets/set_order_widget.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/notice/notice.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/order/order.dart'; +import 'package:flower_app/domain/purchase/purchase_item.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; +import 'package:flower_app/presentation/core/widgets/remains_widget.dart'; +import 'package:flower_app/presentation/notice/widgets/notice_overview_body.dart'; +import 'package:flower_app/presentation/product/widgets/product_image_widget.dart'; +import 'package:flower_app/presentation/product/widgets/set_order_widget.dart'; import 'package:flutter/material.dart'; /// /// diff --git a/lib/presentation/product/widgets/product_image_widget.dart b/lib/presentation/product/widgets/product_image_widget.dart index 7f33100..cc5204a 100644 --- a/lib/presentation/product/widgets/product_image_widget.dart +++ b/lib/presentation/product/widgets/product_image_widget.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/presentation/core/widgets/image_on_network.dart'; +import 'package:flower_app/presentation/core/widgets/image_on_network.dart'; import 'package:flutter/material.dart'; /// /// Shows Picture in the ProductCard / PurchaseContentCard diff --git a/lib/presentation/product/widgets/set_order_widget.dart b/lib/presentation/product/widgets/set_order_widget.dart index fc1d464..6b32ed1 100644 --- a/lib/presentation/product/widgets/set_order_widget.dart +++ b/lib/presentation/product/widgets/set_order_widget.dart @@ -1,9 +1,9 @@ -import 'package:flowers_app/domain/order/order.dart'; -import 'package:flowers_app/domain/purchase/purchase_item.dart'; -import 'package:flowers_app/domain/purchase/purchase_set_order.dart'; -import 'package:flowers_app/presentation/core/widgets/button_with_loading_indicator.dart'; -import 'package:flowers_app/presentation/core/widgets/count_button.dart'; -import 'package:flowers_app/presentation/core/widgets/sized_progress_indicator.dart'; +import 'package:flower_app/domain/order/order.dart'; +import 'package:flower_app/domain/purchase/purchase_item.dart'; +import 'package:flower_app/domain/purchase/purchase_set_order.dart'; +import 'package:flower_app/presentation/core/widgets/button_with_loading_indicator.dart'; +import 'package:flower_app/presentation/core/widgets/count_button.dart'; +import 'package:flower_app/presentation/core/widgets/sized_progress_indicator.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; diff --git a/lib/presentation/purchase/purchase_item/purchase_item_page.dart b/lib/presentation/purchase/purchase_item/purchase_item_page.dart index 47f66d5..230ada7 100644 --- a/lib/presentation/purchase/purchase_item/purchase_item_page.dart +++ b/lib/presentation/purchase/purchase_item/purchase_item_page.dart @@ -1,8 +1,8 @@ -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/purchase/purchase.dart'; -import 'package:flowers_app/domain/purchase/purchase_content.dart'; -import 'package:flowers_app/presentation/purchase/purchase_item/widgets/purchase_item_body.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/purchase/purchase.dart'; +import 'package:flower_app/domain/purchase/purchase_content.dart'; +import 'package:flower_app/presentation/purchase/purchase_item/widgets/purchase_item_body.dart'; import 'package:flutter/material.dart'; /// /// diff --git a/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart b/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart index e59183c..23d138a 100644 --- a/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart +++ b/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart @@ -1,11 +1,12 @@ -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/purchase/purchase_content.dart'; -import 'package:flowers_app/domain/purchase/purchase_item.dart'; -import 'package:flowers_app/presentation/core/widgets/critical_error_widget.dart'; -import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; -import 'package:flowers_app/presentation/purchase/purchase_item/widgets/purchase_item_card.dart'; -import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/core/translate/translate.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/purchase/purchase_content.dart'; +import 'package:flower_app/domain/purchase/purchase_item.dart'; +import 'package:flower_app/presentation/core/widgets/critical_error_widget.dart'; +import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; +import 'package:flower_app/presentation/purchase/purchase_item/widgets/purchase_item_card.dart'; +import 'package:flower_app/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; @@ -59,6 +60,22 @@ class PurchaseItemBody extends StatelessWidget { case Ok, Failure>(value: final map): _log.debug('._buildListViewWidget | Data map received'); final products = map.values.toList(); + if (products.isEmpty) { + return Column( + mainAxisSize: MainAxisSize.min, // это оцентрирует по верикали + children: [ + Text( + 'No products added yet'.inRu, + textAlign: TextAlign.center, + ), + const SizedBox(height: 4,), + TextButton( + onPressed: () {}, + child: Text('Reload'.inRu) + ), + ], + ); + } return Scrollbar( child: ListView.builder( physics: const AlwaysScrollableScrollPhysics(), diff --git a/lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart b/lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart index 94e975b..d4fde54 100644 --- a/lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart +++ b/lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart @@ -1,11 +1,11 @@ -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/notice/notice_list.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/purchase/purchase_item.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/core/widgets/remains_widget.dart'; -import 'package:flowers_app/presentation/product/product_page.dart'; -import 'package:flowers_app/presentation/product/widgets/product_image_widget.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/purchase/purchase_item.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/widgets/remains_widget.dart'; +import 'package:flower_app/presentation/product/product_page.dart'; +import 'package:flower_app/presentation/product/widgets/product_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; /// diff --git a/lib/presentation/purchase/purchase_overview/purchase_overview_page.dart b/lib/presentation/purchase/purchase_overview/purchase_overview_page.dart index 0496ec7..837c342 100644 --- a/lib/presentation/purchase/purchase_overview/purchase_overview_page.dart +++ b/lib/presentation/purchase/purchase_overview/purchase_overview_page.dart @@ -1,14 +1,14 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/auth/user_group.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/purchase/purchase_list.dart'; -import 'package:flowers_app/domain/purchase/purchase_list_filtered.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/core/widgets/icons.dart'; -import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/popup_menu_btn.dart'; -import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/purchase_overview_body.dart'; -import 'package:flowers_app/presentation/user_account/user_account_page.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/auth/user_group.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/purchase/purchase_list.dart'; +import 'package:flower_app/domain/purchase/purchase_list_filtered.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/widgets/icons.dart'; +import 'package:flower_app/presentation/purchase/purchase_overview/widgets/popup_menu_btn.dart'; +import 'package:flower_app/presentation/purchase/purchase_overview/widgets/purchase_overview_body.dart'; +import 'package:flower_app/presentation/user_account/user_account_page.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; /// diff --git a/lib/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart b/lib/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart index 82f4e45..71c2c5a 100644 --- a/lib/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart +++ b/lib/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart @@ -1,5 +1,5 @@ -import 'package:flowers_app/assets/settings/common_settings.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/assets/settings/common_settings.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; /// /// diff --git a/lib/presentation/purchase/purchase_overview/widgets/popup_menu_btn.dart b/lib/presentation/purchase/purchase_overview/widgets/popup_menu_btn.dart index b6833ef..d418ae2 100644 --- a/lib/presentation/purchase/purchase_overview/widgets/popup_menu_btn.dart +++ b/lib/presentation/purchase/purchase_overview/widgets/popup_menu_btn.dart @@ -1,7 +1,7 @@ -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/auth/user_group.dart'; -import 'package:flowers_app/domain/purchase/purchase_status.dart'; -import 'package:flowers_app/presentation/purchase/purchase_overview/purchase_overview_page.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/auth/user_group.dart'; +import 'package:flower_app/domain/purchase/purchase_status.dart'; +import 'package:flower_app/presentation/purchase/purchase_overview/purchase_overview_page.dart'; import 'package:flutter/material.dart'; class ViewFilterPopupMenuBtn extends StatefulWidget { diff --git a/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart b/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart index fd1de3f..cff0752 100644 --- a/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart +++ b/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart @@ -1,10 +1,10 @@ -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/purchase/purchase.dart'; -import 'package:flowers_app/domain/purchase/purchase_status.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/purchase/purchase_item/purchase_item_page.dart'; -import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/purchase_image_widget.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/purchase/purchase.dart'; +import 'package:flower_app/domain/purchase/purchase_status.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/purchase/purchase_item/purchase_item_page.dart'; +import 'package:flower_app/presentation/purchase/purchase_overview/widgets/purchase_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; /// diff --git a/lib/presentation/purchase/purchase_overview/widgets/purchase_image_widget.dart b/lib/presentation/purchase/purchase_overview/widgets/purchase_image_widget.dart index 0736943..90698e0 100644 --- a/lib/presentation/purchase/purchase_overview/widgets/purchase_image_widget.dart +++ b/lib/presentation/purchase/purchase_overview/widgets/purchase_image_widget.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/presentation/core/widgets/image_on_network.dart'; +import 'package:flower_app/presentation/core/widgets/image_on_network.dart'; import 'package:flutter/material.dart'; class PurchaseImageWidget extends StatelessWidget { diff --git a/lib/presentation/purchase/purchase_overview/widgets/purchase_overview_body.dart b/lib/presentation/purchase/purchase_overview/widgets/purchase_overview_body.dart index 1437a0e..a5214ff 100644 --- a/lib/presentation/purchase/purchase_overview/widgets/purchase_overview_body.dart +++ b/lib/presentation/purchase/purchase_overview/widgets/purchase_overview_body.dart @@ -1,12 +1,12 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/purchase/purchase.dart'; -import 'package:flowers_app/domain/purchase/purchase_list_filtered.dart'; -import 'package:flowers_app/presentation/core/widgets/critical_error_widget.dart'; -import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; -import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart'; -import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/purchase_card.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/purchase/purchase.dart'; +import 'package:flower_app/domain/purchase/purchase_list_filtered.dart'; +import 'package:flower_app/presentation/core/widgets/critical_error_widget.dart'; +import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; +import 'package:flower_app/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart'; +import 'package:flower_app/presentation/purchase/purchase_overview/widgets/purchase_card.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; diff --git a/lib/presentation/user_account/user_account_page.dart b/lib/presentation/user_account/user_account_page.dart index 5fb9fc7..f38f936 100644 --- a/lib/presentation/user_account/user_account_page.dart +++ b/lib/presentation/user_account/user_account_page.dart @@ -1,11 +1,11 @@ -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/notice/notice_list.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/order/order_list.dart'; -import 'package:flowers_app/presentation/auth/change_password/change_password_page.dart'; -import 'package:flowers_app/presentation/user_account/widgets/order_overview_body.dart'; -import 'package:flowers_app/presentation/user_account/widgets/user_account_popup_menu_btn.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/order/order_list.dart'; +import 'package:flower_app/presentation/auth/change_password/change_password_page.dart'; +import 'package:flower_app/presentation/user_account/widgets/order_overview_body.dart'; +import 'package:flower_app/presentation/user_account/widgets/user_account_popup_menu_btn.dart'; import 'package:flutter/material.dart'; /// /// diff --git a/lib/presentation/user_account/widgets/last_notice_tile.dart b/lib/presentation/user_account/widgets/last_notice_tile.dart index 05312ed..e5291f3 100644 --- a/lib/presentation/user_account/widgets/last_notice_tile.dart +++ b/lib/presentation/user_account/widgets/last_notice_tile.dart @@ -1,6 +1,6 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/notice/notice.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/notice/notice.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; import 'package:visibility_detector/visibility_detector.dart'; diff --git a/lib/presentation/user_account/widgets/order_card.dart b/lib/presentation/user_account/widgets/order_card.dart index aff4dc4..9259ddb 100644 --- a/lib/presentation/user_account/widgets/order_card.dart +++ b/lib/presentation/user_account/widgets/order_card.dart @@ -1,15 +1,15 @@ -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/notice/notice.dart'; -import 'package:flowers_app/domain/notice/notice_list.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/order/order.dart'; -import 'package:flowers_app/domain/purchase/purchase_item.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; -import 'package:flowers_app/presentation/core/dialogs/delete_dialog.dart'; -import 'package:flowers_app/presentation/core/widgets/sized_progress_indicator.dart'; -import 'package:flowers_app/presentation/product/product_page.dart'; -import 'package:flowers_app/presentation/user_account/widgets/last_notice_tile.dart'; -import 'package:flowers_app/presentation/user_account/widgets/order_tile_image_widget.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/notice/notice.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/order/order.dart'; +import 'package:flower_app/domain/purchase/purchase_item.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; +import 'package:flower_app/presentation/core/dialogs/delete_dialog.dart'; +import 'package:flower_app/presentation/core/widgets/sized_progress_indicator.dart'; +import 'package:flower_app/presentation/product/product_page.dart'; +import 'package:flower_app/presentation/user_account/widgets/last_notice_tile.dart'; +import 'package:flower_app/presentation/user_account/widgets/order_tile_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_result.dart'; /// diff --git a/lib/presentation/user_account/widgets/order_header_card.dart b/lib/presentation/user_account/widgets/order_header_card.dart index 4540aa9..2752f23 100644 --- a/lib/presentation/user_account/widgets/order_header_card.dart +++ b/lib/presentation/user_account/widgets/order_header_card.dart @@ -1,5 +1,5 @@ -import 'package:flowers_app/domain/order/order_header.dart'; -import 'package:flowers_app/presentation/core/app_theme.dart'; +import 'package:flower_app/domain/order/order_header.dart'; +import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; class OrderHeaderCard extends StatelessWidget { diff --git a/lib/presentation/user_account/widgets/order_overview_body.dart b/lib/presentation/user_account/widgets/order_overview_body.dart index c878740..ae3855a 100644 --- a/lib/presentation/user_account/widgets/order_overview_body.dart +++ b/lib/presentation/user_account/widgets/order_overview_body.dart @@ -1,15 +1,15 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/domain/auth/app_user.dart'; -import 'package:flowers_app/domain/notice/notice_list.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/domain/order/order.dart'; -import 'package:flowers_app/domain/order/order_header.dart'; -import 'package:flowers_app/domain/order/order_list.dart'; -import 'package:flowers_app/presentation/core/widgets/critical_error_widget.dart'; -import 'package:flowers_app/presentation/core/widgets/in_pogress_overlay.dart'; -import 'package:flowers_app/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart'; -import 'package:flowers_app/presentation/user_account/widgets/order_card.dart'; -import 'package:flowers_app/presentation/user_account/widgets/order_header_card.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/domain/order/order.dart'; +import 'package:flower_app/domain/order/order_header.dart'; +import 'package:flower_app/domain/order/order_list.dart'; +import 'package:flower_app/presentation/core/widgets/critical_error_widget.dart'; +import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; +import 'package:flower_app/presentation/purchase/purchase_overview/widgets/error_purchase_card.dart'; +import 'package:flower_app/presentation/user_account/widgets/order_card.dart'; +import 'package:flower_app/presentation/user_account/widgets/order_header_card.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_failure.dart'; import 'package:hmi_core/hmi_core_log.dart'; diff --git a/lib/presentation/user_account/widgets/order_tile_image_widget.dart b/lib/presentation/user_account/widgets/order_tile_image_widget.dart index 5fb6ef9..1b30fdb 100644 --- a/lib/presentation/user_account/widgets/order_tile_image_widget.dart +++ b/lib/presentation/user_account/widgets/order_tile_image_widget.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/presentation/core/widgets/image_on_network.dart'; +import 'package:flower_app/presentation/core/widgets/image_on_network.dart'; import 'package:flutter/material.dart'; class OrderTileImageWidget extends StatelessWidget { diff --git a/lib/presentation/user_account/widgets/user_account_popup_menu_btn.dart b/lib/presentation/user_account/widgets/user_account_popup_menu_btn.dart index bac4465..7ba6dbf 100644 --- a/lib/presentation/user_account/widgets/user_account_popup_menu_btn.dart +++ b/lib/presentation/user_account/widgets/user_account_popup_menu_btn.dart @@ -1,6 +1,6 @@ -import 'package:flowers_app/assets/texts/app_text.dart'; -import 'package:flowers_app/dev/log/log.dart'; -import 'package:flowers_app/presentation/core/widgets/icons.dart'; +import 'package:flower_app/assets/texts/app_text.dart'; +import 'package:flower_app/dev/log/log.dart'; +import 'package:flower_app/presentation/core/widgets/icons.dart'; import 'package:flutter/material.dart'; class UserAccountPopupMenuBtn extends StatelessWidget { diff --git a/lib/settings/setting.dart b/lib/settings/setting.dart index f21dd1c..52d5c43 100644 --- a/lib/settings/setting.dart +++ b/lib/settings/setting.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/settings/app_settings.dart'; +import 'package:flower_app/settings/app_settings.dart'; /// /// Holds setting value stored in AppSettings by it name /// - value can be returned in int, double or string represantation diff --git a/lib_/main.dart b/lib_/main.dart new file mode 100644 index 0000000..7b7f5b6 --- /dev/null +++ b/lib_/main.dart @@ -0,0 +1,122 @@ +import 'package:flutter/material.dart'; + +void main() { + runApp(const MyApp()); +} + +class MyApp extends StatelessWidget { + const MyApp({super.key}); + + // This widget is the root of your application. + @override + Widget build(BuildContext context) { + return MaterialApp( + title: 'Flutter Demo', + theme: ThemeData( + // This is the theme of your application. + // + // TRY THIS: Try running your application with "flutter run". You'll see + // the application has a purple toolbar. Then, without quitting the app, + // try changing the seedColor in the colorScheme below to Colors.green + // and then invoke "hot reload" (save your changes or press the "hot + // reload" button in a Flutter-supported IDE, or press "r" if you used + // the command line to start the app). + // + // Notice that the counter didn't reset back to zero; the application + // state is not lost during the reload. To reset the state, use hot + // restart instead. + // + // This works for code too, not just values: Most code changes can be + // tested with just a hot reload. + colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), + ), + home: const MyHomePage(title: 'Flutter Demo Home Page'), + ); + } +} + +class MyHomePage extends StatefulWidget { + const MyHomePage({super.key, required this.title}); + + // This widget is the home page of your application. It is stateful, meaning + // that it has a State object (defined below) that contains fields that affect + // how it looks. + + // This class is the configuration for the state. It holds the values (in this + // case the title) provided by the parent (in this case the App widget) and + // used by the build method of the State. Fields in a Widget subclass are + // always marked "final". + + final String title; + + @override + State createState() => _MyHomePageState(); +} + +class _MyHomePageState extends State { + int _counter = 0; + + void _incrementCounter() { + setState(() { + // This call to setState tells the Flutter framework that something has + // changed in this State, which causes it to rerun the build method below + // so that the display can reflect the updated values. If we changed + // _counter without calling setState(), then the build method would not be + // called again, and so nothing would appear to happen. + _counter++; + }); + } + + @override + Widget build(BuildContext context) { + // This method is rerun every time setState is called, for instance as done + // by the _incrementCounter method above. + // + // The Flutter framework has been optimized to make rerunning build methods + // fast, so that you can just rebuild anything that needs updating rather + // than having to individually change instances of widgets. + return Scaffold( + appBar: AppBar( + // TRY THIS: Try changing the color here to a specific color (to + // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar + // change color while the other colors stay the same. + backgroundColor: Theme.of(context).colorScheme.inversePrimary, + // Here we take the value from the MyHomePage object that was created by + // the App.build method, and use it to set our appbar title. + title: Text(widget.title), + ), + body: Center( + // Center is a layout widget. It takes a single child and positions it + // in the middle of the parent. + child: Column( + // Column is also a layout widget. It takes a list of children and + // arranges them vertically. By default, it sizes itself to fit its + // children horizontally, and tries to be as tall as its parent. + // + // Column has various properties to control how it sizes itself and + // how it positions its children. Here we use mainAxisAlignment to + // center the children vertically; the main axis here is the vertical + // axis because Columns are vertical (the cross axis would be + // horizontal). + // + // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" + // action in the IDE, or press "p" in the console), to see the + // wireframe for each widget. + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const Text('You have pushed the button this many times:'), + Text( + '$_counter', + style: Theme.of(context).textTheme.headlineMedium, + ), + ], + ), + ), + floatingActionButton: FloatingActionButton( + onPressed: _incrementCounter, + tooltip: 'Increment', + child: const Icon(Icons.add), + ), // This trailing comma makes auto-formatting nicer for build methods. + ); + } +} diff --git a/license.txt b/license.txt deleted file mode 100644 index 17f42d1..0000000 --- a/license.txt +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2014-2019 Yegor Bugayenko - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. \ No newline at end of file diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 2b8fa86..14e7846 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -1,13 +1,13 @@ # Project-level configuration. -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.13) project(runner LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "flowers_app") +set(BINARY_NAME "flower_app") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "com.antonlobanovco.flowersapp.flowers_app") +set(APPLICATION_ID "com.lobanov.antongmail.com.flower_app") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. @@ -54,25 +54,8 @@ add_subdirectory(${FLUTTER_MANAGED_DIR}) find_package(PkgConfig REQUIRED) pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") - -# Define the application target. To change its name, change BINARY_NAME above, -# not the value here, or `flutter run` will no longer work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add dependency libraries. Add any application-specific dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") # Run the Flutter tool portions of the build. This must not be removed. add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/linux/runner/CMakeLists.txt b/linux/runner/CMakeLists.txt new file mode 100644 index 0000000..e97dabc --- /dev/null +++ b/linux/runner/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the application ID. +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") diff --git a/linux/main.cc b/linux/runner/main.cc similarity index 100% rename from linux/main.cc rename to linux/runner/main.cc diff --git a/linux/my_application.cc b/linux/runner/my_application.cc similarity index 90% rename from linux/my_application.cc rename to linux/runner/my_application.cc index b4d38d7..6b18b78 100644 --- a/linux/my_application.cc +++ b/linux/runner/my_application.cc @@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) { if (use_header_bar) { GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "flowers_app"); + gtk_header_bar_set_title(header_bar, "flower_app"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); } else { - gtk_window_set_title(window, "flowers_app"); + gtk_window_set_title(window, "flower_app"); } gtk_window_set_default_size(window, 1280, 720); @@ -117,6 +117,12 @@ static void my_application_class_init(MyApplicationClass* klass) { static void my_application_init(MyApplication* self) {} MyApplication* my_application_new() { + // Set the program name to the application ID, which helps various systems + // like GTK and desktop environments map this running application to its + // corresponding .desktop file. This ensures better integration by allowing + // the application to be recognized beyond its binary name. + g_set_prgname(APPLICATION_ID); + return MY_APPLICATION(g_object_new(my_application_get_type(), "application-id", APPLICATION_ID, "flags", G_APPLICATION_NON_UNIQUE, diff --git a/linux/my_application.h b/linux/runner/my_application.h similarity index 100% rename from linux/my_application.h rename to linux/runner/my_application.h diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig index 4b81f9b..c2efd0b 100644 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ b/macos/Flutter/Flutter-Debug.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig index 5caa9d1..c2efd0b 100644 --- a/macos/Flutter/Flutter-Release.xcconfig +++ b/macos/Flutter/Flutter-Release.xcconfig @@ -1,2 +1 @@ -#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" #include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Podfile b/macos/Podfile deleted file mode 100644 index c795730..0000000 --- a/macos/Podfile +++ /dev/null @@ -1,43 +0,0 @@ -platform :osx, '10.14' - -# 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', 'ephemeral', '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 Flutter-Generated.xcconfig, then run \"flutter pub get\"" -end - -require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) - -flutter_macos_podfile_setup - -target 'Runner' do - use_frameworks! - use_modular_headers! - - flutter_install_all_macos_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_macos_build_settings(target) - end -end diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj index 54fc92d..4b65217 100644 --- a/macos/Runner.xcodeproj/project.pbxproj +++ b/macos/Runner.xcodeproj/project.pbxproj @@ -64,7 +64,7 @@ 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* flowers_app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "flowers_app.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* flower_app.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "flower_app.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -131,7 +131,7 @@ 33CC10EE2044A3C60003C045 /* Products */ = { isa = PBXGroup; children = ( - 33CC10ED2044A3C60003C045 /* flowers_app.app */, + 33CC10ED2044A3C60003C045 /* flower_app.app */, 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, ); name = Products; @@ -217,7 +217,7 @@ ); name = Runner; productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* flowers_app.app */; + productReference = 33CC10ED2044A3C60003C045 /* flower_app.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -385,10 +385,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.anton-lobanov-co.flowers-app.flowersApp.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.lobanov.antongmail.com.flowerApp.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flowers_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flowers_app"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flower_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flower_app"; }; name = Debug; }; @@ -399,10 +399,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.anton-lobanov-co.flowers-app.flowersApp.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.lobanov.antongmail.com.flowerApp.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flowers_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flowers_app"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flower_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flower_app"; }; name = Release; }; @@ -413,10 +413,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = com.anton-lobanov-co.flowers-app.flowersApp.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = com.lobanov.antongmail.com.flowerApp.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flowers_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flowers_app"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/flower_app.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/flower_app"; }; name = Profile; }; diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 35b17e8..60d8b2d 100644 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -15,7 +15,7 @@ @@ -31,7 +31,7 @@ @@ -59,13 +59,14 @@ ignoresPersistentStateOnLaunch = "NO" debugDocumentVersioning = "YES" debugServiceExtension = "internal" + enableGPUValidationMode = "1" allowLocationSimulation = "YES"> @@ -82,7 +83,7 @@ diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig index 94aa99e..4e75c27 100644 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ b/macos/Runner/Configs/AppInfo.xcconfig @@ -5,10 +5,10 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = flowers_app +PRODUCT_NAME = flower_app // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.anton-lobanov-co.flowers-app.flowersApp +PRODUCT_BUNDLE_IDENTIFIER = com.lobanov.antongmail.com.flowerApp // The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2024 com.anton-lobanov-co.flowers-app. All rights reserved. +PRODUCT_COPYRIGHT = Copyright © 2025 com.lobanov.anton@gmail.com. All rights reserved. diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..9aa51b2 --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,652 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57 + url: "https://pub.dev" + source: hosted + version: "80.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e" + url: "https://pub.dev" + source: hosted + version: "7.3.0" + another_flushbar: + dependency: "direct main" + description: + name: another_flushbar + sha256: "19bf9520230ec40b300aaf9dd2a8fefcb277b25ecd1c4838f530566965befc2a" + url: "https://pub.dev" + source: hosted + version: "1.12.30" + archive: + dependency: transitive + description: + name: archive + sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742" + url: "https://pub.dev" + source: hosted + version: "4.0.4" + args: + dependency: transitive + description: + name: args + sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + url: "https://pub.dev" + source: hosted + version: "2.6.0" + async: + dependency: transitive + description: + name: async + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 + url: "https://pub.dev" + source: hosted + version: "2.12.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + build: + dependency: transitive + description: + name: build + sha256: cef23f1eda9b57566c81e2133d196f8e3df48f244b317368d65c5943d91148f0 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: ea90e81dc4a25a043d9bee692d20ed6d1c4a1662a28c03a96417446c093ed6b4 + url: "https://pub.dev" + source: hosted + version: "8.9.5" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff + url: "https://pub.dev" + source: hosted + version: "2.0.3" + cli_util: + dependency: transitive + description: + name: cli_util + sha256: ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c + url: "https://pub.dev" + source: hosted + version: "0.4.2" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "0ec10bf4a89e4c613960bf1e8b42c64127021740fb21640c29c909826a5eea3e" + url: "https://pub.dev" + source: hosted + version: "4.10.1" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: "27eb0ae77836989a3bc541ce55595e8ceee0992807f14511552a898ddd0d88ac" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + ext_rw: + dependency: "direct main" + description: + path: "." + ref: "1.2.3" + resolved-ref: e75f8a0b002e1ee3e37d04853829d76f24f5a9ba + url: "https://github.com/a-givertzman/dart_ext_rw" + source: git + version: "1.2.3" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" + url: "https://pub.dev" + source: hosted + version: "1.3.2" + ffi: + dependency: transitive + description: + name: ffi + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_launcher_icons: + dependency: "direct dev" + description: + name: flutter_launcher_icons + sha256: bfa04787c85d80ecb3f8777bde5fc10c3de809240c48fa061a2c2bf15ea5211c + url: "https://pub.dev" + source: hosted + version: "0.14.3" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" + hmi_core: + dependency: "direct main" + description: + path: "." + ref: "2.1.5" + resolved-ref: "4f2652eabcb0e4a2ac40b55e4e318896ff77641a" + url: "https://github.com/a-givertzman/hmi_core.git" + source: git + version: "2.1.5" + image: + dependency: transitive + description: + name: image + sha256: "13d3349ace88f12f4a0d175eb5c12dcdd39d35c4c109a8a13dfeb6d0bd9e31c3" + url: "https://pub.dev" + source: hosted + version: "4.5.3" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec + url: "https://pub.dev" + source: hosted + version: "10.0.8" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 + url: "https://pub.dev" + source: hosted + version: "3.0.9" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" + url: "https://pub.dev" + source: hosted + version: "3.0.1" + lint: + dependency: "direct dev" + description: + name: lint + sha256: "3cd03646de313481336500ba02eb34d07c590535525f154aae7fda7362aa07a9" + url: "https://pub.dev" + source: hosted + version: "2.8.0" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + mockito: + dependency: "direct dev" + description: + name: mockito + sha256: f99d8d072e249f719a5531735d146d8cf04c580d93920b04de75bef6dfb2daf6 + url: "https://pub.dev" + source: hosted + version: "5.4.5" + package_config: + dependency: transitive + description: + name: package_config + sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" + url: "https://pub.dev" + source: hosted + version: "6.1.0" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + posix: + dependency: transitive + description: + name: posix + sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a + url: "https://pub.dev" + source: hosted + version: "6.0.1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: "846849e3e9b68f3ef4b60c60cf4b3e02e9321bc7f4d8c4692cf87ffa82fc8a3a" + url: "https://pub.dev" + source: hosted + version: "2.5.2" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "3ec7210872c4ba945e3244982918e502fa2bfb5230dff6832459ca0e1879b7ad" + url: "https://pub.dev" + source: hosted + version: "2.4.8" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "6a52cfcdaeac77cad8c97b539ff688ccfc458c007b4db12be584fbe5c0e49e03" + url: "https://pub.dev" + source: hosted + version: "2.5.4" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 + url: "https://pub.dev" + source: hosted + version: "2.4.3" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "35c8150ece9e8c8d263337a265153c3329667640850b9304861faea59fc98f6b" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd + url: "https://pub.dev" + source: hosted + version: "0.7.4" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + uuid: + dependency: "direct main" + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + visibility_detector: + dependency: "direct main" + description: + name: visibility_detector + sha256: dd5cc11e13494f432d15939c3aa8ae76844c42b723398643ce9addb88a5ed420 + url: "https://pub.dev" + source: hosted + version: "0.4.0+2" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" + url: "https://pub.dev" + source: hosted + version: "14.3.1" + watcher: + dependency: transitive + description: + name: watcher + sha256: "69da27e49efa56a15f8afe8f4438c4ec02eff0a117df1b22ea4aad194fe1c104" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + url: "https://pub.dev" + source: hosted + version: "0.1.6" + web_socket_channel: + dependency: "direct main" + description: + name: web_socket_channel + sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 + url: "https://pub.dev" + source: hosted + version: "6.5.0" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" +sdks: + dart: ">=3.7.0 <4.0.0" + flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index 87f9033..48e2308 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,5 @@ -name: flowers_app -description: Dart/Flutter simple application to organising join purchases - +name: flower_app +description: "A new Flutter project." # The following line prevents the package from being accidentally published to # pub.dev using `flutter pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev @@ -12,14 +11,22 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # build by specifying --build-name and --build-number, respectively. # In Android, build-name is used as versionName while build-number used as versionCode. # Read more about Android versioning at https://developer.android.com/studio/publish/versioning -# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. +# In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html +# In Windows, build-name is used as the major, minor, and patch parts +# of the product and file versions while build-number is used as the build suffix. version: 1.0.0+1 environment: - sdk: '>=3.2.3 <4.0.0' + sdk: ^3.7.0 +# Dependencies specify other packages that your package needs in order to work. +# To automatically upgrade your package dependencies to the latest versions +# consider running `flutter pub upgrade --major-versions`. Alternatively, +# dependencies can be manually updated by changing the version numbers below to +# the latest version available on pub.dev. To see which dependencies have newer +# versions available, run `flutter pub outdated`. dependencies: flutter: sdk: flutter @@ -28,19 +35,21 @@ dependencies: # path: ../ext_rw git: url: https://github.com/a-givertzman/dart_ext_rw - ref: 1.2.2 + ref: 1.2.3 hmi_core: # path: ../hmi_core git: url: https://github.com/a-givertzman/hmi_core.git - ref: 2.1.4 + ref: 2.1.5 cupertino_icons: ^1.0.8 - shared_preferences: ^2.3.3 + shared_preferences: ^2.5.2 visibility_detector: ^0.4.0+2 - web_socket_channel: ^3.0.1 + web_socket_channel: ^3.0.2 uuid: ^4.5.1 dev_dependencies: + flutter_test: + sdk: flutter flutter_launcher_icons: ^0.14.1 # to update app icons just run this command: # flutter pub run flutter_launcher_icons:main @@ -49,20 +58,23 @@ dev_dependencies: # activated in the `analysis_options.yaml` file located at the root of your # package. See that file for information about deactivating specific lint # rules and activating additional ones. + flutter_lints: ^5.0.0 - flutter_test: - sdk: flutter - lint: ^2.3.0 - mockito: ^5.4.4 + # The "flutter_lints" package below contains a set of recommended lints to + # encourage good coding practices. The lint set provided by the package is + # activated in the `analysis_options.yaml` file located at the root of your + # package. See that file for information about deactivating specific lint + # rules and activating additional ones. + + lint: ^2.8.0 + mockito: ^5.4.5 flutter_icons: android: true ios: true image_path: "assets/app_icon.png" -# For information on the generic Dart part of this file, see the -# following page: https://dart.dev/tools/pub/pubspec -# The following section is specific to Flutter. +# The following section is specific to Flutter packages. flutter: # The following line ensures that the Material Icons font is @@ -75,13 +87,16 @@ flutter: - assets/img/ - assets/icons/ - assets/settings/ - # - assets/img/product-placeholder.png + # assets: # - images/a_dot_burr.jpeg # - images/a_dot_ham.jpeg + # An image asset can refer to one or more resolution-specific "variants", see - # https://flutter.dev/assets-and-images/#resolution-aware. + # https://flutter.dev/to/resolution-aware-images + # For details regarding adding assets from package dependencies, see - # https://flutter.dev/assets-and-images/#from-packages + # https://flutter.dev/to/asset-from-package + # To add custom fonts to your application, add a fonts section here, # in this "flutter" section. Each entry in this list should have a # "family" key with the font family name, and a "fonts" key with a @@ -100,4 +115,4 @@ flutter: # weight: 700 # # For details regarding fonts from package dependencies, - # see https://flutter.dev/custom-fonts/#from-packages + # see https://flutter.dev/to/font-from-package diff --git a/test/unit/notice_list_test.dart b/test/unit/notice_list_test.dart index 22ce617..b1d152c 100644 --- a/test/unit/notice_list_test.dart +++ b/test/unit/notice_list_test.dart @@ -1,7 +1,7 @@ -import 'package:flowers_app/domain/notice/notice.dart'; -import 'package:flowers_app/domain/notice/notice_list.dart'; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart'; -import 'package:flowers_app/settings/app_settings.dart'; +import 'package:flower_app/domain/notice/notice.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; +import 'package:flower_app/domain/notice/notice_list_viewed.dart'; +import 'package:flower_app/settings/app_settings.dart'; import 'package:flutter/material.dart'; import 'package:flutter_test/flutter_test.dart'; import 'package:hmi_core/hmi_core_json.dart'; diff --git a/test/unit/notice_list_test.mocks.dart b/test/unit/notice_list_test.mocks.dart index 013701f..2a110be 100644 --- a/test/unit/notice_list_test.mocks.dart +++ b/test/unit/notice_list_test.mocks.dart @@ -4,7 +4,7 @@ import 'dart:async' as _i3; -import 'package:flowers_app/domain/notice/notice_list_viewed.dart' as _i2; +import 'package:flower_app/domain/notice/notice_list_viewed.dart' as _i2; import 'package:mockito/mockito.dart' as _i1; // ignore_for_file: type=lint diff --git a/test/unit/notice_test.dart b/test/unit/notice_test.dart index e22d8dd..a4cc7b7 100644 --- a/test/unit/notice_test.dart +++ b/test/unit/notice_test.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/domain/notice/notice.dart'; +import 'package:flower_app/domain/notice/notice.dart'; import 'package:flutter_test/flutter_test.dart'; void main() { diff --git a/test/unit/user_password_test.dart b/test/unit/user_password_test.dart index d164c64..50a8d3e 100644 --- a/test/unit/user_password_test.dart +++ b/test/unit/user_password_test.dart @@ -1,4 +1,4 @@ -import 'package:flowers_app/domain/auth/user_password.dart'; +import 'package:flower_app/domain/auth/user_password.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter_test/flutter_test.dart'; import './user_password_test.key' as user_pass; diff --git a/test/widget_test.dart b/test/widget_test.dart deleted file mode 100644 index 8492dcc..0000000 --- a/test/widget_test.dart +++ /dev/null @@ -1,31 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility in the flutter_test package. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:flowers_app/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - return; - // Build our app and trigger a frame. - // await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - // await tester.tap(find.byIcon(Icons.add)); - // await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} diff --git a/web/index.html b/web/index.html index 976274d..a19f961 100644 --- a/web/index.html +++ b/web/index.html @@ -21,15 +21,15 @@ - + - + - flowers_app + flower_app diff --git a/web/manifest.json b/web/manifest.json index e8189ff..43522b5 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,6 +1,6 @@ { - "name": "flowers_app", - "short_name": "flowers_app", + "name": "flower_app", + "short_name": "flower_app", "start_url": ".", "display": "standalone", "background_color": "#0175C2", diff --git a/windows/CMakeLists.txt b/windows/CMakeLists.txt index 51bf251..cf1eadd 100644 --- a/windows/CMakeLists.txt +++ b/windows/CMakeLists.txt @@ -1,10 +1,10 @@ # Project-level configuration. cmake_minimum_required(VERSION 3.14) -project(flowers_app LANGUAGES CXX) +project(flower_app LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "flowers_app") +set(BINARY_NAME "flower_app") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/windows/runner/Runner.rc b/windows/runner/Runner.rc index 5c006ee..ae6eee0 100644 --- a/windows/runner/Runner.rc +++ b/windows/runner/Runner.rc @@ -89,13 +89,13 @@ BEGIN BEGIN BLOCK "040904e4" BEGIN - VALUE "CompanyName", "com.anton-lobanov-co.flowers-app" "\0" - VALUE "FileDescription", "flowers_app" "\0" + VALUE "CompanyName", "com.lobanov.anton@gmail.com" "\0" + VALUE "FileDescription", "flower_app" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "flowers_app" "\0" - VALUE "LegalCopyright", "Copyright (C) 2024 com.anton-lobanov-co.flowers-app. All rights reserved." "\0" - VALUE "OriginalFilename", "flowers_app.exe" "\0" - VALUE "ProductName", "flowers_app" "\0" + VALUE "InternalName", "flower_app" "\0" + VALUE "LegalCopyright", "Copyright (C) 2025 com.lobanov.anton@gmail.com. All rights reserved." "\0" + VALUE "OriginalFilename", "flower_app.exe" "\0" + VALUE "ProductName", "flower_app" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END diff --git a/windows/runner/main.cpp b/windows/runner/main.cpp index fc320cd..6fc77ba 100644 --- a/windows/runner/main.cpp +++ b/windows/runner/main.cpp @@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); - if (!window.Create(L"flowers_app", origin, size)) { + if (!window.Create(L"flower_app", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true); From aedd6c67ab05da2fed0e7f0868ce526a77014073 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 9 Mar 2025 18:45:32 +0300 Subject: [PATCH 10/22] Payment | SetOrder --- .flutter-plugins-dependencies | 2 +- .vscode/launch.json | 32 +++++++++++++++++++ lib/domain/order/order.dart | 7 +++- lib/domain/purchase/purchase_item.dart | 12 +++---- ...chase_content.dart => purchase_items.dart} | 14 ++++---- .../core/widgets/in_pogress_overlay.dart | 2 +- .../product/widgets/product_card.dart | 2 +- .../widgets/product_card_with_notices.dart | 2 +- .../product/widgets/set_order_widget.dart | 21 ++++++------ .../purchase_item/purchase_item_page.dart | 4 +-- .../widgets/purchase_item_body.dart | 16 +++++----- 11 files changed, 76 insertions(+), 38 deletions(-) create mode 100644 .vscode/launch.json rename lib/domain/purchase/{purchase_content.dart => purchase_items.dart} (89%) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index e71a104..7807395 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.8/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-03-09 16:47:51.697162","version":"3.29.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.8/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-03-09 17:46:29.122583","version":"3.29.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..c8a2043 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,32 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Flutter", + "type": "dart", + "request": "launch", + "program": "lib/main.dart", + "flutterMode": "release" + }, + { + "name": "flower-app", + "request": "launch", + "type": "dart" + }, + { + "name": "flower-app (profile mode)", + "request": "launch", + "type": "dart", + "flutterMode": "profile" + }, + { + "name": "flower-app (release mode)", + "request": "launch", + "type": "dart", + "flutterMode": "release" + } + ] +} \ No newline at end of file diff --git a/lib/domain/order/order.dart b/lib/domain/order/order.dart index 32678a3..5d81251 100644 --- a/lib/domain/order/order.dart +++ b/lib/domain/order/order.dart @@ -25,6 +25,11 @@ class OrderSqlParams { this.purchaseItemId, this.count, }); + // + @override + String toString() { + return 'OrderSqlParams { customer_order.id: $id, customer_order.customerId: $customerId, customer_order.purchase_item_id: $purchaseItemId, count: $count }'; + } } /// /// @@ -233,7 +238,7 @@ class Order { return _fromRow(row); } else { _valid = false; - return Err(Failure(message: 'Order.fetch | Error: Order with id=$id is not found', stackTrace: StackTrace.current)); + return Err(Failure(message: 'Order.fetch | Error: Order by params: $params is not found', stackTrace: StackTrace.current)); } case Err(:final error): _log.warning('.fetch | Error: $error'); diff --git a/lib/domain/purchase/purchase_item.dart b/lib/domain/purchase/purchase_item.dart index 3df7de2..3c67d69 100644 --- a/lib/domain/purchase/purchase_item.dart +++ b/lib/domain/purchase/purchase_item.dart @@ -87,7 +87,7 @@ class PurchaseItem { return 0; } /// - /// Returns Order parsed from database row Map + /// Returns Order parsed from database row `Map` PurchaseItem.fromRow(Map row): _remote = _sqlAccess() { _fromRow(row); } @@ -96,14 +96,14 @@ class PurchaseItem { Result _fromRow(Map row) { _log.debug("._fromRow |"); final rowId = row['id']; - if (rowId == null) { + if (rowId == null || '$rowId'.isEmpty) { _valid = false; return Err(Failure(message: 'PurchaseItem._fromRow | Error: PurchaseItem invalid "id" in row: $row', stackTrace: StackTrace.current)); } else { - if ('$rowId'.isEmpty) { - _valid = false; - return Err(Failure(message: 'PurchaseItem._fromRow | Error: PurchaseItem invalid "id" in row: $row', stackTrace: StackTrace.current)); - } + // if ('$rowId'.isEmpty) { + // _valid = false; + // return Err(Failure(message: 'PurchaseItem._fromRow | Error: PurchaseItem invalid "id" in row: $row', stackTrace: StackTrace.current)); + // } id = '${row['id']}'; purchase_id = '${row['purchase_id']}'; product_id = '${row['product_id']}'; diff --git a/lib/domain/purchase/purchase_content.dart b/lib/domain/purchase/purchase_items.dart similarity index 89% rename from lib/domain/purchase/purchase_content.dart rename to lib/domain/purchase/purchase_items.dart index c9efdde..84c608e 100644 --- a/lib/domain/purchase/purchase_content.dart +++ b/lib/domain/purchase/purchase_items.dart @@ -22,14 +22,14 @@ typedef PurchaseContentSqlAccess = SqlAccess, PurchaseConte /// /// Класс реализует список элементов PurchaseItem /// список позиций в составе закупки для каталога -class PurchaseContent { +class PurchaseItems { static const _log = Log('PurchaseContent'); final PurchaseContentSqlAccess _remote; final String _purchaseId; - final Map _products = {}; + final Map _itemss = {}; /// /// - PurchaseContent({ + PurchaseItems({ required String purchaseId, PurchaseContentSqlAccess? remote, }): @@ -51,7 +51,7 @@ class PurchaseContent { /// /// Returns PurchaseItem's as map Future, Failure>> fetch() { - _products.clear(); + _itemss.clear(); return _remote.fetch(params: PurchaseContentSqlParams(purchaseId: _purchaseId)).then( (result) { switch (result) { @@ -59,11 +59,11 @@ class PurchaseContent { _log.debug('.fetch | result: $result'); if (result.isNotEmpty) { for (final row in result) { - final product = PurchaseItem.fromRow(row); - _products.putIfAbsent(product.id, () => product); + final purchaseItem = PurchaseItem.fromRow(row); + _itemss.putIfAbsent(purchaseItem.id, () => purchaseItem); } } - return Ok(_products); + return Ok(_itemss); case Err(:final error): _log.warning('.fetch | Error: $error'); return Err(Failure(message: 'OrderList.fetch | Error: $error', stackTrace: StackTrace.current)); diff --git a/lib/presentation/core/widgets/in_pogress_overlay.dart b/lib/presentation/core/widgets/in_pogress_overlay.dart index 5947f98..be8c61e 100644 --- a/lib/presentation/core/widgets/in_pogress_overlay.dart +++ b/lib/presentation/core/widgets/in_pogress_overlay.dart @@ -20,7 +20,7 @@ class InProgressOverlay extends StatelessWidget { child: AnimatedContainer( duration: const Duration(milliseconds: 150), color: _isSaving - ? appThemeData.colorScheme.secondary.withOpacity(0.8) + ? appThemeData.colorScheme.secondary.withValues(alpha: 0.8) : Colors.transparent, child: Visibility( visible: _isSaving, diff --git a/lib/presentation/product/widgets/product_card.dart b/lib/presentation/product/widgets/product_card.dart index 20a944e..6aa48a3 100644 --- a/lib/presentation/product/widgets/product_card.dart +++ b/lib/presentation/product/widgets/product_card.dart @@ -130,7 +130,7 @@ class _ProductCardState extends State { const SizedBox(width: 8.0,), SetOrderWidget( customerId: widget.customerId, - product: product, + purchaseItem: product, onComplete: () => refreshPurchaseItem(), ), ], diff --git a/lib/presentation/product/widgets/product_card_with_notices.dart b/lib/presentation/product/widgets/product_card_with_notices.dart index 4e6e2a7..a1608ec 100644 --- a/lib/presentation/product/widgets/product_card_with_notices.dart +++ b/lib/presentation/product/widgets/product_card_with_notices.dart @@ -167,7 +167,7 @@ class _ProductCardWithNoticesState extends State { const SizedBox(width: 8.0,), SetOrderWidget( customerId: widget.customerId, - product: product, + purchaseItem: product, onComplete: () => refreshPurchaseItem(), ), ], diff --git a/lib/presentation/product/widgets/set_order_widget.dart b/lib/presentation/product/widgets/set_order_widget.dart index 6b32ed1..ebfbf73 100644 --- a/lib/presentation/product/widgets/set_order_widget.dart +++ b/lib/presentation/product/widgets/set_order_widget.dart @@ -14,7 +14,7 @@ class SetOrderWidget extends StatefulWidget { final int min; final int? max; final String customerId; - final PurchaseItem product; + final PurchaseItem purchaseItem; final Function()? onComplete; /// /// @@ -23,7 +23,7 @@ class SetOrderWidget extends StatefulWidget { this.min = 0, this.max, required this.customerId, - required this.product, + required this.purchaseItem, this.onComplete, }); // @@ -35,7 +35,7 @@ class SetOrderWidget extends StatefulWidget { // class _SetOrderWidgetState extends State { static const _log = Log('_SetOrderWidgetState'); - bool _isLoadingOrderCount = false; + bool _isLoadingOrderCount = true; late final int _count; int _orderCount = 0; final Order _order = Order(); @@ -47,7 +47,7 @@ class _SetOrderWidgetState extends State { setState(() { _isLoadingOrderCount = true; }); - _order.fetch(params: OrderSqlParams(customerId: widget.customerId, purchaseItemId: widget.product.id)).then((result) { + _order.fetch(params: OrderSqlParams(customerId: widget.customerId, purchaseItemId: widget.purchaseItem.id)).then((result) { switch (result) { case Ok(value :final order): setState(() { @@ -59,6 +59,7 @@ class _SetOrderWidgetState extends State { _log.debug(".initState.widget.product.fetch.then | Error : $error"); setState(() { _isLoadingOrderCount = false; + _count = 0; }); } }); @@ -69,9 +70,9 @@ class _SetOrderWidgetState extends State { // @override Widget build(BuildContext context) { - _log.debug(".build | PurchaseItem: ${widget.product.id} '${widget.product.product_name}' (${widget.product.product_id})"); + _log.debug(".build | PurchaseItem: ${widget.purchaseItem.id} '${widget.purchaseItem.product_name}' (${widget.purchaseItem.product_id})"); _log.debug(".build | widget.max: ${widget.max}, widget.product.count: ${_order.count}"); - if (widget.product.status.isOrder()) { + if (widget.purchaseItem.status.isOrder()) { return Column( mainAxisSize: MainAxisSize.min, children: [ @@ -86,7 +87,7 @@ class _SetOrderWidgetState extends State { else CountButton( min: widget.min, - max: widget.max ?? _count + widget.product.remains, + max: widget.max ?? _count + widget.purchaseItem.remains, initialCount: _order.count, disabled: _isLoadingOrderCount, onChange: (count) => _orderCount = count, @@ -98,7 +99,7 @@ class _SetOrderWidgetState extends State { child: ButtonWithLoadingIndicator( width: 110.0, height: 32.0, - onSubmit: () => PurchaseSetOrder(customerId: widget.customerId).send('$_orderCount', widget.product.id) + onSubmit: () => PurchaseSetOrder(customerId: widget.customerId).send('$_orderCount', widget.purchaseItem.id) .then((result) { switch (result) { case Ok, Failure>(value: final _): @@ -157,8 +158,8 @@ class _SetOrderWidgetState extends State { 'приостановлены', ), Text( - style: style.copyWith(color: color?.withOpacity(0.5)), - widget.product.status.text(), + style: style.copyWith(color: color?.withValues(alpha: 0.5)), + widget.purchaseItem.status.text(), ), ], ); diff --git a/lib/presentation/purchase/purchase_item/purchase_item_page.dart b/lib/presentation/purchase/purchase_item/purchase_item_page.dart index 230ada7..882f459 100644 --- a/lib/presentation/purchase/purchase_item/purchase_item_page.dart +++ b/lib/presentation/purchase/purchase_item/purchase_item_page.dart @@ -1,7 +1,7 @@ import 'package:flower_app/domain/auth/app_user.dart'; import 'package:flower_app/domain/notice/notice_list_viewed.dart'; import 'package:flower_app/domain/purchase/purchase.dart'; -import 'package:flower_app/domain/purchase/purchase_content.dart'; +import 'package:flower_app/domain/purchase/purchase_items.dart'; import 'package:flower_app/presentation/purchase/purchase_item/widgets/purchase_item_body.dart'; import 'package:flutter/material.dart'; /// @@ -40,7 +40,7 @@ class PurchaseItemPage extends StatelessWidget { body: Center( child: PurchaseItemBody( user: user, - purchaseContent: PurchaseContent(purchaseId: purchase.id), + purchaseContent: PurchaseItems(purchaseId: purchase.id), noticeListViewed: _noticeListViewed, ), ), diff --git a/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart b/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart index 23d138a..e40c829 100644 --- a/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart +++ b/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart @@ -1,7 +1,7 @@ import 'package:flower_app/domain/auth/app_user.dart'; import 'package:flower_app/domain/core/translate/translate.dart'; import 'package:flower_app/domain/notice/notice_list_viewed.dart'; -import 'package:flower_app/domain/purchase/purchase_content.dart'; +import 'package:flower_app/domain/purchase/purchase_items.dart'; import 'package:flower_app/domain/purchase/purchase_item.dart'; import 'package:flower_app/presentation/core/widgets/critical_error_widget.dart'; import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; @@ -16,7 +16,7 @@ import 'package:hmi_core/hmi_core_result.dart'; class PurchaseItemBody extends StatelessWidget { static const _log = Log('PurchaseItemBody'); final AppUser _user; - final PurchaseContent purchaseContent; + final PurchaseItems purchaseContent; final NoticeListViewed _noticeListViewed; const PurchaseItemBody({ super.key, @@ -59,8 +59,8 @@ class PurchaseItemBody extends StatelessWidget { ); case Ok, Failure>(value: final map): _log.debug('._buildListViewWidget | Data map received'); - final products = map.values.toList(); - if (products.isEmpty) { + final purchaseItems = map.values.toList(); + if (purchaseItems.isEmpty) { return Column( mainAxisSize: MainAxisSize.min, // это оцентрирует по верикали children: [ @@ -79,13 +79,13 @@ class PurchaseItemBody extends StatelessWidget { return Scrollbar( child: ListView.builder( physics: const AlwaysScrollableScrollPhysics(), - itemCount: products.length, + itemCount: purchaseItems.length, itemBuilder: (context, index) { - final product = products[index]; - if (product.valid) { + final purchaseItem = purchaseItems[index]; + if (purchaseItem.valid) { return PurchaseItemCard( user: _user, - purchaseItem: product, + purchaseItem: purchaseItem, noticeListViewed: _noticeListViewed, ); } else { From 9c6d2dfe2dd8a9c03eef1aaf7ff6cc0ad7e4df35 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 9 Mar 2025 20:12:55 +0300 Subject: [PATCH 11/22] Payment | Notices --- lib/domain/notice/notice_list.dart | 2 + .../notice/build_notice_icon.dart | 27 +++++++++++ .../product/widgets/product_body.dart | 4 -- .../widgets/product_card_with_notices.dart | 29 ++++++------ ...tem_page.dart => purchase_items_page.dart} | 10 ++--- .../widgets/purchase_item_card.dart | 30 +++++++++++++ ...tem_body.dart => purchase_items_body.dart} | 16 +++---- .../widgets/purchase_card.dart | 45 +++++++++++++++++-- 8 files changed, 126 insertions(+), 37 deletions(-) create mode 100644 lib/presentation/notice/build_notice_icon.dart rename lib/presentation/purchase/purchase_item/{purchase_item_page.dart => purchase_items_page.dart} (85%) rename lib/presentation/purchase/purchase_item/widgets/{purchase_item_body.dart => purchase_items_body.dart} (92%) diff --git a/lib/domain/notice/notice_list.dart b/lib/domain/notice/notice_list.dart index 969a7dd..90fe071 100644 --- a/lib/domain/notice/notice_list.dart +++ b/lib/domain/notice/notice_list.dart @@ -52,6 +52,8 @@ class NoticeList { sqlBuilder: (sql, params) { if (params?.purchaseItemId != null) { return Sql(sql: "select * from notice where purchase_item_id = ${params?.purchaseItemId} order by id;"); + } else if (params?.purchaseId != null) { + return Sql(sql: "select * from notice where purchase_id = ${params?.purchaseId} order by id;"); } else { return Sql(sql: "select * from notice order by id;"); } diff --git a/lib/presentation/notice/build_notice_icon.dart b/lib/presentation/notice/build_notice_icon.dart new file mode 100644 index 0000000..96c3d43 --- /dev/null +++ b/lib/presentation/notice/build_notice_icon.dart @@ -0,0 +1,27 @@ +import 'package:flower_app/domain/notice/notice.dart'; +import 'package:flutter/material.dart'; + +/// +/// +Widget buildNoticeIcon({ + required BuildContext context, + required Notice? notice, + required bool hasError, + required bool hasNotRead, + Color? errorColor, + double? size, +}) { + return Icon( + hasError || notice == null + ? Icons.error_outline + : notice.isEmpty + ? Icons.messenger_outline + : Icons.message_outlined, + size: size, + color: hasError + ? errorColor ?? Theme.of(context).colorScheme.error + : hasNotRead + ? Colors.blue + : Colors.grey, + ); +} diff --git a/lib/presentation/product/widgets/product_body.dart b/lib/presentation/product/widgets/product_body.dart index f94941d..4c4ae73 100644 --- a/lib/presentation/product/widgets/product_body.dart +++ b/lib/presentation/product/widgets/product_body.dart @@ -38,10 +38,6 @@ class ProductBody extends StatelessWidget { purchaseItem: purchaseItem, noticeList: notices, noticeListViewed: _noticeListViewed, - hasNotRead: notices.hasNew( - fieldName: 'purchase_item_id', - value: purchaseItem.id, - ), ); } else { _log.debug('.build | using ProductCard'); diff --git a/lib/presentation/product/widgets/product_card_with_notices.dart b/lib/presentation/product/widgets/product_card_with_notices.dart index a1608ec..3963757 100644 --- a/lib/presentation/product/widgets/product_card_with_notices.dart +++ b/lib/presentation/product/widgets/product_card_with_notices.dart @@ -7,6 +7,7 @@ import 'package:flower_app/domain/purchase/purchase_item.dart'; import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flower_app/presentation/core/widgets/in_pogress_overlay.dart'; import 'package:flower_app/presentation/core/widgets/remains_widget.dart'; +import 'package:flower_app/presentation/notice/build_notice_icon.dart'; import 'package:flower_app/presentation/notice/widgets/notice_overview_body.dart'; import 'package:flower_app/presentation/product/widgets/product_image_widget.dart'; import 'package:flower_app/presentation/product/widgets/set_order_widget.dart'; @@ -18,7 +19,6 @@ class ProductCardWithNotices extends StatefulWidget { final PurchaseItem purchaseItem; final NoticeList _noticeList; final NoticeListViewed noticeListViewed; - final Future hasNotRead; /// /// @@ -27,7 +27,6 @@ class ProductCardWithNotices extends StatefulWidget { required this.customerId, required this.purchaseItem, NoticeList? noticeList, - required this.hasNotRead, required this.noticeListViewed, }) : _noticeList = noticeList ?? NoticeList.empty(); @@ -60,8 +59,7 @@ class _ProductCardWithNoticesState extends State { setState(() { _isLoading = true; }); - widget - ._noticeList + widget._noticeList .last( fieldName: 'purchase_item_id', value: widget.purchaseItem.id, @@ -76,7 +74,11 @@ class _ProductCardWithNoticesState extends State { _lastNoticeHasError = true; }); }); - widget.hasNotRead + widget._noticeList + .hasNew( + fieldName: 'purchase_item_id', + value: widget.purchaseItem.id, + ) .then((value) { setState(() { _hasNotRead = value; @@ -290,18 +292,13 @@ class _ProductCardWithNoticesState extends State { child: Row( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Icon( - _lastNoticeHasError - ? Icons.error_outline - : _lastNotice.isEmpty - ? Icons.messenger_outline - : Icons.message_outlined, + buildNoticeIcon( + context: context, + notice: _lastNotice, + hasError: _lastNoticeHasError, + hasNotRead: _hasNotRead, + errorColor: appThemeData.colorScheme.error, size: baseFontSize * 1.3, - color: _lastNoticeHasError - ? appThemeData.colorScheme.error - : _hasNotRead - ? Colors.blue - : Colors.grey, ), const SizedBox(width: 4.0,), Expanded( diff --git a/lib/presentation/purchase/purchase_item/purchase_item_page.dart b/lib/presentation/purchase/purchase_item/purchase_items_page.dart similarity index 85% rename from lib/presentation/purchase/purchase_item/purchase_item_page.dart rename to lib/presentation/purchase/purchase_item/purchase_items_page.dart index 882f459..8e688a1 100644 --- a/lib/presentation/purchase/purchase_item/purchase_item_page.dart +++ b/lib/presentation/purchase/purchase_item/purchase_items_page.dart @@ -2,15 +2,15 @@ import 'package:flower_app/domain/auth/app_user.dart'; import 'package:flower_app/domain/notice/notice_list_viewed.dart'; import 'package:flower_app/domain/purchase/purchase.dart'; import 'package:flower_app/domain/purchase/purchase_items.dart'; -import 'package:flower_app/presentation/purchase/purchase_item/widgets/purchase_item_body.dart'; +import 'package:flower_app/presentation/purchase/purchase_item/widgets/purchase_items_body.dart'; import 'package:flutter/material.dart'; /// /// -class PurchaseItemPage extends StatelessWidget { +class PurchaseItemsPage extends StatelessWidget { final AppUser user; final Purchase purchase; final NoticeListViewed _noticeListViewed; - const PurchaseItemPage({ + const PurchaseItemsPage({ super.key, required this.user, required this.purchase, @@ -38,9 +38,9 @@ class PurchaseItemPage extends StatelessWidget { automaticallyImplyLeading: false, ), body: Center( - child: PurchaseItemBody( + child: PurchaseItemsBody( user: user, - purchaseContent: PurchaseItems(purchaseId: purchase.id), + purchaseItems: PurchaseItems(purchaseId: purchase.id), noticeListViewed: _noticeListViewed, ), ), diff --git a/lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart b/lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart index d4fde54..08c71da 100644 --- a/lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart +++ b/lib/presentation/purchase/purchase_item/widgets/purchase_item_card.dart @@ -4,6 +4,7 @@ import 'package:flower_app/domain/notice/notice_list_viewed.dart'; import 'package:flower_app/domain/purchase/purchase_item.dart'; import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flower_app/presentation/core/widgets/remains_widget.dart'; +import 'package:flower_app/presentation/notice/build_notice_icon.dart'; import 'package:flower_app/presentation/product/product_page.dart'; import 'package:flower_app/presentation/product/widgets/product_image_widget.dart'; import 'package:flutter/material.dart'; @@ -71,6 +72,35 @@ class PurchaseItemCard extends StatelessWidget { ), ), ), + Positioned( + right: 16.0, + bottom: 64.0, + width: 42.0, + height: 42.0, + child: Center( + child: FutureBuilder( + future: Future.wait([ + _noticeList.last( + fieldName: 'purchase_item_id', + value: purchaseItem.id, + ), + _noticeList.hasNew( + fieldName: 'purchase_item_id', + value: purchaseItem.id, + ), + ]), + builder: (BuildContext context, AsyncSnapshot snapshot) { + return buildNoticeIcon( + context: context, + notice: snapshot.data?[0], + hasError: snapshot.hasError, + hasNotRead: snapshot.data?[1] ?? false, + size: 23.0, + ); + } + ), + ), + ), Positioned( right: 16.0, bottom: 16.0, diff --git a/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart b/lib/presentation/purchase/purchase_item/widgets/purchase_items_body.dart similarity index 92% rename from lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart rename to lib/presentation/purchase/purchase_item/widgets/purchase_items_body.dart index e40c829..3c77401 100644 --- a/lib/presentation/purchase/purchase_item/widgets/purchase_item_body.dart +++ b/lib/presentation/purchase/purchase_item/widgets/purchase_items_body.dart @@ -13,15 +13,15 @@ import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; /// /// The list of PurchaseItem's -class PurchaseItemBody extends StatelessWidget { +class PurchaseItemsBody extends StatelessWidget { static const _log = Log('PurchaseItemBody'); final AppUser _user; - final PurchaseItems purchaseContent; + final PurchaseItems purchaseItems; final NoticeListViewed _noticeListViewed; - const PurchaseItemBody({ + const PurchaseItemsBody({ super.key, required AppUser user, - required this.purchaseContent, + required this.purchaseItems, required NoticeListViewed noticeListViewed, }) : _user = user, @@ -31,11 +31,11 @@ class PurchaseItemBody extends StatelessWidget { @override Widget build(BuildContext context) { return FutureBuilder, Failure>>( - future: purchaseContent.fetch(), + future: purchaseItems.fetch(), builder: (context, snapshot) { return RefreshIndicator( displacement: 20.0, - onRefresh: purchaseContent.refresh, + onRefresh: purchaseItems.refresh, child: _buildListViewWidget(context, snapshot), ); }, @@ -98,14 +98,14 @@ class PurchaseItemBody extends StatelessWidget { _log.warning('._buildListViewWidget | Error received: $error'); return CriticalErrorWidget( message: snapshot.error.toString(), - refresh: purchaseContent.refresh, + refresh: purchaseItems.refresh, ); } } else if (snapshot.hasError) { _log.warning('._buildListViewWidget | snapshot - hasError: ${snapshot.error}'); return CriticalErrorWidget( message: snapshot.error.toString(), - refresh: purchaseContent.refresh, + refresh: purchaseItems.refresh, ); } return const InProgressOverlay( diff --git a/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart b/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart index cff0752..629d457 100644 --- a/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart +++ b/lib/presentation/purchase/purchase_overview/widgets/purchase_card.dart @@ -1,9 +1,11 @@ import 'package:flower_app/domain/auth/app_user.dart'; +import 'package:flower_app/domain/notice/notice_list.dart'; import 'package:flower_app/domain/notice/notice_list_viewed.dart'; import 'package:flower_app/domain/purchase/purchase.dart'; import 'package:flower_app/domain/purchase/purchase_status.dart'; import 'package:flower_app/presentation/core/app_theme.dart'; -import 'package:flower_app/presentation/purchase/purchase_item/purchase_item_page.dart'; +import 'package:flower_app/presentation/notice/build_notice_icon.dart'; +import 'package:flower_app/presentation/purchase/purchase_item/purchase_items_page.dart'; import 'package:flower_app/presentation/purchase/purchase_overview/widgets/purchase_image_widget.dart'; import 'package:flutter/material.dart'; import 'package:hmi_core/hmi_core_log.dart'; @@ -31,12 +33,14 @@ class PurchaseCard extends StatefulWidget { class _PurchaseCardState extends State { static const _log = Log('_PurchaseCardState'); bool _expanded = false; - late NoticeListViewed _noticeListViewed; + late final NoticeList _noticeList; + late final NoticeListViewed _noticeListViewed; // // @override void initState() { _noticeListViewed = widget.noticeListViewed; + _noticeList = NoticeList(noticeListViewed: _noticeListViewed); super.initState(); } // @@ -50,7 +54,7 @@ class _PurchaseCardState extends State { onTap: () { Navigator.of(context).push( MaterialPageRoute( - builder: (context) => PurchaseItemPage( + builder: (context) => PurchaseItemsPage( user: widget.user, purchase: widget.purchase, noticeListViewed: _noticeListViewed, @@ -62,7 +66,40 @@ class _PurchaseCardState extends State { child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - PurchaseImageWidget(url: widget.purchase.picture), + Stack( + children: [ + PurchaseImageWidget(url: widget.purchase.picture), + Positioned( + right: 16.0, + bottom: 64.0, + width: 42.0, + height: 42.0, + child: Center( + child: FutureBuilder( + future: Future.wait([ + _noticeList.last( + fieldName: 'purchase_id', + value: widget.purchase.id, + ), + _noticeList.hasNew( + fieldName: 'purchase_id', + value: widget.purchase.id, + ), + ]), + builder: (BuildContext context, AsyncSnapshot snapshot) { + return buildNoticeIcon( + context: context, + notice: snapshot.data?[0], + hasError: snapshot.hasError, + hasNotRead: snapshot.data?[1] ?? false, + size: 32.0, + ); + } + ), + ), + ), + ] + ), ExpansionPanelList( animationDuration: const Duration(milliseconds: 1000), elevation: 0.0, From 1410a519af3cbd0724f4b00a4a885b9bf8999acf Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 11 May 2025 16:16:39 +0300 Subject: [PATCH 12/22] Updated JDK, gradle --- .flutter-plugins-dependencies | 2 +- pubspec.lock | 48 +++++++++++++++++------------------ 2 files changed, 25 insertions(+), 25 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 7807395..7c17e81 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.8/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-03-09 17:46:29.122583","version":"3.29.1","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 16:16:10.308090","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/pubspec.lock b/pubspec.lock index 9aa51b2..9a953ba 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: dc27559385e905ad30838356c5f5d574014ba39872d732111cd07ac0beff4c57 + sha256: e55636ed79578b9abca5fecf9437947798f5ef7456308b5cb85720b793eac92f url: "https://pub.dev" source: hosted - version: "80.0.0" + version: "82.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: "192d1c5b944e7e53b24b5586db760db934b177d4147c42fbca8c8c5f1eb8d11e" + sha256: "904ae5bb474d32c38fb9482e2d925d5454cda04ddd0e55d2e6826bc72f6ba8c0" url: "https://pub.dev" source: hosted - version: "7.3.0" + version: "7.4.5" another_flushbar: dependency: "direct main" description: @@ -29,18 +29,18 @@ packages: dependency: transitive description: name: archive - sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742" + sha256: "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd" url: "https://pub.dev" source: hosted - version: "4.0.4" + version: "4.0.7" args: dependency: transitive description: name: args - sha256: bf9f5caeea8d8fe6721a9c358dd8a5c1947b27f1cfaa18b39c301273594919e6 + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 url: "https://pub.dev" source: hosted - version: "2.6.0" + version: "2.7.0" async: dependency: transitive description: @@ -254,10 +254,10 @@ packages: dependency: transitive description: name: image - sha256: "13d3349ace88f12f4a0d175eb5c12dcdd39d35c4c109a8a13dfeb6d0bd9e31c3" + sha256: "4e973fcf4caae1a4be2fa0a13157aa38a8f9cb049db6529aa00b4d71abc4d928" url: "https://pub.dev" source: hosted - version: "4.5.3" + version: "4.5.4" json_annotation: dependency: transitive description: @@ -342,18 +342,18 @@ packages: dependency: "direct dev" description: name: mockito - sha256: f99d8d072e249f719a5531735d146d8cf04c580d93920b04de75bef6dfb2daf6 + sha256: "4546eac99e8967ea91bae633d2ca7698181d008e95fa4627330cf903d573277a" url: "https://pub.dev" source: hosted - version: "5.4.5" + version: "5.4.6" package_config: dependency: transitive description: name: package_config - sha256: "92d4488434b520a62570293fbd33bb556c7d49230791c1b4bbd973baf6d2dc67" + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.2.0" path: dependency: transitive description: @@ -414,10 +414,10 @@ packages: dependency: transitive description: name: posix - sha256: a0117dc2167805aa9125b82eee515cc891819bac2f538c83646d355b16f58b9a + sha256: f0d7856b6ca1887cfa6d1d394056a296ae33489db914e365e2044fdada449e62 url: "https://pub.dev" source: hosted - version: "6.0.1" + version: "6.0.2" pub_semver: dependency: transitive description: @@ -430,18 +430,18 @@ packages: dependency: "direct main" description: name: shared_preferences - sha256: "846849e3e9b68f3ef4b60c60cf4b3e02e9321bc7f4d8c4692cf87ffa82fc8a3a" + sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5" url: "https://pub.dev" source: hosted - version: "2.5.2" + version: "2.5.3" shared_preferences_android: dependency: transitive description: name: shared_preferences_android - sha256: "3ec7210872c4ba945e3244982918e502fa2bfb5230dff6832459ca0e1879b7ad" + sha256: "20cbd561f743a342c76c151d6ddb93a9ce6005751e7aa458baad3858bfbfb6ac" url: "https://pub.dev" source: hosted - version: "2.4.8" + version: "2.4.10" shared_preferences_foundation: dependency: transitive description: @@ -611,18 +611,18 @@ packages: dependency: transitive description: name: web_socket - sha256: "3c12d96c0c9a4eec095246debcea7b86c0324f22df69893d538fcc6f1b8cce83" + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" url: "https://pub.dev" source: hosted - version: "0.1.6" + version: "1.0.1" web_socket_channel: dependency: "direct main" description: name: web_socket_channel - sha256: "0b8e2457400d8a859b7b2030786835a28a8e80836ef64402abef392ff4f1d0e5" + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" xdg_directories: dependency: transitive description: From 78bff951b28cc926f6b780712b5488461b478610 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 11 May 2025 16:19:04 +0300 Subject: [PATCH 13/22] Updated JDK, gradle --- .flutter-plugins-dependencies | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 7c17e81..3e01ea0 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 16:16:10.308090","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 16:16:10.308090","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} From 30f682bfa1833fe2963b115fcc3f4fad738a3adf Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 11 May 2025 16:23:32 +0300 Subject: [PATCH 14/22] Updated JDK, gradle --- .flutter-plugins-dependencies | 2 +- .metadata | 25 +++++-------------------- assets/settings/app-settings.json | 2 +- pubspec.yaml | 8 ++------ 4 files changed, 9 insertions(+), 28 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 3e01ea0..5dcc6a7 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 16:16:10.308090","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.8/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 15:59:04.877400","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} diff --git a/.metadata b/.metadata index 722e716..878648b 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "09de023485e95e6d1225c2baa44b8feb85e0d45f" + revision: "ea121f8859e4b13e47a8f845e4586164519588bc" channel: "stable" project_type: app @@ -13,26 +13,11 @@ project_type: app migration: platforms: - platform: root - create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + create_revision: ea121f8859e4b13e47a8f845e4586164519588bc + base_revision: ea121f8859e4b13e47a8f845e4586164519588bc - platform: android - create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - - platform: ios - create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - - platform: linux - create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - - platform: macos - create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - - platform: web - create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - - platform: windows - create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f - base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f + create_revision: ea121f8859e4b13e47a8f845e4586164519588bc + base_revision: ea121f8859e4b13e47a8f845e4586164519588bc # User provided section diff --git a/assets/settings/app-settings.json b/assets/settings/app-settings.json index 4c41f52..16aa01c 100644 --- a/assets/settings/app-settings.json +++ b/assets/settings/app-settings.json @@ -1,7 +1,7 @@ { "api-host-commented": "127.0.0.1", - "api-host": "172.20.10.6", "api-host-commented1": "192.168.8.192", + "api-host": "172.20.10.6", "api-port": 8080, "api-auth-token": "flowers-app-api-auth-token", "api-database": "flowers_app" diff --git a/pubspec.yaml b/pubspec.yaml index 48e2308..6ce4baa 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -60,12 +60,8 @@ dev_dependencies: # rules and activating additional ones. flutter_lints: ^5.0.0 - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - + flutter_test: + sdk: flutter lint: ^2.8.0 mockito: ^5.4.5 From 6181fc8220fd80792bbfe136d0b50aaacd96ffcd Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 11 May 2025 16:24:48 +0300 Subject: [PATCH 15/22] Updated JDK, gradle --- .flutter-plugins-dependencies | 2 +- pubspec.yaml | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 5dcc6a7..10129d6 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.8/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 15:59:04.877400","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 16:24:31.354689","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index 6ce4baa..d493d70 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -60,8 +60,6 @@ dev_dependencies: # rules and activating additional ones. flutter_lints: ^5.0.0 - flutter_test: - sdk: flutter lint: ^2.8.0 mockito: ^5.4.5 From 5f73fe1e15650380bbd3b31c1f38219a97ea0159 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 11 May 2025 16:34:33 +0300 Subject: [PATCH 16/22] Updated JDK, gradle --- .flutter-plugins-dependencies | 2 +- android/app/src/main/AndroidManifest.xml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 10129d6..f5cdb13 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 16:24:31.354689","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 16:32:18.681808","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index bd0e8f2..8789587 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,4 +1,5 @@ + Date: Sun, 11 May 2025 16:34:48 +0300 Subject: [PATCH 17/22] Updated JDK, gradle --- lib_/main.dart | 122 ------------------------------------------------- 1 file changed, 122 deletions(-) delete mode 100644 lib_/main.dart diff --git a/lib_/main.dart b/lib_/main.dart deleted file mode 100644 index 7b7f5b6..0000000 --- a/lib_/main.dart +++ /dev/null @@ -1,122 +0,0 @@ -import 'package:flutter/material.dart'; - -void main() { - runApp(const MyApp()); -} - -class MyApp extends StatelessWidget { - const MyApp({super.key}); - - // This widget is the root of your application. - @override - Widget build(BuildContext context) { - return MaterialApp( - title: 'Flutter Demo', - theme: ThemeData( - // This is the theme of your application. - // - // TRY THIS: Try running your application with "flutter run". You'll see - // the application has a purple toolbar. Then, without quitting the app, - // try changing the seedColor in the colorScheme below to Colors.green - // and then invoke "hot reload" (save your changes or press the "hot - // reload" button in a Flutter-supported IDE, or press "r" if you used - // the command line to start the app). - // - // Notice that the counter didn't reset back to zero; the application - // state is not lost during the reload. To reset the state, use hot - // restart instead. - // - // This works for code too, not just values: Most code changes can be - // tested with just a hot reload. - colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple), - ), - home: const MyHomePage(title: 'Flutter Demo Home Page'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({super.key, required this.title}); - - // This widget is the home page of your application. It is stateful, meaning - // that it has a State object (defined below) that contains fields that affect - // how it looks. - - // This class is the configuration for the state. It holds the values (in this - // case the title) provided by the parent (in this case the App widget) and - // used by the build method of the State. Fields in a Widget subclass are - // always marked "final". - - final String title; - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _counter = 0; - - void _incrementCounter() { - setState(() { - // This call to setState tells the Flutter framework that something has - // changed in this State, which causes it to rerun the build method below - // so that the display can reflect the updated values. If we changed - // _counter without calling setState(), then the build method would not be - // called again, and so nothing would appear to happen. - _counter++; - }); - } - - @override - Widget build(BuildContext context) { - // This method is rerun every time setState is called, for instance as done - // by the _incrementCounter method above. - // - // The Flutter framework has been optimized to make rerunning build methods - // fast, so that you can just rebuild anything that needs updating rather - // than having to individually change instances of widgets. - return Scaffold( - appBar: AppBar( - // TRY THIS: Try changing the color here to a specific color (to - // Colors.amber, perhaps?) and trigger a hot reload to see the AppBar - // change color while the other colors stay the same. - backgroundColor: Theme.of(context).colorScheme.inversePrimary, - // Here we take the value from the MyHomePage object that was created by - // the App.build method, and use it to set our appbar title. - title: Text(widget.title), - ), - body: Center( - // Center is a layout widget. It takes a single child and positions it - // in the middle of the parent. - child: Column( - // Column is also a layout widget. It takes a list of children and - // arranges them vertically. By default, it sizes itself to fit its - // children horizontally, and tries to be as tall as its parent. - // - // Column has various properties to control how it sizes itself and - // how it positions its children. Here we use mainAxisAlignment to - // center the children vertically; the main axis here is the vertical - // axis because Columns are vertical (the cross axis would be - // horizontal). - // - // TRY THIS: Invoke "debug painting" (choose the "Toggle Debug Paint" - // action in the IDE, or press "p" in the console), to see the - // wireframe for each widget. - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const Text('You have pushed the button this many times:'), - Text( - '$_counter', - style: Theme.of(context).textTheme.headlineMedium, - ), - ], - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: _incrementCounter, - tooltip: 'Increment', - child: const Icon(Icons.add), - ), // This trailing comma makes auto-formatting nicer for build methods. - ); - } -} From 7c0da4f197142bdbadec32dfd8b4e8ca38a1ae5f Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 11 May 2025 16:43:21 +0300 Subject: [PATCH 18/22] Order | fixes --- lib/assets/texts/app_text.dart | 6 +- lib/domain/auth/test/test_encode.dart | 14 ++-- lib/domain/auth/user_password.dart | 16 ++--- .../entities/value_multy_line_string.dart | 13 ++-- lib/domain/core/entities/value_string.dart | 13 ++-- lib/domain/notice/notice.dart | 2 +- lib/domain/order/order.dart | 64 +++++++++---------- lib/domain/order/order_header.dart | 4 +- .../purchase_overview_page.dart | 2 - .../user_account/widgets/order_card.dart | 20 +++--- .../widgets/order_overview_body.dart | 8 +-- 11 files changed, 79 insertions(+), 83 deletions(-) diff --git a/lib/assets/texts/app_text.dart b/lib/assets/texts/app_text.dart index b7dd50e..5cf666d 100644 --- a/lib/assets/texts/app_text.dart +++ b/lib/assets/texts/app_text.dart @@ -66,12 +66,12 @@ class AppText { 'No notines': ['Сообщений нет',], }; static String tr(String text, {AppLang? lng}) { - final AppLang _lng = lng ?? appLang; - if (_lng == AppLang.en) { + final AppLang lng_ = lng ?? appLang; + if (lng_ == AppLang.en) { return text; } if (_map.containsKey(text)) { - return (_map[text] ?? [])[_lng.index]; + return (_map[text] ?? [])[lng_.index]; } log(_debug, '[$AppText.tr] нет перевода для "$text"'); return text; diff --git a/lib/domain/auth/test/test_encode.dart b/lib/domain/auth/test/test_encode.dart index 2827a54..30dc225 100644 --- a/lib/domain/auth/test/test_encode.dart +++ b/lib/domain/auth/test/test_encode.dart @@ -2,7 +2,7 @@ import 'package:flower_app/dev/log/log.dart'; void main() { - const _debug = false; + const debug_ = false; const key = '1234'; final lKey = _escape(key).split(','); // use escape() so only have single-byte chars to encode final k = []; @@ -11,12 +11,12 @@ void main() { final keySlice = lKey[i];//str4ToLong(keySlice); k[i] = keySlice; } - log(_debug, 'k: $k'); + log(debug_, 'k: $k'); alg(k); } void alg(List k) { - const _debug = false; + const debug_ = false; var y = 1; var z = 2; const delta = 0x9E3779B9; @@ -37,14 +37,14 @@ void alg(List k) { final ysum = y ^ sum; final y4y5 = y4 ^ y5; // print('encode add1: $add1'); - log(_debug, 'encode z: $z; z4: $z4; z5: $z5; z4z5: $z4z5; zsum: $zsum'); - log(_debug, 'encode y: $y; y4: $y4; y5: $y5; y4y5: $y4y5; ysum: $ysum'); - log(_debug, 'encode add1: $add1; add2: $add2'); + log(debug_, 'encode z: $z; z4: $z4; z5: $z5; z4z5: $z4z5; zsum: $zsum'); + log(debug_, 'encode y: $y; y4: $y4; y5: $y5; y4y5: $y4y5; ysum: $ysum'); + log(debug_, 'encode add1: $add1; add2: $add2'); z += ((y << 4) ^ (y >>> 5)) + ysum + add2; // note: unsigned right-shift '>>>' is used in place of original '>>', due to lack // of 'unsigned' type declaration in JavaScript (thanks to Karsten Kraus for this) } - log(_debug, 'encode y: $y; z: $z'); + log(debug_, 'encode y: $y; z: $z'); } String _escape(String str) { diff --git a/lib/domain/auth/user_password.dart b/lib/domain/auth/user_password.dart index c902b6c..416ce53 100644 --- a/lib/domain/auth/user_password.dart +++ b/lib/domain/auth/user_password.dart @@ -12,9 +12,9 @@ class UserPassword { required String value, }): _value = value; - factory UserPassword.generate(int _length1, int _length2) { - final part1 = _generateRandomString(_length1); - final part2 = _generateRandomString(_length2); + factory UserPassword.generate(int length1, int length2) { + final part1 = _generateRandomString(length1); + final part2 = _generateRandomString(length2); return UserPassword(value: '$part1-$part2'); } String value() => _value; @@ -26,10 +26,10 @@ class UserPassword { } ValidationResult validate() { final regex = RegExp('^.{$minLength,$maxLength}\$'); - final _valid = regex.hasMatch(_value); + final valid = regex.hasMatch(_value); return ValidationResult( - valid: _valid, - message: _valid ? null : 'Символов не менее: $minLength', + valid: valid, + message: valid ? null : 'Символов не менее: $minLength', ); } String _encrypt(String source, String key) { @@ -106,7 +106,7 @@ class UserPassword { } } String _generateRandomString(int len) { - const _chars = '!%&AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890!%&'; + const chars = '!%&AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz1234567890!%&'; final r = Random.secure(); - return List.generate(len, (index) => _chars[r.nextInt(_chars.length)]).join(); + return List.generate(len, (index) => chars[r.nextInt(chars.length)]).join(); } diff --git a/lib/domain/core/entities/value_multy_line_string.dart b/lib/domain/core/entities/value_multy_line_string.dart index b3c1219..134c5e9 100644 --- a/lib/domain/core/entities/value_multy_line_string.dart +++ b/lib/domain/core/entities/value_multy_line_string.dart @@ -4,11 +4,10 @@ import 'package:flower_app/domain/core/entities/value_object_validation.dart'; class ValueMultyLineString extends ValueObject { final List? _validationList; ValueMultyLineString( - String value, + super.value, {List? validationList,} ): - _validationList = validationList, - super(value); + _validationList = validationList; @override ValueMultyLineString toDomain(String value) { return ValueMultyLineString( @@ -24,12 +23,12 @@ class ValueMultyLineString extends ValueObject { return get(); } String valid() { - final _vList = _validationList; - if (_vList == null) { + final vList = _validationList; + if (vList == null) { return ''; } - return _vList.map( - (_validation) => _validation.validate(get()), + return vList.map( + (validation) => validation.validate(get()), ).join('; ') ; } } diff --git a/lib/domain/core/entities/value_string.dart b/lib/domain/core/entities/value_string.dart index d387792..1495ac5 100644 --- a/lib/domain/core/entities/value_string.dart +++ b/lib/domain/core/entities/value_string.dart @@ -4,22 +4,21 @@ import 'package:flower_app/domain/core/entities/value_object_validation.dart'; class ValueString extends ValueObject { final List? _validationList; ValueString( - String value, + super.value, {List? validationList,} ): - _validationList = validationList, - super(value); + _validationList = validationList; @override String toString() { return get(); } String valid() { - final _vList = _validationList; - if (_vList == null) { + final vList = _validationList; + if (vList == null) { return ''; } - return _vList.map( - (_validation) => _validation.validate(get()), + return vList.map( + (validation) => validation.validate(get()), ).join('; ') ; } @override diff --git a/lib/domain/notice/notice.dart b/lib/domain/notice/notice.dart index 1b799e5..8292d52 100644 --- a/lib/domain/notice/notice.dart +++ b/lib/domain/notice/notice.dart @@ -90,7 +90,7 @@ class Notice { /// Returns true if all field of the Purchase is Ok bool get isValid => _valid; /// - /// Returns Notice parsed from database row Map + /// Returns Notice parsed from database row `Map` Notice.fromRow(Map row): _viewed = Future.value(true), _remote = null diff --git a/lib/domain/order/order.dart b/lib/domain/order/order.dart index 5d81251..2fe8ed8 100644 --- a/lib/domain/order/order.dart +++ b/lib/domain/order/order.dart @@ -43,27 +43,27 @@ typedef OrderSqlAccess = SqlAccess, OrderSqlParams>; class Order { static const _log = Log('Order'); late String id = ''; - late String customer_id = ''; - late String product_id = ''; - late String product_group = ''; - late String product_name = ''; - late String product_picture = ''; + late String customerId = ''; + late String productId = ''; + late String productGroup = ''; + late String productName = ''; + late String productPicture = ''; /// количество единиц товара в заказе пользователя late int count = 0; late String cost = ''; // сколько оплатил late String paid = ''; // сколько оплатил - late String to_refounded = ''; // сколько денег клиенту нужно вернуть + late String toRefounded = ''; // сколько денег клиенту нужно вернуть late String refounded = ''; // сколько денег клиенту вернули late String distributed = ''; // сколько товара получил late String description = ''; - late String purchase_id = ''; - late String purchase_name = ''; - late String purchase_details = ''; - late String purchase_item_id = ''; - late String purchase_item_sale_price = ''; // цена за единицу - late String purchase_item_sale_currency = ''; // валюта - late String purchase_item_shipping = ''; // доставка за единицу - late PurchaseStatus purchase_item_status = PurchaseStatus.notCampled(); // статус позиции + late String purchaseId = ''; + late String purchaseName = ''; + late String purchaseDetails = ''; + late String purchaseItemId = ''; + late String purchaseItemSalePrice = ''; // цена за единицу + late String purchaseItemSaleCurrency = ''; // валюта + late String purchaseItemShipping = ''; // доставка за единицу + late PurchaseStatus purchaseItemStatus = PurchaseStatus.notCampled(); // статус позиции late String created = ''; late String updated = ''; late String deleted = ''; @@ -159,7 +159,7 @@ class Order { double getCost() => double.parse(cost); /// /// Returns Shipping as double - double getShipping() => double.parse(purchase_item_shipping) * count; + double getShipping() => double.parse(purchaseItemShipping) * count; /// /// Removing order from the database Future, Failure>> remove(BuildContext context) { @@ -177,7 +177,7 @@ class Order { ); } /// - /// Returns Order parsed from database row Map + /// Returns Order parsed from database row `Map` Order.fromRow(Map row) { _fromRow(row); } @@ -197,26 +197,26 @@ class Order { return Err(Failure(message: 'Purchase._fromRow | Error: Purchase invalid "id" in row: $row', stackTrace: StackTrace.current)); } id = '${row['id']}'; - customer_id = '${row['customer_id']}'; - product_id = '${row['product_id']}'; - product_group = '${row['product_group']}'; - product_name = '${row['product_name']}'; - product_picture = '${row['product_picture']}'; + customerId = '${row['customer_id']}'; + productId = '${row['product_id']}'; + productGroup = '${row['product_group']}'; + productName = '${row['product_name']}'; + productPicture = '${row['product_picture']}'; count = _parseInt('${row['count']}'); cost = '${row['cost']}'; // сколько оплатил paid = '${row['paid']}'; // сколько оплатил - to_refounded = '${row['to_refounded']}'; // сколько денег клиенту нужно вернуть + toRefounded = '${row['to_refounded']}'; // сколько денег клиенту нужно вернуть refounded = '${row['refounded']}'; // сколько денег клиенту вернули distributed = '${row['distributed']}'; // сколько товара получил description = '${row['description']}'; - purchase_id = '${row['purchase_id']}'; - purchase_name = '${row['purchase_name']}'; - purchase_details = '${row['purchase_details']}'; - purchase_item_id = '${row['purchase_item_id']}'; - purchase_item_sale_price = '${row['purchase_item_sale_price']}'; // цена за единицу - purchase_item_sale_currency = '${row['purchase_item_sale_currency']}'; // валюта - purchase_item_shipping = '${row['purchase_item_shipping']}'; // доставка за единицу - purchase_item_status = PurchaseStatus(status: '${row['purchase_item_status']}'); // статус позиции + purchaseId = '${row['purchase_id']}'; + purchaseName = '${row['purchase_name']}'; + purchaseDetails = '${row['purchase_details']}'; + purchaseItemId = '${row['purchase_item_id']}'; + purchaseItemSalePrice = '${row['purchase_item_sale_price']}'; // цена за единицу + purchaseItemSaleCurrency = '${row['purchase_item_sale_currency']}'; // валюта + purchaseItemShipping = '${row['purchase_item_shipping']}'; // доставка за единицу + purchaseItemStatus = PurchaseStatus(status: '${row['purchase_item_status']}'); // статус позиции created = '${row['created']}'; updated = '${row['updated']}'; deleted = '${row['deleted']}'; @@ -321,7 +321,7 @@ class Order { /// Future, Failure>> setOrder({required int count}) { return PurchaseSetOrder( - customerId: customer_id, - ).send('$count', purchase_item_id); + customerId: customerId, + ).send('$count', purchaseItemId); } } diff --git a/lib/domain/order/order_header.dart b/lib/domain/order/order_header.dart index 2fa7501..d3e1f0a 100644 --- a/lib/domain/order/order_header.dart +++ b/lib/domain/order/order_header.dart @@ -10,8 +10,8 @@ class OrderHeader { required double total, required double shipping, }) { - purchaseId = order.purchase_id; - purchaseName = order.purchase_name; + purchaseId = order.purchaseId; + purchaseName = order.purchaseName; _total = total; _totalShipping = shipping; } diff --git a/lib/presentation/purchase/purchase_overview/purchase_overview_page.dart b/lib/presentation/purchase/purchase_overview/purchase_overview_page.dart index 837c342..a2a5ee0 100644 --- a/lib/presentation/purchase/purchase_overview/purchase_overview_page.dart +++ b/lib/presentation/purchase/purchase_overview/purchase_overview_page.dart @@ -153,8 +153,6 @@ class _PurchaseOverviewPageState extends State { return ['archived',]; case ViewFilter.canceled: return ['canceled',]; - default: - return ['active',]; } } } diff --git a/lib/presentation/user_account/widgets/order_card.dart b/lib/presentation/user_account/widgets/order_card.dart index 9259ddb..28b75bf 100644 --- a/lib/presentation/user_account/widgets/order_card.dart +++ b/lib/presentation/user_account/widgets/order_card.dart @@ -77,11 +77,11 @@ class _OrderCardState extends State { return InkWell( onTap: () { final product = PurchaseItem( - id: order.purchase_item_id, + id: order.purchaseItemId, ); - product.product_name = order.product_name; - product.purchase_id = order.purchase_id; - product.status = order.purchase_item_status; + product.product_name = order.productName; + product.purchase_id = order.purchaseId; + product.status = order.purchaseItemStatus; Navigator.of(context).push( MaterialPageRoute( builder: (context) => ProductPage( @@ -119,7 +119,7 @@ class _OrderCardState extends State { child: Align( alignment: Alignment.centerLeft, child: OrderTileImageWidget( - url: order.product_picture, + url: order.productPicture, radius: 36.0, ), ), @@ -136,14 +136,14 @@ class _OrderCardState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - order.product_name, + order.productName, softWrap: true, overflow: TextOverflow.visible, style: appThemeData.textTheme.titleSmall, ), const SizedBox(height: 8.0,), Text( - order.product_group, + order.productGroup, style: appThemeData.textTheme.bodySmall, ), const SizedBox(height: 12.0,), @@ -163,7 +163,7 @@ class _OrderCardState extends State { onPressed: () { showDeleteDialog( context, - Text(order.product_name), + Text(order.productName), const Text('Удалить заказ ?'), ).then((result) { if (result != null && result) { @@ -187,7 +187,7 @@ class _OrderCardState extends State { left: 12.0, ), child: Text( - order.purchase_item_status.text(), + order.purchaseItemStatus.text(), ), ), Expanded( @@ -207,7 +207,7 @@ class _OrderCardState extends State { ), const SizedBox(height: 8,), Text( - '${order.count}x(${order.purchase_item_sale_price} + ${order.purchase_item_shipping})', + '${order.count}x(${order.purchaseItemSalePrice} + ${order.purchaseItemShipping})', style: appThemeData.textTheme.bodySmall, ), ], diff --git a/lib/presentation/user_account/widgets/order_overview_body.dart b/lib/presentation/user_account/widgets/order_overview_body.dart index ae3855a..3e629c8 100644 --- a/lib/presentation/user_account/widgets/order_overview_body.dart +++ b/lib/presentation/user_account/widgets/order_overview_body.dart @@ -80,8 +80,8 @@ class OrderOverviewBody extends StatelessWidget { OrderHeader? orderHeader; String orderPurchaseId = '-1'; for (final order in ordersMap.values) { - if (order.purchase_id != orderPurchaseId) { - orderPurchaseId = order.purchase_id; + if (order.purchaseId != orderPurchaseId) { + orderPurchaseId = order.purchaseId; orderHeader = OrderHeader( order: order, total: 0, @@ -117,11 +117,11 @@ class OrderOverviewBody extends StatelessWidget { noticeList: _noticeList, lastNotice: _noticeList.last( fieldName: 'purchase_item_id', - value: order.purchase_item_id, + value: order.purchaseItemId, ), hasNotRead: _noticeList.hasNew( fieldName: 'purchase_item_id', - value: order.purchase_item_id, + value: order.purchaseItemId, ), noticeListViewed: _noticeListViewed, onRemoved: () => _refreshAllLists(), From e1905c002c465619a827a55d63a41469b64cbd44 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 11 May 2025 17:22:22 +0300 Subject: [PATCH 19/22] PurchaseItem | Fixes --- .flutter-plugins-dependencies | 2 +- lib/domain/purchase/purchase.dart | 6 +++--- lib/domain/purchase/purchase_item.dart | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index f5cdb13..6f3d0c9 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 16:32:18.681808","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 16:48:45.359206","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/lib/domain/purchase/purchase.dart b/lib/domain/purchase/purchase.dart index 98de7aa..6a90317 100644 --- a/lib/domain/purchase/purchase.dart +++ b/lib/domain/purchase/purchase.dart @@ -67,9 +67,9 @@ class Purchase { id = '${row['id']}'; status = '${row['status']}'; name = '${row['name']}'; - details = '${row['details']}'; - preview = '${row['preview']}'; - description = '${row['description']}'; + details = '${row['details'] ?? ''}'; + preview = '${row['preview'] ?? ''}'; + description = '${row['description'] ?? ''}'; picture = '${row['picture']}'; dateOfStart = '${row['dateOfStart']}'; dateOfEnd = '${row['dateOfEnd']}'; diff --git a/lib/domain/purchase/purchase_item.dart b/lib/domain/purchase/purchase_item.dart index 3c67d69..b3d243e 100644 --- a/lib/domain/purchase/purchase_item.dart +++ b/lib/domain/purchase/purchase_item.dart @@ -112,8 +112,8 @@ class PurchaseItem { shipping = '${row['shipping']}'; // доставка за единицу purchase = '${row['purchase']}'; product_name = '${row['product']}'; - product_details = '${row['details']}'; - product_description = '${row['description']}'; + product_details = '${row['details'] ?? ''}'; + product_description = '${row['description'] ?? ''}'; product_picture = '${row['picture']}'; remains = _parseInt('${row['remains']}'); status = PurchaseStatus(status: '${row['status']}'); From 5d5f14dffe07d2bf1c70216fca9bf0ac7a74fbb5 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 11 May 2025 17:28:55 +0300 Subject: [PATCH 20/22] OrderOverviewBody | fixes --- .flutter-plugins-dependencies | 2 +- lib/domain/order/order_list.dart | 2 +- .../user_account/widgets/order_overview_body.dart | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.flutter-plugins-dependencies b/.flutter-plugins-dependencies index 6f3d0c9..d2a8336 100644 --- a/.flutter-plugins-dependencies +++ b/.flutter-plugins-dependencies @@ -1 +1 @@ -{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 16:48:45.359206","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file +{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"shared_preferences_android","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_android-2.4.10/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"shared_preferences_foundation","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_foundation-2.5.4/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"path_provider_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_linux","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_linux-2.4.1/","native_build":false,"dependencies":["path_provider_linux"],"dev_dependency":false}],"windows":[{"name":"path_provider_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false},{"name":"shared_preferences_windows","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_windows-2.4.1/","native_build":false,"dependencies":["path_provider_windows"],"dev_dependency":false}],"web":[{"name":"shared_preferences_web","path":"/home/lobanov/.pub-cache/hosted/pub.dev/shared_preferences_web-2.4.3/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]},{"name":"shared_preferences","dependencies":["shared_preferences_android","shared_preferences_foundation","shared_preferences_linux","shared_preferences_web","shared_preferences_windows"]},{"name":"shared_preferences_android","dependencies":[]},{"name":"shared_preferences_foundation","dependencies":[]},{"name":"shared_preferences_linux","dependencies":["path_provider_linux"]},{"name":"shared_preferences_web","dependencies":[]},{"name":"shared_preferences_windows","dependencies":["path_provider_windows"]}],"date_created":"2025-05-11 17:22:35.152223","version":"3.29.3","swift_package_manager_enabled":{"ios":false,"macos":false}} \ No newline at end of file diff --git a/lib/domain/order/order_list.dart b/lib/domain/order/order_list.dart index c5da816..032d470 100644 --- a/lib/domain/order/order_list.dart +++ b/lib/domain/order/order_list.dart @@ -25,7 +25,7 @@ class OrderList { authToken: const Setting('api-auth-token').toString(), database: const Setting('api-database').toString(), sqlBuilder: (sql, _) { - return Sql(sql: "select * from order;"); + return Sql(sql: "select * from customer order;"); }, entryBuilder: (row) { return row; diff --git a/lib/presentation/user_account/widgets/order_overview_body.dart b/lib/presentation/user_account/widgets/order_overview_body.dart index 3e629c8..726bbaf 100644 --- a/lib/presentation/user_account/widgets/order_overview_body.dart +++ b/lib/presentation/user_account/widgets/order_overview_body.dart @@ -54,10 +54,10 @@ class OrderOverviewBody extends StatelessWidget { /// Future _refreshAllLists() { return Future(() { - _log.debug('$OrderOverviewBody._refreshAllLists | orderList.refresh ...'); + _log.debug('._refreshAllLists | orderList.refresh ...'); _orderList.refresh() .then((value) { - _log.debug('$OrderOverviewBody._refreshAllLists | noticeList.refresh ...'); + _log.debug('._refreshAllLists | noticeList.refresh ...'); _noticeList.refresh(const NoticeListSqlParams()); }); }); @@ -70,7 +70,7 @@ class OrderOverviewBody extends StatelessWidget { ) { switch (snapshot.data) { case null: - _log.debug('$OrderOverviewBody._buildListView | is loading'); + _log.debug('._buildListView | is loading'); return const InProgressOverlay( isSaving: true, message: AppText.loading, @@ -97,7 +97,7 @@ class OrderOverviewBody extends StatelessWidget { } orders.add(order); } - _log.debug('$OrderOverviewBody._buildListView | orders received'); + _log.debug('._buildListView | orders received'); return Scrollbar( child: ListView.builder( physics: const AlwaysScrollableScrollPhysics(), @@ -134,7 +134,7 @@ class OrderOverviewBody extends StatelessWidget { ), ); case Err, Failure>(:final error): - _log.debug('$OrderOverviewBody._buildListView | Error: $error'); + _log.debug('._buildListView | Error: $error'); return CriticalErrorWidget( message: snapshot.error.toString(), refresh: _refreshAllLists, From f2591257175c0254603c7822eef546ed0dbeafd7 Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 11 May 2025 20:08:02 +0300 Subject: [PATCH 21/22] UserAccountPage | fixes --- lib/domain/order/order.dart | 82 +++++++------- lib/domain/order/order_header.dart | 25 +++-- lib/domain/order/order_list.dart | 100 ++++++++++++++++-- .../auth/sign_in/user_id_page.dart | 5 +- .../auth/sign_in/user_pass_page.dart | 7 +- .../sign_in/widgets/phone_number_widget.dart | 14 ++- .../user_account/user_account_page.dart | 2 +- .../user_account/widgets/order_card.dart | 12 +-- .../widgets/order_header_card.dart | 51 ++++++--- 9 files changed, 217 insertions(+), 81 deletions(-) diff --git a/lib/domain/order/order.dart b/lib/domain/order/order.dart index 2fe8ed8..a41a24d 100644 --- a/lib/domain/order/order.dart +++ b/lib/domain/order/order.dart @@ -19,6 +19,8 @@ class OrderSqlParams { final String? purchaseItemId; /// customer_order.count final String? count; + /// + /// const OrderSqlParams({ this.id, this.customerId, @@ -45,8 +47,8 @@ class Order { late String id = ''; late String customerId = ''; late String productId = ''; - late String productGroup = ''; - late String productName = ''; + late String productCategory = ''; + late String product = ''; late String productPicture = ''; /// количество единиц товара в заказе пользователя late int count = 0; @@ -57,11 +59,11 @@ class Order { late String distributed = ''; // сколько товара получил late String description = ''; late String purchaseId = ''; - late String purchaseName = ''; + late String purchase = ''; late String purchaseDetails = ''; late String purchaseItemId = ''; late String purchaseItemSalePrice = ''; // цена за единицу - late String purchaseItemSaleCurrency = ''; // валюта + late String currency = ''; // валюта late String purchaseItemShipping = ''; // доставка за единицу late PurchaseStatus purchaseItemStatus = PurchaseStatus.notCampled(); // статус позиции late String created = ''; @@ -87,10 +89,14 @@ class Order { if (params?.customerId != null && params?.purchaseItemId != null) { _log.debug(".sqlBuilder | Selecting by customer_id: ${params?.customerId} and purchase_item_id: ${params?.purchaseItemId}"); return Sql(sql: """ - SELECT cord.id, + select + cord.id, cord.customer_id, + cu.name as customer, cord.purchase_item_id, cord.count, + cord.count * (pui.sale_price + pui.shipping) as cost, + pui.shipping as shipping, cord.paid, cord.distributed, cord.to_refound, @@ -99,14 +105,17 @@ class Order { cord.created, cord.updated, cord.deleted, - cu.name AS customer, - p.name AS product, - pu.name AS purchase - FROM customer_order cord - JOIN customer cu ON cord.customer_id = cu.id - JOIN purchase_item puc ON cord.purchase_item_id = puc.id - JOIN purchase pu ON puc.purchase_id = pu.id - JOIN product p ON puc.product_id = p.id + pui.status as status, + pui.product as product, + pui.sale_currency as currency, + p.category as product_category, + pui.picture as product_picture, + pu.name as purchase + from public.customer_order cord + JOIN public.customer cu ON cord.customer_id = cu.id + JOIN public.purchase_item_view pui ON cord.purchase_item_id = pui.id + JOIN public.purchase pu ON pui.purchase_id = pu.id + JOIN public.product_view p ON pui.product_id = p.id where cord.customer_id = ${params?.customerId} and cord.purchase_item_id = ${params?.purchaseItemId}; """,); @@ -116,10 +125,14 @@ class Order { : id; _log.debug(".sqlBuilder | Selecting by order id: $selfId"); return Sql(sql: """ - SELECT cord.id, + select + cord.id, cord.customer_id, + cu.name as customer, cord.purchase_item_id, cord.count, + cord.count * (pui.sale_price + pui.shipping) as cost, + pui.shipping as shipping, cord.paid, cord.distributed, cord.to_refound, @@ -128,14 +141,17 @@ class Order { cord.created, cord.updated, cord.deleted, - cu.name AS customer, - p.name AS product, - pu.name AS purchase - FROM customer_order cord - JOIN customer cu ON cord.customer_id = cu.id - JOIN purchase_item puc ON cord.purchase_item_id = puc.id - JOIN purchase pu ON puc.purchase_id = pu.id - JOIN product p ON puc.product_id = p.id + pui.status as status, + pui.product as product, + pui.sale_currency as currency, + p.category as product_category, + pui.picture as product_picture, + pu.name as purchase + from public.customer_order cord + JOIN public.customer cu ON cord.customer_id = cu.id + JOIN public.purchase_item_view pui ON cord.purchase_item_id = pui.id + JOIN public.purchase pu ON pui.purchase_id = pu.id + JOIN public.product_view p ON pui.product_id = p.id where cord.id = $selfId; """,); }, @@ -164,14 +180,6 @@ class Order { /// Removing order from the database Future, Failure>> remove(BuildContext context) { _log.debug('Order.remove | loading...'); - // final product = PurchaseItem( - // userId: customer_id, - // purchaseItemId: purchase_item_id, - // remote: dataSource.dataSet('purchase_product'), - // ); - // product.product_id = this.product_id; - // product.purchase_id = this.purchase_id; - // product['product/name'] = this['product/name']; return removeOrder( context, ); @@ -199,8 +207,8 @@ class Order { id = '${row['id']}'; customerId = '${row['customer_id']}'; productId = '${row['product_id']}'; - productGroup = '${row['product_group']}'; - productName = '${row['product_name']}'; + productCategory = '${row['product_category']}'; + product = '${row['product']}'; productPicture = '${row['product_picture']}'; count = _parseInt('${row['count']}'); cost = '${row['cost']}'; // сколько оплатил @@ -210,13 +218,13 @@ class Order { distributed = '${row['distributed']}'; // сколько товара получил description = '${row['description']}'; purchaseId = '${row['purchase_id']}'; - purchaseName = '${row['purchase_name']}'; + purchase = '${row['purchase']}'; purchaseDetails = '${row['purchase_details']}'; purchaseItemId = '${row['purchase_item_id']}'; - purchaseItemSalePrice = '${row['purchase_item_sale_price']}'; // цена за единицу - purchaseItemSaleCurrency = '${row['purchase_item_sale_currency']}'; // валюта - purchaseItemShipping = '${row['purchase_item_shipping']}'; // доставка за единицу - purchaseItemStatus = PurchaseStatus(status: '${row['purchase_item_status']}'); // статус позиции + purchaseItemSalePrice = '${row['price']}'; // цена за единицу + currency = '${row['currency']}'; // валюта + purchaseItemShipping = '${row['shipping']}'; // доставка за единицу + purchaseItemStatus = PurchaseStatus(status: '${row['status']}'); // статус позиции created = '${row['created']}'; updated = '${row['updated']}'; deleted = '${row['deleted']}'; diff --git a/lib/domain/order/order_header.dart b/lib/domain/order/order_header.dart index d3e1f0a..869aba6 100644 --- a/lib/domain/order/order_header.dart +++ b/lib/domain/order/order_header.dart @@ -1,23 +1,36 @@ import 'package:flower_app/domain/order/order.dart'; +/// +/// class OrderHeader { late String purchaseId; late String purchaseName; late double _total; late double _totalShipping; + final String currency; + /// + /// OrderHeader({ required Order order, required double total, required double shipping, - }) { - purchaseId = order.purchaseId; - purchaseName = order.purchaseName; - _total = total; - _totalShipping = shipping; - } + }) : + purchaseId = order.purchaseId, + purchaseName = order.purchase, + _total = total, + _totalShipping = shipping, + currency = order.currency; + /// + /// double get total => _total; + /// + /// double get totalPrice => _total - _totalShipping; + /// + /// double get totalShipping => _totalShipping; + /// + /// Adding [cost] and [shipping] to the totals void addCost(double cost, double shipping) { _total += cost; _totalShipping += shipping; diff --git a/lib/domain/order/order_list.dart b/lib/domain/order/order_list.dart index 032d470..bf16b07 100644 --- a/lib/domain/order/order_list.dart +++ b/lib/domain/order/order_list.dart @@ -6,26 +6,114 @@ import 'package:hmi_core/hmi_core_log.dart'; import 'package:hmi_core/hmi_core_result.dart'; /// /// -typedef OrderListSqlAccess = SqlAccess, void>; +typedef OrderListSqlAccess = SqlAccess, OrderListSqlParams>; +/// +/// Container provides SQL query parameters for the [OrderListSqlAccess] +class OrderListSqlParams { + /// customer_order.id + final String? id; + /// customer_order.customerId + final String? customerId; + /// customer_order.purchase_item_id + final String? purchaseItemId; + /// customer_order.count + final String? count; + /// + /// Container provides SQL query parameters for the [OrderListSqlAccess] + const OrderListSqlParams({ + this.id, + this.customerId, + this.purchaseItemId, + this.count, + }); + // + @override + String toString() { + return 'OrderSqlParams { customer_order.id: $id, customer_order.customerId: $customerId, customer_order.purchase_item_id: $purchaseItemId, count: $count }'; + } +} + /// /// Класс реализует список элементов Order для OrderOverviewBody /// Список заказов для отображения в личном кабинете class OrderList { static const _log = Log('OrderList'); + final OrderListSqlParams? params; final OrderListSqlAccess _remote; final Map _orders = {}; /// /// Список заказов для отображения в личном кабинете OrderList({ + this.params, OrderListSqlAccess? remote, }): - _remote = remote ?? SqlAccess( address: ApiAddress(host: const Setting('api-host').toString(), port: const Setting('api-port').toInt), authToken: const Setting('api-auth-token').toString(), database: const Setting('api-database').toString(), - sqlBuilder: (sql, _) { - return Sql(sql: "select * from customer order;"); + sqlBuilder: (sql, params) { + // return Sql(sql: "select * from customer_order_view;"); + if (params?.customerId != null) { + return Sql(sql: """ + select + cord.id, + cord.customer_id, + cu.name as customer, + cord.purchase_item_id, + cord.count, + cord.count * (pui.sale_price + pui.shipping) as cost, + pui.shipping as shipping, + cord.paid, + cord.distributed, + cord.to_refound, + cord.refounded, + cord.description, + cord.created, + cord.updated, + cord.deleted, + pui.status as status, + pui.product as product, + pui.sale_currency as currency, + p.category as product_category, + pui.picture as product_picture, + pu.name as purchase + from public.customer_order cord + JOIN public.customer cu ON cord.customer_id = cu.id + JOIN public.purchase_item_view pui ON cord.purchase_item_id = pui.id + JOIN public.purchase pu ON pui.purchase_id = pu.id + JOIN public.product_view p ON pui.product_id = p.id + where cord.customer_id = ${params?.customerId}; + """); + } + return Sql(sql: """ + select + cord.id, + cord.customer_id, + cu.name as customer, + cord.purchase_item_id, + cord.count, + cord.count * (pui.sale_price + pui.shipping) as cost, + pui.shipping as shipping, + cord.paid, + cord.distributed, + cord.to_refound, + cord.refounded, + cord.description, + cord.created, + cord.updated, + cord.deleted, + pui.status as status, + pui.product as product, + pui.sale_currency as currency, + p.category as product_category, + pui.picture as product_picture, + pu.name as purchase + from public.customer_order cord + JOIN public.customer cu ON cord.customer_id = cu.id + JOIN public.purchase_item_view pui ON cord.purchase_item_id = pui.id + JOIN public.purchase pu ON pui.purchase_id = pu.id + JOIN public.product_view p ON pui.product_id = p.id; + """); }, entryBuilder: (row) { return row; @@ -36,9 +124,9 @@ class OrderList { Future, Failure>> refresh() => fetch(); /// /// Returns Order's as map - Future, Failure>> fetch() { + Future, Failure>> fetch({OrderListSqlParams? params}) { _orders.clear(); - return _remote.fetch().then( + return _remote.fetch(params: params ?? this.params).then( (result) { switch (result) { case Ok(value :final result): diff --git a/lib/presentation/auth/sign_in/user_id_page.dart b/lib/presentation/auth/sign_in/user_id_page.dart index d6f56d6..42af311 100644 --- a/lib/presentation/auth/sign_in/user_id_page.dart +++ b/lib/presentation/auth/sign_in/user_id_page.dart @@ -23,10 +23,11 @@ class UserIdPage extends StatefulWidget { _userPhone = userPhone; AppUser user() => _user; UserPhone userPhone() => _userPhone; + // @override - _UserIdPageState createState() => _UserIdPageState(); + State createState() => _UserIdPageState(); } - +// class _UserIdPageState extends State { static const _debug = false; bool _isLoading = true; diff --git a/lib/presentation/auth/sign_in/user_pass_page.dart b/lib/presentation/auth/sign_in/user_pass_page.dart index f07b212..902f3ef 100644 --- a/lib/presentation/auth/sign_in/user_pass_page.dart +++ b/lib/presentation/auth/sign_in/user_pass_page.dart @@ -33,7 +33,7 @@ class UserPassPage extends StatefulWidget { // // @override - _UserPassPageState createState() => _UserPassPageState(); + State createState() => _UserPassPageState(); } // // @@ -119,7 +119,9 @@ class _UserPassPageState extends State { const SizedBox(height: paddingValue), TextFormField( style: appThemeData.textTheme.bodyMedium, + autofocus: true, maxLength: _userPass.maxLength, + obscureText: true, decoration: const InputDecoration( prefixIcon: Icon( Icons.lock, @@ -136,6 +138,9 @@ class _UserPassPageState extends State { _userPass = UserPassword(value: value); }); }, + onFieldSubmitted: _allowResend + ? (_) => _verifyUserPass + : null, ), const SizedBox(height: paddingValue), SizedBox( diff --git a/lib/presentation/auth/sign_in/widgets/phone_number_widget.dart b/lib/presentation/auth/sign_in/widgets/phone_number_widget.dart index 4efe660..0e05c11 100644 --- a/lib/presentation/auth/sign_in/widgets/phone_number_widget.dart +++ b/lib/presentation/auth/sign_in/widgets/phone_number_widget.dart @@ -8,15 +8,15 @@ class PhoneNumbetWidget extends StatefulWidget { final UserPhone? userPhone; final void Function(UserPhone)? onCompleted; const PhoneNumbetWidget({ - Key? key, + super.key, this.userPhone, this.onCompleted, - }) : super(key: key); - + }); + // @override - _PhoneNumbetWidgetState createState() => _PhoneNumbetWidgetState(); + State createState() => _PhoneNumbetWidgetState(); } - +// class _PhoneNumbetWidgetState extends State { static const _debug = false; late UserPhone _userPhone; @@ -43,6 +43,7 @@ class _PhoneNumbetWidgetState extends State { child: TextFormField( style: appThemeData.textTheme.bodyMedium, keyboardType: TextInputType.number, + autofocus: true, maxLength: 10, decoration: InputDecoration( prefixIcon: const Icon( @@ -62,6 +63,9 @@ class _PhoneNumbetWidgetState extends State { _userPhone = UserPhone(phone: phone); }); }, + onFieldSubmitted: _userPhone.validate().valid() + ? (_) => _onComplete + : null, ), ), const SizedBox(height: paddingValue), diff --git a/lib/presentation/user_account/user_account_page.dart b/lib/presentation/user_account/user_account_page.dart index f38f936..320f49a 100644 --- a/lib/presentation/user_account/user_account_page.dart +++ b/lib/presentation/user_account/user_account_page.dart @@ -79,7 +79,7 @@ class UserAccountPage extends StatelessWidget { ), body: OrderOverviewBody( user: _user, - orderList: OrderList(), + orderList: OrderList(params: OrderListSqlParams(customerId: _user.id)), noticeList: NoticeList(noticeListViewed: _noticeListViewed), noticeListViewed: _noticeListViewed, ), diff --git a/lib/presentation/user_account/widgets/order_card.dart b/lib/presentation/user_account/widgets/order_card.dart index 28b75bf..fa7b968 100644 --- a/lib/presentation/user_account/widgets/order_card.dart +++ b/lib/presentation/user_account/widgets/order_card.dart @@ -79,7 +79,7 @@ class _OrderCardState extends State { final product = PurchaseItem( id: order.purchaseItemId, ); - product.product_name = order.productName; + product.product_name = order.product; product.purchase_id = order.purchaseId; product.status = order.purchaseItemStatus; Navigator.of(context).push( @@ -136,14 +136,14 @@ class _OrderCardState extends State { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - order.productName, + order.product, softWrap: true, overflow: TextOverflow.visible, style: appThemeData.textTheme.titleSmall, ), const SizedBox(height: 8.0,), Text( - order.productGroup, + order.productCategory, style: appThemeData.textTheme.bodySmall, ), const SizedBox(height: 12.0,), @@ -163,7 +163,7 @@ class _OrderCardState extends State { onPressed: () { showDeleteDialog( context, - Text(order.productName), + Text(order.product), const Text('Удалить заказ ?'), ).then((result) { if (result != null && result) { @@ -202,12 +202,12 @@ class _OrderCardState extends State { crossAxisAlignment: CrossAxisAlignment.end, children: [ Text( - order.cost, + '${order.cost} ${order.currency}', style: appThemeData.textTheme.titleSmall, ), const SizedBox(height: 8,), Text( - '${order.count}x(${order.purchaseItemSalePrice} + ${order.purchaseItemShipping})', + '${order.count} x (${order.purchaseItemSalePrice} + ${order.purchaseItemShipping})', style: appThemeData.textTheme.bodySmall, ), ], diff --git a/lib/presentation/user_account/widgets/order_header_card.dart b/lib/presentation/user_account/widgets/order_header_card.dart index 2752f23..a79d5ed 100644 --- a/lib/presentation/user_account/widgets/order_header_card.dart +++ b/lib/presentation/user_account/widgets/order_header_card.dart @@ -1,21 +1,22 @@ import 'package:flower_app/domain/order/order_header.dart'; import 'package:flower_app/presentation/core/app_theme.dart'; import 'package:flutter/material.dart'; - +/// +/// Displays a total by customer's orders +/// in the customer's profile class OrderHeaderCard extends StatelessWidget { - final OrderHeader _orderHeader; + final OrderHeader orderHeader; const OrderHeaderCard({ - Key? key, - required OrderHeader orderHeader, - }) : - _orderHeader = orderHeader, - super(key: key); + super.key, + required this.orderHeader, + }); + // @override Widget build(BuildContext context) { return Card( // color: appThemeData.colorScheme.secondaryContainer, - color: appThemeData.colorScheme.background, - shadowColor: appThemeData.colorScheme.background, + color: appThemeData.colorScheme.surface, + shadowColor: appThemeData.colorScheme.surface, child: Padding( padding: const EdgeInsets.only( left: 32.0, @@ -27,18 +28,34 @@ class OrderHeaderCard extends StatelessWidget { children: [ Expanded( child: Text( - _orderHeader.purchaseName, + orderHeader.purchaseName, style: appThemeData.textTheme.titleSmall!.copyWith( - color: appThemeData.colorScheme.onBackground, + color: appThemeData.colorScheme.onSurface, ), ), ), - Text( - '${_orderHeader.total} (${_orderHeader.totalPrice} + ${_orderHeader.totalShipping})', - style: appThemeData.textTheme.titleSmall!.copyWith( - color: appThemeData.colorScheme.onBackground, - fontWeight: FontWeight.bold, - ), + Tooltip( + message: """Общая сумма за все заказы в данной закупке ${orderHeader.total.toStringAsFixed(2)} ${orderHeader.currency}, + суммарная стоимость товаров ${orderHeader.totalPrice.toStringAsFixed(2)} ${orderHeader.currency}, + суммарная стоимость доставки ${orderHeader.totalShipping.toStringAsFixed(2)} ${orderHeader.currency}""", + child: Column( + children: [ + Text( + '${orderHeader.total.toStringAsFixed(2)} ${orderHeader.currency}', + style: appThemeData.textTheme.titleSmall!.copyWith( + color: appThemeData.colorScheme.onSurface, + fontWeight: FontWeight.bold, + ), + ), + Text( + '(${orderHeader.totalPrice.toStringAsFixed(2)} + ${orderHeader.totalShipping.toStringAsFixed(2)})', + // style: appThemeData.textTheme.titleSmall!.copyWith( + // color: appThemeData.colorScheme.onSurface, + // fontWeight: FontWeight.bold, + // ), + ), + ], + ), ), ], ), From 50b3096f87917b361e21918c18c43b78a10bda8f Mon Sep 17 00:00:00 2001 From: Anton Lobanov Date: Sun, 11 May 2025 20:22:03 +0300 Subject: [PATCH 22/22] OrderOverview | fixes --- lib/domain/core/translate/translate.dart | 2 +- lib/domain/order/order.dart | 2 ++ lib/domain/order/order_list.dart | 8 ++++++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/domain/core/translate/translate.dart b/lib/domain/core/translate/translate.dart index a453c73..b91e941 100644 --- a/lib/domain/core/translate/translate.dart +++ b/lib/domain/core/translate/translate.dart @@ -55,7 +55,7 @@ const tr = { 'Cost': {Lang.en: 'Cost', Lang.ru: 'Стоимость'}, 'Distributed': {Lang.en: 'Distributed', Lang.ru: 'Выдано'}, - 'No products added yet': {Lang.en: 'No products added yet', Lang.ru: 'Пока не добавлено ни одного продукта'}, + 'No products added yet': {Lang.en: 'No products added yet', Lang.ru: 'Пока не добавлено ни одного товара'}, 'Reload': {Lang.en: 'Reload', Lang.ru: 'Перезагрузить'}, }; /// diff --git a/lib/domain/order/order.dart b/lib/domain/order/order.dart index a41a24d..3cd98f9 100644 --- a/lib/domain/order/order.dart +++ b/lib/domain/order/order.dart @@ -110,6 +110,7 @@ class Order { pui.sale_currency as currency, p.category as product_category, pui.picture as product_picture, + pu.id as purchase_id, pu.name as purchase from public.customer_order cord JOIN public.customer cu ON cord.customer_id = cu.id @@ -146,6 +147,7 @@ class Order { pui.sale_currency as currency, p.category as product_category, pui.picture as product_picture, + pu.id as purchase_id, pu.name as purchase from public.customer_order cord JOIN public.customer cu ON cord.customer_id = cu.id diff --git a/lib/domain/order/order_list.dart b/lib/domain/order/order_list.dart index bf16b07..f948e54 100644 --- a/lib/domain/order/order_list.dart +++ b/lib/domain/order/order_list.dart @@ -76,13 +76,15 @@ class OrderList { pui.sale_currency as currency, p.category as product_category, pui.picture as product_picture, + pu.id as purchase_id, pu.name as purchase from public.customer_order cord JOIN public.customer cu ON cord.customer_id = cu.id JOIN public.purchase_item_view pui ON cord.purchase_item_id = pui.id JOIN public.purchase pu ON pui.purchase_id = pu.id JOIN public.product_view p ON pui.product_id = p.id - where cord.customer_id = ${params?.customerId}; + where cord.customer_id = ${params?.customerId} + order by pu.id, pui.id; """); } return Sql(sql: """ @@ -107,12 +109,14 @@ class OrderList { pui.sale_currency as currency, p.category as product_category, pui.picture as product_picture, + pu.id as purchase_id, pu.name as purchase from public.customer_order cord JOIN public.customer cu ON cord.customer_id = cu.id JOIN public.purchase_item_view pui ON cord.purchase_item_id = pui.id JOIN public.purchase pu ON pui.purchase_id = pu.id - JOIN public.product_view p ON pui.product_id = p.id; + JOIN public.product_view p ON pui.product_id = p.id + order by cu.id, pu.id, pui.id; """); }, entryBuilder: (row) {