Files
food_health_flutter/lib/pages/system/login/widgets/login_agree.dart
2025-09-23 11:47:29 +08:00

51 lines
1.5 KiB
Dart

import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:food_health/l10n/l10n.dart';
import 'package:food_health/router/config/route_paths.dart';
import 'package:go_router/go_router.dart';
class LoginAgree extends StatelessWidget {
const LoginAgree({
super.key,
});
@override
Widget build(BuildContext context) {
return RichText(
text: TextSpan(
style: Theme.of(context).textTheme.labelMedium,
children: [
TextSpan(
text: "${L10n.of.login_tip_start} ",
),
TextSpan(
text: L10n.of.login_terms,
style: TextStyle(color: Theme.of(context).primaryColor),
recognizer: TapGestureRecognizer()
..onTap = () => context.push(
RoutePaths.agreement,
extra: {
"title": "Terms of Service",
"url": "https://support.curain.ai/privacy/foodcura/terms_service.html",
},
),
),
TextSpan(text: " ${L10n.of.login_and} "),
TextSpan(
text: L10n.of.login_privacy,
style: TextStyle(color: Theme.of(context).primaryColor),
recognizer: TapGestureRecognizer()
..onTap = () => context.push(
RoutePaths.agreement,
extra: {
"title": "Privacy",
"url": "https://support.curain.ai/privacy/foodcura/privacy_policy.html",
},
),
),
],
),
);
}
}