Added initState() to downloader_menu.dart to fetch prefWorkingDirectory
This commit is contained in:
parent
5836d15654
commit
dd9975c435
|
|
@ -13,6 +13,18 @@ class DownloaderMenu extends StatefulWidget {
|
|||
}
|
||||
|
||||
class _DownloaderMenuState extends State<DownloaderMenu> with PreferencesMixin {
|
||||
@override
|
||||
void initState() {
|
||||
super.initState();
|
||||
getPreference(prefWorkingDirectory).then((pref) {
|
||||
if (pref is String) {
|
||||
setState(() {
|
||||
Directory.current = pref;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Expanded(
|
||||
|
|
|
|||
Loading…
Reference in New Issue