based_local_first_image 1.1.0 copy "based_local_first_image: ^1.1.0" to clipboard
based_local_first_image: ^1.1.0 copied to clipboard

A Based Widget For Building More Useful Avatar

based_local_first_image

『 based_local_first_image - Based Local First Image! 』

Latest update: 2023-10-03 15:55:26

📚 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_widget

🔦 Declaration #

License

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