import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import '../network/NetworkConfig.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( 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(0xFF074CE7)), recognizer: TapGestureRecognizer() ..onTap = () { Navigator.push( context, MaterialPageRoute( builder: (context) => AgreementPage( title: "用户协议", url: "${NetworkConfig.configBean?.userAgreement}", )), ); }), TextSpan(text: '》、《', style: TextStyle(fontSize: 10, color: Colors.white)), TextSpan( text: '隐私政策', style: TextStyle(fontSize: 10, color: Color(0xFF074CE7)), recognizer: TapGestureRecognizer() ..onTap = () { Navigator.push( context, MaterialPageRoute( builder: (context) => AgreementPage( title: "隐私政策", url: "${NetworkConfig.configBean?.privacyAgreement}", )), ); }), 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(0xFF074CE7), borderRadius: BorderRadius.all(Radius.circular(50))), child: Text( '同意并继续', style: TextStyle(color: Colors.white), ), ), ), 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), ), ), ), ], ), ), ), ), ); } }