From 02464cb664218d4b145a13cb2ba5867b1a9f4703 Mon Sep 17 00:00:00 2001 From: Narek Date: Wed, 31 Mar 2021 13:44:39 +0400 Subject: [PATCH] make functions as not nullable #17 --- lib/flutter_statusbar_manager.dart | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/flutter_statusbar_manager.dart b/lib/flutter_statusbar_manager.dart index e9a3e12..d32c1d2 100644 --- a/lib/flutter_statusbar_manager.dart +++ b/lib/flutter_statusbar_manager.dart @@ -9,7 +9,7 @@ class _StatusBarStyle { static const String LIGHT_CONTENT = "light-content"; static const String DARK_CONTENT = "dark-content"; - static String getStyle(StatusBarStyle? style) { + static String getStyle(StatusBarStyle style) { switch (style) { case StatusBarStyle.DEFAULT: return DEFAULT; @@ -17,8 +17,6 @@ class _StatusBarStyle { return DARK_CONTENT; case StatusBarStyle.LIGHT_CONTENT: return LIGHT_CONTENT; - default: - return DEFAULT; } } } @@ -30,7 +28,7 @@ class _StatusBarAnimation { static const String FADE = "fade"; static const String SLIDE = "slide"; - static String getAnimation(StatusBarAnimation? animation) { + static String getAnimation(StatusBarAnimation animation) { switch (animation) { case StatusBarAnimation.NONE: return NONE; @@ -38,8 +36,6 @@ class _StatusBarAnimation { return FADE; case StatusBarAnimation.SLIDE: return SLIDE; - default: - return NONE; } } } @@ -51,7 +47,7 @@ class _NavigationBarStyle { static const String DARK = "light"; static const String LIGHT = "dark"; - static String getStyle(NavigationBarStyle? style) { + static String getStyle(NavigationBarStyle style) { switch (style) { case NavigationBarStyle.DEFAULT: return DEFAULT; @@ -59,8 +55,6 @@ class _NavigationBarStyle { return DARK; case NavigationBarStyle.LIGHT: return LIGHT; - default: - return DEFAULT; } } }