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

A cache helper to easily store custom models and write minimum amount of hive related code.

example/lib/main.dart

import 'package:example/features/books/view/book_view.dart';
import 'package:example/project/hive_constants.dart';
import 'package:example/project/project_constants.dart';
import 'package:example/project/project_globals.dart';
import 'package:example/project/theme.dart';
import 'package:flutter/material.dart';
import 'package:hive_flutter/hive_flutter.dart';

void main() async{
  //initialize Hive before using
  await Hive.initFlutter(HiveConstants.hiveDbName);

  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: ProjectConstants.appTitle,
      debugShowCheckedModeBanner: false,
      theme: ProjectTheme().theme,
      scaffoldMessengerKey: snackBarKey,
      home: const BookView(),
    );
  }
}
2
likes
140
pub points
76%
popularity

Publisher

unverified uploader

A cache helper to easily store custom models and write minimum amount of hive related code.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, flutter_secure_storage, hive, hive_flutter

More

Packages that depend on hive_cache_manager