of_cache 0.0.1 copy "of_cache: ^0.0.1" to clipboard
of_cache: ^0.0.1 copied to clipboard

of_cache is a convenient storage/cache kit for flutter.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';
import 'dart:ui';

import 'package:flutter/services.dart';
import 'pages/kv_storage_demo.dart';

void main() => runApp(MyApp());

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

  final List dataSource = [
    [
      'of_kv_storage Demo',
      KVStorageDemoPage(),
    ],
    [
      'of_disk_cache Demo',
    ],
    [
      'of_memory_cache Demo',
    ]
  ];

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: Text("of_cache Demo")),
        body: ListView.builder(
          itemCount: 3,
          itemBuilder: (BuildContext context, int index) {
            return ListTile(
              title: Text(dataSource[index][0]),
              onTap: () {
                if (dataSource[index].length == 1) return;
                Navigator.of(context).push(MaterialPageRoute(
                    builder: (context) => dataSource[index][1]));
              },
            );
          },
        ),
      ),
    );
  }
}
0
likes
30
pub points
0%
popularity

Publisher

unverified uploader

of_cache is a convenient storage/cache kit for flutter.

Repository (GitHub)
View/report issues

License

MIT (LICENSE)

Dependencies

flutter, of_logger, path, sprintf, sqflite

More

Packages that depend on of_cache