Decoupling logic from UI in Flutter application

Anton Klimenko
8 min readNov 16, 2020
Photo by Kelly Sikkema on Unsplash

Introduction

Recently I worked on a Flutter project. I started with the UI definition. Then I extended the application with user interaction handlers and business logic rules. In no time, the widget classes became polluted. The readability and reusability of the code were low. But the major problem was testing. I could not validate business rules without launching the whole…

--

--