stow 0.1.2 copy "stow: ^0.1.2" to clipboard
stow: ^0.1.2 copied to clipboard

An abstraction to allow synchronous access to persistent data.

example/main.dart

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

final stows = Stows();

class Stows {
  final count = PlainStow.simple('count', 0);
  // ... add more stows as needed
}

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        body: Center(
          child: Column(
            children: [
              ValueListenableBuilder(
                valueListenable: stows.count,
                builder: (context, value, child) {
                  return Text('Count: $value');
                },
              ),
              ElevatedButton(
                onPressed: () => stows.count.value++,
                child: Text('Increment Count'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
0
points
69
downloads

Publisher

verified publisheradil.hanney.org

Weekly Downloads

An abstraction to allow synchronous access to persistent data.

Repository (GitHub)
View/report issues

Topics

#stow #storage #persistence

License

unknown (license)

Dependencies

flutter, meta, mutex

More

Packages that depend on stow