build method
Widget
build(
- BuildContext context,
- AppState appState,
- PageState pageState,
- AppStylesState stylesState,
- dynamic nodeState,
override
Implementation
@override
Widget build(
final BuildContext context,
final AppState appState,
final PageState pageState,
final AppStylesState stylesState,
final WidgetState nodeState,
) {
return SizedBox(
width: width.get(
context: context,
isWidth: true,
),
height: height.get(
context: context,
isWidth: false,
),
child: Builder(
builder: (final BuildContext context) {
switch (type) {
case SocialButtonType.apple:
return LoginWithAppleWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
case SocialButtonType.bitbucket:
return LoginWithBitBucketWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
case SocialButtonType.discord:
return LoginWithDiscordWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
case SocialButtonType.facebook:
return LoginWithFacebookWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
case SocialButtonType.github:
return LoginWithGitHubWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
case SocialButtonType.gitlab:
return LoginWithGitlabWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
case SocialButtonType.google:
return LoginWithGoogleWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
case SocialButtonType.linkedin:
return LoginWithLinkedinWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
case SocialButtonType.microsoft:
return LoginWithMicrosoftWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
case SocialButtonType.twitch:
return LoginWithTwitchWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
case SocialButtonType.twitter:
return LoginWithTwitterWidget(
onPressed: onPressed,
onLongPress: onLongPress,
);
}
},
),
);
}