Git Product home page Git Product logo

Comments (4)

asavchuk avatar asavchuk commented on May 29, 2024 1

Is this something you can reproduce during development - in an emulator or a device - or in production as well?

I noticed it on emulator(android) and on a phone as well, both in development and production.

Could you provide a reproducible example so that I can investigate?

I'll try to make a minimal example to show the expirience.

from theme_mode_handler.

arthurdenner avatar arthurdenner commented on May 29, 2024

Hi @asavchuk! 👋

This is not intended behavior but I don't think it's caused by this package as well since we just switch a property on the MaterialApp widget, which triggers a rebuild of the widgets.

Is this something you can reproduce during development - in an emulator or a device - or in production as well? Could you provide a reproducible example so that I can investigate?

My wild guess would be that the rebuild causes the keyboard to open but that would be up something to be fixed on the consumer side (your app) since this library doesn't enforce that.

from theme_mode_handler.

asavchuk avatar asavchuk commented on May 29, 2024

you are right, that's something with the code, look at this.
I commented LoginView(); although the logic does not invoke the LoginView() now (because at the beginning service.hasSignedUp == false is true hence SignUpFormPage() will be returned) and that behaviour with opened keyboard pad disapeared. how can it be?
About(); - is used just to complete else statement.

Next time when I open the app service.hasSignedUp will be true so LoginView(); will be executed - but as I said earlier in this case there was no issue I described.

...
home: Startup(),
        );
      },
    );
  }
}

class Startup extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final service = locator<LocalStorageService>();

    if (service.hasSignedUp == false) {
      return SignUpFormPage();
    } else {
      return About();
      // return LoginView();
    }
  }
}

from theme_mode_handler.

arthurdenner avatar arthurdenner commented on May 29, 2024

@asavchuk - hard to say, but check if there is some input on LoginView, maybe with autofocus.

I suppose you'd need to search for existing solutions or workarounds similar to your case on StackOverflow, maybe force the keyboard to be hidden on the same piece of code that updates the themeMode... it's a bit tricky for me to say.

I'm closing the issue since you've confirmed that it's not a problem on this package.

from theme_mode_handler.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.