//access to a Constant if it was like another language
ImageWeather.Desktop.cloud;
//What i wanted ( not working because there is no inner class)
class ImageWeather {
class Desktop {
static const String cloud = 'assets/images/DesktopCloud.png';
static const String noCloud = 'assets/images/DesktopNoCloud.png';
static const String rain = 'assets/images/DesktopRain.png';
}
class Phone{
static const String cloud = 'assets/images/PhoneCloud.png';
static const String noCloud = 'assets/images/PhoneNoCloud.png';
static const String rain = 'assets/images/PhoneRain.png';
}
}
//access to a String like an inner class with new …
Run Code Online (Sandbox Code Playgroud)