film_gyaan 1.0.5 film_gyaan: ^1.0.5 copied to clipboard
An unofficial dart SDK which will connect to TheMovieDB. This package can be used to get Movie/TV/Person related details.
import 'package:film_gyaan/film_gyaan.dart';
/// An example on how to use the [FilmGyaan] package.
///
/// This is just an example to show how to use the package.
/// There are many methods provided by this package.
///
/// To know about the other apis if its not available
/// go to https://api.themoviedb.org/.
///
/// Raise an issue if anything is not working. Or need any more feature.
/// Any feedback is appreciated ☺️.
void main() async {
var filmGyaan = FilmGyaan(
credentials: Credentials(
apiKey: '<API_KEY>',
),
);
/// Get popular movies, page 1
var popularMovies = await filmGyaan.getPopularMovies();
/// For page 2
var data = await filmGyaan.getPopularMovies(page: 2);
popularMovies.results.addAll(data.results);
var movieId = popularMovies.results.first.id;
/// Get movie details
var movieDetails = await filmGyaan.getMovieDetails(movieId: movieId);
print(movieDetails.title);
}