Explorar el Código

Attach terms conditions and privacy policy

Vishnu Mohandas hace 4 años
padre
commit
22a8d369d8
Se han modificado 3 ficheros con 44 adiciones y 3 borrados
  1. 41 1
      lib/ui/email_entry_page.dart
  2. 2 2
      pubspec.lock
  3. 1 0
      pubspec.yaml

+ 41 - 1
lib/ui/email_entry_page.dart

@@ -1,4 +1,5 @@
 import 'package:flutter/cupertino.dart';
 import 'package:flutter/cupertino.dart';
+import 'package:flutter/gestures.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/material.dart';
 import 'package:flutter/widgets.dart';
 import 'package:flutter/widgets.dart';
 import 'package:photos/core/configuration.dart';
 import 'package:photos/core/configuration.dart';
@@ -6,6 +7,7 @@ import 'package:photos/services/user_service.dart';
 import 'package:photos/ui/common_elements.dart';
 import 'package:photos/ui/common_elements.dart';
 import 'package:photos/utils/dialog_util.dart';
 import 'package:photos/utils/dialog_util.dart';
 import 'package:photos/utils/email_util.dart';
 import 'package:photos/utils/email_util.dart';
+import 'package:url_launcher/url_launcher.dart';
 
 
 class EmailEntryPage extends StatefulWidget {
 class EmailEntryPage extends StatefulWidget {
   EmailEntryPage({Key key}) : super(key: key);
   EmailEntryPage({Key key}) : super(key: key);
@@ -79,7 +81,45 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
               keyboardType: TextInputType.emailAddress,
               keyboardType: TextInputType.emailAddress,
               initialValue: _email,
               initialValue: _email,
             ),
             ),
-            Padding(padding: EdgeInsets.all(12)),
+            Padding(padding: EdgeInsets.all(8)),
+            Padding(
+              padding: const EdgeInsets.all(6),
+              child: RichText(
+                text: TextSpan(
+                  children: [
+                    TextSpan(text: "By clicking Sign In, I agree to the "),
+                    TextSpan(
+                      text: "Terms of Service",
+                      style: TextStyle(
+                        color: Colors.blue,
+                      ),
+                      recognizer: TapGestureRecognizer()
+                        ..onTap = () {
+                          launch("https://ente.io/terms");
+                        },
+                    ),
+                    TextSpan(text: " and "),
+                    TextSpan(
+                      text: "Privacy Policy",
+                      style: TextStyle(
+                        color: Colors.blue,
+                      ),
+                      recognizer: TapGestureRecognizer()
+                        ..onTap = () {
+                          launch("https://ente.io/privacy");
+                        },
+                    ),
+                    TextSpan(text: "."),
+                  ],
+                  style: TextStyle(
+                    height: 1.25,
+                    // color: Colors.grey,
+                  ),
+                ),
+                textAlign: TextAlign.center,
+              ),
+            ),
+            Padding(padding: EdgeInsets.all(8)),
             Container(
             Container(
               width: double.infinity,
               width: double.infinity,
               height: 44,
               height: 44,

+ 2 - 2
pubspec.lock

@@ -694,12 +694,12 @@ packages:
     source: hosted
     source: hosted
     version: "0.4.0"
     version: "0.4.0"
   url_launcher:
   url_launcher:
-    dependency: transitive
+    dependency: "direct main"
     description:
     description:
       name: url_launcher
       name: url_launcher
       url: "https://pub.dartlang.org"
       url: "https://pub.dartlang.org"
     source: hosted
     source: hosted
-    version: "5.7.8"
+    version: "5.7.10"
   url_launcher_linux:
   url_launcher_linux:
     dependency: transitive
     dependency: transitive
     description:
     description:

+ 1 - 0
pubspec.yaml

@@ -63,6 +63,7 @@ dependencies:
   scrollable_positioned_list: ^0.1.8
   scrollable_positioned_list: ^0.1.8
   connectivity: ^2.0.1
   connectivity: ^2.0.1
   pretty_dio_logger: ^1.1.1
   pretty_dio_logger: ^1.1.1
+  url_launcher: ^5.7.10
 
 
 dev_dependencies:
 dev_dependencies:
   flutter_test:
   flutter_test: