Skip to content

Commit dc44ee5

Browse files
committed
refactor(camera-app): image click condition refactor
1 parent 837a1b9 commit dc44ee5

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

apps/camera/lib/src/home/bottom_actions/gallery_thumbnail.dart

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,15 @@ class _GalleryThumbnailState extends State<GalleryThumbnail>
9696
);
9797
},
9898
child: GestureDetector(
99-
onTap:
100-
mediaPath == null || mediaPath.isEmpty
101-
? null
102-
: () {
103-
Navigator.pushNamed(
104-
context,
105-
AppRoutes.media,
106-
arguments: mediaPath,
107-
);
108-
},
99+
onTap: () {
100+
if (mediaPath == null || mediaPath.isEmpty) return;
101+
102+
Navigator.pushNamed(
103+
context,
104+
AppRoutes.media,
105+
arguments: mediaPath,
106+
);
107+
},
109108
child: Container(
110109
width: 44,
111110
height: 44,

0 commit comments

Comments
 (0)