ResponsiveFramework icon indicating copy to clipboard operation
ResponsiveFramework copied to clipboard

Any way to remove space next to AppBar Title when leading is hidden?

Open kthecoder opened this issue 3 years ago • 0 comments

If you add the ResponsiveVisibility to an AppBar's 'leading' when you hide it, it takes up space with the "SizedBox.shrink". Since it won't be removed unless null.

leading: ResponsiveVisibility(
          hiddenWhen: const [Condition.largerThan(name: TABLET)],
          child: IconButton(
            icon: const Icon(Icons.menu),
            onPressed: () {},
          ),
        ),

But you can't assign null to a widget to disable it:

leading: ResponsiveVisibility(
          replacement: null,
          hiddenWhen: const [Condition.largerThan(name: TABLET)],
          child: IconButton(
            icon: const Icon(Icons.menu),
            onPressed: () {},
          ),
        ),

So is there any way to remove the space next to the title when leading is hidden?

kthecoder avatar Jan 03 '22 21:01 kthecoder