Merge pull request #216 from ente-io/new-user-redesign
New user redesign
This commit is contained in:
commit
9a4db83c3f
1
assets/loadingGalleryLottie.json
Normal file
1
assets/loadingGalleryLottie.json
Normal file
File diff suppressed because one or more lines are too long
|
@ -14,11 +14,10 @@ extension CustomColorScheme on ColorScheme {
|
||||||
? Color.fromRGBO(240, 240, 240, 1)
|
? Color.fromRGBO(240, 240, 240, 1)
|
||||||
: Color.fromRGBO(8, 18, 18, 0.4);
|
: Color.fromRGBO(8, 18, 18, 0.4);
|
||||||
|
|
||||||
Color get fabBackgroundColor =>
|
Color get dynamicFABBackgroundColor =>
|
||||||
brightness == Brightness.light ? Colors.black : Colors.grey[850];
|
brightness == Brightness.light ? Colors.black : Colors.grey[850];
|
||||||
|
|
||||||
Color get fabTextOrIconColor =>
|
Color get dynamicFABTextColor => Colors.white; //same for both themes
|
||||||
brightness == Brightness.light ? Colors.white : Colors.white;
|
|
||||||
|
|
||||||
// todo: use brightness == Brightness.light for changing color for dark/light theme
|
// todo: use brightness == Brightness.light for changing color for dark/light theme
|
||||||
ButtonStyle get optionalActionButtonStyle => buildElevatedButtonThemeData(
|
ButtonStyle get optionalActionButtonStyle => buildElevatedButtonThemeData(
|
||||||
|
|
|
@ -104,10 +104,10 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {
|
||||||
? "Unselect all"
|
? "Unselect all"
|
||||||
: "Select all",
|
: "Select all",
|
||||||
textAlign: TextAlign.right,
|
textAlign: TextAlign.right,
|
||||||
style: Theme.of(context)
|
style: Theme.of(context).textTheme.overline.copyWith(
|
||||||
.textTheme
|
decoration: TextDecoration.underline,
|
||||||
.overline
|
fontSize: 16,
|
||||||
.copyWith(decoration: TextDecoration.underline),
|
letterSpacing: 1),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -133,7 +133,7 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
padding: EdgeInsets.only(
|
padding: EdgeInsets.only(
|
||||||
left: 24, right: 24, bottom: Platform.isIOS ? 60 : 32),
|
left: 20, right: 20, bottom: Platform.isIOS ? 60 : 32),
|
||||||
child: OutlinedButton(
|
child: OutlinedButton(
|
||||||
child: Text(widget.buttonText),
|
child: Text(widget.buttonText),
|
||||||
onPressed: _selectedFolders.isEmpty
|
onPressed: _selectedFolders.isEmpty
|
||||||
|
@ -213,16 +213,24 @@ class _BackupFolderSelectionPageState extends State<BackupFolderSelectionPage> {
|
||||||
padding: const EdgeInsets.only(bottom: 1, right: 1),
|
padding: const EdgeInsets.only(bottom: 1, right: 1),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
border: Border.all(
|
||||||
color: Theme.of(context).colorScheme.boxUnSelectColor,
|
color: Theme.of(context).colorScheme.boxUnSelectColor,
|
||||||
),
|
),
|
||||||
borderRadius: BorderRadius.all(
|
borderRadius: BorderRadius.all(
|
||||||
Radius.circular(12),
|
Radius.circular(12),
|
||||||
),
|
),
|
||||||
color: isSelected
|
// color: isSelected
|
||||||
? Theme.of(context).colorScheme.boxSelectColor
|
// ? Theme.of(context).colorScheme.boxSelectColor
|
||||||
: Theme.of(context).colorScheme.boxUnSelectColor,
|
// : Theme.of(context).colorScheme.boxUnSelectColor,
|
||||||
),
|
gradient: isSelected
|
||||||
|
? LinearGradient(colors: const [
|
||||||
|
Color(0xFF00DD4D),
|
||||||
|
Color(0xFF43BA6C)
|
||||||
|
]) //same for both themes
|
||||||
|
: LinearGradient(colors: [
|
||||||
|
Theme.of(context).colorScheme.boxUnSelectColor,
|
||||||
|
Theme.of(context).colorScheme.boxUnSelectColor
|
||||||
|
])),
|
||||||
padding: EdgeInsets.fromLTRB(8, 4, 4, 4),
|
padding: EdgeInsets.fromLTRB(8, 4, 4, 4),
|
||||||
child: InkWell(
|
child: InkWell(
|
||||||
child: Row(
|
child: Row(
|
||||||
|
|
|
@ -37,9 +37,9 @@ class DynamicFAB extends StatelessWidget {
|
||||||
FloatingActionButton(
|
FloatingActionButton(
|
||||||
//mini: true,
|
//mini: true,
|
||||||
backgroundColor:
|
backgroundColor:
|
||||||
Theme.of(context).colorScheme.fabBackgroundColor,
|
Theme.of(context).colorScheme.dynamicFABBackgroundColor,
|
||||||
foregroundColor:
|
foregroundColor:
|
||||||
Theme.of(context).colorScheme.fabTextOrIconColor,
|
Theme.of(context).colorScheme.dynamicFABTextColor,
|
||||||
child: Transform.rotate(
|
child: Transform.rotate(
|
||||||
angle: isFormValid ? 0 : math.pi / 2, //var here
|
angle: isFormValid ? 0 : math.pi / 2, //var here
|
||||||
child: Icon(
|
child: Icon(
|
||||||
|
|
|
@ -335,9 +335,13 @@ class _EmailEntryPageState extends State<EmailEntryPage> {
|
||||||
horizontal: 20),
|
horizontal: 20),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
spreadRadius: 0.5,
|
||||||
color: Theme.of(context).hintColor,
|
color: Theme.of(context).hintColor,
|
||||||
width: 0.5),
|
offset: Offset(0, -0.325),
|
||||||
|
),
|
||||||
|
],
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.zero,
|
topLeft: Radius.zero,
|
||||||
topRight: Radius.zero,
|
topRight: Radius.zero,
|
||||||
|
|
|
@ -3,143 +3,91 @@ import 'dart:ui';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:photo_manager/photo_manager.dart';
|
import 'package:photo_manager/photo_manager.dart';
|
||||||
import 'package:photos/ente_theme_data.dart';
|
// import 'package:photos/ente_theme_data.dart';
|
||||||
import 'package:photos/services/sync_service.dart';
|
import 'package:photos/services/sync_service.dart';
|
||||||
|
|
||||||
class GrantPermissionsWidget extends StatelessWidget {
|
class GrantPermissionsWidget extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: SingleChildScrollView(
|
body: Column(
|
||||||
child: Column(
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
Center(
|
Column(
|
||||||
child: Padding(
|
children: [
|
||||||
padding: const EdgeInsets.symmetric(vertical: 50),
|
Center(
|
||||||
child: Image.asset(
|
child: Padding(
|
||||||
"assets/gallery.png",
|
padding: const EdgeInsets.symmetric(vertical: 50),
|
||||||
height: 250,
|
child: Image.asset(
|
||||||
),
|
"assets/gallery.png",
|
||||||
),
|
height: 250,
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
||||||
child: Text(
|
|
||||||
'ente needs your permission to access gallery',
|
|
||||||
style:
|
|
||||||
Theme.of(context).textTheme.headline4.copyWith(height: 1.4),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(vertical: 40),
|
|
||||||
child: Divider(
|
|
||||||
thickness: 1.5,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.symmetric(horizontal: 20),
|
|
||||||
child: Text(
|
|
||||||
'Why we need permissions',
|
|
||||||
style: Theme.of(context).textTheme.headline5,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(
|
|
||||||
padding: const EdgeInsets.fromLTRB(0, 20, 0, 5),
|
|
||||||
child: ListTile(
|
|
||||||
leading: ClipRRect(
|
|
||||||
borderRadius: BorderRadius.circular(10),
|
|
||||||
child: Container(
|
|
||||||
height: 40,
|
|
||||||
width: 40,
|
|
||||||
color: Colors.greenAccent,
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
title: Text("hey there random stuff"),
|
|
||||||
subtitle: Text(
|
|
||||||
"Even more random stuff here. blah blabh blahhasdn asidf as"),
|
|
||||||
),
|
),
|
||||||
),
|
Padding(
|
||||||
Padding(
|
padding: const EdgeInsets.symmetric(horizontal: 20),
|
||||||
padding: const EdgeInsets.fromLTRB(0, 5, 0, 180),
|
child: Text(
|
||||||
child: ListTile(
|
'ente needs your permission to access gallery',
|
||||||
leading: ClipRRect(
|
style: Theme.of(context)
|
||||||
borderRadius: BorderRadius.circular(10),
|
.textTheme
|
||||||
child: Container(
|
.headline4
|
||||||
height: 40,
|
.copyWith(height: 1.4),
|
||||||
width: 40,
|
|
||||||
color: Colors.greenAccent,
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
title: Text("hey there random stuff"),
|
|
||||||
subtitle: Text(
|
|
||||||
"Even more random stuff here. blah blabh blahhasdn asidf as"),
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
),
|
Container(
|
||||||
),
|
width: double.infinity,
|
||||||
floatingActionButton: Container(
|
padding: EdgeInsets.only(
|
||||||
decoration: BoxDecoration(boxShadow: [
|
left: 20, right: 20, bottom: Platform.isIOS ? 60 : 32),
|
||||||
BoxShadow(
|
child: OutlinedButton(
|
||||||
color: Theme.of(context).backgroundColor,
|
child: Text("Grant Permission"),
|
||||||
spreadRadius: 200,
|
onPressed: () async {
|
||||||
blurRadius: 100,
|
final state = await PhotoManager.requestPermissionExtend();
|
||||||
offset: Offset(0, 150),
|
if (state == PermissionState.authorized ||
|
||||||
)
|
state == PermissionState.limited) {
|
||||||
]),
|
await SyncService.instance.onPermissionGranted(state);
|
||||||
width: double.infinity,
|
} else if (state == PermissionState.denied) {
|
||||||
height: 56,
|
AlertDialog alert = AlertDialog(
|
||||||
padding: EdgeInsets.symmetric(horizontal: 20),
|
title: Text("Please grant permissions"),
|
||||||
child: FloatingActionButton.extended(
|
content: Text(
|
||||||
backgroundColor: Theme.of(context).colorScheme.fabBackgroundColor,
|
"ente can encrypt and preserve files only if you grant access to them"),
|
||||||
onPressed: () async {
|
actions: [
|
||||||
final state = await PhotoManager.requestPermissionExtend();
|
TextButton(
|
||||||
if (state == PermissionState.authorized ||
|
child: Text(
|
||||||
state == PermissionState.limited) {
|
"OK",
|
||||||
await SyncService.instance.onPermissionGranted(state);
|
style: Theme.of(context).textTheme.subtitle1.copyWith(
|
||||||
} else if (state == PermissionState.denied) {
|
fontSize: 14, fontWeight: FontWeight.w700),
|
||||||
AlertDialog alert = AlertDialog(
|
),
|
||||||
title: Text("Please grant permissions"),
|
onPressed: () {
|
||||||
content: Text(
|
Navigator.of(context, rootNavigator: true)
|
||||||
"ente can encrypt and preserve files only if you grant access to them"),
|
.pop('dialog');
|
||||||
actions: [
|
if (Platform.isIOS) {
|
||||||
TextButton(
|
PhotoManager.openSetting();
|
||||||
child: Text(
|
}
|
||||||
"OK",
|
},
|
||||||
style: Theme.of(context).textTheme.subtitle1.copyWith(
|
|
||||||
fontSize: 14, fontWeight: FontWeight.w700),
|
|
||||||
),
|
),
|
||||||
onPressed: () {
|
],
|
||||||
Navigator.of(context, rootNavigator: true)
|
);
|
||||||
.pop('dialog');
|
|
||||||
if (Platform.isIOS) {
|
|
||||||
PhotoManager.openSetting();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: context,
|
context: context,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
return BackdropFilter(
|
return BackdropFilter(
|
||||||
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
|
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
|
||||||
child: alert,
|
child: alert,
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
barrierColor: Colors.black12,
|
barrierColor: Colors.black12,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
label: Text('Grant permission',
|
// padding: EdgeInsets.fromLTRB(12, 20, 12, 20),
|
||||||
style: Theme.of(context).textTheme.headline6.copyWith(
|
),
|
||||||
color: Theme.of(context).colorScheme.fabTextOrIconColor)),
|
),
|
||||||
shape:
|
],
|
||||||
RoundedRectangleBorder(borderRadius: BorderRadius.circular(8))),
|
|
||||||
),
|
),
|
||||||
floatingActionButtonLocation: FloatingActionButtonLocation.centerFloat,
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ import 'package:photo_manager/photo_manager.dart';
|
||||||
import 'package:photos/core/configuration.dart';
|
import 'package:photos/core/configuration.dart';
|
||||||
import 'package:photos/core/event_bus.dart';
|
import 'package:photos/core/event_bus.dart';
|
||||||
import 'package:photos/db/files_db.dart';
|
import 'package:photos/db/files_db.dart';
|
||||||
|
import 'package:photos/ente_theme_data.dart';
|
||||||
import 'package:photos/events/account_configured_event.dart';
|
import 'package:photos/events/account_configured_event.dart';
|
||||||
import 'package:photos/events/backup_folders_updated_event.dart';
|
import 'package:photos/events/backup_folders_updated_event.dart';
|
||||||
import 'package:photos/events/files_updated_event.dart';
|
import 'package:photos/events/files_updated_event.dart';
|
||||||
|
@ -33,7 +34,7 @@ import 'package:photos/services/user_service.dart';
|
||||||
import 'package:photos/ui/app_update_dialog.dart';
|
import 'package:photos/ui/app_update_dialog.dart';
|
||||||
import 'package:photos/ui/backup_folder_selection_page.dart';
|
import 'package:photos/ui/backup_folder_selection_page.dart';
|
||||||
import 'package:photos/ui/collections_gallery_widget.dart';
|
import 'package:photos/ui/collections_gallery_widget.dart';
|
||||||
import 'package:photos/ui/common_elements.dart';
|
import 'package:photos/ui/common/gradientButton.dart';
|
||||||
import 'package:photos/ui/create_collection_page.dart';
|
import 'package:photos/ui/create_collection_page.dart';
|
||||||
import 'package:photos/ui/extents_page_view.dart';
|
import 'package:photos/ui/extents_page_view.dart';
|
||||||
import 'package:photos/ui/gallery.dart';
|
import 'package:photos/ui/gallery.dart';
|
||||||
|
@ -421,10 +422,18 @@ class _HomeWidgetState extends State<HomeWidget> {
|
||||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
children: [
|
children: [
|
||||||
_headerWidgetWithSettingsButton,
|
_headerWidgetWithSettingsButton,
|
||||||
Image.asset(
|
Padding(
|
||||||
"assets/preserved.png",
|
padding: const EdgeInsets.only(top: 64),
|
||||||
height: 160,
|
child: Image.asset(
|
||||||
|
"assets/preserved.png",
|
||||||
|
height: 206,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
|
Text('No photos are being backed up right now',
|
||||||
|
style: Theme.of(context)
|
||||||
|
.textTheme
|
||||||
|
.caption
|
||||||
|
.copyWith(fontFamily: 'Inter-Medium', fontSize: 16)),
|
||||||
Center(
|
Center(
|
||||||
child: Hero(
|
child: Hero(
|
||||||
tag: "select_folders",
|
tag: "select_folders",
|
||||||
|
@ -433,13 +442,17 @@ class _HomeWidgetState extends State<HomeWidget> {
|
||||||
child: Container(
|
child: Container(
|
||||||
width: double.infinity,
|
width: double.infinity,
|
||||||
height: 64,
|
height: 64,
|
||||||
padding: const EdgeInsets.fromLTRB(60, 0, 60, 0),
|
padding: const EdgeInsets.fromLTRB(20, 0, 20, 0),
|
||||||
child: button(
|
child: GradientButton(
|
||||||
"start backup",
|
child: Text(
|
||||||
fontSize: 16,
|
'Start Backup',
|
||||||
lineHeight: 1.5,
|
style: gradientButtonTextTheme(),
|
||||||
padding: EdgeInsets.only(bottom: 4),
|
),
|
||||||
onPressed: () async {
|
linearGradientColors: const [
|
||||||
|
Color(0xFF2CD267),
|
||||||
|
Color(0xFF1DB954),
|
||||||
|
],
|
||||||
|
onTap: () async {
|
||||||
if (LocalSyncService.instance
|
if (LocalSyncService.instance
|
||||||
.hasGrantedLimitedPermissions()) {
|
.hasGrantedLimitedPermissions()) {
|
||||||
PhotoManager.presentLimited();
|
PhotoManager.presentLimited();
|
||||||
|
@ -448,12 +461,32 @@ class _HomeWidgetState extends State<HomeWidget> {
|
||||||
context,
|
context,
|
||||||
BackupFolderSelectionPage(
|
BackupFolderSelectionPage(
|
||||||
shouldSelectAll: true,
|
shouldSelectAll: true,
|
||||||
buttonText: "Start backup",
|
buttonText: "Start Backup",
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
// child: button(
|
||||||
|
// "start backup",
|
||||||
|
// fontSize: 16,
|
||||||
|
// lineHeight: 1.5,
|
||||||
|
// padding: EdgeInsets.only(bottom: 4),
|
||||||
|
// onPressed: () async {
|
||||||
|
// if (LocalSyncService.instance
|
||||||
|
// .hasGrantedLimitedPermissions()) {
|
||||||
|
// PhotoManager.presentLimited();
|
||||||
|
// } else {
|
||||||
|
// routeToPage(
|
||||||
|
// context,
|
||||||
|
// BackupFolderSelectionPage(
|
||||||
|
// shouldSelectAll: true,
|
||||||
|
// buttonText: "Start backup",
|
||||||
|
// ),
|
||||||
|
// );
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// ),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -474,7 +507,7 @@ class _HomeWidgetState extends State<HomeWidget> {
|
||||||
width: 180,
|
width: 180,
|
||||||
child: ClipRect(
|
child: ClipRect(
|
||||||
child: BackdropFilter(
|
child: BackdropFilter(
|
||||||
filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10),
|
filter: ImageFilter.blur(sigmaX: 4, sigmaY: 4),
|
||||||
child: GNav(
|
child: GNav(
|
||||||
curve: Curves.easeOutExpo,
|
curve: Curves.easeOutExpo,
|
||||||
backgroundColor: Theme.of(context).bottomAppBarColor,
|
backgroundColor: Theme.of(context).bottomAppBarColor,
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:loading_animations/loading_animations.dart';
|
import 'package:lottie/lottie.dart';
|
||||||
import 'package:photos/core/event_bus.dart';
|
import 'package:photos/core/event_bus.dart';
|
||||||
|
import 'package:photos/ente_theme_data.dart';
|
||||||
import 'package:photos/events/sync_status_update_event.dart';
|
import 'package:photos/events/sync_status_update_event.dart';
|
||||||
import 'package:photos/services/local_sync_service.dart';
|
import 'package:photos/services/local_sync_service.dart';
|
||||||
import 'package:photos/ui/backup_folder_selection_page.dart';
|
import 'package:photos/ui/backup_folder_selection_page.dart';
|
||||||
|
@ -17,20 +18,10 @@ class LoadingPhotosWidget extends StatefulWidget {
|
||||||
|
|
||||||
class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
|
class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
|
||||||
StreamSubscription<SyncStatusUpdate> _firstImportEvent;
|
StreamSubscription<SyncStatusUpdate> _firstImportEvent;
|
||||||
int _currentPage = 0;
|
// final int _currentPage = 0;
|
||||||
final PageController _pageController = PageController(
|
// final PageController _pageController = PageController(
|
||||||
initialPage: 0,
|
// initialPage: 0,
|
||||||
);
|
// );
|
||||||
final List<String> _messages = [
|
|
||||||
"web.ente.io has a slick uploader",
|
|
||||||
"we have preserved over a million memories so far",
|
|
||||||
"all our apps are open source",
|
|
||||||
"our encryption protocols have been reviewed by engineers at Google, Apple, Amazon, and Facebook",
|
|
||||||
"you can share files and folders with your loved ones, end-to-end encrypted",
|
|
||||||
"our mobile apps run in the background to encrypt and backup new photos you take",
|
|
||||||
"we use Xchacha20Poly1305 to safely encrypt your data",
|
|
||||||
"one of our data centers is in a fall out shelter 25m underground",
|
|
||||||
];
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
@ -46,28 +37,11 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
|
||||||
context,
|
context,
|
||||||
BackupFolderSelectionPage(
|
BackupFolderSelectionPage(
|
||||||
shouldSelectAll: true,
|
shouldSelectAll: true,
|
||||||
buttonText: "Start backup",
|
buttonText: "Start Backup",
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
Timer.periodic(Duration(seconds: 5), (Timer timer) {
|
|
||||||
if (!mounted) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (_currentPage < _messages.length - 1) {
|
|
||||||
_currentPage++;
|
|
||||||
} else {
|
|
||||||
_currentPage = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
_pageController.animateToPage(
|
|
||||||
_currentPage,
|
|
||||||
duration: Duration(milliseconds: 300),
|
|
||||||
curve: Curves.easeIn,
|
|
||||||
);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -81,47 +55,28 @@ class _LoadingPhotosWidgetState extends State<LoadingPhotosWidget> {
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
body: Center(
|
body: Center(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
LoadingBouncingGrid.square(
|
|
||||||
inverted: true,
|
|
||||||
backgroundColor: Theme.of(context).buttonColor,
|
|
||||||
size: 64,
|
|
||||||
),
|
|
||||||
Padding(padding: const EdgeInsets.all(20.0)),
|
|
||||||
Text(
|
|
||||||
"loading your gallery...",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(padding: EdgeInsets.all(10)),
|
|
||||||
Text(
|
|
||||||
"this might take upto 30 seconds 🐣",
|
|
||||||
style: TextStyle(color: Colors.white.withOpacity(0.3)),
|
|
||||||
),
|
|
||||||
Padding(padding: const EdgeInsets.all(70)),
|
|
||||||
Text(
|
|
||||||
"did you know?",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 16,
|
|
||||||
color: Theme.of(context).buttonColor,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
Padding(padding: EdgeInsets.all(8)),
|
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 80,
|
height: 56,
|
||||||
child: PageView.builder(
|
|
||||||
scrollDirection: Axis.vertical,
|
|
||||||
controller: _pageController,
|
|
||||||
itemBuilder: (context, index) {
|
|
||||||
return _getMessage(_messages[index]);
|
|
||||||
},
|
|
||||||
itemCount: _messages.length,
|
|
||||||
physics: NeverScrollableScrollPhysics(),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
|
Lottie.asset('assets/loadingGalleryLottie.json'),
|
||||||
|
Text("Did you know?",
|
||||||
|
style: Theme.of(context).textTheme.headline6.copyWith(
|
||||||
|
fontFamily: "Inter",
|
||||||
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.defaultTextColor
|
||||||
|
.withOpacity(0.4))),
|
||||||
|
SizedBox(
|
||||||
|
height: 16,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
"ente is amazing",
|
||||||
|
style: Theme.of(context).textTheme.headline6.copyWith(
|
||||||
|
fontFamily: "Inter",
|
||||||
|
color: Theme.of(context).colorScheme.defaultTextColor),
|
||||||
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
@ -358,9 +358,13 @@ class _PasswordEntryPageState extends State<PasswordEntryPage> {
|
||||||
horizontal: 20),
|
horizontal: 20),
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
border: Border.all(
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
spreadRadius: 0.5,
|
||||||
color: Theme.of(context).hintColor,
|
color: Theme.of(context).hintColor,
|
||||||
width: 0.5),
|
offset: Offset(0, -0.325),
|
||||||
|
),
|
||||||
|
],
|
||||||
borderRadius: BorderRadius.only(
|
borderRadius: BorderRadius.only(
|
||||||
topLeft: Radius.zero,
|
topLeft: Radius.zero,
|
||||||
topRight: Radius.zero,
|
topRight: Radius.zero,
|
||||||
|
|
|
@ -679,6 +679,13 @@ packages:
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.0.1"
|
version: "1.0.1"
|
||||||
|
lottie:
|
||||||
|
dependency: "direct main"
|
||||||
|
description:
|
||||||
|
name: lottie
|
||||||
|
url: "https://pub.dartlang.org"
|
||||||
|
source: hosted
|
||||||
|
version: "1.2.2"
|
||||||
matcher:
|
matcher:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
|
@ -72,6 +72,7 @@ dependencies:
|
||||||
loading_animations: ^2.1.0
|
loading_animations: ^2.1.0
|
||||||
local_auth: ^1.1.5
|
local_auth: ^1.1.5
|
||||||
logging: ^1.0.1
|
logging: ^1.0.1
|
||||||
|
lottie: ^1.2.2
|
||||||
motionphoto:
|
motionphoto:
|
||||||
git: "https://github.com/ente-io/motionphoto.git"
|
git: "https://github.com/ente-io/motionphoto.git"
|
||||||
move_to_background: ^1.0.2
|
move_to_background: ^1.0.2
|
||||||
|
|
Loading…
Reference in a new issue