Skip to content

Commit

Permalink
Remove unnecessary null check
Browse files Browse the repository at this point in the history
  • Loading branch information
rubuy-74 committed Oct 2, 2023
1 parent 98bc86b commit 5e42e27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions uni/lib/view/about/widgets/terms_and_conditions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ class TermsAndConditions extends StatelessWidget {

@override
Widget build(BuildContext context) {
var termsAndConditionsSaved = S.of(context).loading_terms;
String? termsAndConditionsSaved = S.of(context).loading_terms;
final termsAndConditionsFuture = fetchTermsAndConditions();
return FutureBuilder(
future: termsAndConditionsFuture,
builder:
(BuildContext context, AsyncSnapshot<String> termsAndConditions) {
if (termsAndConditions.connectionState == ConnectionState.done &&
termsAndConditions.hasData) {
termsAndConditionsSaved = termsAndConditions.data!;
termsAndConditionsSaved = termsAndConditions.data;
}
return MarkdownBody(
styleSheet: MarkdownStyleSheet(),
shrinkWrap: false,
data: termsAndConditionsSaved,
data: termsAndConditionsSaved!,
onTapLink: (text, url, title) async {
await launchUrlWithToast(context, url!);
},
Expand Down

0 comments on commit 5e42e27

Please sign in to comment.