1
0
mirror of https://github.com/nrop19/weiman_app.git synced 2025-08-02 23:05:48 +08:00
weiman_app/lib/widgets/utils.dart
2020-11-07 21:18:42 +00:00

46 lines
1.0 KiB
Dart

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
class TextDivider extends StatelessWidget {
final String text;
final double leftPadding, padding;
final List<Widget> actions;
const TextDivider({
Key key,
@required this.text,
this.padding = 5,
this.leftPadding = 15,
this.actions = const [],
}) : super(key: key);
@override
Widget build(BuildContext context) {
return Container(
padding:
EdgeInsets.only(left: leftPadding, top: padding, bottom: padding),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
children: [
Expanded(child: Text(text, style: TextStyle(color: Colors.grey))),
...actions,
],
),
);
}
}
Widget oldBookAvatar({
String text = '\n\n',
width = double.infinity,
height = double.infinity,
}) {
return Container(
width: width,
height: height,
alignment: Alignment.center,
color: Colors.greenAccent,
child: Text(text),
);
}