| | |
| | | |
| | | void main() { |
| | | if (Platform.isAndroid) { |
| | | SystemChrome.setSystemUIOverlayStyle(SystemUiOverlayStyle( |
| | | SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( |
| | | statusBarColor: Colors.transparent, |
| | | systemNavigationBarColor: Color(0xFF000000), |
| | | systemNavigationBarColor: Colors.white, |
| | | systemNavigationBarDividerColor: null, |
| | | systemNavigationBarIconBrightness: Brightness.light, |
| | | statusBarIconBrightness: Brightness.dark, |
| | |
| | | @override |
| | | Widget build(BuildContext context) { |
| | | return MaterialApp( |
| | | title: 'Flutter Demo', |
| | | title: Constant.APP_NAME, |
| | | theme: ThemeData( |
| | | // This is the theme of your application. |
| | | // |
| | |
| | | // Notice that the counter didn't reset back to zero; the application |
| | | // is not restarted. |
| | | |
| | | primaryColor: Color(0xFFFFFFFF)), |
| | | primaryColor: const Color(0xFFFFFFFF)), |
| | | home: SplashPage(title: ''), |
| | | navigatorKey: navigatorKey); |
| | | } |
| | |
| | | int selectIndex = 1; |
| | | Widget? _splash; |
| | | |
| | | |
| | | @override |
| | | void initState() { |
| | | super.initState(); |
| | | } |
| | | |
| | | bool _jumpToMain = false; |
| | | |
| | | void init() async { |
| | | //请求配置信息 |
| | |
| | | ConfigUtil.saveConfig(value["data"]); |
| | | } |
| | | |
| | | bool result = await AppUtil.initApp(context); |
| | | await AppUtil.initApp(context); |
| | | |
| | | double width = MediaQuery.of(context).size.width; |
| | | double height = MediaQuery.of(context).size.height; |
| | | |
| | | |
| | | Widget? splash = AdUtil.loadSplash(await AdUtil.getAdInfo(AdPosition.splash),width,height-94, (success, msg) { |
| | | NavigatorUtil.navigateToNextPageWithFinish(context, |
| | | MaterialPageRoute(builder: (context) { |
| | | return MainPage(title: ""); |
| | | })); |
| | | Widget splash = AdUtil.loadSplash( |
| | | await AdUtil.getAdInfo(AdPosition.splash), |
| | | MediaQuery.of(context).size.width, |
| | | MediaQuery.of(context).size.height - 94, (success, msg) { |
| | | if (_jumpToMain == true) { |
| | | return; |
| | | } |
| | | _jumpToMain = true; |
| | | if (success) { |
| | | NavigatorUtil.navigateToNextPageWithFinish(context, |
| | | CupertinoPageRoute(builder: (context) { |
| | | return MainPage(title: ""); |
| | | })); |
| | | } else { |
| | | Future.delayed(const Duration(seconds: 2), () { |
| | | NavigatorUtil.navigateToNextPageWithFinish(context, |
| | | CupertinoPageRoute(builder: (context) { |
| | | return MainPage(title: ""); |
| | | })); |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | setState(() { |
| | |
| | | |
| | | Future requestPermission() async { |
| | | await PermissionUtil.openPermission(Permission.phone); |
| | | await PermissionUtil.openPermission(PermissionUtil.getLocationPermission()); |
| | | // await PermissionUtil.openPermission(PermissionUtil.getLocationPermission()); |
| | | return; |
| | | } |
| | | |
| | |
| | | UserUtil.isAgreeProtocol().then((value) { |
| | | if (!value) { |
| | | //弹出用户协议框 |
| | | String content = |
| | | "欢迎您使用百度地图服务!<a href='${Constant.PROTOCOL_URL}'> 用户协议 </a>和<a href='${Constant.PRIVACY_URL}'>隐私政策</a> 我们非常重视您的隐私保护和个人信息保护。本隐私政策适用于您通过任何方式对百度地图各项服务的访问和使用。您可以利用百度地图搜索路况信息、商家信息、定位您所在的位置,进行路径规划、导航您想去的地址,搜索周边的服务等(以下统称“百度地图产品或服务”)。您具体获得的百度地图服务内容可能因为您使用的百度地图的版本及搭载设备不同而有所差异,如果在部分版本或搭载设备中不涵盖某些服务内容或未提供特定功能(例如:部分版本不支持登录,我们可能无法为您提供第三方服务以及其他登录后才能使用的功能;手表等穿戴设备暂时只支持步骑行的路线规划及导航,所以我们在穿戴设备上搭载的地图无法为您提供如驾车路线规划及导航等其他功能),本隐私政策中涉及到上述服务/功能及相关个人信息的内容将不适用。您可以通过多种不同的方式来使用我们的产品和服务,包括百度地图的网站、软件、供第三方网站和应用程序使用的百度地图软件开发工具包(SDK)和应用程序编程接口(API)、车载导航仪、智能后视镜等智能硬件设备。"; |
| | | String content = "尊敬的用户:<br>" + |
| | | "感谢您对定位App一直以来的信任!<br>" + |
| | | "我们非常重视保护您的个人信息和隐私。在您使用我们的软件前,为了更好的保障您的权利,请务必阅读<a href='${Constant.PROTOCOL_URL}'>《用户协议》</a>和<a href='${Constant.PRIVACY_URL}'>《隐私政策》</a>,您同意并接受所有条款后,才能使用我们软件。若您注册成为本软件会员或接受好友的邀请即表明您允许向本软件中的好友提供您的地理位置和轨迹等信息。为确保软件正常运行我们需要获得,尤其是:<br>" + |
| | | "1、我们对您的个人信息(包括但不限于<b style='color:red'>设备MAC地址、IMEI/Android ID、位置信息</b>等信息)的收集/保存/使用/对外提供/保护等规则条款,以及您的用户权利等条款;<br>" + |
| | | "2、约定我们的限制责任、免责条款;<br>" + |
| | | "3、其他以加粗或斜体字进行标识的重要条款。<br>" + |
| | | "4、特别申明:本软件定位守护等功能需双方都下载本软件并同意授权后才可正常使用,不涉及侵犯个人隐私问题。获取地理信息必须在用户双方知情并同意的情况下进行,本软件仅限用于家庭/亲友/熟人/朋友间使用。<br>" + |
| | | "如您对协议有任何疑虑,可通过电子邮箱:dw365@foxmail.com 向我们询问,我们将为您竭诚解答。您点击“同意并继续”的行为代表您已阅读完毕并接受以上协议全部条款。如您同意以上协议内容,请您点击“同意并继续”,开始使用本软件。"; |
| | | |
| | | DialogUtil.showDialog( |
| | | context, |
| | | NotifyDialog( |
| | | "用户协议&隐私政策", |
| | | content, |
| | | () { |
| | | Navigator.of(context).pop(); |
| | | }, |
| | | () { |
| | | UserUtil.setAgreeProtocol().then((value) { |
| | | if (value) { |
| | | //弹出权限框 |
| | | DialogUtil.showDialog(context, PermissionNotifyDialog(() { |
| | | Navigator.of(context).pop(); |
| | | requestPermission().then((value) { |
| | | init(); |
| | | }); |
| | | })); |
| | | } else {} |
| | | }); |
| | | }, |
| | | richText: true, |
| | | height: 400, |
| | | )); |
| | | NotifyDialog("用户协议&隐私政策", content, () { |
| | | SystemNavigator.pop(); |
| | | }, () { |
| | | UserUtil.setAgreeProtocol().then((value) { |
| | | if (value) { |
| | | //弹出权限框 |
| | | DialogUtil.showDialog(context, PermissionNotifyDialog(() { |
| | | Navigator.of(context).pop(); |
| | | requestPermission().then((value) { |
| | | init(); |
| | | }); |
| | | })); |
| | | } else {} |
| | | }); |
| | | }, |
| | | richText: true, |
| | | height: 400, |
| | | cancelName: "不同意", |
| | | sureName: "同意并继续")); |
| | | } else { |
| | | //已经同意了 |
| | | init(); |
| | |
| | | mainAxisAlignment: MainAxisAlignment.center, |
| | | children: const [ |
| | | Text( |
| | | "定位追踪轨迹", |
| | | Constant.APP_NAME, |
| | | style: |
| | | TextStyle(color: Color(0xFF03B5FF), fontSize: 23), |
| | | ), |