diff --git a/.idea/Daflv4.iml b/.idea/Daflv4.iml index 29145de..6fa24ac 100644 --- a/.idea/Daflv4.iml +++ b/.idea/Daflv4.iml @@ -1,5 +1,10 @@ + + + + + @@ -49,7 +54,7 @@ - + diff --git a/.idea/libraries/Dart_Packages.xml b/.idea/libraries/Dart_Packages.xml index 6b14afa..0568fe9 100644 --- a/.idea/libraries/Dart_Packages.xml +++ b/.idea/libraries/Dart_Packages.xml @@ -5,662 +5,662 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/.idea/libraries/Dart_SDK.xml b/.idea/libraries/Dart_SDK.xml index b6e6985..cb79f3d 100644 --- a/.idea/libraries/Dart_SDK.xml +++ b/.idea/libraries/Dart_SDK.xml @@ -1,25 +1,25 @@ - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + diff --git a/Sources/dafl_project_flutter/assets/logs.txt b/Sources/dafl_project_flutter/assets/logs.txt new file mode 100644 index 0000000..7d70a00 --- /dev/null +++ b/Sources/dafl_project_flutter/assets/logs.txt @@ -0,0 +1,4 @@ +postgres +mdpDaflBd +89.83.54.48 +BD-DaflMusic \ No newline at end of file diff --git a/Sources/dafl_project_flutter/lib/position/location.dart b/Sources/dafl_project_flutter/lib/position/location.dart index df1d6fe..caef5b6 100644 --- a/Sources/dafl_project_flutter/lib/position/location.dart +++ b/Sources/dafl_project_flutter/lib/position/location.dart @@ -1,8 +1,8 @@ +import 'dart:developer'; import 'package:geolocator/geolocator.dart'; import 'package:http/http.dart' as http; import 'dart:convert'; import 'dart:async'; - import '../main.dart'; class Location { @@ -18,11 +18,13 @@ class Location { } } String actualUser = MyApp.controller.currentUser.usernameDafl; + String actualSong = await MyApp.api.getCurrentlyPlayingTrack(); Position current = await Geolocator.getCurrentPosition(); await http.post(uri, body: { "id": actualUser.toString(), "latitude": current.latitude.toString(), "longitude": current.longitude.toString(), + "idMusic": actualSong.toString(), }); return getData(); } diff --git a/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart b/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart index a4d60e4..5b3b0c0 100644 --- a/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart +++ b/Sources/dafl_project_flutter/lib/views/pages/main/p_main.dart @@ -1,3 +1,4 @@ +import 'dart:async'; import 'package:flutter/material.dart'; import '../../../position/location.dart'; import '../../../presentation/custom_icons_icons.dart'; @@ -7,6 +8,7 @@ import './w_discovery.dart'; import './w_profile.dart'; import './w_messages.dart'; import 'w_top.dart'; +Timer? timer; class MainPage extends StatefulWidget { const MainPage({Key? key}) : super(key: key); @@ -31,6 +33,7 @@ class _MainPageState extends State { @override Widget build(BuildContext context) { Location.sendCurrentLocation(); + timer = Timer.periodic(const Duration(seconds: 72), (Timer t) => Location.sendCurrentLocation()); double height = MediaQuery.of(context).size.height; return Scaffold( resizeToAvoidBottomInset: false,