store_ds 1.0.13

  • Readme
  • Changelog
  • Example
  • Installing
  • 68

Store Ds

Fast, enjoyable, declaratively and functionally state management in flutter

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

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) {

  // changeStore
  useStore('orders') ;

  saveToStore('cod', 10);
  saveToStore( 'cod' , getFromStore('cod' ) * 2); // results in cod : 20

  return Container(child: Text(getFromStore('cod').toString()));
}

Store❤️ Flutter #

Store was written with Flutter in mind. It is a perfect fit for managing primitive variables that don't need type inference like strings and ints:

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:
  store_ds: ^1.0.13

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:store_ds/store_ds.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
37
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
68
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.15

Analysis suggestions

Package not compatible with SDK dart

Because:

  • store_ds that is a package requiring null.

Health issues and suggestions

Document public APIs. (-1 points)

22 out of 22 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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.7.0 <3.0.0
Dev dependencies
flutter_test