style: Improve code formatting; enhance readability by adjusting line breaks and widget dimensions
This commit is contained in:
parent
47666c7897
commit
a1cd212e74
@ -154,8 +154,10 @@ class TileContainer extends StatelessWidget {
|
|||||||
const TileContainer({required this.child, Key? key}) : super(key: key);
|
const TileContainer({required this.child, Key? key}) : super(key: key);
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) =>
|
Widget build(BuildContext context) => Container(
|
||||||
Container(padding: const EdgeInsets.all(14), decoration: _tileDecoration, child: child);
|
padding: const EdgeInsets.all(14),
|
||||||
|
decoration: _tileDecoration,
|
||||||
|
child: child);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// ==========================
|
/// ==========================
|
||||||
@ -187,9 +189,8 @@ class AttachmentsSection extends StatelessWidget {
|
|||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Obx(() {
|
return Obx(() {
|
||||||
final activeExisting = existingAttachments
|
final activeExisting =
|
||||||
.where((doc) => doc['isActive'] != false)
|
existingAttachments.where((doc) => doc['isActive'] != false).toList();
|
||||||
.toList();
|
|
||||||
|
|
||||||
final imageFiles = attachments.where(_isImageFile).toList();
|
final imageFiles = attachments.where(_isImageFile).toList();
|
||||||
final imageExisting = activeExisting
|
final imageExisting = activeExisting
|
||||||
@ -336,8 +337,8 @@ class AttachmentsSection extends StatelessWidget {
|
|||||||
Widget _buildActionTile(IconData icon, VoidCallback onTap) => GestureDetector(
|
Widget _buildActionTile(IconData icon, VoidCallback onTap) => GestureDetector(
|
||||||
onTap: onTap,
|
onTap: onTap,
|
||||||
child: Container(
|
child: Container(
|
||||||
width: 80,
|
width: 50,
|
||||||
height: 80,
|
height: 50,
|
||||||
decoration: _tileDecoration.copyWith(
|
decoration: _tileDecoration.copyWith(
|
||||||
border: Border.all(color: Colors.grey.shade400),
|
border: Border.all(color: Colors.grey.shade400),
|
||||||
),
|
),
|
||||||
@ -359,7 +360,8 @@ class _AttachmentTile extends StatelessWidget {
|
|||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final fileName = file.path.split('/').last;
|
final fileName = file.path.split('/').last;
|
||||||
final extension = fileName.split('.').last.toLowerCase();
|
final extension = fileName.split('.').last.toLowerCase();
|
||||||
final isImage = AttachmentsSection.allowedImageExtensions.contains(extension);
|
final isImage =
|
||||||
|
AttachmentsSection.allowedImageExtensions.contains(extension);
|
||||||
|
|
||||||
final (icon, color) = _fileIcon(extension);
|
final (icon, color) = _fileIcon(extension);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user