FLUTTER ECOSYSTEM

brianegan/flutter_redux_dev_tools

Um depurador Redux com viagem no tempo para Flutter

Capa do projeto flutter_redux_dev_tools
Stars
40
Forks
9
Último push (UTC)
28 de abr. de 2022
Status do projeto
Ativo
Brian Egan GitHub avatar
GITHUB User

Brian Egan ↗

Montana boy living in the UK.

Lake District, UKSite oficial ↗
LinguagensMakefileDartCMakeC++HTMLCSwiftKotlinObjective-C

Tópicos técnicos

Pacotes publicados por este repositório

Dependências usadas

Lista de dependências 6 itens
  • flutter{"sdk":"flutter"}
  • flutter_redux>=0.8.2 <0.11.0
  • redux>=5.0.0 <6.0.0
  • redux_dev_tools>=0.7.0 <0.8.0
  • flutter_testDesenvolvimento{"sdk":"flutter"}
  • pedanticDesenvolvimento1.11.0

README original

Texto original em inglês. Visite o GitHub para a versão atual.

Expandir / recolher README

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.