Update thingsboard client library

This commit is contained in:
Igor Kulikov
2021-06-24 19:21:53 +03:00
parent f25888e5f6
commit 2187211f00
10 changed files with 35 additions and 25 deletions

View File

@@ -278,7 +278,7 @@ class _AlarmCardState extends TbContextState<AlarmCard, _AlarmCardState> {
alarm.id!.id!);
setState(() {
loading = false;
this.alarm = newAlarm;
this.alarm = newAlarm!;
});
}
}
@@ -294,7 +294,7 @@ class _AlarmCardState extends TbContextState<AlarmCard, _AlarmCardState> {
alarm.id!.id!);
setState(() {
loading = false;
this.alarm = newAlarm;
this.alarm = newAlarm!;
});
}
}

View File

@@ -12,7 +12,7 @@ class AssetDetailsPage extends EntityDetailsPage<AssetInfo> {
defaultTitle: 'Asset', subTitle: 'Asset details');
@override
Future<AssetInfo> fetchEntity(String assetId) {
Future<AssetInfo?> fetchEntity(String assetId) {
return tbClient.getAssetService().getAssetInfo(assetId);
}

View File

@@ -8,7 +8,7 @@ class CustomerDetailsPage extends ContactBasedDetailsPage<Customer> {
super(tbContext, entityId: customerId, defaultTitle: 'Customer', subTitle: 'Customer details');
@override
Future<Customer> fetchEntity(String customerId) {
Future<Customer?> fetchEntity(String customerId) {
return tbClient.getCustomerService().getCustomer(customerId);
}

View File

@@ -12,7 +12,7 @@ class DeviceDetailsPage extends EntityDetailsPage<DeviceInfo> {
defaultTitle: 'Device');
@override
Future<DeviceInfo> fetchEntity(String deviceId) {
Future<DeviceInfo?> fetchEntity(String deviceId) {
return tbClient.getDeviceService().getDeviceInfo(deviceId);
}

View File

@@ -140,7 +140,7 @@ class _ProfilePageState extends TbPageState<ProfilePage, _ProfilePageState> {
Future<void> _loadUser() async {
_isLoadingNotifier.value = true;
_currentUser = await tbClient.getUserService().getUser(tbClient.getAuthUser()!.userId!);
_currentUser = await tbClient.getUserService().getUser();
_setUser();
_isLoadingNotifier.value = false;
}

View File

@@ -8,7 +8,7 @@ class TenantDetailsPage extends ContactBasedDetailsPage<Tenant> {
super(tbContext, entityId: tenantId, defaultTitle: 'Tenant', subTitle: 'Tenant details');
@override
Future<Tenant> fetchEntity(String tenantId) {
Future<Tenant?> fetchEntity(String tenantId) {
return tbClient.getTenantService().getTenant(tenantId);
}