This commit is contained in:
zhutao
2025-09-04 17:57:35 +08:00
parent 4d12f8afc2
commit 0231dcfe1a
34 changed files with 1339 additions and 368 deletions

View File

@@ -6,68 +6,40 @@ import '../../../../router/config/route_paths.dart';
///勾中协议
class AgreementBox extends StatelessWidget {
final bool checked;
final Function(bool) onChanged;
const AgreementBox({
super.key,
this.checked = false,
required this.onChanged,
});
@override
Widget build(BuildContext context) {
return Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
width: 25,
child: Transform.scale(
scale: 0.8,
child: Checkbox(
value: checked,
shape: CircleBorder(),
onChanged: (value) {
onChanged(value!);
},
),
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"},
),
),
),
GestureDetector(
onTap: () {
onChanged(!checked);
},
child: RichText(
text: TextSpan(
style: Theme.of(context).textTheme.labelSmall,
children: [
TextSpan(
text: "I agree to the ",
),
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"},
),
),
TextSpan(text: " & "),
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: " 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: "."),
],
),
);
}
}

View File

@@ -10,12 +10,15 @@ class LogoBox extends StatelessWidget {
margin: EdgeInsets.only(bottom: 40),
child: Column(
children: [
Image.asset(
"assets/image/logo.png",
width: 43,
ClipRRect(
borderRadius: BorderRadius.circular(5),
child: Image.asset(
"assets/image/logo.png",
width: 43,
),
),
Text(
"FoodCura",
"PlanCura",
style: Theme.of(context).textTheme.titleSmall,
),
],