import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import '../tools/me/set/agreement_page.dart'; class AgreementDialog extends StatefulWidget { final Function onTap; AgreementDialog({required this.onTap}); @override State createState() => _AgreementDialogState(); } class _AgreementDialogState extends State { @override void initState() { // TODO: implement initState super.initState(); } @override Widget build(BuildContext context) { return Material( type: MaterialType.transparency, //透明类型 color: Color(0x1A000000), child: Center( child: ClipRRect( borderRadius: BorderRadius.circular(7.0), child: Container( width: 247, color: Color(0xFF272727), child: Column( mainAxisSize: MainAxisSize.min, mainAxisAlignment: MainAxisAlignment.start, children: [ Container( height: 320, margin: EdgeInsets.only(top: 10), child: SingleChildScrollView( child: Column( children: [ Container( child: Text( '免责声明与风险提示', style: TextStyle(fontSize: 16, color: Colors.white, fontWeight: FontWeight.w600), ), ), Container( margin: EdgeInsets.only(top: 10, left: 22, right: 22), child: Text( '本平台生成的相关内容为人工智能模型概率生成,不确保真实性,您须自行进行核实,特别是针对其中包含的数字、时间以及各类事实性描述等内容。除与您个人信息相关的内容,您在使用妙语星河软件及相关服务时发布上传的内容均由您原创或已获合法授权(且含转授权),知识产权归您或合法第三方所有,同时不侵犯任何人的相关权益。', style: TextStyle(color: Colors.white, fontSize: 10), ), ), Container( margin: EdgeInsets.only(top: 15), child: Text( '用户协议与隐私政策', style: TextStyle(fontSize: 16, color: Colors.white, fontWeight: FontWeight.w600), ), ), Container( margin: EdgeInsets.only(top: 10, left: 22, right: 22), child: Text( '感谢您选择妙语星河!感谢您一直以来的支持!', style: TextStyle(color: Colors.white, fontSize: 10), ), ), Container( alignment: Alignment.centerLeft, margin: EdgeInsets.only(top: 5, left: 22, right: 22, bottom: 10), child: Text( '妙语星河非常重视您的个人信息和隐私保护', style: TextStyle(color: Colors.white, fontSize: 10), ), ), Container( alignment: Alignment.centerLeft, margin: EdgeInsets.only(top: 5, left: 22, right: 22, bottom: 10), child: Text( '1.为了更好的提供注册登录、浏览动态、发布动态内容、消费支付等服务.我们会根据您使用服务的具体功能需求,收集必要的用户信息(可能涉及账户、设备、交易、日志、IMSI等相关信息)', style: TextStyle(color: Colors.white, fontSize: 10), ), ), Container( alignment: Alignment.centerLeft, margin: EdgeInsets.only(top: 5, left: 22, right: 22, bottom: 10), child: Text( '2.未经您的同意,我们不会将您的信息出租、出售给第三方或用于您未授权的其他用途:', style: TextStyle(color: Colors.white, fontSize: 10), ), ), Container( alignment: Alignment.centerLeft, margin: EdgeInsets.only(top: 5, left: 22, right: 22), child: RichText( text: TextSpan(children: [ TextSpan(text: '3.您可以对上述信息进行访问、更正、删除以及撤回同意等。 更多内容请您认真阅读并了解《', style: TextStyle(fontSize: 10, color: Colors.white)), TextSpan( text: '用户协议', style: TextStyle(fontSize: 10, color: Color(0xFFFF9000)), recognizer: TapGestureRecognizer() ..onTap = () { Navigator.push( context, MaterialPageRoute( builder: (context) => AgreementPage( title: "用户协议", url: "https://shhuanmeng.com/yonghuxieyi.html", )), ); }), TextSpan(text: '》、《', style: TextStyle(fontSize: 10, color: Colors.white)), TextSpan( text: '隐私政策', style: TextStyle(fontSize: 10, color: Color(0xFFFF9000)), recognizer: TapGestureRecognizer() ..onTap = () { Navigator.push( context, MaterialPageRoute( builder: (context) => AgreementPage( title: "隐私政策", url: "https://shhuanmeng.com/yinsixieyi.html", )), ); }), TextSpan(text: '》 点击同意即表示您已阅读并同意全部条款。', style: TextStyle(fontSize: 10, color: Colors.white)), ]), ), ), ], ), ), ), GestureDetector( behavior: HitTestBehavior.opaque, onTap: () { widget.onTap(0); }, child: Container( width: 160, height: 40, margin: EdgeInsets.only(top: 10), alignment: Alignment.center, decoration: BoxDecoration(color: Color(0xFFFF9000), borderRadius: BorderRadius.all(Radius.circular(50))), child: Text('同意并继续'), ), ), GestureDetector( onTap: () { widget.onTap(1); }, child: Container( alignment: Alignment.center, margin: EdgeInsets.only(top: 15, left: 22, right: 22, bottom: 10), child: Text( '不同意并退出', style: TextStyle(color: Colors.grey, fontSize: 10), ), ), ), ], ), ), ), ), ); } }