fromAsset static method

Widget fromAsset(
  1. String assetPath
)

Implementation

static Widget fromAsset(String assetPath) => assetPath.isNotEmpty
    ? FutureBuilder(
        future: rootBundle.loadString(assetPath),
        builder: (context, snapshot) =>
            MarkdownWithHighlight(markdown: snapshot.data ?? "")
                .animate()
                .fade(),
      )
    : MarkdownWithHighlight(markdown: "");