use the 'earth' icon for GoToMap widget when locations are empty

This commit is contained in:
ashilkn 2024-02-23 15:47:10 +05:30
parent 06911d0395
commit be11b398d3
2 changed files with 24 additions and 21 deletions

View file

@ -32,30 +32,31 @@ class GoToMapWidget extends StatelessWidget {
);
}
},
child: SizedBox(
width: width,
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 6, vertical: 10),
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Image.asset(
"assets/map.png",
child: Padding(
padding: const EdgeInsets.fromLTRB(8, 14, 8, 0),
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Transform.scale(
scale: 1.2,
child: Image.asset(
"assets/map_world.png",
width: 64,
height: 64,
),
const SizedBox(
height: 10,
),
Text(
S.of(context).yourMap,
maxLines: 2,
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
style: getEnteTextTheme(context).mini,
),
],
),
),
const SizedBox(
height: 11.5,
),
Text(
S.of(context).yourMap,
maxLines: 2,
textAlign: TextAlign.center,
overflow: TextOverflow.ellipsis,
style: getEnteTextTheme(context).mini,
),
],
),
),
);

View file

@ -17,6 +17,7 @@ import "package:photos/ui/map/enable_map.dart";
import "package:photos/ui/map/map_screen.dart";
import "package:photos/ui/viewer/file/no_thumbnail_widget.dart";
import "package:photos/ui/viewer/file/thumbnail_widget.dart";
import "package:photos/ui/viewer/search/result/go_to_map_widget.dart";
import "package:photos/ui/viewer/search/result/search_result_page.dart";
import "package:photos/ui/viewer/search/search_section_cta.dart";
import "package:photos/ui/viewer/search_tab/section_header.dart";
@ -96,6 +97,7 @@ class _LocationsSectionState extends State<LocationsSection> {
),
const SizedBox(width: 8),
const SearchSectionEmptyCTAIcon(SectionType.location),
const GoToMapWidget(),
],
),
);