Giter VIP home page Giter VIP logo

flutter_redux_dev_tools's Introduction

flutter_redux_dev_tools

Build Status codecov

A Widget you can use to show a Redux Time Travel UI. Simply put it in a part of your UI that makes sense (Such as a Dev Tools Drawer), pass it a DevToolsStore and you'll be good to go!

Note: This Widget does not work with a normal Redux Store. It is meant to work with the redux_dev_tools package, which provides a DevToolsStore. The DevToolsStore is a drop-in replacement for your Store during Development!

Demo

A simple Flutter app that allows you to Increment and Decrement a counter.

A screenshot of the Dev Tools in Action

Usage

  1. Create a main_dev.dart file
  2. In this file, create a DevToolsStore in place of a normal redux Store
  3. Create a ReduxDevTools widget, passing through the Store. You can place this Widget wherever makes sense in your app! One good suggestion: In a "Dev Tools Drawer." This is generally the endDrawer in your Scaffold, and can contain different types of tools for a Dev Build of your app.

Example

This example paints only a broad outline of how to use the ReduxDevTools. For a complete example, see the example folder.

int addReducer(int state, action) => state + 1;

// Create a DevToolsStore instead of a normal Store during Development
final store = DevToolsStore<int>(
  addReducer,
  initialState: 0,
);

// Finally, create your app with a Redux Dev Tools
main() { 
  runApp(MaterialApp(
    home: Scaffold(
      endDrawer: ReduxDevTools<int>(store),
    ),
  ));
}

Credits

All of this is inspired by the original Redux Devtools.

flutter_redux_dev_tools's People

Contributors

brianegan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

flutter_redux_dev_tools's Issues

Cupertino app, ReduxDevTools UI will crash, maybe slider widget's problem?

The specific widget that could not find a MaterialLocalizations ancestor was: CommonScaffold
dependencies: [_LocalizationsScope-[GlobalKey#133d6]]
The ancestors of this widget were
CupertinoTabScaffold
dependencies: [CupertinoUserInterfaceLevel, _InheritedCupertinoTheme, MediaQuery]
state: _CupertinoTabScaffoldState#e4b2b
TabPage
state: _TabPage#9a5b2
CupertinoApp
state: _CupertinoAppState#95500
App
StoreProvider
ReduxDevToolsContainer
state: _ReduxDevToolsRecomputeState#6c19b

Add link to Dart pub

Hi! Thanks for making this.

I had trouble finding the right Dart package for this because the GitHub repository name is different. Could we remedy that?

A couple suggestions:

  • Add a link to the Dark package into the repo description
  • Add a link in the README
  • Add a portion of the readme that has a pubspec.yaml line on how to import.

Not a big issue, but a little cognitive friction for the consumer.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.