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(
String instanceUrl, PostListingType listingType, SortType sort) {
return (page, batchSize) => LemmyApi(instanceUrl).v1.getPosts(
type: listingType,
sort: sort,
page: page,
limit: batchSize,
auth: accStore.defaultTokenFor(instanceUrl)?.raw,
);
}
String instanceUrl, PostListingType listingType, SortType sort) =>
(page, batchSize) => LemmyApi(instanceUrl).v1.getPosts(
type: listingType,
sort: sort,
page: page,
limit: batchSize,
auth: accStore.defaultTokenFor(instanceUrl)?.raw,
);
return InfiniteScroll<PostView>(
prepend: Column(

View File

@ -3,20 +3,18 @@ import 'package:flutter_hooks/flutter_hooks.dart';
class InboxPage extends HookWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'🚧 WORK IN PROGRESS 🚧',
style: Theme.of(context).textTheme.headline5,
)
],
Widget build(BuildContext context) => Scaffold(
appBar: AppBar(),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
'🚧 WORK IN PROGRESS 🚧',
style: Theme.of(context).textTheme.headline5,
)
],
),
),
),
);
}
);
}