selected_item.dart
1.25 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
import 'package:flutter/material.dart';
import 'package:Parlando/res/resources.dart';
class SelectedItem extends StatelessWidget {
const SelectedItem({
Key? key,
this.onTap,
required this.title,
this.content = '',
this.textAlign = TextAlign.start,
this.style
}): super(key: key);
final GestureTapCallback? onTap;
final String title;
final String content;
final TextAlign textAlign;
final TextStyle? style;
@override
Widget build(BuildContext context) {
return InkWell(
onTap: onTap,
child: Container(
height: 50.0,
margin: const EdgeInsets.only(right: 8.0, left: 16.0),
width: double.infinity,
decoration: BoxDecoration(
border: Border(
bottom: Divider.createBorderSide(context, width: 0.6),
),
),
child: Row(
children: <Widget>[
Text(title),
Gaps.hGap16,
Expanded(
child: Text(
content,
maxLines: 2,
textAlign: textAlign,
overflow: TextOverflow.ellipsis,
style: style
),
),
Gaps.hGap8,
Images.arrowRight
],
),
),
);
}
}