Skip to content

how to initialize? #40

@nohkumado

Description

@nohkumado

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions