Move constructors above methods
This commit is contained in:
parent
5509e0bc90
commit
e7380b4914
|
@ -14,6 +14,17 @@ class CommunityPage extends HookWidget {
|
|||
final CommunityView _community;
|
||||
final String instanceUrl;
|
||||
|
||||
CommunityPage({@required String communityName, @required this.instanceUrl})
|
||||
: assert(communityName != null, instanceUrl != null),
|
||||
_fullCommunityFuture =
|
||||
LemmyApi(instanceUrl).v1.getCommunity(name: communityName),
|
||||
_community = null;
|
||||
CommunityPage.fromCommunityView(this._community)
|
||||
: instanceUrl = _community.actorId.split('/')[2],
|
||||
_fullCommunityFuture = LemmyApi(_community.actorId.split('/')[2])
|
||||
.v1
|
||||
.getCommunity(name: _community.name);
|
||||
|
||||
void _goToInstance() {
|
||||
print('GO TO INSTANCE');
|
||||
}
|
||||
|
@ -42,17 +53,6 @@ class CommunityPage extends HookWidget {
|
|||
print('GO RO CATEGORIES');
|
||||
}
|
||||
|
||||
CommunityPage({@required String communityName, @required this.instanceUrl})
|
||||
: assert(communityName != null, instanceUrl != null),
|
||||
_fullCommunityFuture =
|
||||
LemmyApi(instanceUrl).v1.getCommunity(name: communityName),
|
||||
_community = null;
|
||||
CommunityPage.fromCommunityView(this._community)
|
||||
: instanceUrl = _community.actorId.split('/')[2],
|
||||
_fullCommunityFuture = LemmyApi(_community.actorId.split('/')[2])
|
||||
.v1
|
||||
.getCommunity(name: _community.name);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final theme = Theme.of(context);
|
||||
|
|
Loading…
Reference in New Issue