condora_automatic_getter_storage_directory 1.0.1 copy "condora_automatic_getter_storage_directory: ^1.0.1" to clipboard
condora_automatic_getter_storage_directory: ^1.0.1 copied to clipboard

A Flutter package that provides an automatic and platform-aware solution for managing storage directories across web and non-web platforms, handling both debug and release environments efficiently.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:hydrated_bloc/hydrated_bloc.dart';
import 'package:condora_automatic_getter_storage_directory/condora_automatic_getter_storage_directory.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  // Initialize Hydrated Bloc Storage dynamically.
  HydratedBloc.storage = await HydratedStorage.build(
    storageDirectory: await condoraAutomaticGetterStorageDirectory(
      webStorageDirectory: HydratedStorage.webStorageDirectory,
    ),
  );

  runApp(const MyApp());
}

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

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: Scaffold(
        body: Placeholder(),
      ),
    );
  }
}
0
likes
140
points
36
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package that provides an automatic and platform-aware solution for managing storage directories across web and non-web platforms, handling both debug and release environments efficiently.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, path_provider

More

Packages that depend on condora_automatic_getter_storage_directory