π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
[mobile][photos] fix layout centering in landing page
Priyanshu Dangareb2f4dac9585f
diff --git a/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart b/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dartindex 9f542a53d6..17825db6bf 100644--- a/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart+++ b/mobile/apps/photos/lib/ui/home/grant_permissions_widget.dart@@ -3,7 +3,6 @@ import "dart:async";import "package:ente_components/ente_components.dart";import 'package:ente_pure_utils/ente_pure_utils.dart';import 'package:flutter/material.dart';-import "package:flutter/services.dart";import 'package:flutter_svg/flutter_svg.dart';import "package:hugeicons/hugeicons.dart";import "package:logging/logging.dart";@@ -51,12 +50,10 @@ class _GrantPermissionsWidgetState extends State<GrantPermissionsWidget> {"assets/home_tab.riv",riveFactory: rive.Factory.flutter,);- SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);}@overridevoid dispose() {- SystemChrome.setPreferredOrientations([]);_permissionsAnimationLoader.dispose();_onlyNewActionDebouncer.cancelDebounceTimer();super.dispose();diff --git a/mobile/apps/photos/lib/ui/home/landing_page_widget.dart b/mobile/apps/photos/lib/ui/home/landing_page_widget.dartindex e7f19a4ab9..8cbd713980 100644--- a/mobile/apps/photos/lib/ui/home/landing_page_widget.dart+++ b/mobile/apps/photos/lib/ui/home/landing_page_widget.dart@@ -43,16 +43,6 @@ class _LandingPageWidgetState extends State<LandingPageWidget> {riveFactory: rive.Factory.flutter,);Future(_showAutoLogoutDialogIfRequired);- if (mounted) {- SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]);- }- }-- @override- void dispose() {- _onboardingAnimationLoader.dispose();- SystemChrome.setPreferredOrientations([]);- super.dispose();}@override@@ -78,89 +68,77 @@ class _LandingPageWidgetState extends State<LandingPageWidget> {onSettingsChanged: () {setState(() {});},- child: Column(- children: [- if (kDebugMode) _buildDebugLanguageButton(),- Expanded(- child: Padding(- padding: const EdgeInsets.all(16),- child: Column(- children: [- _buildOnboardingAnimation(),- Text(- AppLocalizations.of(context).onboardingTitle,- textAlign: .center,- style: const TextStyle(- fontWeight: .w900,- fontFamily: TextStyles.outfitFontFamily,- package: TextStyles.fontPackage,- fontSize: 36,- height: 1,- color: Colors.white,- ),- ),- const SizedBox(height: 16),- Padding(- padding: const EdgeInsets.symmetric(horizontal: 32),- child: Text(- AppLocalizations.of(context).onboardingDesc,- textAlign: TextAlign.center,- style: textTheme.body.copyWith(- color: colorScheme.greenLight,- fontSize: 14,- ),- ),- ),- ],+ child: Padding(+ padding: const EdgeInsets.all(16),+ child: Column(+ crossAxisAlignment: .center,+ mainAxisAlignment: .center,+ children: [+ if (kDebugMode) _buildDebugLanguageButton(),+ _buildOnboardingAnimation(),+ Text(+ AppLocalizations.of(context).onboardingTitle,+ textAlign: .center,+ style: const TextStyle(+ fontWeight: .w900,+ fontFamily: TextStyles.outfitFontFamily,+ package: TextStyles.fontPackage,+ fontSize: 36,+ height: 1,+ color: Colors.white,),),- ),- Padding(- padding: const EdgeInsets.symmetric(horizontal: 16),- child: Column(- children: [- Theme(- data: lightComponentTheme,- child: ButtonComponent(- variant: ButtonComponentVariant.neutral,- label: AppLocalizations.of(context).createAnEnteAccount,- onTap: _navigateToSignUpPage,- shouldSurfaceExecutionStates: false,- ),+ const Flexible(child: SizedBox(height: 16)),+ Padding(+ padding: const EdgeInsets.symmetric(horizontal: 32),+ child: Text(+ AppLocalizations.of(context).onboardingDesc,+ textAlign: TextAlign.center,+ style: textTheme.body.copyWith(+ color: colorScheme.greenLight,+ fontSize: 14,),- if (localSettings.showLocalGalleryModeOption) ...[- const SizedBox(height: 12),- Theme(- data: lightComponentTheme,- child: ButtonComponent(- variant: ButtonComponentVariant.secondary,- label: AppLocalizations.of(- context,- ).continueWithoutAccount,- onTap: _navigateWithoutAccount,- shouldSurfaceExecutionStates: false,- ),- ),- ],- const SizedBox(height: 12),- TextButton(- onPressed: _navigateToSignInPage,- child: Text(- AppLocalizations.of(context).loginToExistingAccount,- style: textTheme.body.copyWith(- decoration: TextDecoration.underline,- decorationColor: Colors.white,- color: Colors.white,- ),- ),+ ),+ ),+ const Flexible(child: SizedBox(height: 64)),+ Theme(+ data: lightComponentTheme,+ child: ButtonComponent(+ variant: ButtonComponentVariant.neutral,+ label: AppLocalizations.of(context).createAnEnteAccount,+ onTap: _navigateToSignUpPage,+ shouldSurfaceExecutionStates: false,+ ),+ ),+ if (localSettings.showLocalGalleryModeOption) ...[+ const SizedBox(height: 12),+ Theme(+ data: lightComponentTheme,+ child: ButtonComponent(+ variant: ButtonComponentVariant.secondary,+ label: AppLocalizations.of(+ context,+ ).continueWithoutAccount,+ onTap: _navigateWithoutAccount,+ shouldSurfaceExecutionStates: false,),- ],+ ),+ ],+ const SizedBox(height: 12),+ TextButton(+ onPressed: _navigateToSignInPage,+ child: Text(+ AppLocalizations.of(context).loginToExistingAccount,+ style: textTheme.body.copyWith(+ decoration: TextDecoration.underline,+ decorationColor: Colors.white,+ color: Colors.white,+ ),+ ),),- ),- const SizedBox(height: 16),- const DeveloperSettingsWidget(),- const SizedBox(height: 24),- ],+ if (kDebugMode) const DeveloperSettingsWidget(),+ ],+ ),),),),