63 lines
1.8 KiB
Dart
63 lines
1.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class RowWidgetWithSpacers extends StatefulWidget {
|
|
final Widget? widget1;
|
|
final Widget? widget2;
|
|
final Widget? widget3;
|
|
final Widget? widget4;
|
|
final Widget? widget5;
|
|
|
|
const RowWidgetWithSpacers(
|
|
this.widget1, this.widget2, this.widget3, this.widget4, this.widget5,
|
|
{super.key});
|
|
|
|
@override
|
|
State<RowWidgetWithSpacers> createState() => _RowWidgetWithSpacersState();
|
|
}
|
|
|
|
class _RowWidgetWithSpacersState extends State<RowWidgetWithSpacers> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
mainAxisAlignment: MainAxisAlignment.end,
|
|
children: [
|
|
Expanded(
|
|
flex: 5,
|
|
child: Padding(
|
|
padding:
|
|
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0),
|
|
child: widget.widget1 ?? Container(),
|
|
)),
|
|
Expanded(
|
|
flex: 5,
|
|
child: Padding(
|
|
padding:
|
|
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0),
|
|
child: widget.widget2 ?? Container(),
|
|
)),
|
|
Expanded(
|
|
flex: 5,
|
|
child: Padding(
|
|
padding:
|
|
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0),
|
|
child: widget.widget3 ?? Container(),
|
|
)),
|
|
Expanded(
|
|
flex: 5,
|
|
child: Padding(
|
|
padding:
|
|
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0),
|
|
child: widget.widget4 ?? Container(),
|
|
)),
|
|
Expanded(
|
|
flex: 5,
|
|
child: Padding(
|
|
padding:
|
|
const EdgeInsets.symmetric(vertical: 2.0, horizontal: 2.0),
|
|
child: widget.widget5 ?? Container(),
|
|
)),
|
|
],
|
|
);
|
|
}
|
|
}
|