@@ -155,8 +155,11 @@ class ApiService {
155155 /// (according to the `timelineType` ), using `maxId` as an optional
156156 /// starting point.
157157 Future <List <Status >> getStatusList (
158- TimelineType timelineType, String ? maxId, int limit,
159- {String ? accountId}) async {
158+ TimelineType timelineType,
159+ String ? maxId,
160+ int limit, {
161+ String ? accountId,
162+ }) async {
160163 // Depending on the type, we select and restrict the api URL to use,
161164 // limiting the amount of posts we're requesting according to `limit`
162165 String apiUrl;
@@ -271,10 +274,12 @@ class ApiService {
271274 /// Given a status content, requests the Mastodon API to post a new status
272275 /// on the user's timeline. Returns the (new) [Status] instance the API
273276 /// responds with.
274- Future <Status > postStatus (String content,
275- {Status ? replyToStatus,
276- StatusVisibility visibility = StatusVisibility .public,
277- String spoilerText = "" }) async {
277+ Future <Status > postStatus (
278+ String content, {
279+ Status ? replyToStatus,
280+ StatusVisibility visibility = StatusVisibility .public,
281+ String spoilerText = "" ,
282+ }) async {
278283 final apiUrl = "${instanceUrl !}/api/v1/statuses" ;
279284 // TODO: Support sensitivity, language, scheduling, polls and media
280285 Map <String , String > body = {
@@ -286,8 +291,11 @@ class ApiService {
286291 body["in_reply_to_id" ] = replyToStatus.id;
287292 }
288293
289- http.Response resp =
290- await helper! .post (apiUrl, body: body, httpClient: httpClient);
294+ http.Response resp = await helper! .post (
295+ apiUrl,
296+ body: body,
297+ httpClient: httpClient,
298+ );
291299
292300 if (resp.statusCode == 200 ) {
293301 Map <String , dynamic > jsonData = jsonDecode (resp.body);
@@ -359,7 +367,8 @@ class ApiService {
359367 /// Note that this request is not tied to the current user or its instance,
360368 /// as it's a public endpoint. Returns a list of custom emojis, if any.
361369 Future <Map <String , String >> getCustomEmojis (
362- String mastodonInstanceUrl) async {
370+ String mastodonInstanceUrl,
371+ ) async {
363372 final apiUrl = "$mastodonInstanceUrl /api/v1/custom_emojis" ;
364373 http.Response resp = await _apiGet (apiUrl);
365374
@@ -370,7 +379,7 @@ class ApiService {
370379
371380 return {
372381 for (var item in jsonData)
373- item['shortcode' ] as String : item['url' ] as String
382+ item['shortcode' ] as String : item['url' ] as String ,
374383 };
375384 }
376385
@@ -381,7 +390,8 @@ class ApiService {
381390
382391 /// Fetches custom emojis for a Mastodon instance, using cache if available
383392 Future <Map <String , String >> getCachedCustomEmojis (
384- String mastodonInstanceUrl) async {
393+ String mastodonInstanceUrl,
394+ ) async {
385395 if (_customEmojisCache.containsKey (mastodonInstanceUrl)) {
386396 return _customEmojisCache[mastodonInstanceUrl]! ;
387397 }
0 commit comments