You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
driver-app/lib/widgets/data_display/list/ListContainer.dart

40 lines
1013 B
Dart

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,
),
),
),
);
}
}