profileBanner method
Future<Banner>
profileBanner({
- String? screenName,
- String? userId,
- TransformResponse<
Banner> transform = defaultBannerTransform,
Returns available size variations of the specified user's profile banner.
The profile banner data available at each size variant's URL is in PNG format.
If the user has not uploaded a profile banner, a Future.error
is
returned instead with the 404 response.
Implementation
Future<Banner> profileBanner({
String? screenName,
String? userId,
TransformResponse<Banner> transform = defaultBannerTransform,
}) {
final params = <String, String>{}
..addParameter('screen_name', screenName)
..addParameter('user_id', userId);
return client
.get(
Uri.https('api.twitter.com', '1.1/users/profile_banner.json', params),
)
.then(transform);
}