|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
class ListContainer extends StatelessWidget {
|
|
|
|
|
final double widthFactor;
|
|
|
|
|
final double heightFactor;
|
|
|
|
|
final EdgeInsets padding;
|
|
|
|
|
final Widget child;
|
|
|
|
|
|
|
|
|
|
ListContainer({
|
|
|
|
|
Key key,
|
|
|
|
|
this.widthFactor = 0.9,
|
|
|
|
|
this.heightFactor = 1,
|
|
|
|
|
this.padding,
|
|
|
|
|
this.child,
|
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
@override
|
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
|
return FractionallySizedBox(
|
|
|
|
|
widthFactor: widthFactor,
|
|
|
|
|
heightFactor: heightFactor,
|
|
|
|
|
child: ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(8.0),
|
|
|
|
|
child: Material(
|
|
|
|
|
color: Theme.of(context).backgroundColor,
|
|
|
|
|
child: Container(
|
|
|
|
|
padding: padding,
|
|
|
|
|
width: double.infinity,
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
border: Border.all(
|
|
|
|
|
color: Theme.of(context).dividerColor, width: 2.0),
|
|
|
|
|
borderRadius: BorderRadius.circular(8.0)),
|
|
|
|
|
child: child,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
}
|