SFResponsiveGrid constructor
SFResponsiveGrid({
- required List<
Widget> children, - int? mobileColumns,
- int? tabletColumns,
- int? desktopColumns,
- int? largeDesktopColumns,
- double? spacing,
- EdgeInsetsGeometry? margin,
- EdgeInsetsGeometry? padding,
- double? maxWidth,
- bool maximize = false,
- WrapAlignment alignment = WrapAlignment.start,
- double? runSpacing,
- Key? key,
Implementation
SFResponsiveGrid({
required this.children,
this.mobileColumns,
this.tabletColumns,
this.desktopColumns,
this.largeDesktopColumns,
this.spacing,
this.margin,
this.padding,
this.maxWidth,
this.maximize = false,
this.alignment = WrapAlignment.start,
this.runSpacing,
super.key,
}) {
// Validation des colonnes
assert(
mobileColumns == null || mobileColumns! > 0,
'Le nombre de colonnes doit être positif',
);
assert(
tabletColumns == null || tabletColumns! > 0,
'Le nombre de colonnes doit être positif',
);
assert(
desktopColumns == null || desktopColumns! > 0,
'Le nombre de colonnes doit être positif',
);
assert(
largeDesktopColumns == null || largeDesktopColumns! > 0,
'Le nombre de colonnes doit être positif',
);
}