visual_cache 1.1.1 copy "visual_cache: ^1.1.1" to clipboard
visual_cache: ^1.1.1 copied to clipboard

PlatformAndroidiOS
outdated

Visual Cache was created to help you see how much cache your application has accumulated.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Visual cache Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.greenAccent),
        useMaterial3: true,
      ),
      home: const VisualCacheDemo(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Visual cache demo'),
      ),
      body: const Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            Text(
              'Cache size',
              style: TextStyle(fontSize: 24),
            ),
            SizedBox(height: 70),
            VisualCache(
              /// 'Path to subdirectories ': 'Custom name subdirectories'
              namedSubdirectories: {
                'NewFolder': 'Images',
                'NewFolder2': 'Videos',
                'NewFolder3': 'File',
              },

              /// Custom colors subdirectories
              colorSubdirectories: [
                Colors.amberAccent, // Images color
                Colors.deepOrange, // Videos color
                Colors.deepPurpleAccent, // File color
                Colors
                    .teal, // Add a final color for "Rest Cache" if you don't want it to be determined by itself
              ],
              showLegends: true, // Enable disable display of directory names
              isRealTime: true, // Enable disable realtime cache
              /// Custom text style
              textStyle: TextStyle(
                color: Colors.black
              ),
            )
          ],
        ),
      ),
    );
  }
}
5
likes
150
points
50
downloads

Documentation

API reference

Publisher

verified publishersmollaitc.org

Weekly Downloads

Visual Cache was created to help you see how much cache your application has accumulated.

Repository (GitHub)
View/report issues

Topics

#visual-cache #cache #image-picker #files

License

BSD-3-Clause (license)

Dependencies

flutter, path_provider, pie_chart

More

Packages that depend on visual_cache

Packages that implement visual_cache