based_local_first_image

γ€Ž based_local_first_image - Based Local First Image! 』

πŸ“š Introduction

πŸ“¦ How to use

πŸ§‘β€πŸ’» Contributor

πŸ”¦ Declaration


πŸ“š Introduction

Welcome to the world of local-first web development.

πŸ“¦ How to use

  • Follow Installing to add based_local_first_image to your pubspec.yaml
Image(
  image: BasedLocalFirstImage(
    filename: '$index.png',
    localDirectory: path.join(appSupport.path, 'image'),
    remoteUrl: 'https://avatars.githubusercontent.com/u/$index?v=4',
  ),
  errorBuilder: (context, error, stackTrace) => const Placeholder(),
  loadingBuilder: (context, child, loadingProgress) {
    if (loadingProgress == null) {
      return child;
    }
    return CircularProgressIndicator(
      value: loadingProgress.expectedTotalBytes != null
          ? loadingProgress.cumulativeBytesLoaded /
              loadingProgress.expectedTotalBytes!
          : null,
    );
  },
),

πŸ§‘β€πŸ’» Contributor

based_flutter

πŸ”¦ Declaration

License

This project is licensed under the terms of the MIT license. See LICENSE for more details