Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Username1548
2025-03-21 20:43:35 +07:00
15 changed files with 428 additions and 430 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -0,0 +1,46 @@
name: "Build Test Flight"
on:
pull_request:
branches:
- test-flight
jobs:
build:
runs-on: [macos-arm64]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Delete existing keychain if present
run: |
if security list-keychains | grep -q "signing_temp.keychain"; then
security delete-keychain signing_temp.keychain
fi
- name: Import code sign
uses: mso7nueh/import-codesign-certs@v1
env:
KEYCHAIN_PATH: ${{ runner.temp }}/signing_temp.keychain
with:
keychain-path: ${{ env.KEYCHAIN_PATH }}
p12-file-base64: ${{ secrets.CERTIFICATES_FILE_BASE64 }}
p12-password: ${{ secrets.CERTIFICATES_PASSWORD }}
- name: Download provisioning
uses: mso7nueh/apple-provisioning-profiles-downloader@v1.0.8
with:
profile-type: IOS_APP_STORE
bundle-id: com.eatvioapp.app
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}
- run: ./Build-tf
- name: Upload to TestFlight
uses: mso7nueh/upload-testflight-build@master
with:
app-path: .build/Artifacts/EatvioApp.ipa/EatvioApp.ipa
issuer-id: ${{ secrets.APPSTORE_ISSUER_ID }}
api-key-id: ${{ secrets.APPSTORE_KEY_ID }}
api-private-key: ${{ secrets.APPSTORE_PRIVATE_KEY }}

71
Build-tf Executable file
View File

@@ -0,0 +1,71 @@
#!/usr/bin/env bash
set -xeu
set -o pipefail
export LANG=en_US.UTF-8
LANG=en_US.UTF-8
function finish() {
if [[ -d "${RESULT_BUNDLE_PATH}" ]]; then
ditto -c -k --sequesterRsrc --keepParent "${RESULT_BUNDLE_PATH}" "${RESULT_BUNDLE_PATH}.zip"
rm -rf "${RESULT_BUNDLE_PATH}"
fi
}
trap finish EXIT
SDK="${SDK:-iphoneos}"
WORKSPACE="${WORKSPACE:-ios/Runner.xcworkspace}"
SCHEME="${SCHEME:-Runner}"
CONFIGURATION="${CONFIGURATION:-Release}"
BUILD_DIR="${BUILD_DIR:-build}"
ARTIFACT_PATH="${RESULT_PATH:-${BUILD_DIR}/Artifacts}"
RESULT_BUNDLE_PATH="${ARTIFACT_PATH}/${SCHEME}.xcresult"
ARCHIVE_PATH="${ARCHIVE_PATH:-${BUILD_DIR}/Archives/${SCHEME}.xcarchive}"
DERIVED_DATA_PATH="${DERIVED_DATA_PATH:-${BUILD_DIR}/DerivedData}"
CURRENT_PROJECT_VERSION="${BUILD_NUMBER:-0}"
EXPORT_OPTIONS_FILE="Support/ExportOptions.plist"
# Clean and prepare the build
flutter clean
flutter pub get
cd ios
rm -rf Pods Podfile.lock
pod install --repo-update
pod update || { echo "Pod update failed"; exit 1; }
cd ..
rm -rf "${RESULT_BUNDLE_PATH}" "${DERIVED_DATA_PATH}"
mkdir -p "${ARTIFACT_PATH}"
# Archive the build
xcrun xcodebuild \
-workspace "${WORKSPACE}" \
-scheme "${SCHEME}" \
-configuration "${CONFIGURATION}" \
-sdk "${SDK}" \
-parallelizeTargets \
-showBuildTimingSummary \
-derivedDataPath "${DERIVED_DATA_PATH}" \
-archivePath "${ARCHIVE_PATH}" \
-resultBundlePath "${RESULT_BUNDLE_PATH}" \
-allowProvisioningUpdates \
CURRENT_PROJECT_VERSION="${CURRENT_PROJECT_VERSION}" \
archive || { echo "Xcode archive failed"; exit 1; }
# Export the build to .ipa
xcrun xcodebuild \
-exportArchive \
-exportOptionsPlist "${EXPORT_OPTIONS_FILE}" \
-archivePath "${ARCHIVE_PATH}" \
-exportPath "${ARTIFACT_PATH}/${SCHEME}.ipa" || { echo "Export to IPA failed"; exit 1; }
# Zip the archive
if [[ -d "${ARCHIVE_PATH}" ]]; then
ditto -c -k --sequesterRsrc --keepParent "${ARCHIVE_PATH}" "${ARTIFACT_PATH}/${SCHEME}.xcarchive.zip"
else
echo "Archive directory not found, skipping zip."
fi

View File

@@ -0,0 +1,19 @@
<?xml version="1.0"coding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" " http://www.apple.com/DTDs/PropertyList -1.0.dtd ">
<plist version="1.0">
<dict>
<key>provisioningProfiles</key>
<dict>
<key>com.eatvioapp.app</key>
<string>CI CD Example Disctribution</string>
</dict>
<key>signingCertificate</key>
<string>Apple Distribution: Team ITVIO, OOO</string>
<key>method</key>
<string>app-store</string>
<key>signingStyle</key>
<string>automatic</string>
<key>teamID</key>
<string>VL68C36HYS</string>
</dict>
</plist>

BIN
android/.DS_Store vendored Normal file

Binary file not shown.

View File

@@ -2,27 +2,27 @@ C/C++ Structured Loga
_
]/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/additional_project_files.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Ðú’ýØ2  <20>ë„ÖØ2^
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ¤¤þñÚ2  <20>ë„ÖØ2^
\
Z/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/android_gradle_build.json  Ðú’ýØ2§ ‡ë„ÖØ2c
Z/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/android_gradle_build.json  ¤¤þñÚ2§ ‡ë„ÖØ2c
a
_/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/android_gradle_build_mini.json  Ðú’ýØ2² ‰ë„ÖØ2P
_/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/android_gradle_build_mini.json  ¤¤þñÚ2² ‰ë„ÖØ2P
N
L/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/build.ninja  Ðú’ýØ2œÃ çê„ÖØ2T
L/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/build.ninja  ¤¤þñÚ2œÃ çê„ÖØ2T
R
P/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/build.ninja.txt  Ðú’ýØ2Y
P/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/build.ninja.txt  ¤¤þñÚ2Y
W
U/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/build_file_index.txt  Ðú’ýØ2
U/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/build_file_index.txt  ¤¤þñÚ2
P ‰ë„ÖØ2Z
X
X
V/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/compile_commands.json  ¤¤þñÚ2^
\
\
Z/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/compile_commands.json.bin  ¤¤þñÚ2 d
b
b
`/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/metadata_generation_command.txt  ¤¤þñÚ2
‚ ‰ë„ÖØ2W
U
U
S/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/prefab_config.json  ¤¤þñÚ2
 ( ‰ë„ÖØ2\
 ( ‰ë„ÖØ2\
Z
X/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/symbol_folder_index.txt  Ðú’ýØ2
X/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/arm64-v8a/symbol_folder_index.txt  ¤¤þñÚ2

View File

@@ -2,27 +2,27 @@ C/C++ Structured Logc
a
_/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/additional_project_files.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  б“ýØ2  ’ò„ÖØ2`
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ѤþñÚ2  ’ò„ÖØ2`
^
\/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/android_gradle_build.json  б“ýØ2« ”ò„ÖØ2e
\/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/android_gradle_build.json  ѤþñÚ2« ”ò„ÖØ2e
c
a/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/android_gradle_build_mini.json  б“ýØ2 –ò„ÖØ2R
a/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/android_gradle_build_mini.json  ѤþñÚ2 –ò„ÖØ2R
P
N/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/build.ninja  б“ýØ2¨Ã þñ„ÖØ2V
N/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/build.ninja  ѤþñÚ2¨Ã þñ„ÖØ2V
T
R/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/build.ninja.txt  б“ýØ2[
R/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/build.ninja.txt  ѤþñÚ2[
Y
W/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/build_file_index.txt  б“ýØ2
W/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/build_file_index.txt  ѤþñÚ2
P –ò„ÖØ2\
Z
Z
X/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/compile_commands.json  ѤþñÚ2`
^
^
\/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/compile_commands.json.bin  ѤþñÚ2 f
d
d
b/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/metadata_generation_command.txt  ѤþñÚ2
Œ –ò„ÖØ2Y
W
W
U/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/prefab_config.json  ѤþñÚ2
 ( –ò„ÖØ2^
 ( –ò„ÖØ2^
\
Z/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/symbol_folder_index.txt  б“ýØ2
Z/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/armeabi-v7a/symbol_folder_index.txt  ѤþñÚ2

View File

@@ -2,27 +2,27 @@ C/C++ Structured Log[
Y
W/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/additional_project_files.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ¢±“ýØ2  Üû„ÖØ2X
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  ߤþñÚ2  Üû„ÖØ2X
V
T/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/android_gradle_build.json  ¢±“ýØ2› Ýû„ÖØ2]
T/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/android_gradle_build.json  ߤþñÚ2› Ýû„ÖØ2]
[
Y/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/android_gradle_build_mini.json  ¢±“ýØ2¦ Þû„ÖØ2J
Y/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/android_gradle_build_mini.json  ߤþñÚ2¦ Þû„ÖØ2J
H
F/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/build.ninja  ¢±“ýØ2øÂ Ïû„ÖØ2N
F/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/build.ninja  ߤþñÚ2øÂ Ïû„ÖØ2N
L
J/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/build.ninja.txt  ¢±“ýØ2S
J/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/build.ninja.txt  ߤþñÚ2S
Q
O/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/build_file_index.txt  ¢±“ýØ2
O/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/build_file_index.txt  ߤþñÚ2
P ßû„ÖØ2T
R
R
P/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/compile_commands.json  ߤþñÚ2X
V
V
T/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/compile_commands.json.bin  ߤþñÚ2 ^
\
\
Z/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/metadata_generation_command.txt  ߤþñÚ2
ä Þû„ÖØ2Q
O
O
M/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/prefab_config.json  ߤþñÚ2
 ( Þû„ÖØ2V
 ( Þû„ÖØ2V
T
R/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/symbol_folder_index.txt  ¢±“ýØ2
R/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86/symbol_folder_index.txt  ߤþñÚ2

View File

@@ -2,27 +2,27 @@ C/C++ Structured Log^
\
Z/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/additional_project_files.txtC
A
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  Ó±“ýØ2  Î<>…ÖØ2[
?com.android.build.gradle.internal.cxx.io.EncodedFileFingerPrint  é¤þñÚ2  Î<>…ÖØ2[
Y
W/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/android_gradle_build.json  Ó±“ýØ2¡ Ð<>…ÖØ2`
W/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/android_gradle_build.json  é¤þñÚ2¡ Ð<>…ÖØ2`
^
\/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/android_gradle_build_mini.json  Ó±“ýØ2¬ Ò<>…ÖØ2M
\/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/android_gradle_build_mini.json  é¤þñÚ2¬ Ò<>…ÖØ2M
K
I/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/build.ninja  Ó±“ýØ2ŠÃ »<>…ÖØ2Q
I/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/build.ninja  é¤þñÚ2ŠÃ »<>…ÖØ2Q
O
M/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/build.ninja.txt  Ó±“ýØ2V
M/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/build.ninja.txt  é¤þñÚ2V
T
R/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/build_file_index.txt  Ó±“ýØ2
R/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/build_file_index.txt  é¤þñÚ2
P Ô<>…ÖØ2W
U
U
S/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/compile_commands.json  é¤þñÚ2[
Y
Y
W/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/compile_commands.json.bin  é¤þñÚ2 a
_
_
]/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/metadata_generation_command.txt  ê¤þñÚ2
ó Ó<>…ÖØ2T
R
R
P/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/prefab_config.json  ê¤þñÚ2
 ( Ó<>…ÖØ2Y
 ( Ó<>…ÖØ2Y
W
U/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/symbol_folder_index.txt  Ó±“ýØ2
U/Users/alex/eatvio_app/android/app/.cxx/Debug/4y1z256o/x86_64/symbol_folder_index.txt  ê¤þñÚ2

View File

@@ -365,7 +365,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 49;
CURRENT_PROJECT_VERSION = 48;
DEVELOPMENT_TEAM = VL68C36HYS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -383,7 +383,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.0.49;
MARKETING_VERSION = 1.0.48;
PRODUCT_BUNDLE_IDENTIFIER = com.eatvioapp.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -514,7 +514,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 49;
CURRENT_PROJECT_VERSION = 48;
DEVELOPMENT_TEAM = VL68C36HYS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -532,7 +532,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.0.49;
MARKETING_VERSION = 1.0.48;
PRODUCT_BUNDLE_IDENTIFIER = com.eatvioapp.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@@ -551,7 +551,7 @@
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 49;
CURRENT_PROJECT_VERSION = 48;
DEVELOPMENT_TEAM = VL68C36HYS;
ENABLE_BITCODE = NO;
FRAMEWORK_SEARCH_PATHS = (
@@ -569,7 +569,7 @@
"$(inherited)",
"$(PROJECT_DIR)/Flutter",
);
MARKETING_VERSION = 1.0.49;
MARKETING_VERSION = 1.0.48;
PRODUCT_BUNDLE_IDENTIFIER = com.eatvioapp.app;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@@ -68,16 +68,8 @@ class AppRouter {
name: 'authScreen',
builder: (context, state) => const AuthScreen(),
routes: [
GoRoute(
path: 'webView-registration-screen',
name: 'webViewRegistrationScreen',
builder: (context, state) => const WebViewRegistrationScreen(),
),
GoRoute(
path: 'registration-screen',
name: 'registrationScreen',
builder: (context, state) => const RegistrationScreen(),
),
GoRoute(path: 'webView-registration-screen', name: 'webViewRegistrationScreen', builder: (context, state) => const WebViewRegistrationScreen()),
GoRoute(path: 'registration-screen', name: 'registrationScreen', builder: (context, state) => const RegistrationScreen()),
],
),
ShellRoute(
@@ -85,10 +77,7 @@ class AppRouter {
return BlocBuilder<ProfileAvatarCubit, ProfileAvatarState>(
builder: (BuildContext context, ProfileAvatarState state) {
if (state is ProfileAvatarStateLoaded) {
return BottomNavigationBarWidget(
child: child,
profileModel: state.profile,
);
return BottomNavigationBarWidget(child: child, profileModel: state.profile);
}
return SizedBox.shrink();
},
@@ -106,44 +95,25 @@ class AppRouter {
return NoTransitionPage(child: ProfileScreen());
},
),
GoRoute(
path: '/feed-screen',
name: 'feedScreen',
pageBuilder: (context, state) => NoTransitionPage(child: FeedScreen()),
),
GoRoute(
path: '/diary-screen',
name: 'diaryScreen',
pageBuilder: (context, state) => NoTransitionPage(child: DiaryScreen()),
),
GoRoute(
path: '/consultations-screen',
name: 'consultationsScreen',
pageBuilder: (context, state) => NoTransitionPage(child: ConsultationsScreen()),
),
GoRoute(
path: '/chat-select-screen',
name: 'chatSelectScreen',
pageBuilder: (context, state) => NoTransitionPage(child: ChatsScreen()),
),
GoRoute(
path: '/notifications-screen',
name: 'notificationsScreen',
pageBuilder: (context, state) => NoTransitionPage(child: NotificationsScreen()),
),
GoRoute(path: '/feed-screen', name: 'feedScreen', pageBuilder: (context, state) => NoTransitionPage(child: FeedScreen())),
GoRoute(path: '/diary-screen', name: 'diaryScreen', pageBuilder: (context, state) => NoTransitionPage(child: DiaryScreen())),
GoRoute(path: '/consultations-screen', name: 'consultationsScreen', pageBuilder: (context, state) => NoTransitionPage(child: ConsultationsScreen())),
GoRoute(path: '/chat-select-screen', name: 'chatSelectScreen', pageBuilder: (context, state) => NoTransitionPage(child: ChatsScreen())),
GoRoute(path: '/notifications-screen', name: 'notificationsScreen', pageBuilder: (context, state) => NoTransitionPage(child: NotificationsScreen())),
GoRoute(
path: '/menu-screen',
name: 'menuScreen',
pageBuilder: (context, state) => NoTransitionPage(
child: BlocBuilder<ProfileAvatarCubit, ProfileAvatarState>(
builder: (BuildContext context, ProfileAvatarState state) {
if (state is ProfileAvatarStateLoaded) {
return MenuScreen(profileModel: state.profile);
}
return SizedBox.shrink();
},
),
),
pageBuilder:
(context, state) => NoTransitionPage(
child: BlocBuilder<ProfileAvatarCubit, ProfileAvatarState>(
builder: (BuildContext context, ProfileAvatarState state) {
if (state is ProfileAvatarStateLoaded) {
return MenuScreen(profileModel: state.profile);
}
return SizedBox.shrink();
},
),
),
),
],
),
@@ -167,85 +137,46 @@ class AppRouter {
name: 'aboutPlanScreen',
builder: (context, state) {
final data = state.extra as Map<String, dynamic>;
return AboutPlanScreen(
plan: data['plan'] as PlanModel,
index: data['index'] as int?,
navigateToComments: data['navigateToComments'] as bool,
);
return AboutPlanScreen(plan: data['plan'] as PlanModel, index: data['index'] as int?, navigateToComments: data['navigateToComments'] as bool);
},
),
GoRoute(
path: '/glossary-screen',
name: 'glossaryScreen',
builder: (context, state) => GlossaryScreen(),
),
GoRoute(path: '/glossary-screen', name: 'glossaryScreen', builder: (context, state) => GlossaryScreen()),
GoRoute(
path: '/about-recipes-screen',
name: 'aboutRecipesScreen',
builder: (context, state) {
final data = state.extra as Map<String, dynamic>;
return AboutRecipeScreen(
recipe: data['recipe'] as Recipe,
index: data['index'] as int?,
navigateToComments: data['navigateToComments'] as bool,
);
return AboutRecipeScreen(recipe: data['recipe'] as Recipe, index: data['index'] as int?, navigateToComments: data['navigateToComments'] as bool);
},
),
GoRoute(
path: RecipeCreateScreen.path,
name: RecipeCreateScreen.name,
builder: (context, state) => RecipeCreateScreen(),
),
GoRoute(
path: '/profile-screen',
name: 'profileScreen',
builder: (context, state) => ProfileScreen(
author: state.extra as Author,
),
),
GoRoute(path: RecipeCreateScreen.path, name: RecipeCreateScreen.name, builder: (context, state) => RecipeCreateScreen()),
GoRoute(path: '/profile-screen', name: 'profileScreen', builder: (context, state) => ProfileScreen(author: state.extra as Author)),
GoRoute(
path: '/subs-screen/:slug',
name: 'subsScreen',
builder: (context, state) => SubsScreen(
slug: state.pathParameters['slug']!,
subType: state.extra as SubType,
),
builder: (context, state) => SubsScreen(slug: state.pathParameters['slug']!, subType: state.extra as SubType),
),
GoRoute(
path: '/about-diet-screen',
name: 'aboutDietScreen',
builder: (context, state) {
final data = state.extra as Map<String, dynamic>;
return AboutDietScreen(
diet: data['diet'] as Diet,
index: data['index'] as int?,
navigateToComments: data['navigateToComments'] as bool,
);
return AboutDietScreen(diet: data['diet'] as Diet, index: data['index'] as int?, navigateToComments: data['navigateToComments'] as bool);
},
),
GoRoute(
path: '/blog-post-create-screen',
name: 'blogPostCreateScreen',
builder: (context, state) => BlogPostCreateScreen(
feedBlogPostModel: state.extra != null ? state.extra as FeedBlogPostModel : null,
),
),
GoRoute(
path: '/blog-post-screen',
name: 'blogPostScreen',
builder: (context, state) => BlogPostScreen(
blogPost: state.extra as FeedBlogPostModel,
),
builder: (context, state) => BlogPostCreateScreen(feedBlogPostModel: state.extra != null ? state.extra as FeedBlogPostModel : null),
),
GoRoute(path: '/blog-post-screen', name: 'blogPostScreen', builder: (context, state) => BlogPostScreen(blogPost: state.extra as FeedBlogPostModel)),
GoRoute(
path: '/chat-screen',
name: 'chatScreen',
builder: (context, state) {
final data = state.extra as Map<String, dynamic>;
final data = state.extra as Map<String, dynamic>;
final chatId = data['chatId'] as String;
return ChatScreen(
chatId: chatId,
);
return ChatScreen(chatId: chatId);
},
),
GoRoute(
@@ -256,81 +187,44 @@ class AppRouter {
GoRoute(
path: 'general-info-screen',
name: 'generalInfoScreen',
builder: (context, state) => GeneralInfoScreen(
settingsEntity: state.extra as SettingsEntity,
),
builder: (context, state) => GeneralInfoScreen(settingsEntity: state.extra as SettingsEntity),
),
GoRoute(
path: 'other-info-screen',
name: 'otherInfoScreen',
builder: (context, state) => OtherInfoScreen(
settingsEntity: state.extra as SettingsEntity,
),
builder: (context, state) => OtherInfoScreen(settingsEntity: state.extra as SettingsEntity),
),
GoRoute(
path: 'physical-activity-screen',
name: 'physicalActivityScreen',
builder: (context, state) => PhysicalActivityScreen(
settingsEntity: state.extra as SettingsEntity,
),
builder: (context, state) => PhysicalActivityScreen(settingsEntity: state.extra as SettingsEntity),
),
GoRoute(
path: 'physical-form-screen',
name: 'physicalFormScreen',
builder: (context, state) => PhysicalFormScreen(
settingsEntity: state.extra as SettingsEntity,
),
),
GoRoute(
path: 'pressure-screen',
name: 'pressureScreen',
builder: (context, state) => PressureScreen(
settingsEntity: state.extra as SettingsEntity,
),
builder: (context, state) => PhysicalFormScreen(settingsEntity: state.extra as SettingsEntity),
),
GoRoute(path: 'pressure-screen', name: 'pressureScreen', builder: (context, state) => PressureScreen(settingsEntity: state.extra as SettingsEntity)),
GoRoute(
path: 'change-password-screen',
name: 'changePasswordScreen',
builder: (context, state) => ChangePasswordScreen(
settingsEntity: state.extra as SettingsEntity,
),
builder: (context, state) => ChangePasswordScreen(settingsEntity: state.extra as SettingsEntity),
),
GoRoute(
path: 'change-email-screen',
name: 'changeEmailScreen',
builder: (context, state) => ChangeEmailScreen(
settingsEntity: state.extra as SettingsEntity,
),
builder: (context, state) => ChangeEmailScreen(settingsEntity: state.extra as SettingsEntity),
),
],
),
GoRoute(
path: '/become-consultant-screen',
name: 'becomeConsultantScreen',
builder: (context, state) => BecomeConsultantScreen(),
),
GoRoute(
path: '/stepper-become-consultant-screen',
name: 'stepperBecomeConsultantScreen',
builder: (context, state) => StepperBecomeConsultantScreen(),
),
GoRoute(
path: '/calendar-screen',
name: 'calendarScreen',
builder: (context, state) => CalendarScreen(),
),
GoRoute(
path: '/support-screen',
name: 'supportScreen',
builder: (context, state) => SupportScreen(),
),
GoRoute(path: '/become-consultant-screen', name: 'becomeConsultantScreen', builder: (context, state) => BecomeConsultantScreen()),
GoRoute(path: '/stepper-become-consultant-screen', name: 'stepperBecomeConsultantScreen', builder: (context, state) => StepperBecomeConsultantScreen()),
GoRoute(path: '/calendar-screen', name: 'calendarScreen', builder: (context, state) => CalendarScreen()),
GoRoute(path: '/support-screen', name: 'supportScreen', builder: (context, state) => SupportScreen()),
GoRoute(
path: '/photo-view-screen/:index',
name: 'photoViewScreen',
builder: (context, state) => PhotoViewScreen(
imageUrls: state.extra as List<String>,
index: int.parse(state.pathParameters['index']!),
),
builder: (context, state) => PhotoViewScreen(imageUrls: state.extra as List<String>, index: int.parse(state.pathParameters['index']!)),
),
GoRoute(
path: CreateDietScreen.path,
@@ -345,48 +239,16 @@ class AppRouter {
name: DietPreviewScreen.name,
builder: (context, state) {
final data = state.extra as Diet;
return DietPreviewScreen(
diet: data,
);
return DietPreviewScreen(diet: data);
},
),
GoRoute(
path: CreatePlanScreen.path,
name: CreatePlanScreen.name,
builder: (context, state) => CreatePlanScreen(),
),
GoRoute(
path: MyDietsScreen.path,
name: MyDietsScreen.name,
builder: (context, state) => MyDietsScreen(),
),
GoRoute(
path: MyPlansScreen.path,
name: MyPlansScreen.name,
builder: (context, state) => MyPlansScreen(),
),
GoRoute(
path: UserDetailsScreen.path,
name: UserDetailsScreen.name,
builder: (context, state) => UserDetailsScreen(
slug: state.extra as String,
),
),
GoRoute(
path: DevToolsScreen.path,
name: DevToolsScreen.name,
builder: (context, state) => DevToolsScreen(),
),
GoRoute(
path: ConsultantRatingScreen.path,
name: ConsultantRatingScreen.name,
builder: (context, state) => ConsultantRatingScreen(),
),
GoRoute(
path: InfoByOrderScreen.path,
name: InfoByOrderScreen.name,
builder: (context, state) => InfoByOrderScreen(),
),
GoRoute(path: CreatePlanScreen.path, name: CreatePlanScreen.name, builder: (context, state) => CreatePlanScreen()),
GoRoute(path: MyDietsScreen.path, name: MyDietsScreen.name, builder: (context, state) => MyDietsScreen()),
GoRoute(path: MyPlansScreen.path, name: MyPlansScreen.name, builder: (context, state) => MyPlansScreen()),
GoRoute(path: UserDetailsScreen.path, name: UserDetailsScreen.name, builder: (context, state) => UserDetailsScreen(slug: state.extra as String)),
GoRoute(path: DevToolsScreen.path, name: DevToolsScreen.name, builder: (context, state) => DevToolsScreen()),
GoRoute(path: ConsultantRatingScreen.path, name: ConsultantRatingScreen.name, builder: (context, state) => ConsultantRatingScreen()),
GoRoute(path: InfoByOrderScreen.path, name: InfoByOrderScreen.name, builder: (context, state) => InfoByOrderScreen()),
],
);
}

View File

@@ -24,10 +24,7 @@ import 'package:share_plus/share_plus.dart';
class BlogPostScreen extends StatefulWidget {
final FeedBlogPostModel blogPost;
BlogPostScreen({
super.key,
required this.blogPost,
});
BlogPostScreen({super.key, required this.blogPost});
@override
State<BlogPostScreen> createState() => _BlogPostScreenState();
@@ -50,12 +47,7 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
@override
Widget build(BuildContext context) {
return BlocProvider<CommentsCubit>(
create: (BuildContext context) => commentsCubit
..getComments(
widget.blogPost.id.toString(),
CommentSourceType.blogPost,
true,
),
create: (BuildContext context) => commentsCubit..getComments(widget.blogPost.id.toString(), CommentSourceType.blogPost, true),
child: BlocConsumer<CommentsCubit, CommentsState>(
listener: (BuildContext context, CommentsState state) {
if (state is CommentsStateLoaded) {
@@ -69,14 +61,7 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
resizeToAvoidBottomInset: true,
bottomSheet: Container(
padding: EdgeInsets.symmetric(vertical: 12) + (Platform.isIOS ? const EdgeInsets.only(bottom: 16) : EdgeInsets.zero),
decoration: BoxDecoration(
color: Colors.white,
border: Border(
top: BorderSide(
color: Colors.black.withValues(alpha: 0.1),
),
),
),
decoration: BoxDecoration(color: Colors.white, border: Border(top: BorderSide(color: Colors.black.withValues(alpha: 0.1)))),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
@@ -91,17 +76,10 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
FocusManager.instance.primaryFocus?.unfocus();
},
child: Container(
decoration: BoxDecoration(
color: appTheme.blueA400,
shape: BoxShape.circle,
),
decoration: BoxDecoration(color: appTheme.blueA400, shape: BoxShape.circle),
height: 32,
width: 32,
child: Icon(
Icons.close_rounded,
size: 18,
color: Colors.white,
),
child: Icon(Icons.close_rounded, size: 18, color: Colors.white),
),
),
if (replyId != null) SizedBox(width: 8),
@@ -115,44 +93,16 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
maxLines: 5,
minLines: 1,
keyboardType: TextInputType.multiline,
style: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w400,
color: Colors.black,
height: 1,
),
style: TextStyle(fontSize: 16, fontWeight: FontWeight.w400, color: Colors.black, height: 1),
decoration: InputDecoration(
isDense: true,
contentPadding: EdgeInsets.symmetric(horizontal: 16, vertical: 8),
hintText: 'Комментарий',
hintStyle: TextStyle(
fontSize: 16,
fontWeight: FontWeight.w400,
height: 1,
color: Color(0xFFAEAEB2),
),
hintStyle: TextStyle(fontSize: 16, fontWeight: FontWeight.w400, height: 1, color: Color(0xFFAEAEB2)),
filled: true,
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(16),
borderSide: BorderSide(
color: Color(0xFFD1D1D6),
width: 1,
),
),
enabledBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(16),
borderSide: BorderSide(
color: Color(0xFFD1D1D6),
width: 1,
),
),
focusedBorder: OutlineInputBorder(
borderRadius: BorderRadius.circular(16),
borderSide: BorderSide(
color: Color(0xFFD1D1D6),
width: 1,
),
),
border: OutlineInputBorder(borderRadius: BorderRadius.circular(16), borderSide: BorderSide(color: Color(0xFFD1D1D6), width: 1)),
enabledBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(16), borderSide: BorderSide(color: Color(0xFFD1D1D6), width: 1)),
focusedBorder: OutlineInputBorder(borderRadius: BorderRadius.circular(16), borderSide: BorderSide(color: Color(0xFFD1D1D6), width: 1)),
),
),
),
@@ -175,17 +125,10 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
}
},
child: Container(
decoration: BoxDecoration(
color: textEditingController.text.length > 2 ? appTheme.blueA400 : Colors.grey,
shape: BoxShape.circle,
),
decoration: BoxDecoration(color: textEditingController.text.length > 2 ? appTheme.blueA400 : Colors.grey, shape: BoxShape.circle),
height: 32,
width: 32,
child: Icon(
Icons.send_rounded,
size: 18,
color: Colors.white,
),
child: Icon(Icons.send_rounded, size: 18, color: Colors.white),
),
),
],
@@ -206,39 +149,26 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
Navigator.of(context).pop();
}
if (value == 'edit') {
GoRouter.of(context).replaceNamed(
'blogPostCreateScreen',
extra: widget.blogPost,
);
GoRouter.of(context).replaceNamed('blogPostCreateScreen', extra: widget.blogPost);
}
},
itemBuilder: (context) => [
if (widget.blogPost.author.authorIsMe)
PopupMenuItem(
value: 'edit',
child: Text('Редактировать'),
),
if (widget.blogPost.author.authorIsMe)
PopupMenuItem(
value: 'delete',
child: Text('Удалить'),
),
if (!widget.blogPost.author.authorIsMe)
PopupMenuItem(
value: 'report',
child: Text('Пожаловаться'),
onTap: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (context) => ComplainingBottomSheet(
complainedContentType: ComplainedContent.posts,
id: widget.blogPost.id,
),
);
},
),
],
itemBuilder:
(context) => [
if (widget.blogPost.author.authorIsMe) PopupMenuItem(value: 'edit', child: Text('Редактировать')),
if (widget.blogPost.author.authorIsMe) PopupMenuItem(value: 'delete', child: Text('Удалить')),
if (!widget.blogPost.author.authorIsMe)
PopupMenuItem(
value: 'report',
child: Text('Пожаловаться'),
onTap: () {
showModalBottomSheet(
context: context,
isScrollControlled: true,
builder: (context) => ComplainingBottomSheet(complainedContentType: ComplainedContent.posts, id: widget.blogPost.id),
);
},
),
],
),
],
),
@@ -255,32 +185,19 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
CircleAvatar(
radius: 16,
backgroundImage: NetworkImage(widget.blogPost.author.authorProfileIcon),
),
CircleAvatar(radius: 16, backgroundImage: NetworkImage(widget.blogPost.author.authorProfileIcon)),
SizedBox(width: 8),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
widget.blogPost.author.authorName,
style: TextStyle(
color: Colors.black,
fontSize: 14,
fontWeight: FontWeight.w400,
height: 1,
),
style: TextStyle(color: Colors.black, fontSize: 14, fontWeight: FontWeight.w400, height: 1),
),
SizedBox(height: 2),
Text(
widget.blogPost.createdAt.format('dd MMMM', 'ru'),
style: TextStyle(
color: Colors.grey.shade600,
fontSize: 12,
fontWeight: FontWeight.w400,
height: 1,
),
style: TextStyle(color: Colors.grey.shade600, fontSize: 12, fontWeight: FontWeight.w400, height: 1),
),
],
),
@@ -291,19 +208,10 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
if (widget.blogPost.description.isNotEmpty)
Padding(
padding: const EdgeInsets.symmetric(horizontal: 8),
child: Html(
data: widget.blogPost.description,
style: {
"*": Style(
color: Colors.black87,
),
},
),
child: Html(data: widget.blogPost.description, style: {"*": Style(color: Colors.black87)}),
),
SizedBox(height: 8),
CachedNetworkImage(
imageUrl: baseUrl + '/storage/' + (widget.blogPost.image),
),
CachedNetworkImage(imageUrl: baseUrl + '/storage/' + (widget.blogPost.image)),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12),
child: Row(
@@ -331,38 +239,22 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
onTap: () {
final box = context.findRenderObject() as RenderBox?;
Share.shareUri(
Uri.parse(
baseUrl + '/ru/blog_post/' + widget.blogPost.id.toString(),
),
Uri.parse(baseUrl + '/ru/blog_post/' + widget.blogPost.id.toString()),
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
);
},
),
Spacer(),
Icon(
Icons.visibility_rounded,
size: 16,
color: appTheme.gray500,
),
Icon(Icons.visibility_rounded, size: 16, color: appTheme.gray500),
SizedBox(width: 4),
Text(
widget.blogPost.totalViews.toString(),
style: TextStyle(
fontSize: 12,
color: appTheme.gray500,
fontWeight: FontWeight.w400,
),
),
Text(widget.blogPost.totalViews.toString(), style: TextStyle(fontSize: 12, color: appTheme.gray500, fontWeight: FontWeight.w400)),
],
),
),
Container(
width: MediaQuery.of(context).size.width - 32,
height: 0.4,
decoration: BoxDecoration(
color: Colors.black.withValues(alpha: 0.2),
borderRadius: BorderRadius.circular(16),
),
decoration: BoxDecoration(color: Colors.black.withValues(alpha: 0.2), borderRadius: BorderRadius.circular(16)),
),
SizedBox(height: 8),
Container(
@@ -370,22 +262,13 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
alignment: Alignment.centerLeft,
child: Text(
widget.blogPost.totalComments.toString() + ' КОММЕНТАРИЕВ',
style: TextStyle(
fontSize: 12,
color: appTheme.gray500,
fontWeight: FontWeight.w400,
),
style: TextStyle(fontSize: 12, color: appTheme.gray500, fontWeight: FontWeight.w400),
),
),
SizedBox(height: 16),
if (state is CommentsStateLoading) const Loader(),
if (state is CommentsStateLoaded)
CommentsWidget(
id: widget.blogPost.id.toString(),
commentSourceType: CommentSourceType.blogPost,
comment: state.comment,
replyId: replyId,
),
CommentsWidget(id: widget.blogPost.id.toString(), commentSourceType: CommentSourceType.blogPost, comment: state.comment, replyId: replyId),
],
),
),
@@ -401,28 +284,14 @@ class _BlogPostScreenState extends State<BlogPostScreen> {
borderRadius: BorderRadius.circular(16),
child: Ink(
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4),
decoration: BoxDecoration(
color: backgroundColor ?? appTheme.gray100,
borderRadius: BorderRadius.circular(16),
),
decoration: BoxDecoration(color: backgroundColor ?? appTheme.gray100, borderRadius: BorderRadius.circular(16)),
height: 32,
child: Row(
mainAxisSize: MainAxisSize.min,
children: [
Icon(
icon,
size: 20,
color: iconColor ?? appTheme.gray600,
),
Icon(icon, size: 20, color: iconColor ?? appTheme.gray600),
if (text != null) SizedBox(width: 8),
if (text != null)
Text(
text,
style: TextStyle(
color: textColor ?? appTheme.gray600,
fontWeight: FontWeight.w500,
),
),
if (text != null) Text(text, style: TextStyle(color: textColor ?? appTheme.gray600, fontWeight: FontWeight.w500)),
],
),
),

View File

@@ -1,26 +1,155 @@
import 'package:eatvio_app/core/app_colors.dart';
import 'package:eatvio_app/features/diets/presentation/widgets/author_card.dart';
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
import 'package:eatvio_app/generated/l10n.dart';
import 'package:flutter/material.dart';
class InfoByOrderScreen extends StatelessWidget {
class InfoByOrderScreen extends StatefulWidget {
static const name = 'infoByOrderScreen';
static const path = '/info-by-order-screen';
const InfoByOrderScreen({super.key});
@override
Widget build(BuildContext context) {
final s = S.of(context);
State<InfoByOrderScreen> createState() => _InfoByOrderScreenState();
}
class _InfoByOrderScreenState extends State<InfoByOrderScreen> {
bool _isHelpExpanded = false;
@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: AppColors.scaffoldBackgroundColor,
appBar: AppBar(
title: Text(s.infoAboutOrder),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.vertical(bottom: Radius.circular(12))),
appBar: AppBar(title: Text("Информация о заказе"), leading: IconButton(icon: Icon(Icons.arrow_back), onPressed: () {})),
body: ListView(
padding: EdgeInsets.all(16.0),
children: [
_buildProfileSection(),
SizedBox(height: 10),
_buildOrderStatus(),
SizedBox(height: 20),
_buildPlanDetails(),
SizedBox(height: 20),
_buildOptionDetails(),
SizedBox(height: 20),
_buildOrderProgress(),
SizedBox(height: 20),
_buildHelpSection(),
SizedBox(height: 20),
_buildCancelButton(),
],
),
body: AuthorCard(author: Author(authorSlug: 'authorSlug', authorName: 'authorName', authorProfileIcon: '', authorIsMe: false), title: 'asdasd'),
);
}
Widget _buildProfileSection() {
return Row(
children: [
CircleAvatar(
radius: 30,
backgroundImage: AssetImage('assets/profile.jpg'), // Замените на реальный путь
),
SizedBox(width: 10),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Дмитрий Коваль", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 16)),
Text("Консультант 128-й в рейтинге", style: TextStyle(color: Colors.grey)),
],
),
],
);
}
Widget _buildOrderStatus() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text("Статус заказа", style: TextStyle(fontWeight: FontWeight.bold)),
Chip(label: Text("Заказ оплачен", style: TextStyle(color: Colors.white)), backgroundColor: Colors.green),
],
),
Text("Сумма заказа: 2500₽"),
Text("Время выполнения плана: 7 дней"),
],
);
}
Widget _buildPlanDetails() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Название плана", style: TextStyle(fontWeight: FontWeight.bold)),
Text("В мире, где технологии становятся все более..."),
SizedBox(height: 10),
Image.asset('assets/plan_image.jpg', height: 150, fit: BoxFit.cover),
],
);
}
Widget _buildOptionDetails() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Название опции", style: TextStyle(fontWeight: FontWeight.bold)),
Text("Поддержка 24/7"),
Text("Составление индивидуальной диеты"),
Text("Длинное название опции..."),
],
);
}
Widget _buildOrderProgress() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Этапы заказа", style: TextStyle(fontWeight: FontWeight.bold)),
ListTile(leading: Icon(Icons.check_circle, color: Colors.green), title: Text("Заказ создан")),
ListTile(leading: Icon(Icons.check_circle, color: Colors.green), title: Text("Выбрана дата старта")),
ListTile(leading: Icon(Icons.check_circle, color: Colors.green), title: Text("Заказ оплачен")),
ListTile(leading: Icon(Icons.radio_button_unchecked, color: Colors.grey), title: Text("В процессе")),
ListTile(leading: Icon(Icons.radio_button_unchecked, color: Colors.grey), title: Text("Завершен")),
],
);
}
Widget _buildHelpSection() {
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
ListTile(
leading: Icon(Icons.help_outline),
title: Text("Помощь", style: TextStyle(fontWeight: FontWeight.bold)),
trailing: Icon(_isHelpExpanded ? Icons.expand_less : Icons.expand_more),
onTap: () {
setState(() {
_isHelpExpanded = !_isHelpExpanded;
});
},
),
if (_isHelpExpanded) ...[
Padding(
padding: EdgeInsets.symmetric(horizontal: 16),
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text("Продавец не отвечает на мои сообщения", style: TextStyle(fontWeight: FontWeight.bold)),
Text("Ответ некоторых продавцов может занять больше времени, чем вы ожидали..."),
SizedBox(height: 10),
Text("Работа, которую сдал продавец, отличалась от описания", style: TextStyle(fontWeight: FontWeight.bold)),
Text("У вас есть три дня, чтобы проверить сданную на проверку работу..."),
],
),
),
],
],
);
}
Widget _buildCancelButton() {
return ElevatedButton(
style: ElevatedButton.styleFrom(backgroundColor: Colors.red, padding: EdgeInsets.symmetric(vertical: 15)),
onPressed: () {},
child: Text("Отменить заказ", style: TextStyle(color: Colors.white)),
);
}
}

View File

@@ -32,6 +32,8 @@ class CreateRecipeTask implements TestCases {
RecipeModel(
title: 'Title',
state: 'active',
activeCookTime: 10,
image: null,
description: 'desc',
type: 'first_meals',
servings: 10,

View File

@@ -1,6 +1,6 @@
name: eatvio_app
description: A new Flutter project.
version: 1.0.49+50
version: 1.0.48+48
publish_to: 'none'
environment: