|
@@ -4,53 +4,52 @@ 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/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';
|
|
|
|
+import 'package:photos/ui/common/gradientButton.dart';
|
|
import 'package:photos/utils/navigation_util.dart';
|
|
import 'package:photos/utils/navigation_util.dart';
|
|
|
|
+import 'package:sqflite/utils/utils.dart';
|
|
|
|
|
|
class GalleryFooterWidget extends StatelessWidget {
|
|
class GalleryFooterWidget extends StatelessWidget {
|
|
const GalleryFooterWidget({Key key}) : super(key: key);
|
|
const GalleryFooterWidget({Key key}) : super(key: key);
|
|
|
|
|
|
@override
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
Widget build(BuildContext context) {
|
|
- return Column(
|
|
|
|
- children: [
|
|
|
|
- Padding(padding: EdgeInsets.all(6)),
|
|
|
|
- Divider(
|
|
|
|
- height: 1,
|
|
|
|
- ),
|
|
|
|
- Container(
|
|
|
|
- padding: EdgeInsets.fromLTRB(20, 24, 20, 72),
|
|
|
|
- child: ElevatedButton(
|
|
|
|
- style: Theme.of(context).colorScheme.primaryActionButtonStyle,
|
|
|
|
- onPressed: () async {
|
|
|
|
- if (LocalSyncService.instance.hasGrantedLimitedPermissions()) {
|
|
|
|
- await PhotoManager.presentLimited();
|
|
|
|
- } else {
|
|
|
|
- routeToPage(
|
|
|
|
- context,
|
|
|
|
- BackupFolderSelectionPage(
|
|
|
|
- buttonText: "preserve",
|
|
|
|
- ),
|
|
|
|
- );
|
|
|
|
- }
|
|
|
|
- },
|
|
|
|
- child: Row(
|
|
|
|
- mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
- crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
- //mainAxisSize: MainAxisSize.min,
|
|
|
|
- children: [
|
|
|
|
- Icon(
|
|
|
|
- Icons.cloud_upload,
|
|
|
|
- color: Theme.of(context).backgroundColor,
|
|
|
|
- ),
|
|
|
|
- Padding(padding: EdgeInsets.all(6)),
|
|
|
|
- Text(
|
|
|
|
- "Preserve more",
|
|
|
|
- ),
|
|
|
|
- ],
|
|
|
|
|
|
+ return Padding(
|
|
|
|
+ padding: const EdgeInsets.fromLTRB(20, 24, 20, 80),
|
|
|
|
+ child: GradientButton(
|
|
|
|
+ child: Row(
|
|
|
|
+ mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
+ crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
+ //mainAxisSize: MainAxisSize.min,
|
|
|
|
+ children: [
|
|
|
|
+ Icon(
|
|
|
|
+ Icons.cloud_upload_outlined,
|
|
|
|
+ color: Colors.white,
|
|
),
|
|
),
|
|
- ),
|
|
|
|
|
|
+ Padding(padding: EdgeInsets.all(6)),
|
|
|
|
+ Text("Preserve more",
|
|
|
|
+ style: Theme.of(context)
|
|
|
|
+ .textTheme
|
|
|
|
+ .headline6
|
|
|
|
+ .copyWith(color: Colors.white)),
|
|
|
|
+ ],
|
|
),
|
|
),
|
|
- ],
|
|
|
|
|
|
+ linearGradientColors: const [
|
|
|
|
+ Color(0xFF2CD267),
|
|
|
|
+ Color(0xFF1DB954),
|
|
|
|
+ ],
|
|
|
|
+ onTap: () async {
|
|
|
|
+ if (LocalSyncService.instance.hasGrantedLimitedPermissions()) {
|
|
|
|
+ await PhotoManager.presentLimited();
|
|
|
|
+ } else {
|
|
|
|
+ routeToPage(
|
|
|
|
+ context,
|
|
|
|
+ BackupFolderSelectionPage(
|
|
|
|
+ buttonText: "preserve",
|
|
|
|
+ ),
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ ),
|
|
);
|
|
);
|
|
}
|
|
}
|
|
}
|
|
}
|