cached_svg_image 0.0.7 copy "cached_svg_image: ^0.0.7" to clipboard
cached_svg_image: ^0.0.7 copied to clipboard

This using package svg network image cached in reusable for image

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Cached SVG Image',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(title: 'Cached SVG Image Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});

  final String title;

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

class _MyHomePageState extends State<MyHomePage> {

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: Text(widget.title),
      ),
      body: const Center(
        child: CachedNetworkSvgImage(
          url: "https://upload.wikimedia.org/wikipedia/commons/4/44/Google-flutter-logo.svg", loadingGif: '{your loading assets}',
        ),
      ),
    );
  }
}
1
likes
150
points
167
downloads

Publisher

unverified uploader

Weekly Downloads

This using package svg network image cached in reusable for image

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_cache_manager, flutter_svg

More

Packages that depend on cached_svg_image