Skip to content

Commit

Permalink
Reorganize widget ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
ashuntu committed Dec 17, 2024
1 parent 2a324f0 commit 99d9134
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,9 @@ class SubscribeNowPage extends StatelessWidget {
),
const SizedBox(height: 16.0),
OutlinedButton(
onPressed: model.purchaseAllowed
? () async {
onPressed: !model.purchaseAllowed
? () => launchUrlString('https://ubuntu.com/pro/subscribe')
: () async {
final subs = await model.purchaseSubscription();

// Using anything attached to the BuildContext after a suspension point might be tricky.
Expand All @@ -71,8 +72,7 @@ class SubscribeNowPage extends StatelessWidget {
},
ifRight: onSubscriptionUpdate,
);
}
: () => launchUrlString('https://ubuntu.com/pro/subscribe'),
},
child: Text(lang.getUbuntuPro),
),
],
Expand Down

0 comments on commit 99d9134

Please sign in to comment.