Accessing Assets ๐ท
If you're used to adding assets in raw string format in Flutter, then this section is for you. ๐
- We're using the flutter_gen package for utilizing code generation for our assets. The code that you used to write like this :
Image.asset("assets/demo.png")
Will be replaced like this :
Assets.images.demo.image()
To use assets like the code above, follow the steps:
-
Add the assets in the assets folder in the app_ui package. ๐คท
-
Run the build runner command:
melos run asset-gen
-
Now you can use assets in the DashingKit project as shown.