发布于 5年前

flutter缓存网络图片

// pubspec.yaml
dependencies:
    cached_network_image: ^1.1.1

// xxxPage.dart
import 'package:cached_network_image/cached_network_image.dart';

Container(
    child: Image(
            width: 40.0,
            height: 40.0,
            image: CachedNetworkImageProvider("https://www.pianduan.fun/logo.png")
        )
)
©2020 edoou.com   京ICP备16001874号-3