SFResponsiveColumn class

Un widget qui s'adapte automatiquement à différentes tailles d'écran en ajustant sa largeur.

Permet de définir des largeurs différentes selon le breakpoint (mobile, tablette, desktop, grand desktop). Cette colonne peut être utilisée comme enfant direct d'un SFResponsiveRow ou comme widget autonome.

Paramètres:

  • child : Widget à afficher dans la colonne.
  • xs : Nombre de colonnes à occuper sur les écrans mobiles (0-12).
  • sm : Nombre de colonnes à occuper sur les écrans tablettes. Si null, utilise xs.
  • md : Nombre de colonnes à occuper sur les écrans desktop. Si null, utilise sm ou xs.
  • lg : Nombre de colonnes à occuper sur les grands écrans. Si null, utilise md, sm ou xs.
  • padding : Espacement interne de la colonne.
  • decoration : Décoration visuelle de la colonne.
  • alignment : Alignement du contenu dans la colonne.

Exemple d'utilisation:

SFResponsiveRow(
  children: [
    SFResponsiveColumn(
      xs: 12,     // Pleine largeur sur mobile
      sm: 6,      // Demi-largeur sur tablette
      md: 4,      // Tiers de largeur sur desktop
      lg: 3,      // Quart de largeur sur grand écran
      padding: EdgeInsets.all(16.0),
      decoration: BoxDecoration(
        color: Colors.grey[200],
        borderRadius: BorderRadius.circular(8.0),
      ),
      child: Text('Contenu responsive'),
    ),
    SFResponsiveColumn(
      xs: 12,
      sm: 6,
      child: Text('Autre colonne'),
    ),
  ],
)
Inheritance

Constructors

SFResponsiveColumn({required Widget child, int? xs, int? sm, int? md, int? lg, EdgeInsetsGeometry? padding, BoxDecoration? decoration, Alignment? alignment, Key? key})
const

Properties

alignment Alignment?
final
child Widget
final
decoration BoxDecoration?
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
lg int?
final
md int?
final
padding EdgeInsetsGeometry?
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sm int?
final
xs int?
final

Methods

build(BuildContext context) Widget
Describes the part of the user interface represented by this widget.
override
createElement() StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) String
Returns a one-line detailed description of the object.
inherited
toStringShort() String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited