licenseExpirationDate property

  1. @override
Future<DateTime?> get licenseExpirationDate
override

Implementation

@override
Future<DateTime?> get licenseExpirationDate async {
  final initialized = await _isInitialize();
  final started = await _isStarted();
  assert(initialized, 'Bridgefy is not initialized');
  assert(started, 'Bridgefy is not started');
  final result = await methodChannel.invokeMethod('licenseExpirationDate');
  final interval = result["licenseExpirationDate"].toInt();
  if (interval != null) {
    return DateTime.fromMillisecondsSinceEpoch(interval);
  }
  return null;
}