Added new mediaUrl constant and replaced occurrences of aseUrl with mediaUrl in various widgets and screens.
This commit is contained in:
parent
7fcd5639ae
commit
4cbae2f613
|
|
@ -1,2 +1,5 @@
|
|||
const String baseUrl =
|
||||
'https://ba47-2001-448a-50a0-14bf-701c-6eb0-9412-6ff4.ngrok-free.app/';
|
||||
|
||||
const String mediaUrl =
|
||||
'https://ba47-2001-448a-50a0-14bf-701c-6eb0-9412-6ff4.ngrok-free.app/api/uploads/';
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ class ProgressCard extends StatelessWidget {
|
|||
String _getFullImageUrl(String thumbnail) {
|
||||
return thumbnail.startsWith('http')
|
||||
? thumbnail
|
||||
: '${baseUrl}api/uploads/section/$thumbnail';
|
||||
: '${mediaUrl}section/$thumbnail';
|
||||
}
|
||||
|
||||
Future<void> _navigateToTopics(
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ class _ExerciseContentState extends State<ExerciseContent>
|
|||
padding: const EdgeInsets.symmetric(vertical: 16.0),
|
||||
child: ImageWidget(
|
||||
imageFileName: widget.exercise.image!,
|
||||
baseUrl: '${baseUrl}api/uploads/exercise/image/',
|
||||
baseUrl: '$mediaUrl/exercise/image/',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
@ -180,7 +180,7 @@ class _ExerciseContentState extends State<ExerciseContent>
|
|||
child: AudioPlayerWidget(
|
||||
key: _audioPlayerKey,
|
||||
audioFileName: widget.exercise.audio!,
|
||||
baseUrl: '${baseUrl}api/uploads/exercise/audio/',
|
||||
baseUrl: '${mediaUrl}exercise/audio/',
|
||||
),
|
||||
),
|
||||
),
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ class _TopicsListScreenState extends State<TopicsListScreen> {
|
|||
if (thumbnail.startsWith('http')) {
|
||||
return thumbnail;
|
||||
} else {
|
||||
return '${baseUrl}api/uploads/section/$thumbnail';
|
||||
return '${mediaUrl}section/$thumbnail';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class _SectionCardState extends State<SectionCard>
|
|||
if (thumbnail.startsWith('http')) {
|
||||
return thumbnail;
|
||||
} else {
|
||||
return '${baseUrl}api/uploads/section/$thumbnail';
|
||||
return '${mediaUrl}section/$thumbnail';
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ class _EditProfileScreenState extends State<EditProfileScreen> {
|
|||
child: UserAvatar(
|
||||
radius: 60,
|
||||
pictureUrl: userProvider.userData?['PICTURE'],
|
||||
baseUrl: '${baseUrl}api/uploads/avatar/',
|
||||
baseUrl: '${mediaUrl}avatar/',
|
||||
onImageSelected: (File image) {
|
||||
userProvider.setSelectedImage(image);
|
||||
},
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
|||
UserAvatar(
|
||||
radius: 60,
|
||||
pictureUrl: userProvider.userData?['PICTURE'],
|
||||
baseUrl: '${baseUrl}api/uploads/avatar/',
|
||||
baseUrl: '${mediaUrl}avatar/',
|
||||
onImageSelected: (File image) {
|
||||
userProvider.setSelectedImage(image);
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user