Skip to content

Commit

Permalink
ui: 添付ファイルの表示を横幅を制限したCard()に変更
Browse files Browse the repository at this point in the history
  • Loading branch information
Npepperlinux committed Apr 20, 2024
1 parent 017c89e commit a738666
Showing 1 changed file with 33 additions and 19 deletions.
52 changes: 33 additions & 19 deletions lib/view/note_create_page/create_file_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -59,27 +59,41 @@ class CreateFileView extends ConsumerWidget {

switch (data) {
case ImageFile():
return Column(
children: [
SizedBox(
height: 200,
child: GestureDetector(
onTap: () async => await onTap(context, ref),
child: Image.memory(data.data)),
),
Row(
return Card.outlined(
child: SizedBox(
width: 210,
child: Column(
children: [
if (data.isNsfw) const Icon(Icons.details_rounded),
Text(data.fileName),
IconButton(
onPressed: () => detailTap(context, ref),
icon: const Icon(Icons.more_vert)),
IconButton(
onPressed: () => delete(context, ref),
icon: const Icon(Icons.delete)),
Container(
padding: const EdgeInsets.all(5),
child: SizedBox(
height: 200,
child: GestureDetector(
onTap: () async => await onTap(context, ref),
child: Image.memory(data.data)),
),
),
Row(
children: [
if (data.isNsfw) const Icon(Icons.details_rounded),
if (!data.isNsfw) const SizedBox(width: 5,),
Expanded(
child: Text(
data.fileName,
overflow: TextOverflow.ellipsis
),
),
IconButton(
onPressed: () => detailTap(context, ref),
icon: const Icon(Icons.more_vert)),
IconButton(
onPressed: () => delete(context, ref),
icon: const Icon(Icons.delete)),
],
)
],
)
],
),
),
);
case ImageFileAlreadyPostedFile():
return Column(
Expand Down

0 comments on commit a738666

Please sign in to comment.