LinkedInLearning / learning-flutter-3009709

Learning Flutter: Build for Multiple Platforms
Other
110 stars 206 forks source link

Images API link no longer exists #7

Open ahmloutfy opened 10 months ago

ahmloutfy commented 10 months ago

I'm learining Flutter and lately started learning from the linkedin course.

But I found that the link:

https://pixelford.com/api2/images

not exists, so how can I continue with the course without it?

TharinduHub commented 1 week ago

you can use this url and need to update Image_model

TharinduHub commented 1 week ago

as example:

import 'package:json_annotation/json_annotation.dart';

part 'image_model.g.dart';

@JsonSerializable()
class PixelformImage {
  String id;
  String author;
  String url;

  @JsonKey(name: 'download_url')
  String urlFullSize;

  PixelformImage(
      {required this.author,
      required this.url,
      required this.id,
      required this.urlFullSize});

  factory PixelformImage.fromJson(Map<String, dynamic> json) =>
      _$PixelformImageFromJson(json);

  Map<String, dynamic> toJson() => _$PixelformImageToJson(this);
}