46 lines
1.4 KiB
Dart
46 lines
1.4 KiB
Dart
import 'package:flutter/gestures.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:go_router/go_router.dart';
|
|
|
|
import '../../../../router/config/route_paths.dart';
|
|
|
|
///勾中协议
|
|
class AgreementBox extends StatelessWidget {
|
|
const AgreementBox({
|
|
super.key,
|
|
});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Text.rich(
|
|
textAlign: TextAlign.center,
|
|
TextSpan(
|
|
style: Theme.of(context).textTheme.labelSmall,
|
|
children: [
|
|
const TextSpan(text: "By logging in, you agree to our "),
|
|
TextSpan(
|
|
text: "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"},
|
|
),
|
|
),
|
|
const TextSpan(text: " and "),
|
|
TextSpan(
|
|
text: "Privacy Policy",
|
|
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"},
|
|
),
|
|
),
|
|
const TextSpan(text: "."),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|