Your Developer Aji got you covered on making your idea become reality.
main.dart
main.dart
main.dart
import 'package:http/http.dart' as http;
void main() {
getProfile();
}
Future<void> getProfile() async {
try {
final response = await http.get(Uri.parse('https://user/data'));
if (response.statusCode == 200) {
print(response.body);
} else {
print('Failed to load profile data.');
}
} catch (error) {
print('Error fetching profile: $error');
}
}