File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
lib/screens/main/course_table Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,8 @@ class CourseTableScreen extends ConsumerWidget {
107107 required AsyncValue <User ?> profileAsync,
108108 required AsyncValue <File ?> avatarAsync,
109109 }) {
110- final profile = profileAsync.value;
110+ final profile = profileAsync.asData? .value;
111+ final avatarFile = avatarAsync.asData? .value;
111112 final isLoading = profileAsync is AsyncLoading <User ?> && profile == null ;
112113 final ownerName = switch (profileAsync) {
113114 AsyncLoading () => _placeholderOwnerName,
@@ -154,9 +155,9 @@ class CourseTableScreen extends ConsumerWidget {
154155 color: Theme .of (context).colorScheme.primary,
155156 ),
156157 child: ClipOval (
157- child: switch (avatarAsync.value ) {
158- final avatarFile ? => Image .file (
159- avatarFile ,
158+ child: switch (avatarFile ) {
159+ final file ? => Image .file (
160+ file ,
160161 fit: BoxFit .cover,
161162 ),
162163 null => Center (
You can’t perform that action at this time.
0 commit comments