Skip to content

Instantly share code, notes, and snippets.

@bounty1342
Created March 8, 2020 21:34
Show Gist options
  • Save bounty1342/82af8a386e51984ddf57bd492775db0a to your computer and use it in GitHub Desktop.
Save bounty1342/82af8a386e51984ddf57bd492775db0a to your computer and use it in GitHub Desktop.
Assets
/*
- assets
- images
- root
- rlogo_small.png
- rlogo_full.png
- onboarding
- logo_small.png
- logo_full.png
- login
- bar
- bar.png
- icon.png
- button
- icon.png
- button.png
- svg
- background.svg
*/
class Assets {
static Images _image = Images();
static Svg _svg = Svg();
static Images get images => _image;
static Svg get svg => _svg;
}
class Images {
static Root _root = Root();
static Onboarding _onboarding = Onboarding();
static Login _login = Login();
Root get root => _root;
Onboarding get onboarding => _onboarding;
Login get login => _login;
}
class Svg {
static const String _background = 'assets/svg/background.png';
String get background => _background;
}
class Root {
static const String _rlogo_small = 'assets/image/root/rlogo_small.png';
static const String _rlogo_full = 'assets/image/root/rlogo_full.png';
String get rlogo_small => _rlogo_small;
String get rlogo_full => _rlogo_full;
}
class Onboarding {
static const String _rlogo_small = 'assets/image/onboarding/rlogo_small.png';
static const String _rlogo_full = 'assets/image/onboarding/rlogo_full.png';
String get rlogo_small => _rlogo_small;
String get rlogo_full => _rlogo_full;
}
class Login {
static Bar _bar = Bar();
static Button _button = Button();
Bar get bar => _bar;
Button get button => _button;
}
class Bar {
static const String _icon = 'assets/image/bar/buton/icon.png';
static const String _button = 'assets/image/bar/buton/button.png';
String get icon => _icon;
String get button => _button;
}
class Button {
static const String _icon = 'assets/image/login/buton/icon.png';
static const String _button = 'assets/image/login/buton/button.png';
String get icon => _icon;
String get button => _button;
}
Future<void> main() async {
print(Assets.images.root.rlogo_small);
print(Assets.images.root.rlogo_small);
print(Assets.images.onboarding.rlogo_small);
print(Assets.images.onboarding.rlogo_small);
print(Assets.images.login.bar.icon);
print(Assets.images.login.bar.button);
print(Assets.images.login.button.icon);
print(Assets.images.login.button.button);
print(Assets.svg.background);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment