image_network 2.1.0 copy "image_network: ^2.1.0" to clipboard
image_network: ^2.1.0 copied to clipboard

outdated

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

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:image_network/image_network.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'ImageNetwork',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo ImageNetwork'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({Key? key, required this.title}) : super(key: key);
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  final String imageUrl =
      "https://scaffoldtecnologia.com.br/wp-content/uploads/2021/10/app-2.png";

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: ImageNetwork(
          image: imageUrl,
          height: 150,
          width: 150,
          duration: 1500,
          curve: Curves.easeIn,
          onPointer: true,
          cacheAndroidIos: true,
          fitAndroidIos: BoxFit.cover,
          fitWeb: BoxFitWeb.cover,
          borderRadius: BorderRadius.circular(70),
          onTap: () {
            debugPrint("©gabriel_patrick_souza");
          },
        ),
      ),
    );
  }
}
151
likes
0
pub points
96%
popularity

Publisher

unverified uploader

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

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

connectivity_plus, flutter, http, shared_preferences, webviewx

More

Packages that depend on image_network