convert some returns to =>

This commit is contained in:
krawieck 2020-10-06 12:06:29 +02:00
parent 88d8e1bcde
commit 4058ebc200
2 changed files with 21 additions and 24 deletions

View File

@ -259,15 +259,14 @@ class InfiniteHomeList extends HookWidget {
} }
Future<List<PostView>> Function(int, int) _fetcherFromInstance( Future<List<PostView>> Function(int, int) _fetcherFromInstance(
String instanceUrl, PostListingType listingType, SortType sort) { String instanceUrl, PostListingType listingType, SortType sort) =>
return (page, batchSize) => LemmyApi(instanceUrl).v1.getPosts( (page, batchSize) => LemmyApi(instanceUrl).v1.getPosts(
type: listingType, type: listingType,
sort: sort, sort: sort,
page: page, page: page,
limit: batchSize, limit: batchSize,
auth: accStore.defaultTokenFor(instanceUrl)?.raw, auth: accStore.defaultTokenFor(instanceUrl)?.raw,
); );
}
return InfiniteScroll<PostView>( return InfiniteScroll<PostView>(
prepend: Column( prepend: Column(

View File

@ -3,8 +3,7 @@ import 'package:flutter_hooks/flutter_hooks.dart';
class InboxPage extends HookWidget { class InboxPage extends HookWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) => Scaffold(
return Scaffold(
appBar: AppBar(), appBar: AppBar(),
body: Center( body: Center(
child: Column( child: Column(
@ -18,5 +17,4 @@ class InboxPage extends HookWidget {
), ),
), ),
); );
}
} }