I am trying to create a nested enum in flutter/dart. it will serve as a structure to use as keys in certain maps holding their values. something like this :
enum Settings{
WIFI_SETTINGS,
UI_SETTINGS,
STORAGE_SETTING {
FTP_SETTINGS {
HOST,
PORT,
KEY
},
DB_SETTING {
TYPE,
HOST,
PORT,
UNAME,
PWD
}
}
}
then to be able to use it like this
Map AllSettings = Map<Settings,dynamic>();
print(AllSettings[Settings.WIFI_SETTINGS]);
print(AllSettings[Settings.STORAGE_SETTING.FTP_SETTINGS.PORT]);
Clearly the above code is not acceptable within dart, is there anyway of achieving this ?