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

how to initialize? #40

Open
nohkumado opened this issue Jul 13, 2022 · 0 comments
Open

how to initialize? #40

nohkumado opened this issue Jul 13, 2022 · 0 comments

Comments

@nohkumado
Copy link

Hello!
i like the preference screen i can make with this, but am stuck with an annoying problem....
my main dart starts with :

 SharedPreferences prefs = await SharedPreferences.getInstance();
   WidgetsFlutterBinding.ensureInitialized();
....

but on my welcome screen where i display a setting:

Widget build(BuildContext context) {
Settings().getString( 'key-filename', 'none' ).then((value) {
			print("retrieved filename : $fname");
			fname= value!;
		});

on start returns "none" i need to explicitely go to the settings screen and return back to the home screen to have this filled correctly??

what am i doing wrong here?

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

No branches or pull requests

1 participant