In the future, this mechanism might be extended to Then the graphics/my_icon.png, graphics/background.pngĪnd graphics/dark/background.png files are also included.įlutter uses asset variants when choosing resolution-appropriate Included in the asset bundle along with the specified asset.įor example, if you have the following files in The build process looks for any files with the same The build process supports the notion of asset variants:ĭifferent versions of an asset that might be displayed ( assets in first example or directory in the aboveĭuring a build, Flutter places assets into a specialĪrchive called the asset bundle that apps read The order in which the assets areĭeclared doesn’t matter. (relative to the pubspec.yaml file) where the assetįile is located. Specifies files that should be included with the app.Įach asset is identified by an explicit path The assets subsection of the flutter section To add files located in subdirectories, create There are files with the same name inside a subdirectory Only files located directly in the directory are included unless Flutter : assets : - directory/ - directory/subdirectory/