rx_store_ds 0.0.5

  • Readme
  • Changelog
  • Example
  • Installing
  • new56

Store Ds

Fast, enjoyable, declaratively and functionally state management in flutter

You can also view a video demonstration if are a video person

Rx Store Ds #

An awesome Flutter package to manage state of program declaratively and functionally.

Inspiration #

This package is inspired from javascript way of storing objects in map like structures.

Usage #

You can use store_ds to manage state as follows.

Widget build(BuildContext context) {
  useStore('rootStore');
  
  listenToStore(
      'hello',
      RxCommand.createSync<String, String>((param) => param + param),
      'rootStore');

  listenToStore(
      'pommello', RxCommand.createSync<int, int>((param) => param + param));

  getFromRxStore<String, String>(
    'hello',
  ).listen((value) {
    print(value);
  });

  getFromRxStore<int, int>(
    'pommello',
  ).listen((value) {
    print(value);
  });

  saveToStore('hello', 'value');
  saveToStore('pommello', 5);
  logRxStore();

Store❤️ Flutter #

Store was written with Flutter in mind. It is a perfect fit for managing variables:

Licence #

Copyright 2020 Chetan Jain

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

[0.0.1] - June 4 2020 #

  • Created store_ds to manage state of program declaratively and functionally.

[1.0.0] - June 5 2020 #

  • Added feature for multiple store "Added feature for multiple store"

[1.0.1] - June 5 2020 #

  • Added example

[1.0.2] - June 5 2020 #

  • Fixed Bugs

[1.0.3] - June 5 2020 #

  • Added features

example/lib/main.dart

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

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

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Material App',
      home: Scaffold(
        appBar: AppBar(
          title: Text('Dev Delight'),
        ),
        body: Home(),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  rx_store_ds: ^0.0.5

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:rx_store_ds/rx_store_ds.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
24
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
56
Learn more about scoring.

We analyzed this package on Jul 2, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Analysis suggestions

Package not compatible with SDK dart

because of import path [rx_store_ds] that is in a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

11 out of 11 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/rx_store.dart.

Run flutter format to format lib/rx_store.dart.

Maintenance issues and suggestions

Use constrained dependencies. (-20 points)

The pubspec.yaml contains 1 dependency without version constraints. Specify version ranges for the following dependencies: rx_command.

Package is pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
rx_command any 5.1.0+test
store_ds ^1.0.13 1.0.13
Transitive dependencies
quiver_hashcode 2.0.0
rxdart 0.24.1
Dev dependencies
flutter_test