Loading assets: Loading text assets

Loading text assets

Outside of a Widget context, or when a handle to an AssetBundle is not available, you can use rootBundle to directly load assets.

RootBundle

Object for easy access to the main asset bundle.

It is possible to load assets directly using the rootBundle global static from package:flutter/services.dart.

Loading assets: Loading text assets — Structure map

Clickable & Draggable!

Loading assets: Loading text assets — Related pages: