Explorar o código

Make screen scrollable (#400)

## Description
Fixes https://github.com/ente-io/auth/issues/398

<!--- Describe your changes in detail -->

## Type of Change


- [x] 🛠️ Bug fix (non-breaking change which fixes an issue)
Neeraj Gupta hai 1 ano
pai
achega
14820ad7a0
Modificáronse 3 ficheiros con 80 adicións e 65 borrados
  1. 6 0
      ios/Podfile.lock
  2. 73 64
      lib/ui/home/home_empty_state.dart
  3. 1 1
      pubspec.yaml

+ 6 - 0
ios/Podfile.lock

@@ -79,6 +79,8 @@ PODS:
   - path_provider_foundation (0.0.1):
   - path_provider_foundation (0.0.1):
     - Flutter
     - Flutter
     - FlutterMacOS
     - FlutterMacOS
+  - privacy_screen (0.0.1):
+    - Flutter
   - qr_code_scanner (0.2.0):
   - qr_code_scanner (0.2.0):
     - Flutter
     - Flutter
     - MTBBarcodeScanner
     - MTBBarcodeScanner
@@ -127,6 +129,7 @@ DEPENDENCIES:
   - open_filex (from `.symlinks/plugins/open_filex/ios`)
   - open_filex (from `.symlinks/plugins/open_filex/ios`)
   - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
   - package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
   - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
   - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
+  - privacy_screen (from `.symlinks/plugins/privacy_screen/ios`)
   - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
   - qr_code_scanner (from `.symlinks/plugins/qr_code_scanner/ios`)
   - sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
   - sentry_flutter (from `.symlinks/plugins/sentry_flutter/ios`)
   - share_plus (from `.symlinks/plugins/share_plus/ios`)
   - share_plus (from `.symlinks/plugins/share_plus/ios`)
@@ -186,6 +189,8 @@ EXTERNAL SOURCES:
     :path: ".symlinks/plugins/package_info_plus/ios"
     :path: ".symlinks/plugins/package_info_plus/ios"
   path_provider_foundation:
   path_provider_foundation:
     :path: ".symlinks/plugins/path_provider_foundation/darwin"
     :path: ".symlinks/plugins/path_provider_foundation/darwin"
+  privacy_screen:
+    :path: ".symlinks/plugins/privacy_screen/ios"
   qr_code_scanner:
   qr_code_scanner:
     :path: ".symlinks/plugins/qr_code_scanner/ios"
     :path: ".symlinks/plugins/qr_code_scanner/ios"
   sentry_flutter:
   sentry_flutter:
@@ -225,6 +230,7 @@ SPEC CHECKSUMS:
   OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
   OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
   package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
   package_info_plus: fd030dabf36271f146f1f3beacd48f564b0f17f7
   path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
   path_provider_foundation: 29f094ae23ebbca9d3d0cec13889cd9060c0e943
+  privacy_screen: 1a131c052ceb3c3659934b003b0d397c2381a24e
   qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
   qr_code_scanner: bb67d64904c3b9658ada8c402e8b4d406d5d796e
   Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
   Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
   SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9
   SDWebImage: 750adf017a315a280c60fde706ab1e552a3ae4e9

+ 73 - 64
lib/ui/home/home_empty_state.dart

@@ -18,72 +18,81 @@ class HomeEmptyStateWidget extends StatelessWidget {
   @override
   @override
   Widget build(BuildContext context) {
   Widget build(BuildContext context) {
     final l10n = context.l10n;
     final l10n = context.l10n;
-    return Center(
-      child: ConstrainedBox(
-        constraints: const BoxConstraints.tightFor(height: 800, width: 450),
-        child: Padding(
-          padding: const EdgeInsets.symmetric(vertical: 40.0, horizontal: 40),
-          child: Column(
-            mainAxisAlignment: MainAxisAlignment.spaceBetween,
-            children: [
-              Column(
-                children: [
-                  Image.asset(
-                    "assets/wallet-front-gradient.png",
-                    width: 200,
-                    height: 200,
-                  ),
-                  Text(
-                    l10n.setupFirstAccount,
-                    textAlign: TextAlign.center,
-                    style: Theme.of(context).textTheme.headlineMedium,
-                  ),
-                  const SizedBox(height: 64),
-                  SizedBox(
-                    width: 400,
-                    child: OutlinedButton(
-                      onPressed: onScanTap,
-                      child: Text(l10n.importScanQrCode),
+    return SingleChildScrollView(
+      child: Center(
+        child: ConstrainedBox(
+          constraints: const BoxConstraints.tightFor(height: 800, width: 450),
+          child: Padding(
+            padding: const EdgeInsets.symmetric(vertical: 40.0, horizontal: 40),
+            child: Column(
+              mainAxisAlignment: MainAxisAlignment.spaceBetween,
+              children: [
+                Column(
+                  children: [
+                    Image.asset(
+                      "assets/wallet-front-gradient.png",
+                      width: 200,
+                      height: 200,
                     ),
                     ),
-                  ),
-                  const SizedBox(height: 18),
-                  SizedBox(
-                    width: 400,
-                    child: OutlinedButton(
-                      onPressed: onManuallySetupTap,
-                      child: Text(l10n.importEnterSetupKey),
-                    ),
-                  ),
-                  const SizedBox(height: 54),
-                  InkWell(
-                    onTap: () {
-                      routeToPage(context, ImportCodePage());
-                    },
-                    child: Text(
-                      l10n.importCodes,
-                      textAlign: TextAlign.center,
-                      style: getEnteTextTheme(context).bodyFaint.copyWith(decoration: TextDecoration.underline),
-                    ),),
-                  const SizedBox(height: 18),
-                  InkWell(
-                    onTap: () {
-                      showModalBottomSheet<void>(
-                        backgroundColor: Theme.of(context).colorScheme.background,
-                        barrierColor: Colors.black87,
-                        context: context,
-                        builder: (context) {
-                          return const FAQQuestionsWidget();
-                        },
-                      );
-                    },
-                    child: Text(
-                      l10n.faq,
+                    Text(
+                      l10n.setupFirstAccount,
                       textAlign: TextAlign.center,
                       textAlign: TextAlign.center,
-                      style: getEnteTextTheme(context).bodyFaint.copyWith(decoration: TextDecoration.underline),
-                    ),),
-                ],
-              ),
-            ],
+                      style: Theme.of(context).textTheme.headlineMedium,
+                    ),
+                    const SizedBox(height: 64),
+                    SizedBox(
+                      width: 400,
+                      child: OutlinedButton(
+                        onPressed: onScanTap,
+                        child: Text(l10n.importScanQrCode),
+                      ),
+                    ),
+                    const SizedBox(height: 18),
+                    SizedBox(
+                      width: 400,
+                      child: OutlinedButton(
+                        onPressed: onManuallySetupTap,
+                        child: Text(l10n.importEnterSetupKey),
+                      ),
+                    ),
+                    const SizedBox(height: 54),
+                    InkWell(
+                      onTap: () {
+                        routeToPage(context, ImportCodePage());
+                      },
+                      child: Text(
+                        l10n.importCodes,
+                        textAlign: TextAlign.center,
+                        style: getEnteTextTheme(context)
+                            .bodyFaint
+                            .copyWith(decoration: TextDecoration.underline),
+                      ),
+                    ),
+                    const SizedBox(height: 18),
+                    InkWell(
+                      onTap: () {
+                        showModalBottomSheet<void>(
+                          backgroundColor:
+                              Theme.of(context).colorScheme.background,
+                          barrierColor: Colors.black87,
+                          context: context,
+                          builder: (context) {
+                            return const FAQQuestionsWidget();
+                          },
+                        );
+                      },
+                      child: Text(
+                        l10n.faq,
+                        textAlign: TextAlign.center,
+                        style: getEnteTextTheme(context)
+                            .bodyFaint
+                            .copyWith(decoration: TextDecoration.underline),
+                      ),
+                    ),
+                  ],
+                ),
+              ],
+            ),
           ),
           ),
         ),
         ),
       ),
       ),

+ 1 - 1
pubspec.yaml

@@ -1,6 +1,6 @@
 name: ente_auth
 name: ente_auth
 description: ente two-factor authenticator
 description: ente two-factor authenticator
-version: 2.0.28+227
+version: 2.0.29+229
 publish_to: none
 publish_to: none
 
 
 environment:
 environment: