Jonathan Simon @jsimon.dev · Dec 31

🤯 Just had a massive Eureka moment revisiting Design Patterns. We often treat #Flutter’s BuildContext as some sort of "magic" variable, but while reading about the Strategy Pattern on refactoring.guru today, everything just clicked. Flutter applies this pattern beautifully. 🧵👇

1 likes 1 replies

?

Replies

Jonathan Simon · Dec 31

I was reading the definition of "Context" in the Strategy Pattern and found this: "The context isn’t responsible for selecting an appropriate algorithm... the client passes the desired strategy to the context. In fact, the context doesn’t know much about strategies." Sound familiar? 🤔