Skip to content

Commit

Permalink
Fix opening dynamic links
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsreichardt committed May 9, 2023
1 parent 47e4ccb commit 42d4b34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/lib/main/dynamic_links.dart
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ class DynamicLinkOverlay extends StatelessWidget {
return StreamBuilder<EinkommenderLink>(
stream: einkommendeLinks,
builder: (context, snapshot) {
if (snapshot.hasData && !snapshot.data.empty && activated) {
// Note: activated can be null, so need to use `activated == true`
// instead of just `activated`. Otherwise, you can easily a "Failed
// assertion: boolean expression must not be null", see
// https://github.com/SharezoneApp/sharezone-app/issues/659
if (snapshot.hasData && !snapshot.data.empty && activated == true) {
final einkommenderLink = snapshot.data;
// If Notification is shown directly an Error as thrown, as it can't be displayed while this is still bulding (marked as dirty)
Future.delayed(Duration(seconds: 1)).then((_) =>
Expand Down

0 comments on commit 42d4b34

Please sign in to comment.