Skip to content

Commit

Permalink
feat: Registration completed screen - Use BlocSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalheartxs committed Oct 14, 2024
1 parent 2b5d2b8 commit 73999af
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ class _RegistrationDialogState extends State<RegistrationDialog>
onPopInvokedWithResult: (didPop, result) {
unawaited(_confirmedExit(context, didPop: didPop));
},
child: BlocBuilder<RegistrationCubit, RegistrationState>(
builder: (context, state) {
child: BlocSelector<RegistrationCubit, RegistrationState, bool>(
selector: (state) => state.step is! AccountCompletedStep,
builder: (context, showCloseButton) {
return VoicesTwoPaneDialog(
left: const RegistrationInfoPanel(),
right: const RegistrationDetailsPanel(),
showCloseButton: state.step is! AccountCompletedStep,
showCloseButton: showCloseButton,
);
},
),
Expand Down

0 comments on commit 73999af

Please sign in to comment.