pexels_photos_videos 0.0.16 copy "pexels_photos_videos: ^0.0.16" to clipboard
pexels_photos_videos: ^0.0.16 copied to clipboard

This package will help you to get data from pexels.com. It's easy to use and get all details related to media which is requested.

example/example.dart

import 'package:flutter/foundation.dart';
import 'package:pexels_photos_videos/curated.dart';
import 'package:pexels_photos_videos/pexels_media.dart';
import 'package:pexels_photos_videos/photo.dart';
import 'package:pexels_photos_videos/search_photo.dart';
import 'package:pexels_photos_videos/video.dart';

void main() async {
  /// Call [PexelsMedia] and get [PexelsResult]
  var pexelsMedia =
      await PexelsMedia(authorizationKey: 'place your auth key here');
  Photo photo = await pexelsMedia.getPhoto('image Id');
  Video video = await pexelsMedia.getVideo('video Id');
  Curated curated = await pexelsMedia.getCuratedPhotos(1, 1);
  SearchPhoto searchResult = await pexelsMedia.searchPhotos("search text");
  if (kDebugMode) {
    print(photo.photographer);
    print(video.user);
    print(curated.totalResult);
    print(searchResult.totalResults);
  }
}
3
likes
0
pub points
0%
popularity

Publisher

verified publishertarunmahajan.com

This package will help you to get data from pexels.com. It's easy to use and get all details related to media which is requested.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, http

More

Packages that depend on pexels_photos_videos