From 16971bb14647d44223c3e8099f361ead29867aaf Mon Sep 17 00:00:00 2001 From: nohli <43643339+nohli@users.noreply.github.com> Date: Thu, 4 Mar 2021 22:40:07 +0100 Subject: [PATCH 1/2] Add ios to platforms --- pubspec.lock | 1 + pubspec.yaml | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pubspec.lock b/pubspec.lock index 49a0ce6..6ddb0a3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -144,3 +144,4 @@ packages: version: "2.1.0" sdks: dart: ">=2.12.0 <3.0.0" + flutter: ">=1.12.0" diff --git a/pubspec.yaml b/pubspec.yaml index 41de4fe..26cdfa4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,5 +23,7 @@ flutter: android: package: com.whelksoft.flutter_native_timezone pluginClass: FlutterNativeTimezonePlugin + ios: + pluginClass: FlutterNativeTimezonePlugin macos: pluginClass: FlutterNativeTimezonePlugin From a8bd31f9c859a87cc64577c524e1baad6f1aa587 Mon Sep 17 00:00:00 2001 From: nohli <43643339+nohli@users.noreply.github.com> Date: Thu, 4 Mar 2021 22:57:22 +0100 Subject: [PATCH 2/2] Fix errors --- example/lib/main.dart | 2 +- example/test/widget_test.dart | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index d88ea23..750609e 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -12,7 +12,7 @@ class MyApp extends StatefulWidget { class _MyAppState extends State { String _timezone = 'Unknown'; - List _availableTimezones = List(); + List _availableTimezones = []; @override void initState() { diff --git a/example/test/widget_test.dart b/example/test/widget_test.dart index 62cf76e..b3fca04 100644 --- a/example/test/widget_test.dart +++ b/example/test/widget_test.dart @@ -11,7 +11,8 @@ void main() { expect( find.byWidgetPredicate( (Widget widget) => - widget is Text && widget.data.startsWith('Local timezone:'), + widget is Text && + widget.data?.startsWith('Local timezone:') == true, ), findsOneWidget, );