process method

Future process(
  1. Map moduleStore
)

@param moduleStore the copy of module store your action's module indicates you can use this action's payload data, deal with it or fetch api or something else when finished , you need return a Map that tell me which property was modified of the module store eg. // outside you have a module store like this: { 'name': 'reaction' }; // once you wanner rename 'reaction' to 'flutter-reaction' doAction(RenameAction('flutter-reaction')); // then in the class RenameAction's process method, code is like: Future process(Map moduleStore) async { bool renameOk = await fetch(someApi); if (renameOk) { // server said we rename succeed return {'name': this.payload} // this.payload's value is 'flutter-reaction' // then the module store's property name will be modified to 'flutter-reaction' // if your widget is inherits ModuleState class, it will fresh render with the new 'name' value which is 'flutter-reaction' } return {}; // server fail, so return a blank map to tell me nothing was modified }

Implementation

Future<dynamic> process(Map moduleStore) async {
  return {};
}