forked from eatvio/eatvio_app
Merge pull request 'fix: some fixes' (#199) from mso7nueh/eatvio_app:main into main
Reviewed-on: eatvio/eatvio_app#199
This commit is contained in:
@@ -3,7 +3,7 @@ name: Eatvio App Android Test
|
||||
on: [ pull_request ]
|
||||
|
||||
env:
|
||||
flutter_version: "3.24.5"
|
||||
flutter_version: "3.27.0"
|
||||
java_version: "21.x"
|
||||
flutter_channel: "stable"
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ name: Eatvio App Android Test on custom docker
|
||||
on: [ pull_request ]
|
||||
|
||||
env:
|
||||
flutter_version: "3.24.5"
|
||||
flutter_version: "3.27.0"
|
||||
java_version: "21.x"
|
||||
flutter_channel: "stable"
|
||||
my_local_cache_dir: "/opt/hostedtoolcache/"
|
||||
|
||||
@@ -3,7 +3,7 @@ name: Eatvio App Android Test
|
||||
on: [ pull_request ]
|
||||
|
||||
env:
|
||||
flutter_version: "3.24.5"
|
||||
flutter_version: "3.27.0"
|
||||
java_version: "21.x"
|
||||
flutter_channel: "stable"
|
||||
my_local_cache_dir: "/opt/hostedtoolcache/"
|
||||
|
||||
@@ -10,12 +10,12 @@ android {
|
||||
ndkVersion = "25.1.8937393"
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||
targetCompatibility = JavaVersion.VERSION_1_8
|
||||
sourceCompatibility = JavaVersion.VERSION_21
|
||||
targetCompatibility = JavaVersion.VERSION_21
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = JavaVersion.VERSION_1_8
|
||||
jvmTarget = 21
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
|
||||
6
assets/icons/calories.svg
Normal file
6
assets/icons/calories.svg
Normal file
@@ -0,0 +1,6 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.90614 0.149879C7.18426 0.606129 6.58739 1.08113 5.90926 1.73113C3.72489 3.828 2.48114 6.01863 2.10301 8.43738C2.03114 8.89363 2.02176 10.3186 2.08739 10.6874C2.29051 11.828 2.74051 12.8374 3.42801 13.6874C3.67489 13.9905 4.19989 14.4999 4.51551 14.7374C5.28426 15.3218 6.25614 15.7468 7.21864 15.9218C7.66551 16.003 8.69364 16.0218 9.16864 15.953C11.053 15.6936 12.7061 14.603 13.6843 12.9843C14.0124 12.4405 14.2968 11.7249 14.4374 11.0936C14.653 10.1218 14.6499 8.89988 14.4218 7.86238C14.0593 6.1905 13.2343 4.58425 11.9561 3.053C11.7999 2.8655 11.6343 2.69363 11.5874 2.66863C11.4655 2.60613 11.2218 2.61238 11.1093 2.68425C11.0593 2.7155 10.5311 3.19363 9.93739 3.74988L8.85926 4.75613L8.84364 2.53738C8.82801 0.346754 8.82801 0.315504 8.76239 0.228004C8.64364 0.0686289 8.50926 -0.000121117 8.31551 -0.000121117C8.15614 -0.000121117 8.11239 0.0155039 7.90614 0.149879ZM7.94676 6.14675C8.05301 6.34675 8.37801 6.43425 8.58426 6.31863C8.63739 6.2905 9.26864 5.7155 9.98426 5.04675C10.6999 4.37488 11.2968 3.82488 11.3093 3.82175C11.3405 3.81238 11.7593 4.3655 12.0468 4.79675C12.8436 5.9905 13.3311 7.19988 13.553 8.54675C13.5936 8.80925 13.6093 9.0655 13.6093 9.6405C13.6093 10.4624 13.5718 10.7374 13.3718 11.3593C13.2468 11.7468 12.8874 12.4561 12.6343 12.8124C12.3624 13.1936 11.7843 13.7718 11.4155 14.0311C11.1155 14.2405 10.6343 14.5249 10.5749 14.528C10.553 14.5311 10.5686 14.4374 10.6124 14.278C10.8124 13.5874 10.6999 12.8093 10.278 12.003C9.92489 11.3249 9.30926 10.6405 8.65926 10.2061C8.46239 10.0718 8.26239 10.0561 8.06551 10.153C7.84676 10.2655 7.42176 10.603 7.14051 10.8905C6.11864 11.9311 5.67489 13.3218 6.03426 14.3686C6.06551 14.4624 6.09364 14.5468 6.09364 14.553C6.09364 14.5624 5.98426 14.5093 5.85301 14.4343C4.39989 13.6436 3.43739 12.3624 3.08739 10.7499C3.02489 10.4561 3.01864 10.3374 3.01864 9.6405C3.01551 8.803 3.05926 8.44363 3.23426 7.753C3.79051 5.553 5.30926 3.38738 7.51551 1.64363L7.85926 1.37175L7.87489 3.70925C7.89051 5.86863 7.89364 6.053 7.94676 6.14675ZM8.62489 11.4593C9.66239 12.4468 10.0155 13.6311 9.49676 14.3905C9.35301 14.6061 9.14989 14.778 8.90926 14.8999C8.67801 15.0124 8.66864 15.0155 8.31239 15.0155C7.95614 15.0155 7.94676 15.0124 7.70614 14.8968C7.10926 14.5999 6.80301 14.0061 6.89989 13.328C6.97801 12.7968 7.22176 12.2905 7.63739 11.8061C7.84051 11.5686 8.25614 11.1874 8.31239 11.1874C8.32801 11.1874 8.46864 11.3093 8.62489 11.4593Z" fill="#323F4B"/>
|
||||
<path d="M8.15614 0.149879C7.43426 0.606129 6.83739 1.08113 6.15926 1.73113C3.97489 3.828 2.73114 6.01863 2.35301 8.43738C2.28114 8.89363 2.27176 10.3186 2.33739 10.6874C2.54051 11.828 2.99051 12.8374 3.67801 13.6874C3.92489 13.9905 4.44989 14.4999 4.76551 14.7374C5.53426 15.3218 6.50614 15.7468 7.46864 15.9218C7.91551 16.003 8.94364 16.0218 9.41864 15.953C11.303 15.6936 12.9561 14.603 13.9343 12.9843C14.2624 12.4405 14.5468 11.7249 14.6874 11.0936C14.903 10.1218 14.8999 8.89988 14.6718 7.86238C14.3093 6.1905 13.4843 4.58425 12.2061 3.053C12.0499 2.8655 11.8843 2.69363 11.8374 2.66863C11.7155 2.60613 11.4718 2.61238 11.3593 2.68425C11.3093 2.7155 10.7811 3.19363 10.1874 3.74988L9.10926 4.75613L9.09364 2.53738C9.07801 0.346754 9.07801 0.315504 9.01239 0.228004C8.89364 0.0686289 8.75926 -0.000121117 8.56551 -0.000121117C8.40614 -0.000121117 8.36239 0.0155039 8.15614 0.149879ZM8.19676 6.14675C8.30301 6.34675 8.62801 6.43425 8.83426 6.31863C8.88739 6.2905 9.51864 5.7155 10.2343 5.04675C10.9499 4.37488 11.5468 3.82488 11.5593 3.82175C11.5905 3.81238 12.0093 4.3655 12.2968 4.79675C13.0936 5.9905 13.5811 7.19988 13.803 8.54675C13.8436 8.80925 13.8593 9.0655 13.8593 9.6405C13.8593 10.4624 13.8218 10.7374 13.6218 11.3593C13.4968 11.7468 13.1374 12.4561 12.8843 12.8124C12.6124 13.1936 12.0343 13.7718 11.6655 14.0311C11.3655 14.2405 10.8843 14.5249 10.8249 14.528C10.803 14.5311 10.8186 14.4374 10.8624 14.278C11.0624 13.5874 10.9499 12.8093 10.528 12.003C10.1749 11.3249 9.55926 10.6405 8.90926 10.2061C8.71239 10.0718 8.51239 10.0561 8.31551 10.153C8.09676 10.2655 7.67176 10.603 7.39051 10.8905C6.36864 11.9311 5.92489 13.3218 6.28426 14.3686C6.31551 14.4624 6.34364 14.5468 6.34364 14.553C6.34364 14.5624 6.23426 14.5093 6.10301 14.4343C4.64989 13.6436 3.68739 12.3624 3.33739 10.7499C3.27489 10.4561 3.26864 10.3374 3.26864 9.6405C3.26551 8.803 3.30926 8.44363 3.48426 7.753C4.04051 5.553 5.55926 3.38738 7.76551 1.64363L8.10926 1.37175L8.12489 3.70925C8.14051 5.86863 8.14364 6.053 8.19676 6.14675ZM8.87489 11.4593C9.91239 12.4468 10.2655 13.6311 9.74676 14.3905C9.60301 14.6061 9.39989 14.778 9.15926 14.8999C8.92801 15.0124 8.91864 15.0155 8.56239 15.0155C8.20614 15.0155 8.19676 15.0124 7.95614 14.8968C7.35926 14.5999 7.05301 14.0061 7.14989 13.328C7.22801 12.7968 7.47176 12.2905 7.88739 11.8061C8.09051 11.5686 8.50614 11.1874 8.56239 11.1874C8.57801 11.1874 8.71864 11.3093 8.87489 11.4593Z" fill="#323F4B"/>
|
||||
<path d="M8.26293 0.149878C7.54105 0.606128 6.94418 1.08113 6.26605 1.73113C4.08168 3.828 2.83793 6.01863 2.4598 8.43738C2.38793 8.89363 2.37855 10.3186 2.44418 10.6874C2.6473 11.828 3.0973 12.8374 3.7848 13.6874C4.03168 13.9905 4.55668 14.4999 4.8723 14.7374C5.64105 15.3218 6.61293 15.7468 7.57543 15.9218C8.0223 16.003 9.05043 16.0218 9.52543 15.953C11.4098 15.6936 13.0629 14.603 14.0411 12.9843C14.3692 12.4405 14.6536 11.7249 14.7942 11.0936C15.0098 10.1218 15.0067 8.89988 14.7786 7.86238C14.4161 6.1905 13.5911 4.58425 12.3129 3.053C12.1567 2.8655 11.9911 2.69363 11.9442 2.66863C11.8223 2.60613 11.5786 2.61238 11.4661 2.68425C11.4161 2.7155 10.8879 3.19363 10.2942 3.74988L9.21605 4.75613L9.20043 2.53738C9.1848 0.346753 9.1848 0.315503 9.11918 0.228003C9.00043 0.0686279 8.86605 -0.00012207 8.6723 -0.00012207C8.51293 -0.00012207 8.46918 0.0155029 8.26293 0.149878ZM8.30355 6.14675C8.4098 6.34675 8.7348 6.43425 8.94105 6.31863C8.99418 6.2905 9.62543 5.7155 10.3411 5.04675C11.0567 4.37488 11.6536 3.82488 11.6661 3.82175C11.6973 3.81238 12.1161 4.3655 12.4036 4.79675C13.2004 5.9905 13.6879 7.19988 13.9098 8.54675C13.9504 8.80925 13.9661 9.0655 13.9661 9.6405C13.9661 10.4624 13.9286 10.7374 13.7286 11.3593C13.6036 11.7468 13.2442 12.4561 12.9911 12.8124C12.7192 13.1936 12.1411 13.7718 11.7723 14.0311C11.4723 14.2405 10.9911 14.5249 10.9317 14.528C10.9098 14.5311 10.9254 14.4374 10.9692 14.278C11.1692 13.5874 11.0567 12.8093 10.6348 12.003C10.2817 11.3249 9.66605 10.6405 9.01605 10.2061C8.81918 10.0718 8.61918 10.0561 8.4223 10.153C8.20355 10.2655 7.77855 10.603 7.4973 10.8905C6.47543 11.9311 6.03168 13.3218 6.39105 14.3686C6.4223 14.4624 6.45043 14.5468 6.45043 14.553C6.45043 14.5624 6.34105 14.5093 6.2098 14.4343C4.75668 13.6436 3.79418 12.3624 3.44418 10.7499C3.38168 10.4561 3.37543 10.3374 3.37543 9.6405C3.3723 8.803 3.41605 8.44363 3.59105 7.753C4.1473 5.553 5.66605 3.38738 7.8723 1.64363L8.21605 1.37175L8.23168 3.70925C8.2473 5.86863 8.25043 6.053 8.30355 6.14675ZM8.98168 11.4593C10.0192 12.4468 10.3723 13.6311 9.85355 14.3905C9.7098 14.6061 9.50668 14.778 9.26605 14.8999C9.0348 15.0124 9.02543 15.0155 8.66918 15.0155C8.31293 15.0155 8.30355 15.0124 8.06293 14.8968C7.46605 14.5999 7.1598 14.0061 7.25668 13.328C7.3348 12.7968 7.57855 12.2905 7.99418 11.8061C8.1973 11.5686 8.61293 11.1874 8.66918 11.1874C8.6848 11.1874 8.82543 11.3093 8.98168 11.4593Z" fill="#323F4B"/>
|
||||
<path d="M8.51293 0.149878C7.79105 0.606128 7.19418 1.08113 6.51605 1.73113C4.33168 3.828 3.08793 6.01863 2.7098 8.43738C2.63793 8.89363 2.62855 10.3186 2.69418 10.6874C2.8973 11.828 3.3473 12.8374 4.0348 13.6874C4.28168 13.9905 4.80668 14.4999 5.1223 14.7374C5.89105 15.3218 6.86293 15.7468 7.82543 15.9218C8.2723 16.003 9.30043 16.0218 9.77543 15.953C11.6598 15.6936 13.3129 14.603 14.2911 12.9843C14.6192 12.4405 14.9036 11.7249 15.0442 11.0936C15.2598 10.1218 15.2567 8.89988 15.0286 7.86238C14.6661 6.1905 13.8411 4.58425 12.5629 3.053C12.4067 2.8655 12.2411 2.69363 12.1942 2.66863C12.0723 2.60613 11.8286 2.61238 11.7161 2.68425C11.6661 2.7155 11.1379 3.19363 10.5442 3.74988L9.46605 4.75613L9.45043 2.53738C9.4348 0.346753 9.4348 0.315503 9.36918 0.228003C9.25043 0.0686279 9.11605 -0.00012207 8.9223 -0.00012207C8.76293 -0.00012207 8.71918 0.0155029 8.51293 0.149878ZM8.55355 6.14675C8.6598 6.34675 8.9848 6.43425 9.19105 6.31863C9.24418 6.2905 9.87543 5.7155 10.5911 5.04675C11.3067 4.37488 11.9036 3.82488 11.9161 3.82175C11.9473 3.81238 12.3661 4.3655 12.6536 4.79675C13.4504 5.9905 13.9379 7.19988 14.1598 8.54675C14.2004 8.80925 14.2161 9.0655 14.2161 9.6405C14.2161 10.4624 14.1786 10.7374 13.9786 11.3593C13.8536 11.7468 13.4942 12.4561 13.2411 12.8124C12.9692 13.1936 12.3911 13.7718 12.0223 14.0311C11.7223 14.2405 11.2411 14.5249 11.1817 14.528C11.1598 14.5311 11.1754 14.4374 11.2192 14.278C11.4192 13.5874 11.3067 12.8093 10.8848 12.003C10.5317 11.3249 9.91605 10.6405 9.26605 10.2061C9.06918 10.0718 8.86918 10.0561 8.6723 10.153C8.45355 10.2655 8.02855 10.603 7.7473 10.8905C6.72543 11.9311 6.28168 13.3218 6.64105 14.3686C6.6723 14.4624 6.70043 14.5468 6.70043 14.553C6.70043 14.5624 6.59105 14.5093 6.4598 14.4343C5.00668 13.6436 4.04418 12.3624 3.69418 10.7499C3.63168 10.4561 3.62543 10.3374 3.62543 9.6405C3.6223 8.803 3.66605 8.44363 3.84105 7.753C4.3973 5.553 5.91605 3.38738 8.1223 1.64363L8.46605 1.37175L8.48168 3.70925C8.4973 5.86863 8.50043 6.053 8.55355 6.14675ZM9.23168 11.4593C10.2692 12.4468 10.6223 13.6311 10.1036 14.3905C9.9598 14.6061 9.75668 14.778 9.51605 14.8999C9.2848 15.0124 9.27543 15.0155 8.91918 15.0155C8.56293 15.0155 8.55355 15.0124 8.31293 14.8968C7.71605 14.5999 7.4098 14.0061 7.50668 13.328C7.5848 12.7968 7.82855 12.2905 8.24418 11.8061C8.4473 11.5686 8.86293 11.1874 8.91918 11.1874C8.9348 11.1874 9.07543 11.3093 9.23168 11.4593Z" fill="#323F4B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 9.6 KiB |
3
assets/icons/clock.svg
Normal file
3
assets/icons/clock.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M7.99992 12C9.11103 12 10.0555 11.6112 10.8333 10.8334C11.611 10.0556 11.9999 9.11115 11.9999 8.00004C11.9999 6.88893 11.611 5.94448 10.8333 5.16671C10.0555 4.38893 9.11103 4.00004 7.99992 4.00004V8.00004L5.16658 10.8334C5.55547 11.2 5.99158 11.4862 6.47492 11.6917C6.95825 11.8973 7.46659 12 7.99992 12ZM7.99992 14.6667C7.0777 14.6667 6.21103 14.4917 5.39992 14.1417C4.58881 13.7917 3.88325 13.3167 3.28325 12.7167C2.68325 12.1167 2.20825 11.4112 1.85825 10.6C1.50825 9.78893 1.33325 8.92226 1.33325 8.00004C1.33325 7.07782 1.50825 6.21115 1.85825 5.40004C2.20825 4.58893 2.68325 3.88337 3.28325 3.28337C3.88325 2.68337 4.58881 2.20837 5.39992 1.85837C6.21103 1.50837 7.0777 1.33337 7.99992 1.33337C8.92214 1.33337 9.78881 1.50837 10.5999 1.85837C11.411 2.20837 12.1166 2.68337 12.7166 3.28337C13.3166 3.88337 13.7916 4.58893 14.1416 5.40004C14.4916 6.21115 14.6666 7.07782 14.6666 8.00004C14.6666 8.92226 14.4916 9.78893 14.1416 10.6C13.7916 11.4112 13.3166 12.1167 12.7166 12.7167C12.1166 13.3167 11.411 13.7917 10.5999 14.1417C9.78881 14.4917 8.92214 14.6667 7.99992 14.6667ZM7.99992 13.3334C9.48881 13.3334 10.7499 12.8167 11.7833 11.7834C12.8166 10.75 13.3333 9.48893 13.3333 8.00004C13.3333 6.51115 12.8166 5.25004 11.7833 4.21671C10.7499 3.18337 9.48881 2.66671 7.99992 2.66671C6.51103 2.66671 5.24992 3.18337 4.21659 4.21671C3.18325 5.25004 2.66659 6.51115 2.66659 8.00004C2.66659 9.48893 3.18325 10.75 4.21659 11.7834C5.24992 12.8167 6.51103 13.3334 7.99992 13.3334Z" fill="#323F4B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
3
assets/icons/steps.svg
Normal file
3
assets/icons/steps.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M4.33325 1.99996C3.83325 1.99996 3.43047 2.27774 3.12492 2.83329C2.81936 3.38885 2.66659 3.99996 2.66659 4.66663C2.66659 5.36663 2.76381 5.98607 2.95825 6.52496C3.1527 7.06385 3.33325 7.46663 3.49992 7.73329L5.33325 7.36663C5.4777 7.01107 5.62492 6.60552 5.77492 6.14996C5.92492 5.6944 5.99992 5.19996 5.99992 4.66663C5.99992 3.99996 5.84714 3.38885 5.54158 2.83329C5.23603 2.27774 4.83325 1.99996 4.33325 1.99996ZM5.24992 10.6666C5.46103 10.6666 5.63881 10.5888 5.78325 10.4333C5.9277 10.2777 5.99992 10.0611 5.99992 9.78329C5.99992 9.5944 5.95547 9.39996 5.86658 9.19996C5.7777 8.99996 5.68881 8.82218 5.59992 8.66663L3.99992 8.99996C3.99992 9.4444 4.09714 9.83329 4.29159 10.1666C4.48603 10.5 4.80547 10.6666 5.24992 10.6666ZM11.6666 5.33329C11.1666 5.33329 10.7638 5.61107 10.4583 6.16663C10.1527 6.72218 9.99992 7.33329 9.99992 7.99996C9.99992 8.53329 10.0749 9.02496 10.2249 9.47496C10.3749 9.92496 10.5221 10.3333 10.6666 10.7L12.4999 11.0666C12.6666 10.8 12.8471 10.4 13.0416 9.86663C13.236 9.33329 13.3333 8.71107 13.3333 7.99996C13.3333 7.33329 13.1805 6.72218 12.8749 6.16663C12.5694 5.61107 12.1666 5.33329 11.6666 5.33329ZM10.7499 14C11.1944 14 11.5138 13.8333 11.7083 13.5C11.9027 13.1666 11.9999 12.7777 11.9999 12.3333L10.3999 12C10.311 12.1555 10.2221 12.3333 10.1333 12.5333C10.0444 12.7333 9.99992 12.9277 9.99992 13.1166C9.99992 13.3388 10.0694 13.5416 10.2083 13.725C10.3471 13.9083 10.5277 14 10.7499 14ZM5.24992 12C4.39436 12 3.74436 11.6833 3.29992 11.05C2.85547 10.4166 2.64436 9.70551 2.66659 8.91663L2.36659 8.46663C2.24436 8.27774 2.04159 7.84996 1.75825 7.18329C1.47492 6.51663 1.33325 5.67774 1.33325 4.66663C1.33325 3.52218 1.61659 2.5694 2.18325 1.80829C2.74992 1.04718 3.46659 0.666626 4.33325 0.666626C5.2777 0.666626 6.01381 1.08607 6.54158 1.92496C7.06936 2.76385 7.33325 3.67774 7.33325 4.66663C7.33325 5.31107 7.24436 5.90552 7.06659 6.44996C6.88881 6.9944 6.73325 7.43329 6.59992 7.76663L6.73325 7.98329C6.82214 8.13885 6.94436 8.38607 7.09992 8.72496C7.25547 9.06385 7.33325 9.41663 7.33325 9.78329C7.33325 10.4166 7.13603 10.9444 6.74158 11.3666C6.34714 11.7888 5.84992 12 5.24992 12ZM10.7499 15.3333C10.1499 15.3333 9.6527 15.1222 9.25825 14.7C8.86381 14.2777 8.66658 13.75 8.66658 13.1166C8.66658 12.75 8.74436 12.3972 8.89992 12.0583C9.05547 11.7194 9.1777 11.4722 9.26658 11.3166L9.39992 11.1C9.26658 10.7666 9.11103 10.3277 8.93325 9.78329C8.75547 9.23885 8.66658 8.6444 8.66658 7.99996C8.66658 7.01107 8.93047 6.09718 9.45825 5.25829C9.98603 4.4194 10.7221 3.99996 11.6666 3.99996C12.5333 3.99996 13.2499 4.38052 13.8166 5.14163C14.3833 5.90274 14.6666 6.85552 14.6666 7.99996C14.6666 9.01107 14.5249 9.84718 14.2416 10.5083C13.9583 11.1694 13.7555 11.5944 13.6333 11.7833L13.3333 12.25C13.3444 13.0388 13.1305 13.75 12.6916 14.3833C12.2527 15.0166 11.6055 15.3333 10.7499 15.3333Z" fill="#323F4B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.9 KiB |
@@ -18,7 +18,7 @@ class FeedBlogPostModel with _$FeedBlogPostModel {
|
||||
required String title,
|
||||
@JsonKey(name: "total_likes") required int totalLikes,
|
||||
@JsonKey(name: "total_views") required int totalViews,
|
||||
@JsonKey(name: "total_comments") required int totalComments,
|
||||
@JsonKey(name: "total_comments") int? totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required bool wasLikedByMe,
|
||||
}) = _FeedBlogPostModel;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ mixin _$FeedBlogPostModel {
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments => throw _privateConstructorUsedError;
|
||||
int? get totalComments => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "was_liked_by_me")
|
||||
bool get wasLikedByMe => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -69,7 +69,7 @@ abstract class $FeedBlogPostModelCopyWith<$Res> {
|
||||
String title,
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@JsonKey(name: "total_comments") int totalComments,
|
||||
@JsonKey(name: "total_comments") int? totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe});
|
||||
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
@@ -101,7 +101,7 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
||||
Object? title = null,
|
||||
Object? totalLikes = null,
|
||||
Object? totalViews = null,
|
||||
Object? totalComments = null,
|
||||
Object? totalComments = freezed,
|
||||
Object? wasLikedByMe = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -149,10 +149,10 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
||||
? _value.totalViews
|
||||
: totalViews // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalComments: null == totalComments
|
||||
totalComments: freezed == totalComments
|
||||
? _value.totalComments
|
||||
: totalComments // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int?,
|
||||
wasLikedByMe: null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
@@ -191,7 +191,7 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
|
||||
String title,
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@JsonKey(name: "total_comments") int totalComments,
|
||||
@JsonKey(name: "total_comments") int? totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe});
|
||||
|
||||
@override
|
||||
@@ -222,7 +222,7 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
|
||||
Object? title = null,
|
||||
Object? totalLikes = null,
|
||||
Object? totalViews = null,
|
||||
Object? totalComments = null,
|
||||
Object? totalComments = freezed,
|
||||
Object? wasLikedByMe = null,
|
||||
}) {
|
||||
return _then(_$FeedBlogPostModelImpl(
|
||||
@@ -270,10 +270,10 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
|
||||
? _value.totalViews
|
||||
: totalViews // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalComments: null == totalComments
|
||||
totalComments: freezed == totalComments
|
||||
? _value.totalComments
|
||||
: totalComments // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
as int?,
|
||||
wasLikedByMe: null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
@@ -297,7 +297,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
required this.title,
|
||||
@JsonKey(name: "total_likes") required this.totalLikes,
|
||||
@JsonKey(name: "total_views") required this.totalViews,
|
||||
@JsonKey(name: "total_comments") required this.totalComments,
|
||||
@JsonKey(name: "total_comments") this.totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe});
|
||||
|
||||
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -332,7 +332,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
final int totalViews;
|
||||
@override
|
||||
@JsonKey(name: "total_comments")
|
||||
final int totalComments;
|
||||
final int? totalComments;
|
||||
@override
|
||||
@JsonKey(name: "was_liked_by_me")
|
||||
final bool wasLikedByMe;
|
||||
@@ -418,7 +418,7 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
|
||||
required final String title,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") required final int totalComments,
|
||||
@JsonKey(name: "total_comments") final int? totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe}) =
|
||||
_$FeedBlogPostModelImpl;
|
||||
|
||||
@@ -454,7 +454,7 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
|
||||
int get totalViews;
|
||||
@override
|
||||
@JsonKey(name: "total_comments")
|
||||
int get totalComments;
|
||||
int? get totalComments;
|
||||
@override
|
||||
@JsonKey(name: "was_liked_by_me")
|
||||
bool get wasLikedByMe;
|
||||
|
||||
@@ -20,7 +20,7 @@ _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
|
||||
title: json['title'] as String,
|
||||
totalLikes: (json['total_likes'] as num).toInt(),
|
||||
totalViews: (json['total_views'] as num).toInt(),
|
||||
totalComments: (json['total_comments'] as num).toInt(),
|
||||
totalComments: (json['total_comments'] as num?)?.toInt(),
|
||||
wasLikedByMe: json['was_liked_by_me'] as bool,
|
||||
);
|
||||
|
||||
|
||||
@@ -1,10 +1,15 @@
|
||||
// ignore_for_file: dead_code
|
||||
|
||||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:eatvio_app/core/const.dart';
|
||||
import 'package:eatvio_app/core/widgets/feed_icon_button.dart';
|
||||
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
|
||||
import 'package:eatvio_app/core/theme/theme_helper.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_html/flutter_html.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:share_plus/share_plus.dart';
|
||||
|
||||
class RecipesWidget extends StatefulWidget {
|
||||
final Recipes recipes;
|
||||
@@ -46,72 +51,14 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
child: Wrap(
|
||||
runSpacing: 8,
|
||||
children: [
|
||||
_iconButton(Icons.fastfood, '139.9 ккал'),
|
||||
_iconButton('assets/icons/clock.svg', widget.recipes.cookingTime.toString() + ' минут'),
|
||||
SizedBox(width: 8),
|
||||
_iconButton(Icons.timer_rounded, widget.recipes.cookingTime.toString() + ' минут'),
|
||||
_iconButton('assets/icons/steps.svg', widget.recipes.steps.length.toString() + ' этапов'),
|
||||
SizedBox(width: 8),
|
||||
_iconButton(Icons.fast_forward_rounded, widget.recipes.steps.length.toString() + ' этапов'),
|
||||
_iconButton('assets/icons/calories.svg', '139.9 ккал'),
|
||||
],
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
left: 8,
|
||||
top: 8,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.favorite_rounded,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
'0',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
Positioned(
|
||||
right: 8,
|
||||
top: 8,
|
||||
child: Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
child: Row(
|
||||
children: [
|
||||
Icon(
|
||||
Icons.visibility_rounded,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
'0',
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: Colors.black,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
@@ -150,27 +97,96 @@ class _RecipesWidgetState extends State<RecipesWidget> {
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12),
|
||||
child: Row(
|
||||
children: [
|
||||
FeedIconButton(
|
||||
icon: true ? Icons.favorite_rounded : Icons.favorite_border_rounded,
|
||||
text: widget.recipes.likesCount.toString(),
|
||||
iconColor: true ? Colors.red.withOpacity(0.8) : null,
|
||||
backgroundColor: true ? Colors.red.withOpacity(0.1) : null,
|
||||
textColor: true ? Colors.red.withOpacity(0.8) : null,
|
||||
onTap: () async {
|
||||
// setState(() {
|
||||
// isLiked = !isLiked;
|
||||
// isLiked ? totalLikes++ : totalLikes--;
|
||||
// });
|
||||
// isLiked
|
||||
// ? await context.read<FeedCubit>().likePost(state.feedBlogPostList[widget.index].id)
|
||||
// : await context.read<FeedCubit>().unlikedPost(state.feedBlogPostList[widget.index].id);
|
||||
// await context.read<FeedCubit>().loadFeedBlogPostList();
|
||||
},
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
FeedIconButton(
|
||||
svgIcon: SvgPicture.asset(
|
||||
'assets/icons/comment.svg',
|
||||
height: 20,
|
||||
width: 20,
|
||||
colorFilter: ColorFilter.mode(
|
||||
appTheme.gray600,
|
||||
BlendMode.srcIn,
|
||||
),
|
||||
),
|
||||
text: widget.recipes.commentsCount.toString(),
|
||||
onTap: () => GoRouter.of(context).pushNamed(
|
||||
'aboutRecipesScreen',
|
||||
extra: widget.recipes,
|
||||
),
|
||||
),
|
||||
SizedBox(width: 8),
|
||||
FeedIconButton(
|
||||
svgIcon: SvgPicture.asset(
|
||||
height: 20,
|
||||
width: 20,
|
||||
'assets/icons/share.svg',
|
||||
colorFilter: ColorFilter.mode(appTheme.gray600, BlendMode.srcIn),
|
||||
),
|
||||
onTap: () => Share.shareUri(
|
||||
Uri.parse(
|
||||
baseUrl + '/ru/blog_post/' + widget.recipes.id.toString(),
|
||||
),
|
||||
),
|
||||
),
|
||||
Spacer(),
|
||||
Icon(
|
||||
Icons.visibility_rounded,
|
||||
size: 16,
|
||||
color: appTheme.gray500,
|
||||
),
|
||||
SizedBox(width: 4),
|
||||
Text(
|
||||
widget.recipes.viewsCount.toString(),
|
||||
style: TextStyle(
|
||||
fontSize: 12,
|
||||
color: appTheme.gray500,
|
||||
fontWeight: FontWeight.w400,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
SizedBox(height: 12),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
_iconButton(IconData icon, [String? text]) {
|
||||
_iconButton(String iconPath, [String? text]) {
|
||||
return Container(
|
||||
padding: EdgeInsets.symmetric(horizontal: 12, vertical: 4),
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withOpacity(0.8),
|
||||
color: Colors.white.withValues(alpha: 0.8),
|
||||
borderRadius: BorderRadius.circular(16),
|
||||
),
|
||||
height: 32,
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
Icon(
|
||||
icon,
|
||||
size: 16,
|
||||
color: Colors.black,
|
||||
SvgPicture.asset(
|
||||
iconPath,
|
||||
),
|
||||
if (text != null) SizedBox(width: 8),
|
||||
if (text != null)
|
||||
|
||||
@@ -45,7 +45,10 @@ dependencies:
|
||||
flutter_keyboard_visibility: ^6.0.0
|
||||
share_plus: ^10.1.2
|
||||
flutter_html: ^3.0.0-beta.2
|
||||
file_picker: ^8.1.4
|
||||
file_picker:
|
||||
git:
|
||||
url: https://github.com/abdelaziz-mahdy/flutter_file_picker
|
||||
ref: fix-flutter-3.27-compile-error
|
||||
audioplayers: ^6.1.0
|
||||
intl: ^0.19.0
|
||||
rive: ^0.13.20
|
||||
|
||||
Reference in New Issue
Block a user