m8ty_client_personal
As it's required to display specific information about the currently logged in user this client has been created.
Before you start
Check the documentation of the m8ty_client_personal library to get an idea about the available models and their properties.
import all needed libraries
import 'package:dio/dio.dart';
import 'package:m8ty_client_personal/m8ty_client_personal.dart';
import 'package:m8ty_client_common/m8ty_client_common.dart';
import 'package:built_collection/built_collection.dart';
How to perform different tasks
Here some examples how the dart client can be used
Retrieve personal user data
final client = M8tyClientPersonal();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getPersonalUserApi();
try {
final response = await api.retrieveUserData();
print('User data: ${response.data}');
} on DioException catch (e) {
throw Exception(
'Request failed (status: ${e.response?.statusCode}): ${e.response?.data}',
);
}
Update personal user data
final client = M8tyClientPersonal();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getPersonalUserApi();
final response = await api.updateUserData(
updateUserDataRequestModel: UpdateUserDataRequestModel((b) {
// set fields to update
}),
);
Delete user data
final client = M8tyClientPersonal();
client.setOAuthToken('ApiOAuth2', oauthToken);
final api = client.getPersonalUserApi();
await api.deleteUserData();
03 June 2026