Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

migrate to null-safety #17

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

NarHakobyan
Copy link

Hi guys, I migrated package to null safety, to be honest I think this library is no more maintainable so you can use null safety version directly from git.

flutter_statusbar_manager:
  git:
    url: https://github.com/NarHakobyan/flutter_statusbar_manager
    ref: master

@amitkot
Copy link

amitkot commented Mar 31, 2021

@NarHakobyan Oops, I missed your PR and created one for this as well.
I will probably close mine.
I suggest limiting the arguments in the library's functions to not accept null values. Adding an link below.
Also, the example app required some change to its Podfile to build.
I advanced the version number and added to the changelog file, which will help the maintainers push the update.

@@ -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) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not accept null values here

@@ -30,7 +30,7 @@ class _StatusBarAnimation {
static const String FADE = "fade";
static const String SLIDE = "slide";

static String getAnimation(StatusBarAnimation animation) {
static String getAnimation(StatusBarAnimation? animation) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here

@@ -51,7 +51,7 @@ class _NavigationBarStyle {
static const String DARK = "light";
static const String LIGHT = "dark";

static String getStyle(NavigationBarStyle style) {
static String getStyle(NavigationBarStyle? style) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also here

@amitkot amitkot mentioned this pull request Mar 31, 2021
@NarHakobyan
Copy link
Author

NarHakobyan commented Mar 31, 2021

Hi @amitkot, yeah, it's not necessary to have nullable arguments. I have fixed it.

@NarHakobyan
Copy link
Author

@amitkot are you still here? :D

@rafaelmaeuer
Copy link

rafaelmaeuer commented Jun 4, 2021

@NarHakobyan thanks very much for your PR, I am using it for now unless something else is moving here... Do you have a solution for MissingPluginException(No implementation found for method setStyle on channel flutter_statusbar_manager) when using flutter web?

Edit: I found a solution using kIsWeb and created a PR: NarHakobyan#1

@amitkot
Copy link

amitkot commented Jun 6, 2021

@NarHakobyan hi, missed your ping (a month ago).
I'm still here, was working on other project. I'm closing my PR now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants