mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Create post container
This commit is contained in:
24
lib/ui/widgets/post_container_widget.dart
Normal file
24
lib/ui/widgets/post_container_widget.dart
Normal file
@ -0,0 +1,24 @@
|
||||
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,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user