setJWTToken static method

Future<bool> setJWTToken(
  1. String token
)

Set JWT token for backend authentication

Implementation

static Future<bool> setJWTToken(String token) async {
  try {
    final result = await platform.invokeMethod('setJWTToken', {'token': token});
    return result as bool? ?? false;
  } on PlatformException catch (e) {
    print("Failed to set JWT token: '${e.message}'.");
    return false;
  }
}