fix(location): add orderBy to positions query to show latest position
This commit is contained in:
@@ -184,6 +184,8 @@ PODS:
|
||||
- GoogleUtilities/Privacy
|
||||
- image_picker_ios (0.0.1):
|
||||
- Flutter
|
||||
- jc_sdk (0.0.1):
|
||||
- Flutter
|
||||
- mobile_scanner (7.0.0):
|
||||
- Flutter
|
||||
- FlutterMacOS
|
||||
@@ -226,6 +228,7 @@ DEPENDENCIES:
|
||||
- flutter_native_splash (from `.symlinks/plugins/flutter_native_splash/ios`)
|
||||
- flutter_treezor_entrust_sdk_bridge (from `.symlinks/plugins/flutter_treezor_entrust_sdk_bridge/ios`)
|
||||
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
|
||||
- jc_sdk (from `.symlinks/plugins/jc_sdk/ios`)
|
||||
- mobile_scanner (from `.symlinks/plugins/mobile_scanner/darwin`)
|
||||
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
|
||||
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
|
||||
@@ -284,6 +287,8 @@ EXTERNAL SOURCES:
|
||||
:path: ".symlinks/plugins/flutter_treezor_entrust_sdk_bridge/ios"
|
||||
image_picker_ios:
|
||||
:path: ".symlinks/plugins/image_picker_ios/ios"
|
||||
jc_sdk:
|
||||
:path: ".symlinks/plugins/jc_sdk/ios"
|
||||
mobile_scanner:
|
||||
:path: ".symlinks/plugins/mobile_scanner/darwin"
|
||||
package_info_plus:
|
||||
@@ -332,6 +337,7 @@ SPEC CHECKSUMS:
|
||||
GoogleDataTransport: aae35b7ea0c09004c3797d53c8c41f66f219d6a7
|
||||
GoogleUtilities: 00c88b9a86066ef77f0da2fab05f65d7768ed8e1
|
||||
image_picker_ios: 4f2f91b01abdb52842a8e277617df877e40f905b
|
||||
jc_sdk: 3c77f6d7e5e052e2960c47629f612127585779cf
|
||||
mobile_scanner: 77265f3dc8d580810e91849d4a0811a90467ed5e
|
||||
nanopb: fad817b59e0457d11a5dfbde799381cd727c1275
|
||||
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
|
||||
@@ -344,6 +350,6 @@ SPEC CHECKSUMS:
|
||||
url_launcher_ios: bb13df5870e8c4234ca12609d04010a21be43dfa
|
||||
webview_flutter_wkwebview: 29eb20d43355b48fe7d07113835b9128f84e3af4
|
||||
|
||||
PODFILE CHECKSUM: 2ff48235bd696a83f30729eab21272c929e12684
|
||||
PODFILE CHECKSUM: 88fd88ec59f7f53cf74c06ffd99479aec395968a
|
||||
|
||||
COCOAPODS: 1.16.2
|
||||
|
||||
@@ -17,7 +17,7 @@ resolution: workspace
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 1.0.0+9
|
||||
version: 1.0.0+4
|
||||
|
||||
environment:
|
||||
sdk: ^3.9.2
|
||||
|
||||
@@ -89,8 +89,7 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
gap,
|
||||
AppMenuButton(
|
||||
color: primaryColor,
|
||||
onPressed: () =>
|
||||
navigationContract.pushTo(AppRoutes.health),
|
||||
onPressed: () => navigationContract.pushTo(AppRoutes.health),
|
||||
icon: SFIcons.healthCircle,
|
||||
negativeIcon: true,
|
||||
text: context.translate(I18n.healthTitle),
|
||||
@@ -110,8 +109,7 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
gap,
|
||||
AppMenuButton(
|
||||
color: primaryColor,
|
||||
onPressed: () =>
|
||||
navigationContract.pushTo(AppRoutes.rewards),
|
||||
onPressed: () => navigationContract.pushTo(AppRoutes.rewards),
|
||||
icon: SFIcons.rewardsCircle,
|
||||
negativeIcon: true,
|
||||
text: context.translate(I18n.rewards),
|
||||
@@ -127,15 +125,15 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
iconSize: SizeUtils.getByScreen(small: 42, big: 40),
|
||||
text: context.translate(I18n.callWatch),
|
||||
),
|
||||
gap,
|
||||
AppMenuButton(
|
||||
color: primaryColor,
|
||||
onPressed: () =>
|
||||
navigationContract.pushTo(AppRoutes.videocall),
|
||||
icon: Icons.videocam_outlined,
|
||||
iconSize: SizeUtils.getByScreen(small: 42, big: 40),
|
||||
text: context.translate(I18n.videocallTitle),
|
||||
),
|
||||
// gap,
|
||||
// AppMenuButton(
|
||||
// color: primaryColor,
|
||||
// onPressed: () =>
|
||||
// navigationContract.pushTo(AppRoutes.videocall),
|
||||
// icon: Icons.videocam_outlined,
|
||||
// iconSize: SizeUtils.getByScreen(small: 42, big: 40),
|
||||
// text: context.translate(I18n.videocallTitle),
|
||||
// ),
|
||||
gap,
|
||||
AppMenuButton(
|
||||
color: primaryColor,
|
||||
@@ -145,21 +143,19 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
iconSize: SizeUtils.getByScreen(small: 42, big: 40),
|
||||
text: context.translate(I18n.callHistory),
|
||||
),
|
||||
gap,
|
||||
AppMenuButton(
|
||||
color: primaryColor,
|
||||
onPressed: () =>
|
||||
navigationContract.pushTo(AppRoutes.friends),
|
||||
icon: Icons.people_outline,
|
||||
iconSize: SizeUtils.getByScreen(small: 42, big: 40),
|
||||
text: context.translate(I18n.makeFriends),
|
||||
),
|
||||
// gap,
|
||||
// AppMenuButton(
|
||||
// color: primaryColor,
|
||||
// onPressed: () => navigationContract.pushTo(AppRoutes.friends),
|
||||
// icon: Icons.people_outline,
|
||||
// iconSize: SizeUtils.getByScreen(small: 42, big: 40),
|
||||
// text: context.translate(I18n.makeFriends),
|
||||
// ),
|
||||
if (capabilities?.appUsageSchedules != null) ...[
|
||||
gap,
|
||||
AppMenuButton(
|
||||
color: primaryColor,
|
||||
onPressed: () =>
|
||||
navigationContract.pushTo(AppRoutes.appsUse),
|
||||
onPressed: () => navigationContract.pushTo(AppRoutes.appsUse),
|
||||
icon: SFIcons.screenTime,
|
||||
text: context.translate(I18n.appsUse),
|
||||
),
|
||||
@@ -172,7 +168,8 @@ class DeviceManagementScreen extends ConsumerWidget {
|
||||
text: context.translate(I18n.installedAppsTitle),
|
||||
),
|
||||
],
|
||||
if (capabilities?.commands?.types.contains('FIND_DEVICE') ?? false) ...[
|
||||
if (capabilities?.commands?.types.contains('FIND_DEVICE') ??
|
||||
false) ...[
|
||||
gap,
|
||||
AppMenuButton(
|
||||
color: primaryColor,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:legacy_device_state/legacy_device_state.dart';
|
||||
import 'package:sf_infrastructure/sf_infrastructure.dart';
|
||||
import 'package:utils/utils.dart';
|
||||
|
||||
class LegacyDeviceRemoteDatasourceImpl implements LegacyDeviceRemoteDatasource {
|
||||
LegacyDeviceRemoteDatasourceImpl(this._repository);
|
||||
@@ -14,7 +15,11 @@ class LegacyDeviceRemoteDatasourceImpl implements LegacyDeviceRemoteDatasource {
|
||||
try {
|
||||
final response = await _repository.get<Map<String, dynamic>>(
|
||||
'/devices/identificator/$deviceId/positions',
|
||||
queryParameters: <String, dynamic>{'pageSize': 5},
|
||||
queryParameters: <String, dynamic>{
|
||||
'page': 1,
|
||||
'pageSize': 5,
|
||||
'orderBy': encodeOrderBy('positionDate'),
|
||||
},
|
||||
);
|
||||
|
||||
final data = response.data;
|
||||
|
||||
Reference in New Issue
Block a user