getCurrentUser method
Get the current user information.
This method returns information about the currently logged in user, including userId, userName, userEmail, and userPhone.
Returns a map containing the current user information.
Implementation
@override
Future<Map<String, dynamic>> getCurrentUser() async {
try {
final result = await methodChannel.invokeMethod<Map<Object?, Object?>>('getCurrentUser');
return Map<String, dynamic>.from(result ?? {});
} on PlatformException catch (e) {
debugPrint('Failed to get current user: ${e.message}');
return {};
}
}