-
Notifications
You must be signed in to change notification settings - Fork 0
/
others_meassage.dart
50 lines (48 loc) · 1.49 KB
/
others_meassage.dart
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
import 'package:flutter/material.dart';
class OtherMsgWidget extends StatelessWidget {
final String sender, msg;
const OtherMsgWidget({Key? key, required this.sender, required this.msg})
: super(key: key);
@override
Widget build(BuildContext context) {
return Align(
alignment: Alignment.bottomLeft,
child: ConstrainedBox(
constraints: BoxConstraints(
maxWidth: MediaQuery.of(context).size.width - 60,
),
child: Card(
shape:
RoundedRectangleBorder(borderRadius: BorderRadius.circular(10)),
color: Colors.amber,
child: Padding(
padding: EdgeInsets.all(10),
child: Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
sender,
style: const TextStyle(
fontSize: 16,
fontWeight: FontWeight.bold,
color: Colors.red),
),
const SizedBox(
height: 3,
),
Text(
msg,
style: const TextStyle(
fontSize: 14,
fontWeight: FontWeight.bold,
color: Colors.black),
),
],
),
),
),
),
);
}
}