Don't copyWith a ThemeData in Flutter

from blog aarol.dev, | ↗ original
While reading the code of flutter apps, I’ve seen this particular piece of code repeated way too many times: return MaterialApp( theme: ThemeData.dark().copyWith( textTheme: ... ), home: ... ) This is problematic for a couple reasons that become clear when we take a peek at how ThemeData works. This is taken directly from the material...