3
0
Fork 0
trifid_mobile/lib/components/config/ConfigItem.dart

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
996 B
Dart
Raw Permalink Normal View History

2020-07-27 20:43:58 +00:00
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:mobile_nebula/services/utils.dart';
class ConfigItem extends StatelessWidget {
const ConfigItem(
{Key? key,
this.label,
required this.content,
this.labelWidth = 100,
this.crossAxisAlignment = CrossAxisAlignment.center})
2020-07-27 20:43:58 +00:00
: super(key: key);
final Widget? label;
2020-07-27 20:43:58 +00:00
final Widget content;
final double labelWidth;
final CrossAxisAlignment crossAxisAlignment;
@override
Widget build(BuildContext context) {
return Container(
color: Utils.configItemBackground(context),
padding: EdgeInsets.only(top: 2, bottom: 2, left: 15, right: 10),
constraints: BoxConstraints(minHeight: Utils.minInteractiveSize),
child: Row(
crossAxisAlignment: crossAxisAlignment,
children: <Widget>[
Container(width: labelWidth, child: label),
Expanded(child: content),
],
));
}
}