Solian/lib/widgets/centered_container.dart

23 lines
434 B
Dart
Raw Normal View History

2024-07-06 13:14:19 +00:00
import 'package:flutter/material.dart';
class CenteredContainer extends StatelessWidget {
final Widget child;
final double maxWidth;
const CenteredContainer({
super.key,
required this.child,
this.maxWidth = 720,
});
@override
Widget build(BuildContext context) {
return Center(
child: Container(
constraints: BoxConstraints(maxWidth: maxWidth),
child: child,
),
);
}
}