updated project style guidelines
This commit is contained in:
@ -37,8 +37,7 @@ class ChatMessage {
|
||||
}
|
||||
|
||||
return CachedNetworkImage(
|
||||
errorWidget: (context, url, error) {
|
||||
return Padding(padding: const EdgeInsets.only(top: 10), child: Row(
|
||||
errorWidget: (context, url, error) => Padding(padding: const EdgeInsets.only(top: 10), child: Row(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
@ -47,12 +46,9 @@ class ChatMessage {
|
||||
Flexible(child: Text(file!.name, maxLines: 2, overflow: TextOverflow.ellipsis, style: const TextStyle(fontWeight: FontWeight.bold))),
|
||||
const SizedBox(width: 10),
|
||||
],
|
||||
));
|
||||
},
|
||||
)),
|
||||
alignment: Alignment.center,
|
||||
placeholder: (context, url) {
|
||||
return const Padding(padding: EdgeInsets.all(10), child: CircularProgressIndicator());
|
||||
},
|
||||
placeholder: (context, url) => const Padding(padding: EdgeInsets.all(10), child: CircularProgressIndicator()),
|
||||
fadeInDuration: Duration.zero,
|
||||
fadeOutDuration: Duration.zero,
|
||||
errorListener: (value) {},
|
||||
@ -60,9 +56,9 @@ class ChatMessage {
|
||||
);
|
||||
}
|
||||
|
||||
void onOpen(LinkableElement link) async {
|
||||
Future<void> onOpen(LinkableElement link) async {
|
||||
if(await canLaunchUrlString(link.url)) {
|
||||
await launchUrlString(link.url);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user