Guest User

Untitled

a guest
Jun 10th, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.94 KB | None | 0 0
  1. import 'package:flutter/cupertino.dart';
  2. import 'package:flutter/material.dart';
  3. import 'package:rarare/helper/htmlTextView.dart';
  4. import 'package:flutter_markdown/flutter_markdown.dart';
  5. import 'package:rarare/helper/networkManager.dart';
  6.  
  7. class Terms extends StatefulWidget {
  8. @override
  9. _TermsState createState() {
  10. return new _TermsState();
  11. }
  12. }
  13.  
  14. class _TermsState extends State<Terms> {
  15. BuildContext context;
  16.  
  17. double screenHeight;
  18. double screenWidth;
  19.  
  20. NetworkManager networkManager = new NetworkManager();
  21.  
  22. String termsText = 'rpose. We utilize, render or use your given information and data to operate, maintain, and provide to you the features, services and functionality of the App. We do not publish or disclose your username or personal information to any third party without your permission.<\/p>\n\n<p>&nbsp;<\/p>\n\n<p><strong>Information we may receive from third parties<\/strong><\/p>\n\n<p>We may receive information or data about you and your website from third parties. For example, if you try to access our App through a third-party website connection or log-in, for example, through Facebook Connect, linking your account to our App etc., that third party may pass certain information about your use of its service. The information we collect through this channel or procedure could include, but is not limited to, the user ID associated with your account, an access token necessary to access that service, any information that you have allowed the third party to share with us, and any information you have disclosed publicly in connection with that service. You should always review and maintain privacy settings to secure your personal information on third-party websites, services or application before linking or connecting them to the App.<\/p>\n\n<p>&nbsp;<\/p>\n\n<p><strong>Links to Other Websites and Services<\/strong><\/p>\n\n<p>We are not responsible for the practices employed by websites or services linked to or from the App, including the information or content contained therein. Please remember that when you use a link to go from the App or website to another website, our Privacy Policy does not apply to third-party websites or services. Your browsing and interaction on any third-party website or service, including those that have a link or advertisement on our website, are subject to that third party&rsquo;s own rules and policies. In addition, you agree that we are not responsible and we do not control over any third-parties that you authorize to access your User Content. If you are using a third-party website or service and you allow such a third-party access to your User Content you do so at your own risk. This Privacy Policy does not apply to information we collect by other means (including offline) or from other sources other than through the App.<\/p>\n\n<p>&nbsp;<\/p>\n\n<p><strong>Cookie Policy<\/strong><\/p>\n\n<p>A Cookie is a small piece of data may be sent to you or stored by your browser that uniquely identifies your browser and lets us help you log in faster and enhance your navigation. Cookie may also be sent and stored on the device or browner of your users that use your App or services. A cookie may also convey information or analytics to us, the links clicked and other actions are taken to the App, and allow us or our linked sites to track usage of the App over time. &nbsp;Cookies may be used on your browser by subsequent visits to the App. Persistent cookies can be removed with your sole discretion.<\/p>\n\n<p>&nbsp;<\/p>\n\n<p><strong>How we communicate<\/strong><\/p>\n\n<p>We utilize the information you provide us, such as your email address or phone number, to communicate directly with you. We may send you emails or messages including newsletters, promotional information and special offers. If you do not agree to continue and receive such communication, you have the option to change your account preferences and terminate these services. Your information may also be used to send other App related emails.<\/p>\n\n<p>&nbsp;<\/p>\n\n<p><strong>Sharing of Your Information<\/strong><\/p>\n\n<p>We do not rent or sell your information to third parties and its group of companies (including any partners, parents, subsidiaries or affiliates) without your consent, except as noted below:<\/p>\n\n<p>We may share your information with third-party business partners for the purpose of providing the functionality of App to you. We provide only limited information to third parties, affiliates or partners reasonably necessary to deliver the services of the App. This Privacy Policy also governs such third parties or affiliates, or we operate under a similar privacy policy. We or any third party service embedded with the App will also have access to your IP address. We may disclose your information upon request of law enforcement agencies or departments where we believe that such disclosure is necessary to comply with the law. We may also share certain information such as your location, browser, and cookie data and other data relating to your use of our App with our business partners or affiliates to deliver advertisements (&ldquo;ads&rdquo;) that may be of interest to you.<\/p>\n\n<p>&nbsp;<\/p>\n\n<p><strong>Event of a change of control<\/strong><\/p>\n\n<p>We may sell or transfer our company collectively or partially or any combination of its products, services and assets. Your information such as customer names and email addresses, User Content and other user information related to the App may be among the p';
  23. String imageLogoUrl = "";
  24.  
  25. final termsController = new TextEditingController();
  26.  
  27. @override
  28. void dispose() {
  29. // Clean up the controller when the Widget is removed from the Widget tree
  30. termsController.dispose();
  31. super.dispose();
  32. }
  33.  
  34. @override
  35. Widget build(BuildContext context) {
  36. this.context = context;
  37.  
  38. screenHeight = MediaQuery.of(context).size.height;
  39. screenWidth = MediaQuery.of(context).size.width;
  40.  
  41. // loadTerms();
  42.  
  43. return new Scaffold(
  44. appBar: new AppBar(
  45. title: const Text('Terms'),
  46. ),
  47. body: new Column(
  48. children: <Widget>[
  49. _createLogo(),
  50. _getHtmlTextView(),
  51. ],
  52. ));
  53. }
  54.  
  55. Widget _createLogo() {
  56. return new Container(
  57. alignment: AlignmentDirectional.topCenter,
  58. child: new Padding(
  59. padding: new EdgeInsets.fromLTRB(16.0, screenHeight / 18, 16.0, 30.0),
  60. child: new Image.network(
  61. imageLogoUrl,
  62. width: screenWidth / 8,
  63. ),
  64. ),
  65. );
  66. }
  67.  
  68. Widget _getHtmlTextView() {
  69. return SingleChildScrollView(
  70. child:new Container(
  71. height: 100.0,
  72. child: new Text(
  73. termsText,
  74. )
  75. ),) ;
  76. }
  77.  
  78. ///
  79. ///functions
  80. ///
  81.  
  82. void loadTerms() {
  83. networkManager.getTermsData().then((terms) {
  84. setState(() {
  85. termsText = terms.data.first.content;
  86. imageLogoUrl = terms.data.first.img;
  87. });
  88. }).catchError((err) {
  89. print(err);
  90. });
  91. }
  92. }
Add Comment
Please, Sign In to add comment