Mooyeee / image_network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🌐 Image Network

Image Network is a package that allows you to render images on the web using CanvasKit without having problems with CORS.

Build

📚 Features

  • Image Manager (Android - iOS - Web)
  • Use the CanvasKit renderer
  • No problems with CORS
  • Fast loading
  • Image cache (Android && iOS)
    • Recommended using with CachedNetworkImage version 2.2.0 or newer
  • Image from Url:
    • (Web) accept http or https image
    • (Android && iOS) accept https images
  • Supported Image Formats
    • PNG
    • JPEG
    • GIF / Animated GIF

🔌 Installation

Add image_network as a dependency in your pubspec.yaml file .

Import Image Network:

import 'package:image_network/image_network.dart';

👨‍💻 How To Use

URL Image

String imageUrl = "https://scaffoldtecnologia.com.br/wp-content/uploads/2021/10/app-2.png";

Image Network

ImageNetwork(
    image: imageUrl,
    imageCache: CachedNetworkImageProvider(imageUrl),
    height: 150,
    width: 150,
    duration: 1500,
    curve: Curves.easeIn,
    onPointer: true,
    debugPrint: false,
    fullScreen: false,
    fitAndroidIos: BoxFit.cover,
    fitWeb: BoxFitWeb.cover,
    borderRadius: BorderRadius.circular(70),
    onLoading: const CircularProgressIndicator(
      color: Colors.indigoAccent,
    ),
    onError: const Icon(
      Icons.error,
      color: Colors.red,
    ),
    onTap: () {
      debugPrint("©gabriel_patrick_souza");
    },
  )

☀️ License

Copyright (c) 2021 Gabriel Patrick Souza

MIT License

About

License:MIT License


Languages

Language:Dart 36.1%Language:C++ 35.5%Language:CMake 17.4%Language:HTML 8.3%Language:C 1.6%Language:Swift 0.9%Language:Kotlin 0.3%Language:Objective-C 0.1%