Closed Errechydy closed 4 years ago
I'm getting this error when calling
final String currentTimeZone = await FlutterNativeTimezone.getLocalTimezone();
Compiler message: Error: 'await' can only be used in 'async' or 'async*' methods. final String currentTimeZone = await FlutterNativeTimezone.getLocalTimezone()
Make sure you're running it inside of a method marked as async. You're probably trying to run it in a sync method (that's the default). It's not related to the package, it's basic async/await functionality. Try googling dart async/await.
Thanks i already found that it needs to be inside an async method. you probably need to mention that in the example you provided
I'm getting this error when calling
final String currentTimeZone = await FlutterNativeTimezone.getLocalTimezone();