Conversation
|
Hey @VJLIVE , |
VJLIVE
left a comment
There was a problem hiding this comment.
Hey @Shibai419 I saw ur PR, there are some merge conflicts which needs to be resolved.
And one more tip, please only change those files which are relevant to the issue
|
@VJLIVE while i was creating a PR it was written to run flutter format . it was depreciated so i ran dart format . which formats all the files, other than that i did not change any file |
VJLIVE
left a comment
There was a problem hiding this comment.
Hey @Shibai419 I found some issues with ur PR, I had solved them, I will tell all of them
- Update the fetchQuotes logic with the below
Future<void> Fetchquotes() async {
final response = await http.get(
Uri.parse(
'https://raw.githubusercontent.com/Keshav8605/Athletix/refs/heads/motivation_quote_feature_add/assets/motivational_quotes.json',
),
);
if (response.statusCode == 200) {
final data = json.decode(response.body);
quotes = data;
// Generate random index based on the actual quotes list size
setState(() {
number_ = Random().nextInt(quotes.length);
});
} else {
throw Exception('Failed to load quotes');
}
}- Update the children container (line 301) with this
children: [
Text("Today's Quote"),
const SizedBox(height: 5),
quotes.isNotEmpty
? Text(
"${quotes[number_]['quote']}",
style: const TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
)
: const Text(
"No quote available",
style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold),
),
SizedBox(height: 30),
Lottie.asset(
'assets/Athlete.json',
width: 150,
height: 150,
fit: BoxFit.cover,
),
SizedBox(height: 20),
Row(
children: [
Container(
width: 70,
height: 70,
decoration: BoxDecoration(
gradient: const LinearGradient(
colors: [Color(0xFF667EEA), Color(0xFF764BA2)],
),
borderRadius: BorderRadius.circular(20),
),
child: const Icon(
Icons.person_rounded,
color: Colors.white,
size: 36,
),
),
const SizedBox(width: 20),
Expanded(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
greeting,
style: TextStyle(
fontSize: 14,
color: Colors.grey[600],
fontWeight: FontWeight.w500,
),
),
const SizedBox(height: 4),
Text(
name,
style: const TextStyle(
fontSize: 24,
fontWeight: FontWeight.bold,
color: Color(0xFF1A202C),
),
),
const SizedBox(height: 8),
Row(
children: [
_buildInfoChip(Icons.sports_rounded, sport),
const SizedBox(width: 12),
_buildInfoChip(Icons.cake_rounded, _formatDate(dob)),
],
),
],
),
),
],
),
],- Not ur issue, but important, update the cloudinary presets
static const String _cloudName = 'dgiqmo1t1';
static const String _uploadPreset = 'flutter_unsigned';Send the updated PR, and then it's good to go
Additional:
Please update the UI if possible for that profile picture
|
@VJLIVE Did the changes, you can merge it now |
|
@VJLIVE its been 2 weeks, if you have some time then you can review this PR and merge it as i have solved the issues. |
🔥 Pull Request – Athletix
Thanks for contributing to Athletix! Please complete the following to help us review your changes efficiently.
🔖 Type of Change
📄 Description
There was an issue raised stating that the profile picture is static and when it is clicked the options to change the profile picture through gallery or camera should come so that it increases user engagement. And in this PR i have added that feature. Also i have tested it using my cloudinary account and to keep my Cloudinary credentials secret i have replaced them with placeholders. You can set your own _cloudName and _uploadPreset (preferably unsigned upload preset) variables in services/cloudinary_service.dart from your own Cloudinary account to make it completely working. I suggest to keep the secret credentials in a .env file and then replace the .env variables with the value of the variables in services/cloudinary_service.dart
🎯 Related Issue
Fixes #7
🧪 How to Test This
Navigate to:
Perform:
Tap on the profile picture.
A bottom sheet will appear with options:
Choose from Gallery
Take a Photo
Select either option and pick/capture an image.
Expected behavior:
The selected image is uploaded to Cloudinary.
The profile picture on the screen updates with the new image.
The image URL is saved accordingly.
Tested on:
📸 UI Changes (if applicable)
|


| |
🔐 Firebase / Firestore Updates
Describe briefly:
✅ Checklist
flutter pub getanddart format .🙋 Additional Notes
To fully test the profile picture update feature, you need to configure your own Cloudinary credentials. In services/cloudinary_service.dart, replace the placeholder values of the _cloudName and _uploadPreset variables with the corresponding values from your own Cloudinary account. It is recommended to use an unsigned upload preset for this purpose. To keep these credentials secure, you should store them in a .env file and access them using the flutter_dotenv package. Then, update the code to read these values using dotenv.env['CLOUDINARY_CLOUD_NAME'] and dotenv.env['CLOUDINARY_UPLOAD_PRESET'] instead of hardcoding them. This ensures sensitive data is not exposed and the feature works seamlessly during development and deployment.