From 9249da64d68ef99b4f028e39d9760f4fd74c13db Mon Sep 17 00:00:00 2001 From: Lock128 Date: Wed, 24 Feb 2021 02:15:48 +0100 Subject: [PATCH 1/2] Fixes #52 after deprecation see #52 - fixed this deprecation https://api.flutter.dev/flutter/widgets/BuildContext/inheritFromWidgetOfExactType.html --- lib/dynamic_theme.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_theme.dart b/lib/dynamic_theme.dart index 2aeba4a..cf1d535 100644 --- a/lib/dynamic_theme.dart +++ b/lib/dynamic_theme.dart @@ -38,7 +38,7 @@ class DynamicTheme extends StatefulWidget { DynamicThemeState createState() => DynamicThemeState(); static DynamicThemeState of(BuildContext context) { - return context.findAncestorStateOfType>(); + return context.ancestorStateOfType>(); } } From 394de1a0ad8d3b91e280f9c2cea24da7bb8c9ae0 Mon Sep 17 00:00:00 2001 From: Lock128 Date: Wed, 24 Feb 2021 02:27:10 +0100 Subject: [PATCH 2/2] Fixes #52 Fixes deprecation/renaming --- lib/dynamic_theme.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_theme.dart b/lib/dynamic_theme.dart index cf1d535..2aeba4a 100644 --- a/lib/dynamic_theme.dart +++ b/lib/dynamic_theme.dart @@ -38,7 +38,7 @@ class DynamicTheme extends StatefulWidget { DynamicThemeState createState() => DynamicThemeState(); static DynamicThemeState of(BuildContext context) { - return context.ancestorStateOfType>(); + return context.findAncestorStateOfType>(); } }