0 purchases
switchable padding
Widget that switches Padding for a given width for Responsive support.
Getting started #
In your library add the following import:
import 'package:switchable_padding/switchable_padding.dart';
copied to clipboard
Place the Widget for which you wish to adjust the Padding to be given as a child element of SwitchablePadding.
SwitchablePadding(
padding: (width) {
if (width < 600) {
return const EdgeInsets.all(0);
} else {
return const EdgetInsets.all(16);
}
},
child: Text('Hello World'),
),
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.