📜  在 imageprovider flutter 中加载 svg - Dart 代码示例

📅  最后修改于: 2022-03-11 14:48:02.302000             🧑  作者: Mango

代码示例2
// ImageProvider does not support SvgPicture.asset()
// the following code will throw an error because flutter_svg package is not compatible with image provider

Container(
  decoration: BoxDecoration(
    image: DecorationImage(
      image: SvgPicture.asset(''),
    ),
  ),
),

// instead, you can use flutter_svg_provider package. It suppports image provider