attachment lint

This commit is contained in:
Deven Joshi
2021-05-04 16:58:03 +05:30
parent f236d92840
commit edba3d2ad5
2 changed files with 15 additions and 21 deletions
@@ -192,8 +192,7 @@ class AttachmentActionsModal extends StatelessWidget {
VoidCallback? onTap, {
Color? color,
Key? key,
}) {
return Material(
}) => Material(
key: key,
color: StreamChatTheme.of(context).colorTheme.white,
child: InkWell(
@@ -216,7 +215,6 @@ class AttachmentActionsModal extends StatelessWidget {
),
),
);
}
Widget _buildDownloadProgressDialog(
BuildContext context,
@@ -245,7 +243,7 @@ class AttachmentActionsModal extends StatelessWidget {
),
child: Center(
child: progress == null
? Container(
? SizedBox(
height: 100,
width: 100,
child: StreamSvgIcon.error(
@@ -253,7 +251,7 @@ class AttachmentActionsModal extends StatelessWidget {
),
)
: progress.toProgressIndicatorValue == 1.0
? Container(
? SizedBox(
key: Key('completedIcon'),
height: 160,
width: 160,
@@ -261,7 +259,7 @@ class AttachmentActionsModal extends StatelessWidget {
color: theme.colorTheme.greyGainsboro,
),
)
: Container(
: SizedBox(
height: 100,
width: 100,
child: Stack(
@@ -812,8 +812,7 @@ class MessageInputState extends State<MessageInput> {
final renderBox = context.findRenderObject() as RenderBox;
final size = renderBox.size;
return OverlayEntry(builder: (context) {
return Positioned(
return OverlayEntry(builder: (context) => Positioned(
bottom: size.height + MediaQuery.of(context).viewInsets.bottom,
left: 0,
right: 0,
@@ -821,8 +820,7 @@ class MessageInputState extends State<MessageInput> {
tween: Tween(begin: 0, end: 1),
duration: Duration(milliseconds: 300),
curve: Curves.easeInOutExpo,
builder: (context, val, wid) {
return Transform.scale(
builder: (context, val, wid) => Transform.scale(
scale: val,
child: Padding(
padding: const EdgeInsets.all(8),
@@ -869,7 +867,7 @@ class MessageInputState extends State<MessageInput> {
],
),
),
SizedBox(
const SizedBox(
height: 10,
),
...commands
@@ -878,21 +876,21 @@ class MessageInputState extends State<MessageInput> {
onTap: () {
_setCommand(c);
},
child: Container(
child: SizedBox(
height: 40,
child: Row(
children: [
SizedBox(
const SizedBox(
width: 16,
),
_buildCommandIcon(c.name),
SizedBox(
const SizedBox(
width: 8,
),
Text.rich(
TextSpan(
text: c.name.capitalize(),
style: TextStyle(
style: const TextStyle(
fontWeight: FontWeight.bold),
children: [
TextSpan(
@@ -922,10 +920,8 @@ class MessageInputState extends State<MessageInput> {
),
),
),
);
}),
);
});
)),
));
}
Widget _buildFilePickerSection() {
@@ -1038,12 +1034,12 @@ class MessageInputState extends State<MessageInput> {
child: Container(
decoration: BoxDecoration(
color: StreamChatTheme.of(context).colorTheme.white,
borderRadius: BorderRadius.only(
borderRadius: const BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16),
),
),
child: Container(
child: SizedBox(
width: double.infinity,
child: Center(
child: Padding(