33 lines
933 B
Dart
33 lines
933 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class RowWidget extends StatefulWidget {
|
|
final Widget? widget1;
|
|
final Widget? widget2;
|
|
final Widget? widget3;
|
|
final Widget? widget4;
|
|
final Widget? widget5;
|
|
|
|
const RowWidget(
|
|
this.widget1, this.widget2, this.widget3, this.widget4, this.widget5,
|
|
{super.key});
|
|
|
|
@override
|
|
State<RowWidget> createState() => _RowWidgetState();
|
|
}
|
|
|
|
class _RowWidgetState extends State<RowWidget> {
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
children: [
|
|
Expanded(flex: 10, child: widget.widget1 ?? Container()),
|
|
Expanded(flex: 6, child: widget.widget2 ?? Container()),
|
|
Expanded(flex: 6, child: widget.widget3 ?? Container()),
|
|
Expanded(flex: 8, child: widget.widget4 ?? Container()),
|
|
Expanded(flex: 3, child: widget.widget5 ?? Container()),
|
|
],
|
|
);
|
|
}
|
|
}
|