Merge pull request 'V2_MODALE_LDE' (#35) from V2_MODALE_LDE into master
continuous-integration/drone/push Build is passing Details

Reviewed-on: #35
pull/40/head
Emre KARTAL 2 years ago
commit 6b34e03a6c

@ -37,6 +37,13 @@
</list> </list>
</value> </value>
</entry> </entry>
<entry key="args">
<value>
<list>
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.4.2/lib" />
</list>
</value>
</entry>
<entry key="async"> <entry key="async">
<value> <value>
<list> <list>
@ -359,6 +366,13 @@
</list> </list>
</value> </value>
</entry> </entry>
<entry key="flutter_svg">
<value>
<list>
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_svg-2.0.7/lib" />
</list>
</value>
</entry>
<entry key="flutter_test"> <entry key="flutter_test">
<value> <value>
<list> <list>
@ -597,6 +611,13 @@
</list> </list>
</value> </value>
</entry> </entry>
<entry key="path_parsing">
<value>
<list>
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_parsing-1.0.1/lib" />
</list>
</value>
</entry>
<entry key="path_provider"> <entry key="path_provider">
<value> <value>
<list> <list>
@ -639,6 +660,13 @@
</list> </list>
</value> </value>
</entry> </entry>
<entry key="petitparser">
<value>
<list>
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/petitparser-5.4.0/lib" />
</list>
</value>
</entry>
<entry key="pinch_zoom"> <entry key="pinch_zoom">
<value> <value>
<list> <list>
@ -772,6 +800,27 @@
</list> </list>
</value> </value>
</entry> </entry>
<entry key="vector_graphics">
<value>
<list>
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/vector_graphics-1.1.7/lib" />
</list>
</value>
</entry>
<entry key="vector_graphics_codec">
<value>
<list>
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/vector_graphics_codec-1.1.7/lib" />
</list>
</value>
</entry>
<entry key="vector_graphics_compiler">
<value>
<list>
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/vector_graphics_compiler-1.1.7/lib" />
</list>
</value>
</entry>
<entry key="vector_math"> <entry key="vector_math">
<value> <value>
<list> <list>
@ -793,6 +842,13 @@
</list> </list>
</value> </value>
</entry> </entry>
<entry key="xml">
<value>
<list>
<option value="$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/xml-6.3.0/lib" />
</list>
</value>
</entry>
<entry key="zoom_tap_animation"> <entry key="zoom_tap_animation">
<value> <value>
<list> <list>
@ -808,6 +864,7 @@
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/animations-2.0.7/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/animations-2.0.7/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/another_flushbar-1.12.30/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/another_flushbar-1.12.30/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/archive-3.3.7/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/archive-3.3.7/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/args-2.4.2/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.11.0/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/async-2.11.0/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/audioplayers-4.1.0/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/audioplayers-4.1.0/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/audioplayers_android-3.0.2/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/audioplayers_android-3.0.2/lib" />
@ -853,6 +910,7 @@
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.15/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_plugin_android_lifecycle-2.0.15/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_screenutil-5.8.4/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_screenutil-5.8.4/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_signin_button-2.0.0/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_signin_button-2.0.0/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/flutter_svg-2.0.7/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/font_awesome_flutter-9.2.0/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/font_awesome_flutter-9.2.0/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/geolocator-9.0.2/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/geolocator-9.0.2/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/geolocator_android-4.2.0/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/geolocator_android-4.2.0/lib" />
@ -885,12 +943,14 @@
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/mime-1.0.4/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/mime-1.0.4/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/modal_bottom_sheet-2.1.2/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.8.3/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path-1.8.3/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_parsing-1.0.1/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider-2.0.15/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider-2.0.15/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_android-2.0.27/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_android-2.0.27/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_foundation-2.2.4/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_foundation-2.2.4/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.1.11/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_linux-2.1.11/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_platform_interface-2.0.6/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_platform_interface-2.0.6/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_windows-2.1.7/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/path_provider_windows-2.1.7/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/petitparser-5.4.0/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/pinch_zoom-1.0.0/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/pinch_zoom-1.0.0/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/platform-3.1.0/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/platform-3.1.0/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/plugin_platform_interface-2.1.5/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/plugin_platform_interface-2.1.5/lib" />
@ -909,9 +969,13 @@
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/tuple-2.0.2/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/tuple-2.0.2/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.3.2/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/typed_data-1.3.2/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/uuid-3.0.7/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/uuid-3.0.7/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/vector_graphics-1.1.7/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/vector_graphics_codec-1.1.7/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/vector_graphics_compiler-1.1.7/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/vector_math-2.1.4/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/vector_math-2.1.4/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/win32-5.0.6/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/win32-5.0.6/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/xdg_directories-1.0.1/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/xdg_directories-1.0.1/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/xml-6.3.0/lib" />
<root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/zoom_tap_animation-1.1.0/lib" /> <root url="file://$USER_HOME$/AppData/Local/Pub/Cache/hosted/pub.dev/zoom_tap_animation-1.1.0/lib" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/pkg/sky_engine/lib" /> <root url="file://$PROJECT_DIR$/../../../../src/flutter/bin/cache/pkg/sky_engine/lib" />
<root url="file://$PROJECT_DIR$/../../../../src/flutter/packages/flutter/lib" /> <root url="file://$PROJECT_DIR$/../../../../src/flutter/packages/flutter/lib" />

@ -0,0 +1,3 @@
<svg width="24" height="25" viewBox="0 0 24 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M1.75444 22.8646C3.50887 24.619 6.3326 24.619 11.9801 24.619C17.6275 24.619 20.4513 24.619 22.2056 22.8646C23.9601 21.1102 23.9601 18.2864 23.9601 12.639C23.9601 6.99153 23.9601 4.16781 22.2056 2.41338C20.4513 0.658936 17.6275 0.658936 11.9801 0.658936C6.3326 0.658936 3.50887 0.658936 1.75444 2.41338C0 4.16781 0 6.99153 0 12.639C0 18.2864 0 21.1102 1.75444 22.8646ZM12.8785 9.0449C12.8785 8.54868 12.4762 8.1464 11.98 8.1464C11.4838 8.1464 11.0815 8.54868 11.0815 9.0449V11.7404H8.38597C7.88974 11.7404 7.48746 12.1427 7.48746 12.6389C7.48746 13.1351 7.88974 13.5374 8.38597 13.5374H11.0815V16.2329C11.0815 16.7291 11.4838 17.1314 11.98 17.1314C12.4762 17.1314 12.8785 16.7291 12.8785 16.2329V13.5374H15.574C16.0702 13.5374 16.4725 13.1351 16.4725 12.6389C16.4725 12.1427 16.0702 11.7404 15.574 11.7404H12.8785V9.0449Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 989 B

@ -0,0 +1,4 @@
<svg width="28" height="28" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M12.1376 26.2263L12.4586 25.6842C12.9728 24.8153 13.23 24.3809 13.6396 24.1386C14.0493 23.8962 14.5835 23.8791 15.6522 23.8449C16.6542 23.8129 17.3278 23.7254 17.9035 23.487C19.1159 22.9847 20.0791 22.0215 20.5812 20.8092C20.958 19.8999 20.958 18.7473 20.958 16.4418V15.4523C20.958 12.213 20.958 10.5934 20.2288 9.4036C19.8208 8.73784 19.261 8.1781 18.5953 7.77012C17.4056 7.04102 15.7859 7.04102 12.5466 7.04102H9.57799C6.33874 7.04102 4.71912 7.04102 3.52933 7.77012C2.86357 8.1781 2.30383 8.73784 1.89586 9.4036C1.16675 10.5934 1.16675 12.213 1.16675 15.4523V16.4418C1.16675 18.7473 1.16675 19.8999 1.54337 20.8092C2.04555 22.0215 3.00875 22.9847 4.2211 23.487C4.79692 23.7254 5.47037 23.8129 6.4724 23.8449C7.54104 23.8791 8.07536 23.8962 8.48499 24.1386C8.89463 24.3809 9.15178 24.8153 9.66608 25.6842L9.98698 26.2263C10.4651 27.0341 11.6595 27.0341 12.1376 26.2263ZM15.3917 16.9366C16.0748 16.9366 16.6286 16.3828 16.6286 15.6996C16.6286 15.0165 16.0748 14.4627 15.3917 14.4627C14.7085 14.4627 14.1547 15.0165 14.1547 15.6996C14.1547 16.3828 14.7085 16.9366 15.3917 16.9366ZM12.2993 15.6996C12.2993 16.3828 11.7455 16.9366 11.0623 16.9366C10.3792 16.9366 9.82539 16.3828 9.82539 15.6996C9.82539 15.0165 10.3792 14.4627 11.0623 14.4627C11.7455 14.4627 12.2993 15.0165 12.2993 15.6996ZM6.73301 16.9366C7.41616 16.9366 7.96997 16.3828 7.96997 15.6996C7.96997 15.0165 7.41616 14.4627 6.73301 14.4627C6.04987 14.4627 5.49606 15.0165 5.49606 15.6996C5.49606 16.3828 6.04987 16.9366 6.73301 16.9366Z" fill="white"/>
<path opacity="0.5" d="M18.0669 1.16675C19.545 1.16674 20.7203 1.16673 21.6629 1.25636C22.6294 1.34826 23.4467 1.54089 24.1747 1.987C24.9237 2.44597 25.5533 3.07568 26.0123 3.82466C26.4584 4.55264 26.651 5.36984 26.743 6.33639C26.8326 7.279 26.8326 8.45442 26.8326 9.93242V10.9419C26.8326 11.9938 26.8326 12.8305 26.7862 13.5089C26.7389 14.2031 26.6401 14.799 26.4088 15.3571C25.8439 16.7211 24.7603 17.8047 23.3964 18.3696C23.3623 18.3837 23.328 18.3974 23.2936 18.4105C23.129 18.4734 22.9878 18.5274 22.864 18.5676H20.9389C20.9578 17.9854 20.9578 17.2921 20.9578 16.4419V15.4523C20.9578 12.2131 20.9578 10.5935 20.2286 9.40368C19.8207 8.73792 19.2609 8.17818 18.5952 7.77021C17.4054 7.0411 15.7857 7.0411 12.5465 7.0411H9.57783C8.42819 7.0411 7.48256 7.0411 6.68774 7.07369V5.14823C6.72591 5.01598 6.7782 4.86439 6.83956 4.68646C6.94394 4.38384 7.07586 4.09764 7.24315 3.82466C7.70211 3.07568 8.33182 2.44597 9.0808 1.987C9.80878 1.54089 10.626 1.34826 11.5925 1.25636C12.5352 1.16673 13.7105 1.16674 15.1885 1.16675H18.0669Z" fill="#8B8B8B"/>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

@ -0,0 +1,3 @@
<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M10.1328 22.8086C6.62274 20.1042 2.5 16.9278 2.5 11.4214C2.5 5.34276 9.3752 1.03189 15 6.87585L17.5 9.37416C17.8661 9.74021 18.4597 9.7401 18.8259 9.37391C19.1919 9.00774 19.1917 8.41415 18.8256 8.0481L16.4106 5.63396C21.7106 1.75393 27.5 5.84338 27.5 11.4214C27.5 16.9278 23.3772 20.1042 19.8671 22.8086C19.5024 23.0897 19.1441 23.3657 18.7979 23.6387C17.5 24.6618 16.25 25.6251 15 25.6251C13.75 25.6251 12.5 24.6618 11.2022 23.6387C10.8559 23.3657 10.4977 23.0897 10.1328 22.8086Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 611 B

@ -0,0 +1,5 @@
<svg width="27" height="26" viewBox="0 0 27 26" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M24.7935 13.0001C24.7935 7.01699 19.9432 2.16675 13.9602 2.16675C7.97708 2.16675 3.12683 7.01699 3.12683 13.0001C3.12683 18.9831 7.97708 23.8334 13.9602 23.8334C19.9432 23.8334 24.7935 18.9831 24.7935 13.0001Z" fill="white"/>
<path d="M13.9602 6.77075C14.4089 6.77075 14.7727 7.13452 14.7727 7.58325V14.0833C14.7727 14.532 14.4089 14.8958 13.9602 14.8958C13.5115 14.8958 13.1477 14.532 13.1477 14.0833V7.58325C13.1477 7.13452 13.5115 6.77075 13.9602 6.77075Z" fill="#515151"/>
<path d="M13.9602 18.4167C14.5585 18.4167 15.0435 17.9317 15.0435 17.3333C15.0435 16.735 14.5585 16.25 13.9602 16.25C13.3618 16.25 12.8768 16.735 12.8768 17.3333C12.8768 17.9317 13.3618 18.4167 13.9602 18.4167Z" fill="#515151"/>
</svg>

After

Width:  |  Height:  |  Size: 818 B

@ -0,0 +1,4 @@
<svg width="31" height="30" viewBox="0 0 31 30" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.6571 21.8771C16.4792 22.0747 16.226 22.1875 15.9602 22.1875C15.6945 22.1875 15.4412 22.0747 15.2633 21.8771L11.5134 17.7105C11.167 17.3256 11.1982 16.7329 11.5831 16.3865C11.9679 16.0401 12.5607 16.0714 12.9071 16.4561L15.0227 18.8069V8.75002H5.96021C5.77152 8.75006 5.51671 8.7501 5.33521 8.74756V16.25C5.33521 20.9641 5.3352 23.3211 6.79967 24.7855C8.26414 26.25 10.6212 26.25 15.3352 26.25H16.5852C21.2992 26.25 23.6563 26.25 25.1207 24.7855C26.5852 23.3211 26.5852 20.9641 26.5852 16.25V8.74756C26.4037 8.7501 26.1488 8.75006 25.9602 8.75002H16.8977V18.8069L19.0133 16.4561C19.3597 16.0714 19.9525 16.0401 20.3373 16.3865C20.7222 16.7329 20.7535 17.3256 20.4071 17.7105L16.6571 21.8771Z" fill="white"/>
<path d="M3.46021 6.25C3.46021 5.07149 3.46021 4.48224 3.82632 4.11611C4.19244 3.75 4.78169 3.75 5.9602 3.75H25.9602C27.1387 3.75 27.728 3.75 28.0941 4.11611C28.4602 4.48224 28.4602 5.07149 28.4602 6.25C28.4602 7.42851 28.4602 8.01776 28.0941 8.38389C27.728 8.75 27.1387 8.75 25.9602 8.75H5.9602C4.78169 8.75 4.19244 8.75 3.82632 8.38389C3.46021 8.01776 3.46021 7.42851 3.46021 6.25Z" fill="#515151"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@ -0,0 +1,51 @@
import 'package:flutter/Material.dart';
import '../main.dart';
import '../model/Music.dart';
class ButtonPlayComponent extends StatefulWidget {
final Music music;
const ButtonPlayComponent({super.key, required this.music});
@override
State<ButtonPlayComponent> createState() => _ButtonPlayComponentState();
}
class _ButtonPlayComponentState extends State<ButtonPlayComponent> {
bool isPlaying = false;
@override
void initState() {
MyApp.audioPlayer.onPlayerComplete.listen((event) {
setState(() {
isPlaying = false;
});
});
super.initState();
}
@override
Widget build(BuildContext context) {
return GestureDetector(
child: GestureDetector(
onTap: () {
if (isPlaying) {
widget.music.stopSong();
setState(() {
isPlaying = !isPlaying;
});
} else {
widget.music.playSong();
setState(() {
isPlaying = !isPlaying;
});
}
},
child: Icon(
isPlaying ? Icons.pause_circle : Icons.play_circle,
color: Colors.white,
size: 53,
),
));
}
}

@ -11,14 +11,10 @@ class CommentComponent extends StatelessWidget {
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
width: double.infinity, width: double.infinity,
decoration: BoxDecoration( decoration: BoxDecoration(color: bgComment, borderRadius: BorderRadius.circular(20)),
color: bgComment, borderRadius: BorderRadius.circular(10)),
padding: EdgeInsets.all(20), padding: EdgeInsets.all(20),
child: Column( child: Row(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
ClipOval( ClipOval(
child: SizedBox.fromSize( child: SizedBox.fromSize(
@ -29,36 +25,42 @@ class CommentComponent extends StatelessWidget {
), ),
), ),
), ),
Expanded(
child: Column(
children: [
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: [
SizedBox( SizedBox(
width: 10, width: 10,
), ),
Text( Text(
"Melina", "Melina",
style: GoogleFonts.plusJakartaSans( style: GoogleFonts.plusJakartaSans(color: Colors.white, fontWeight: FontWeight.w600),
color: Colors.white, fontWeight: FontWeight.w600),
), ),
Padding( Padding(
padding: EdgeInsets.only(top: 6, left: 10), padding: EdgeInsets.only(top: 6, left: 10),
child: Text( child: Text(
"Il y a 2 min(s)", "Il y a 2 min(s)",
style: GoogleFonts.plusJakartaSans( style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.6), color: Colors.white.withOpacity(0.6), fontWeight: FontWeight.w400, fontSize: 10),
fontWeight: FontWeight.w200,
fontSize: 10),
), ),
), ),
], ],
), ),
SizedBox( SizedBox(
height: 10, height: 8,
), ),
Text( Padding(
"Jadore ce son auss je trouve quil a vraiment une plume de fou le rap cest trop bien jknei rhozi ugzeor gzhjkev huz vhzbejlh zouebvfiyzv fi hzejkfb zjf ouzebfjzebihf b zuib fiuzebfihzbejfbzejkbf hzbfiébiu zegiu fzieu iuzy giuzeg iuzg eiu zg ", padding: const EdgeInsets.symmetric(horizontal: 10),
style: GoogleFonts.plusJakartaSans( child: Text(
color: Colors.white.withOpacity(0.4), "Jadore ce son aussi, je trouve quil avait vraiment une plume de fou.",
fontWeight: FontWeight.w300, style: GoogleFonts.plusJakartaSans(color: Colors.white, fontWeight: FontWeight.w300, fontSize: 11),
fontSize: 13), ),
),
],
), ),
)
], ],
), ),
); );

@ -1,4 +1,3 @@
import 'package:audioplayers/audioplayers.dart';
import 'package:flutter/Material.dart'; import 'package:flutter/Material.dart';
import 'package:flutter_animated_play_button/flutter_animated_play_button.dart'; import 'package:flutter_animated_play_button/flutter_animated_play_button.dart';
import 'package:ionicons/ionicons.dart'; import 'package:ionicons/ionicons.dart';
@ -12,11 +11,7 @@ class PlayButtonComponent extends StatefulWidget {
final int index; final int index;
final bool playing; final bool playing;
const PlayButtonComponent( const PlayButtonComponent(
{Key? key, {Key? key, required this.music, required this.callback, required this.playing, required this.index})
required this.music,
required this.callback,
required this.playing,
required this.index})
: super(key: key); : super(key: key);
@override @override
@ -24,8 +19,6 @@ class PlayButtonComponent extends StatefulWidget {
} }
class _PlayButtonComponentState extends State<PlayButtonComponent> { class _PlayButtonComponentState extends State<PlayButtonComponent> {
final player = AudioPlayer();
@override @override
void initState() { void initState() {
MyApp.audioPlayer.onPlayerComplete.listen((event) { MyApp.audioPlayer.onPlayerComplete.listen((event) {

@ -259,7 +259,7 @@ class _PostComponentState extends State<PostComponent> with TickerProviderStateM
), ),
widget.post.location.item2 != null widget.post.location.item2 != null
? Text( ? Text(
"${widget.post.location?.item1}, ${widget.post.location?.item2}", "${widget.post.location.item1}, ${widget.post.location.item2}",
style: GoogleFonts.plusJakartaSans( style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.4), color: Colors.white.withOpacity(0.4),
fontWeight: FontWeight.w300, fontWeight: FontWeight.w300,
@ -284,7 +284,7 @@ class _PostComponentState extends State<PostComponent> with TickerProviderStateM
color: Colors.white.withOpacity(0.4), fontWeight: FontWeight.w300, fontSize: 13), color: Colors.white.withOpacity(0.4), fontWeight: FontWeight.w300, fontSize: 13),
) )
: Text( : Text(
"${widget.post.date.day}/${widget.post.date.month}/${widget.post.date.year}-${widget.post.date.hour}:${widget.post.date.minute}", "hier, ${widget.post.date.hour}:${widget.post.date.minute}",
style: GoogleFonts.plusJakartaSans( style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.4), fontWeight: FontWeight.w300, fontSize: 13), color: Colors.white.withOpacity(0.4), fontWeight: FontWeight.w300, fontSize: 13),
), ),

@ -0,0 +1,532 @@
import 'package:flutter/Material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:flutter_svg/svg.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:text_scroll/text_scroll.dart';
import 'package:zoom_tap_animation/zoom_tap_animation.dart';
import '../components/button_play_component.dart';
import '../components/comment_component.dart';
import '../main.dart';
import '../model/Post.dart';
import '../values/constants.dart';
class DetailPostScreen extends StatefulWidget {
final Post post;
const DetailPostScreen({super.key, required this.post});
@override
State<DetailPostScreen> createState() => _DetailPostScreenState();
}
class _DetailPostScreenState extends State<DetailPostScreen> {
Future<void> resetFullScreen() async {
await SystemChannels.platform.invokeMethod<void>(
'SystemChrome.restoreSystemUIOverlays',
);
}
bool choice = false;
DateTime today = DateTime.now();
void switchChoice() {
setState(() {
choice = !choice;
});
}
@override
void dispose() {
MyApp.audioPlayer.release();
super.dispose();
}
@override
void initState() {
print("post: ${widget.post.date.toString()}");
print("ajrd: ${DateTime.now().toString()}");
super.initState();
}
/*void test() {
return Column(
children: [
Align(
child: Container(
width: 60,
height: 5,
decoration: BoxDecoration(color: Colors.white.withOpacity(0.3), borderRadius: BorderRadius.circular(20))),
),
const SizedBox(
height: 20,
),
Expanded(
child: ClipRRect(
borderRadius: BorderRadius.only(topRight: Radius.circular(15), topLeft: Radius.circular(15)),
child: Padding(
padding: EdgeInsets.only(left: defaultPadding, right: defaultPadding),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(decelerationRate: ScrollDecelerationRate.fast),
child: Wrap(
// to apply margin in the main axis of the wrap
runSpacing: 10,
children: [
Container(height: 5),
Align(
child: RichText(
text: TextSpan(
text: "3",
style: GoogleFonts.plusJakartaSans(color: Colors.white, fontWeight: FontWeight.w600),
children: [
TextSpan(
text: " commentaires",
style: GoogleFonts.plusJakartaSans(color: Colors.white, fontWeight: FontWeight.w300),
)
])),
),
SizedBox(height: 20),
CommentComponent(),
CommentComponent(),
CommentComponent(),
Container(height: 10),
],
),
),
),
),
),
Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child: Container(
height: 70,
width: double.infinity,
decoration:
BoxDecoration(border: Border(top: BorderSide(color: grayColor, width: 2)), color: textFieldMessage),
child: Center(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Row(
children: [
ClipOval(
child: SizedBox.fromSize(
// Image radius
child: const Image(
image: AssetImage("assets/images/exemple_profile.png"),
width: 45,
),
),
),
SizedBox(
width: 10,
),
Expanded(
child: TextField(
keyboardAppearance: Brightness.dark,
cursorColor: primaryColor,
keyboardType: TextInputType.emailAddress,
style: GoogleFonts.plusJakartaSans(color: Colors.white),
decoration: InputDecoration(
suffixIcon: Icon(
Icons.send,
color: grayText,
size: 20,
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: grayText),
borderRadius: BorderRadius.all(Radius.circular(100))),
contentPadding: EdgeInsets.only(top: 0, bottom: 0, left: 20, right: 20),
fillColor: bgModal,
filled: true,
focusColor: Color.fromRGBO(255, 255, 255, 0.30),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: grayText),
borderRadius: BorderRadius.all(Radius.circular(100))),
hintText: 'Ajoutez une réponse...',
hintStyle: GoogleFonts.plusJakartaSans(color: grayText)),
),
)
],
),
),
)),
),
],
);
}*/
final ScrollController _scrollController = ScrollController();
@override
Widget build(BuildContext context) {
return GestureDetector(
onTap: () {
FocusScopeNode currentFocus = FocusScope.of(context);
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
resetFullScreen();
}
},
child: Container(
height: 760.h,
child: Column(
children: [
Expanded(
child: Stack(
children: [
ScrollConfiguration(
behavior: MyBehavior(),
child: SingleChildScrollView(
controller: _scrollController,
physics: AlwaysScrollableScrollPhysics(),
child: Stack(
clipBehavior: Clip.hardEdge,
children: [
Align(
alignment: Alignment.topCenter,
child: Container(
height: 400,
width: double.infinity,
child: FadeInImage.assetNetwork(
placeholder: "assets/images/loadingPlaceholder.gif",
image: choice ? widget.post.selfie! : widget.post.music.cover!,
width: double.infinity,
fit: BoxFit.cover,
),
)),
Column(
children: [
Container(
height: 200,
margin: EdgeInsets.only(top: 230),
width: double.infinity,
decoration: const BoxDecoration(
gradient: LinearGradient(
begin: Alignment.topCenter,
end: Alignment.bottomCenter,
colors: [Colors.transparent, bgModal],
stops: [0, 0.8]),
),
child: Padding(
padding: const EdgeInsets.fromLTRB(20, 0, 20, 10),
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Padding(
padding: const EdgeInsets.only(right: 10),
child: choice
? Padding(
padding: const EdgeInsets.all(4),
child: ClipOval(
child: SizedBox.fromSize(
// Image radius
child: Image(
image: NetworkImage(widget.post.user.pp),
width: 45,
),
),
),
)
: widget.post.music.previewUrl != null
? ButtonPlayComponent(music: widget.post.music)
: Container(),
),
Flexible(
child: Column(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Flexible(
child: Row(
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Expanded(
child: ScrollConfiguration(
behavior: ScrollBehavior().copyWith(scrollbars: false),
child: TextScroll(
choice
? widget.post.user.pseudo
: widget.post.music.title!,
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w800,
fontSize: 22),
mode: TextScrollMode.endless,
pauseBetween: Duration(milliseconds: 500),
velocity: Velocity(pixelsPerSecond: Offset(20, 0)),
))),
Padding(
padding: const EdgeInsets.only(left: 20.0),
child: choice
? DateTime(today.year, today.month, today.day)
.isAtSameMomentAs(DateTime(widget.post.date.year,
widget.post.date.month, widget.post.date.day))
? Text(
"Aujourd'hui, ${widget.post.date.hour}:${widget.post.date.minute}",
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w900,
fontSize: 18),
)
: Text(
"hier, ${widget.post.date.hour}:${widget.post.date.minute}",
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w900,
fontSize: 18),
)
: Text(
widget.post.music.date.toString(),
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w900,
fontSize: 18),
),
)
],
),
),
choice
? widget.post.location.item2 != null
? Text(
"${widget.post.location.item1}, ${widget.post.location.item2}",
style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.5),
fontWeight: FontWeight.w400,
fontSize: 15),
)
: Text(
"",
style: GoogleFonts.plusJakartaSans(
color: Colors.white.withOpacity(0.4),
fontWeight: FontWeight.w300,
fontSize: 13),
)
: ScrollConfiguration(
behavior: ScrollBehavior().copyWith(scrollbars: false),
child: TextScroll(widget.post.music.artists.first.name!,
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w500,
fontSize: 17),
mode: TextScrollMode.endless,
pauseBetween: Duration(milliseconds: 500),
velocity: Velocity(pixelsPerSecond: Offset(20, 0))),
)
],
),
),
],
),
),
),
widget.post.description != null
? Align(
alignment: Alignment.bottomLeft,
child: Padding(
padding: const EdgeInsets.fromLTRB(50, 35, 50, 35),
child: Text(
widget.post.description!,
textAlign: TextAlign.left,
style: GoogleFonts.plusJakartaSans(
height: 1,
color: Colors.white,
fontWeight: FontWeight.w400,
fontSize: 14),
),
),
)
: Container(
height: 30,
),
Container(
width: double.infinity,
decoration: const BoxDecoration(
color: bgAppBar,
border: Border(
top: BorderSide(
color: Color(0xFF262626), // Couleur de la bordure
width: 1.0, // Épaisseur de la bordure
),
),
),
child: Column(
children: [
Padding(
padding: EdgeInsets.symmetric(vertical: 20),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
SvgPicture.asset("assets/images/heart.svg", semanticsLabel: 'Like Logo'),
SvgPicture.asset("assets/images/chat.svg", semanticsLabel: 'Chat Logo'),
SvgPicture.asset("assets/images/add.svg",
semanticsLabel: 'Add playlist Logo'),
SvgPicture.asset("assets/images/save.svg", semanticsLabel: 'Save Logo'),
SvgPicture.asset("assets/images/report.svg",
semanticsLabel: 'Report Logo'),
],
),
),
Padding(
padding: const EdgeInsets.all(15.0),
child: RichText(
text: TextSpan(
text: "3",
style: GoogleFonts.plusJakartaSans(
color: Colors.white, fontWeight: FontWeight.w800),
children: [
TextSpan(
text: " commentaires",
style: GoogleFonts.plusJakartaSans(
color: Colors.white, fontWeight: FontWeight.w400),
)
])),
),
Padding(
padding: EdgeInsets.fromLTRB(20, 0, 20, 20),
child: Wrap(
runSpacing: 13,
children: [
CommentComponent(),
CommentComponent(),
CommentComponent(),
],
),
)
],
),
),
],
),
widget.post.selfie != null
? Align(
alignment: Alignment.topRight,
child: ZoomTapAnimation(
onTap: () {
if (widget.post.selfie != null) {
switchChoice();
}
},
enableLongTapRepeatEvent: false,
longTapRepeatDuration: const Duration(milliseconds: 100),
begin: 1.0,
end: 0.96,
beginDuration: const Duration(milliseconds: 70),
endDuration: const Duration(milliseconds: 100),
beginCurve: Curves.decelerate,
endCurve: Curves.easeInOutSine,
child: Container(
margin: EdgeInsets.all(20),
width: 120,
height: 120,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
border: Border.all(width: 4, color: Colors.white)),
child: ClipRRect(
borderRadius: BorderRadius.circular(15),
// implement image
child: Image(
image: NetworkImage(
choice ? widget.post.music.cover! : widget.post.selfie!),
fit: BoxFit.cover,
)),
),
),
)
: Container()
],
),
)),
Align(
alignment: Alignment.topCenter,
child: Container(
height: 50,
width: double.infinity,
color: Colors.transparent,
child: Align(
alignment: Alignment.topCenter,
child: Container(
margin: EdgeInsets.only(top: 10),
width: 60,
height: 5,
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.6), borderRadius: BorderRadius.circular(20))),
),
),
),
],
),
),
Padding(
padding: EdgeInsets.only(bottom: MediaQuery.of(context).viewInsets.bottom),
child: Container(
height: 70,
width: double.infinity,
decoration: BoxDecoration(
border: Border(top: BorderSide(color: grayColor, width: 2)), color: textFieldMessage),
child: Center(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Row(
children: [
ClipOval(
child: SizedBox.fromSize(
// Image radius
child: Image.network(
MyApp.userViewModel.userCurrent.pp,
width: 45,
),
),
),
SizedBox(
width: 10,
),
Expanded(
child: TextField(
keyboardAppearance: Brightness.dark,
cursorColor: primaryColor,
keyboardType: TextInputType.emailAddress,
style: GoogleFonts.plusJakartaSans(color: Colors.white),
decoration: InputDecoration(
suffixIcon: Icon(
Icons.send,
color: grayText,
size: 20,
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: grayText),
borderRadius: BorderRadius.all(Radius.circular(100))),
contentPadding: EdgeInsets.only(top: 0, bottom: 0, left: 20, right: 20),
fillColor: bgModal,
filled: true,
focusColor: Color.fromRGBO(255, 255, 255, 0.30),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(width: 1, color: grayText),
borderRadius: BorderRadius.all(Radius.circular(100))),
hintText: 'Ajoutez une réponse...',
hintStyle: GoogleFonts.plusJakartaSans(color: grayText)),
),
)
],
),
),
)),
),
],
),
));
}
}
class MyBehavior extends ScrollBehavior {
@override
Widget buildOverscrollIndicator(BuildContext context, Widget child, ScrollableDetails details) {
return child;
}
}

@ -1,14 +1,21 @@
import 'dart:async';
import 'package:another_flushbar/flushbar.dart';
import 'package:circular_reveal_animation/circular_reveal_animation.dart'; import 'package:circular_reveal_animation/circular_reveal_animation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter/services.dart'; import 'package:flutter/services.dart';
import 'package:flutter_countdown_timer/flutter_countdown_timer.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart'; import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
import 'package:ionicons/ionicons.dart';
import 'package:justmusic/main.dart'; import 'package:justmusic/main.dart';
import '../components/comment_component.dart'; import 'package:lottie/lottie.dart';
import '../components/post_component.dart'; import '../components/post_component.dart';
import '../components/top_nav_bar_component.dart'; import '../components/top_nav_bar_component.dart';
import '../model/Post.dart'; import '../model/Post.dart';
import '../values/constants.dart'; import '../values/constants.dart';
import 'detail_post_screen.dart';
class FeedScreen extends StatefulWidget { class FeedScreen extends StatefulWidget {
const FeedScreen({Key? key}) : super(key: key); const FeedScreen({Key? key}) : super(key: key);
@ -17,17 +24,21 @@ class FeedScreen extends StatefulWidget {
State<FeedScreen> createState() => _FeedScreenState(); State<FeedScreen> createState() => _FeedScreenState();
} }
class _FeedScreenState extends State<FeedScreen> class _FeedScreenState extends State<FeedScreen> with SingleTickerProviderStateMixin {
with SingleTickerProviderStateMixin {
late AnimationController animationController; late AnimationController animationController;
late Animation<double> animation; late Animation<double> animation;
late List<Post> friendFeed; late List<Post> friendFeed;
Timer? timer;
late List<Post> discoveryFeed; late List<Post> discoveryFeed;
late List<Post> displayFeed; late List<Post> displayFeed;
final DateTime midnight = DateTime(DateTime.now().year, DateTime.now().month, DateTime.now().day + 1);
bool isDismissed = true;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
MyApp.postViewModel.getPostsFriends(); MyApp.postViewModel.getPostsFriends();
friendFeed = MyApp.postViewModel.postsFriends; friendFeed = MyApp.postViewModel.postsFriends;
MyApp.postViewModel.getBestPosts(); MyApp.postViewModel.getBestPosts();
@ -44,10 +55,90 @@ class _FeedScreenState extends State<FeedScreen>
animationController.forward(); animationController.forward();
} }
Future<void> resetFullScreen() async { Future<void> showCapsuleDot() async {
await SystemChannels.platform.invokeMethod<void>( bool res = await MyApp.postViewModel.getAvailable();
'SystemChrome.restoreSystemUIOverlays', if (isDismissed) {
); if (res) {
setState(() {
isDismissed = !isDismissed;
});
Flushbar(
maxWidth: 210,
animationDuration: Duration(seconds: 1),
forwardAnimationCurve: Curves.easeOutCirc,
margin: EdgeInsets.fromLTRB(0, 0, 0, 0),
icon: Icon(
Ionicons.sparkles,
color: Colors.white,
size: 18,
),
padding: EdgeInsets.fromLTRB(8, 8, 8, 8),
messageText: Align(
alignment: Alignment.centerLeft,
child: Text(
"Capsule disponible",
style: GoogleFonts.plusJakartaSans(color: Colors.grey, fontSize: 15),
),
),
flushbarStyle: FlushbarStyle.FLOATING,
flushbarPosition: FlushbarPosition.BOTTOM,
textDirection: Directionality.of(context),
borderRadius: BorderRadius.circular(1000),
borderWidth: 1,
isDismissible: false,
borderColor: Colors.white.withOpacity(0.04),
duration: const Duration(minutes: 100),
leftBarIndicatorColor: Colors.transparent,
positionOffset: 20,
onTap: (_) {
Navigator.pop(context);
Navigator.pushNamed(context, '/post');
},
).show(context).then((value) {
isDismissed = !isDismissed;
});
} else {
setState(() {
isDismissed = !isDismissed;
});
Flushbar(
maxWidth: 155,
animationDuration: Duration(seconds: 1),
isDismissible: false,
forwardAnimationCurve: Curves.easeOutCirc,
margin: EdgeInsets.fromLTRB(0, 0, 0, 0),
icon: Lottie.asset(
'assets/animations/LottieHourGlass.json',
width: 26,
fit: BoxFit.fill,
),
padding: EdgeInsets.fromLTRB(8, 8, 8, 8),
messageText: Align(
alignment: Alignment.centerLeft,
child: CountdownTimer(
endTime: midnight.millisecondsSinceEpoch - 2 * 60 * 60 * 1000,
textStyle: GoogleFonts.plusJakartaSans(color: Colors.grey, fontSize: 15),
),
),
flushbarStyle: FlushbarStyle.FLOATING,
flushbarPosition: FlushbarPosition.BOTTOM,
textDirection: Directionality.of(context),
borderRadius: BorderRadius.circular(1000),
borderWidth: 1,
borderColor: Colors.white.withOpacity(0.04),
duration: const Duration(minutes: 100),
leftBarIndicatorColor: Colors.transparent,
positionOffset: 20,
onTap: (_) {},
).show(context).then((value) {
{
setState(() {
isDismissed = !isDismissed;
});
}
});
}
}
} }
Future _refresh() async { Future _refresh() async {
@ -87,171 +178,18 @@ class _FeedScreenState extends State<FeedScreen>
isScrollControlled: true, isScrollControlled: true,
context: context, context: context,
shape: const RoundedRectangleBorder( shape: const RoundedRectangleBorder(
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20))),
topLeft: Radius.circular(20), topRight: Radius.circular(20))),
builder: ((BuildContext context) { builder: ((BuildContext context) {
return GestureDetector( return ClipRRect(
onTap: () { borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)),
FocusScopeNode currentFocus = FocusScope.of(context); child: DetailPostScreen(post: displayFeed[index]));
if (!currentFocus.hasPrimaryFocus) {
currentFocus.unfocus();
resetFullScreen();
}
},
child: Container(
height: 720.h,
margin: const EdgeInsets.only(top: 10),
child: Column(
children: [
Align(
child: Container(
width: 60,
height: 5,
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.3),
borderRadius: BorderRadius.circular(20))),
),
const SizedBox(
height: 20,
),
Expanded(
child: ClipRRect(
borderRadius: BorderRadius.only(
topRight: Radius.circular(15),
topLeft: Radius.circular(15)),
child: Padding(
padding: EdgeInsets.only(
left: defaultPadding, right: defaultPadding),
child: SingleChildScrollView(
physics: BouncingScrollPhysics(
decelerationRate: ScrollDecelerationRate.fast),
child: Wrap(
// to apply margin in the main axis of the wrap
runSpacing: 10,
children: [
PostComponent(
callback: null,
post: displayFeed[index],
index: index,
),
Container(height: 5),
displayFeed[index].description == null
? Container()
: Padding(
padding: const EdgeInsets.only(bottom: 20),
child: Text(
'${displayFeed[index].description ?? ""}',
style: GoogleFonts.plusJakartaSans(
color: Colors.white,
fontWeight: FontWeight.w200)),
),
Align(
child: RichText(
text: TextSpan(
text: "3",
style: GoogleFonts.plusJakartaSans(
color: Colors.white,
fontWeight: FontWeight.w600),
children: [
TextSpan(
text: " commentaires",
style: GoogleFonts.plusJakartaSans(
color: Colors.white,
fontWeight: FontWeight.w300),
)
])),
),
SizedBox(height: 20),
CommentComponent(),
CommentComponent(),
CommentComponent(),
Container(height: 10),
],
),
),
),
),
),
Padding(
padding: EdgeInsets.only(
bottom: MediaQuery.of(context).viewInsets.bottom),
child: Container(
height: 70,
width: double.infinity,
decoration: BoxDecoration(
border: Border(
top: BorderSide(color: grayColor, width: 2)),
color: textFieldMessage),
child: Center(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Row(
children: [
ClipOval(
child: SizedBox.fromSize(
// Image radius
child: const Image(
image: AssetImage(
"assets/images/exemple_profile.png"),
width: 45,
),
),
),
SizedBox(
width: 10,
),
Expanded(
child: TextField(
keyboardAppearance: Brightness.dark,
cursorColor: primaryColor,
keyboardType: TextInputType.emailAddress,
style: GoogleFonts.plusJakartaSans(
color: Colors.white),
decoration: InputDecoration(
suffixIcon: Icon(
Icons.send,
color: grayText,
size: 20,
),
focusedBorder: OutlineInputBorder(
borderSide: BorderSide(
width: 1, color: grayText),
borderRadius: BorderRadius.all(
Radius.circular(100))),
contentPadding: EdgeInsets.only(
top: 0,
bottom: 0,
left: 20,
right: 20),
fillColor: bgModal,
filled: true,
focusColor:
Color.fromRGBO(255, 255, 255, 0.30),
enabledBorder: OutlineInputBorder(
borderSide: BorderSide(
width: 1, color: grayText),
borderRadius: BorderRadius.all(
Radius.circular(100))),
hintText: 'Ajoutez une réponse...',
hintStyle: GoogleFonts.plusJakartaSans(
color: grayText)),
),
)
],
),
),
)),
),
],
),
),
);
}), }),
); );
} }
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
showCapsuleDot();
return Scaffold( return Scaffold(
resizeToAvoidBottomInset: true, resizeToAvoidBottomInset: true,
backgroundColor: bgColor, backgroundColor: bgColor,
@ -265,21 +203,16 @@ class _FeedScreenState extends State<FeedScreen>
Container( Container(
decoration: const BoxDecoration( decoration: const BoxDecoration(
image: DecorationImage( image: DecorationImage(
image: AssetImage("assets/images/empty_bg.png"), image: AssetImage("assets/images/empty_bg.png"), fit: BoxFit.cover, opacity: 0.3),
fit: BoxFit.cover,
opacity: 0.3),
), ),
child: Padding( child: Padding(
padding: padding: EdgeInsets.only(top: 140.h, left: defaultPadding),
EdgeInsets.only(top: 140.h, left: defaultPadding),
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Text("Suis tes amis pour voir leurs capsules", Text("Suis tes amis pour voir leurs capsules",
style: GoogleFonts.plusJakartaSans( style: GoogleFonts.plusJakartaSans(
color: Colors.white, color: Colors.white, fontSize: 23, fontWeight: FontWeight.w800))
fontSize: 23,
fontWeight: FontWeight.w800))
], ],
), ),
), ),
@ -292,14 +225,8 @@ class _FeedScreenState extends State<FeedScreen>
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment.topRight, begin: Alignment.topRight,
stops: [ stops: [0.3, 1],
0.3, colors: [bgColor.withOpacity(0.9), bgColor.withOpacity(0)])),
1
],
colors: [
bgColor.withOpacity(0.9),
bgColor.withOpacity(0)
])),
), ),
), ),
), ),
@ -325,26 +252,21 @@ class _FeedScreenState extends State<FeedScreen>
centerOffset: Offset(30.w, -100), centerOffset: Offset(30.w, -100),
child: Container( child: Container(
constraints: BoxConstraints(maxWidth: 600), constraints: BoxConstraints(maxWidth: 600),
padding: EdgeInsets.fromLTRB( padding: EdgeInsets.fromLTRB(defaultPadding, 100.h, defaultPadding, 0),
defaultPadding, 100.h, defaultPadding, 0),
child: RefreshIndicator( child: RefreshIndicator(
displacement: 20, displacement: 20,
triggerMode: RefreshIndicatorTriggerMode.onEdge, triggerMode: RefreshIndicatorTriggerMode.onEdge,
onRefresh: _refresh, onRefresh: _refresh,
child: ListView.builder( child: ListView.builder(
physics: const BouncingScrollPhysics( physics: const BouncingScrollPhysics(decelerationRate: ScrollDecelerationRate.fast),
decelerationRate:
ScrollDecelerationRate.fast),
clipBehavior: Clip.none, clipBehavior: Clip.none,
shrinkWrap: true, shrinkWrap: true,
itemCount: displayFeed.length, itemCount: displayFeed.length,
itemBuilder: (BuildContext context, int index) { itemBuilder: (BuildContext context, int index) {
return Padding( return Padding(
padding: const EdgeInsets.only(bottom: 40), padding: const EdgeInsets.only(bottom: 40),
child: PostComponent( child:
callback: openDetailPost, PostComponent(callback: openDetailPost, post: displayFeed[index], index: index),
post: displayFeed[index],
index: index),
); );
}, },
), ),
@ -359,14 +281,8 @@ class _FeedScreenState extends State<FeedScreen>
decoration: BoxDecoration( decoration: BoxDecoration(
gradient: LinearGradient( gradient: LinearGradient(
begin: Alignment.topRight, begin: Alignment.topRight,
stops: [ stops: [0.3, 1],
0.3, colors: [bgColor.withOpacity(0.9), bgColor.withOpacity(0)])),
1
],
colors: [
bgColor.withOpacity(0.9),
bgColor.withOpacity(0)
])),
), ),
), ),
), ),

@ -41,6 +41,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.3.7" version: "3.3.7"
args:
dependency: transitive
description:
name: args
sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
url: "https://pub.dev"
source: hosted
version: "2.4.2"
async: async:
dependency: transitive dependency: transitive
description: description:
@ -406,6 +414,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.0.0" version: "2.0.0"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338"
url: "https://pub.dev"
source: hosted
version: "2.0.7"
flutter_test: flutter_test:
dependency: "direct dev" dependency: "direct dev"
description: flutter description: flutter
@ -672,6 +688,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.8.3" version: "1.8.3"
path_parsing:
dependency: transitive
description:
name: path_parsing
sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
url: "https://pub.dev"
source: hosted
version: "1.0.1"
path_provider: path_provider:
dependency: transitive dependency: transitive
description: description:
@ -720,6 +744,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "2.1.7" version: "2.1.7"
petitparser:
dependency: transitive
description:
name: petitparser
sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
url: "https://pub.dev"
source: hosted
version: "5.4.0"
pinch_zoom: pinch_zoom:
dependency: "direct main" dependency: "direct main"
description: description:
@ -869,6 +901,30 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "3.0.7" version: "3.0.7"
vector_graphics:
dependency: transitive
description:
name: vector_graphics
sha256: "670f6e07aca990b4a2bcdc08a784193c4ccdd1932620244c3a86bb72a0eac67f"
url: "https://pub.dev"
source: hosted
version: "1.1.7"
vector_graphics_codec:
dependency: transitive
description:
name: vector_graphics_codec
sha256: "7451721781d967db9933b63f5733b1c4533022c0ba373a01bdd79d1a5457f69f"
url: "https://pub.dev"
source: hosted
version: "1.1.7"
vector_graphics_compiler:
dependency: transitive
description:
name: vector_graphics_compiler
sha256: "80a13c613c8bde758b1464a1755a7b3a8f2b6cec61fbf0f5a53c94c30f03ba2e"
url: "https://pub.dev"
source: hosted
version: "1.1.7"
vector_math: vector_math:
dependency: transitive dependency: transitive
description: description:
@ -893,6 +949,14 @@ packages:
url: "https://pub.dev" url: "https://pub.dev"
source: hosted source: hosted
version: "1.0.1" version: "1.0.1"
xml:
dependency: transitive
description:
name: xml
sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
url: "https://pub.dev"
source: hosted
version: "6.3.0"
zoom_tap_animation: zoom_tap_animation:
dependency: "direct main" dependency: "direct main"
description: description:

@ -70,6 +70,7 @@ dependencies:
lottie: ^2.5.0 lottie: ^2.5.0
custom_refresh_indicator: ^2.2.1 custom_refresh_indicator: ^2.2.1
animations: ^2.0.7 animations: ^2.0.7
flutter_svg: ^2.0.7
dev_dependencies: dev_dependencies:
flutter_test: flutter_test:

Loading…
Cancel
Save