SFResponsiveGrid constructor

SFResponsiveGrid({
  1. required List<Widget> children,
  2. int? mobileColumns,
  3. int? tabletColumns,
  4. int? desktopColumns,
  5. int? largeDesktopColumns,
  6. double? spacing,
  7. EdgeInsetsGeometry? margin,
  8. EdgeInsetsGeometry? padding,
  9. double? maxWidth,
  10. bool maximize = false,
  11. WrapAlignment alignment = WrapAlignment.start,
  12. double? runSpacing,
  13. 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',
  );
}