Upgrading flutter_easyloading to 4.x Leaks MaterialApp's Error TextStyle into Cupertino Popups
A dependency upgrade that ships a silent styling regression can waste hours of debugging. This particular bug is insidious because the visual breakage — giant red underlined text — looks like a development-mode artifact, not a production library change, and the package changelog gave no warning.
Upgrading flutter_easyloading from 3.0.5 to 4.x triggers a visual regression where Cupertino modal popups render text in Flutter's internal error TextStyle: 48px red monospace with yellow double underlines. The bug surfaces without any code changes to the app itself.
The root cause is a change in how the package wraps the widget tree. Version 3.0.5 used a plain `Material` widget that provided the default theme text style. Version 4.x explicitly sets `textStyle: DefaultTextStyle.of(context).style`, which resolves to `_errorTextStyle` from `MaterialApp` — the fallback style Flutter uses when a widget lacks a proper `Material` ancestor.
A Cupertino modal popup route sits as a sibling to the main page route inside the Navigator's Overlay, so it does not inherit the page's own `Material` text environment. Instead, it picks up whatever `Material` the EasyLoading wrapper provides, which now carries the error style. The fix is a one-liner in EasyLoading's initialization builder that forces `DefaultTextStyle` back to the theme's body style.
Flutter's _errorTextStyle is a deliberately ugly fallback meant to catch missing Material ancestors during development, but a library wrapping MaterialApp can accidentally promote it into production UI.
The Overlay-based routing model means popups and dialogs do not inherit the visual context of the page that triggers them; they inherit from whatever sits above the Navigator, making wrapper libraries a single point of styling failure.
A changelog that omits behavioral changes to the widget tree structure leaves consumers blind to regressions that only manifest in specific widget combinations like Cupertino popups.