aves/lib/services/time_service.dart
2021-02-15 16:58:49 +09:00

15 lines
483 B
Dart

import 'package:flutter/foundation.dart';
import 'package:flutter/services.dart';
class TimeService {
static const platform = MethodChannel('deckers.thibault/aves/time');
static Future<String> getDefaultTimeZone() async {
try {
return await platform.invokeMethod('getDefaultTimeZone');
} on PlatformException catch (e) {
debugPrint('getDefaultTimeZone failed with code=${e.code}, exception=${e.message}, details=${e.details}');
}
return null;
}
}