wrap static method

Widget wrap(
  1. Widget child, {
  2. required bool enabled,
})

Enable inherited scaling for standalone content, or suppress it when an enclosing paragraph owns scaling. The enabled path adds no widget.

Implementation

static Widget wrap(Widget child, {required bool enabled}) =>
    enabled ? child : MediaQuery.withNoTextScaling(child: child);