Skip to main content

`SignedIn`

Cloud has the newest features. Some may not be in a release yet; the newest release is Identity & Access Management 7.3.0.

SignedIn is a guard widget that renders its child only when the user is authenticated. When the user is not signed in it renders fallback instead (or nothing, if no fallback is provided).

This widget re-renders automatically whenever the auth state in the parent ThunderIDProvider changes.

Usage​

import 'package:thunderid_flutter/thunderid_flutter.dart';

SignedIn(
child: const HomeScreen(),
fallback: const AuthScreen(),
)

Using SignedIn and SignedOut together:

Widget build(BuildContext context) {
return Scaffold(
body: Stack(
children: [
SignedIn(child: const HomeScreen()),
SignedOut(child: const AuthScreen()),
],
),
);
}

Parameters​

ParameterTypeRequiredDescription
childWidget✅Rendered when ThunderIDProvider.of(context).isSignedIn is true.
fallbackWidget?Rendered when the user is not signed in. Defaults to const SizedBox.shrink() if omitted.

Was this page helpful?