termsAndConditions function
Implementation
Widget termsAndConditions(BuildContext context,
[TextAlign align = TextAlign.center]) {
return Container(
margin: const EdgeInsets.all(8.0),
child: RichText(
text: TextSpan(
children: <TextSpan>[
TextSpan(
text: landingTerms,
style: Theme.of(context)
.textTheme
.caption!
.copyWith(color: Colors.grey),
),
TextSpan(
text: landingTAndC,
style: Theme.of(context).textTheme.caption!.copyWith(
color: Theme.of(context).primaryColor,
fontStyle: FontStyle.normal,
),
recognizer: TapGestureRecognizer()
..onTap = () {
final List<AppContext> appContext =
AppWrapperBase.of(context)!.appContexts;
String? termsUrl;
if (appContext.contains(AppContext.AfyaMoja)) {
termsUrl = afyaMojaTermsUrl;
}
triggerNavigationEvent(
context: context,
route: termsAndConditionsRoute,
args: termsUrl);
},
),
],
),
textAlign: align,
),
);
}