renderFallback method
dynamic
renderFallback( - dynamic context,
- bool canLinkSpace
)
Implementation
Widget renderFallback(BuildContext context, bool canLinkSpace) {
return Center(
heightFactor: 1,
child: EmptyState(
title: L10n.of(context).noConnectedSpaces,
subtitle: L10n.of(context).inConnectedSpaces,
image: 'assets/images/empty_space.svg',
primaryButton: canLinkSpace
? ActerPrimaryActionButton(
onPressed: () => context.pushNamed(
Routes.createSpace.name,
queryParameters: {
'parentSpaceId': spaceIdOrAlias,
},
),
child: Text(L10n.of(context).createNewSpace),
)
: null,
secondaryButton: canLinkSpace
? ActerInlineTextButton(
onPressed: () => context.pushNamed(
Routes.linkSubspace.name,
pathParameters: {'spaceId': spaceIdOrAlias},
),
child: Text(L10n.of(context).linkExistingSpace),
)
: null,
),
);
}