Avoid confusion on empty widget settings pages

This commit is contained in:
ashilkn
2025-05-26 19:22:51 +05:30
parent 08b7986d70
commit 9069975bf0
3 changed files with 9 additions and 24 deletions

View File

@@ -6,7 +6,6 @@ import "package:photos/models/selected_albums.dart";
import "package:photos/services/album_home_widget_service.dart";
import "package:photos/services/collections_service.dart";
import "package:photos/services/favorites_service.dart";
import 'package:photos/theme/ente_theme.dart';
import "package:photos/ui/collections/flex_grid_view.dart";
import "package:photos/ui/common/loading_widget.dart";
import "package:photos/ui/components/buttons/button_widget.dart";
@@ -85,7 +84,6 @@ class _AlbumsWidgetSettingsState extends State<AlbumsWidgetSettings> {
@override
Widget build(BuildContext context) {
final textTheme = getEnteTextTheme(context);
return Scaffold(
bottomNavigationBar: hasInstalledAny
? Padding(
@@ -122,7 +120,9 @@ class _AlbumsWidgetSettingsState extends State<AlbumsWidgetSettings> {
title: S.of(context).albums,
),
expandedHeight: 120,
flexibleSpaceCaption: S.of(context).albumsWidgetDesc,
flexibleSpaceCaption: hasInstalledAny
? S.of(context).albumsWidgetDesc
: "Add an album widget to your homescreen and come back here to customize",
actionIcons: [
IconButtonWidget(
icon: Icons.close_outlined,
@@ -150,12 +150,6 @@ class _AlbumsWidgetSettingsState extends State<AlbumsWidgetSettings> {
"assets/albums-widget-static.png",
height: 160,
),
const SizedBox(height: 20),
Text(
"Add an album widget to your homescreen and come back here to customize",
style: textTheme.smallFaint,
textAlign: TextAlign.center,
),
],
),
),

View File

@@ -88,7 +88,6 @@ class _MemoriesWidgetSettingsState extends State<MemoriesWidgetSettings> {
@override
Widget build(BuildContext context) {
final textTheme = getEnteTextTheme(context);
final colorScheme = getEnteColorScheme(context);
return Scaffold(
@@ -100,7 +99,9 @@ class _MemoriesWidgetSettingsState extends State<MemoriesWidgetSettings> {
title: S.of(context).memories,
),
expandedHeight: 120,
flexibleSpaceCaption: S.of(context).memoriesWidgetDesc,
flexibleSpaceCaption: hasInstalledAny
? S.of(context).memoriesWidgetDesc
: "Add a memories widget to your homescreen and come back here to customize",
actionIcons: [
IconButtonWidget(
icon: Icons.close_outlined,
@@ -128,12 +129,6 @@ class _MemoriesWidgetSettingsState extends State<MemoriesWidgetSettings> {
"assets/memories-widget-static.png",
height: 160,
),
const SizedBox(height: 20),
Text(
"Add a memories widget to your homescreen and come back here to customize",
style: textTheme.smallFaint,
textAlign: TextAlign.center,
),
],
),
),

View File

@@ -94,7 +94,9 @@ class _PeopleWidgetSettingsState extends State<PeopleWidgetSettings> {
title: S.of(context).people,
),
expandedHeight: 120,
flexibleSpaceCaption: S.of(context).peopleWidgetDesc,
flexibleSpaceCaption: hasInstalledAny
? S.of(context).peopleWidgetDesc
: "Add a people widget to your homescreen and come back here to customize.",
actionIcons: [
IconButtonWidget(
icon: Icons.close_outlined,
@@ -122,12 +124,6 @@ class _PeopleWidgetSettingsState extends State<PeopleWidgetSettings> {
"assets/people-widget-static.png",
height: 160,
),
const SizedBox(height: 20),
Text(
"Add a people widget to your homescreen and come back here to customize",
style: textTheme.smallFaint,
textAlign: TextAlign.center,
),
],
),
),