mirror of
https://gitlab.com/comunic/comunicmobile
synced 2024-11-29 16:26:27 +00:00
25 lines
538 B
Dart
25 lines
538 B
Dart
|
import 'package:flutter/material.dart';
|
||
|
|
||
|
/// Here is a widget used to contain a post
|
||
|
///
|
||
|
/// @author Pierre Hubert
|
||
|
|
||
|
class PostContainer extends StatelessWidget {
|
||
|
final Widget child;
|
||
|
|
||
|
const PostContainer({Key key, @required this.child})
|
||
|
: assert(child != null),
|
||
|
super(key: key);
|
||
|
|
||
|
@override
|
||
|
Widget build(BuildContext context) {
|
||
|
return Align(
|
||
|
alignment: Alignment.center,
|
||
|
child: ConstrainedBox(
|
||
|
constraints: BoxConstraints.loose(Size.fromWidth(500)),
|
||
|
child: child,
|
||
|
),
|
||
|
);
|
||
|
}
|
||
|
}
|