QC Flutter: 10/21/2020

Community Updates

Tonight's topic

Refactoring Excuses with Commands + GetIt

What is a command?

  • A behavioral design pattern
  • Include everything needed to perform a deferred action
  • Encapsulated in an object instance with a run/execute call.

Benefits of commands

  • Decouple invocation from execution
  • Simplifies responsibilities
  • Easy to extend
  • Easier to test

Anatomy

Anatomy in Flutter

  • Widget is the invoker
  • Repository & Blocs are receivers

Show me the code

Prior art

QC Flutter: 10/21/2020

By Ryan Edge

QC Flutter: 10/21/2020

Topic: Refactoring Excuses to use Commands + GetIt

  • 209