From c60a3ca6fdbb36c02610763904c9c7f284fd10c8 Mon Sep 17 00:00:00 2001 From: BONVILA Olivier Date: Wed, 26 Aug 2020 11:27:33 +0200 Subject: [PATCH] Closes: #158 : Retrieving theme with correct method --- lib/src/widget/button.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/widget/button.dart b/lib/src/widget/button.dart index 65e038be..237f3636 100644 --- a/lib/src/widget/button.dart +++ b/lib/src/widget/button.dart @@ -92,7 +92,7 @@ class _NeumorphicButtonState extends State { void updateInitialStyle() { final appBarPresent = NeumorphicAppBarTheme.of(context) != null; if (widget.style != initialStyle || initialStyle == null) { - final theme = NeumorphicTheme.of(context).current; + final theme = NeumorphicTheme.currentTheme(context); setState(() { this.initialStyle = widget.style ?? (appBarPresent