Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Prettify edit rituals screen

laurenspriem056fbf5e1251
diff --git a/mobile/apps/photos/lib/ui/activity/activity_screen.dart b/mobile/apps/photos/lib/ui/activity/activity_screen.dart
index 84a7f88da4..a5410e0c41 100644
--- a/mobile/apps/photos/lib/ui/activity/activity_screen.dart
+++ b/mobile/apps/photos/lib/ui/activity/activity_screen.dart
@@ -1,10 +1,14 @@
import "package:flutter/material.dart";
import "package:photos/models/activity/activity_models.dart";
import "package:photos/models/collection/collection.dart";
+import "package:photos/models/file/file.dart";
import "package:photos/service_locator.dart";
import "package:photos/services/collections_service.dart";
+import "package:photos/theme/colors.dart";
import "package:photos/theme/ente_theme.dart";
+import "package:photos/ui/collections/album/column_item.dart";
import "package:photos/ui/notification/toast.dart";
+import "package:photos/ui/viewer/file/thumbnail_widget.dart";
class ActivityScreen extends StatelessWidget {
const ActivityScreen({super.key});
@@ -13,7 +17,7 @@ class ActivityScreen extends StatelessWidget {
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
- title: const Text("Activity"),
+ title: const Text("Photos taken"),
actions: [
IconButton(
icon: const Icon(Icons.ios_share),
@@ -417,7 +421,7 @@ class _RitualsSection extends StatelessWidget {
Row(
children: [
Text(
- "Rituals",
+ "Activity",
style: Theme.of(context).textTheme.titleMedium,
),
const Spacer(),
@@ -560,154 +564,300 @@ class _RitualCard extends StatelessWidget {
Future<void> _showRitualEditor(BuildContext context, {Ritual? ritual}) async {
final controller = TextEditingController(text: ritual?.title ?? "");
final days = [...(ritual?.daysOfWeek ?? List<bool>.filled(7, true))];
- final selectedAlbumName = ValueNotifier<String?>(ritual?.albumName);
- int? selectedAlbumId = ritual?.albumId;
+ Collection? selectedAlbum = ritual?.albumId != null
+ ? CollectionsService.instance.getCollectionByID(ritual!.albumId!)
+ : null;
+ String? selectedAlbumName = selectedAlbum?.displayName ?? ritual?.albumName;
+ int? selectedAlbumId = selectedAlbum?.id ?? ritual?.albumId;
TimeOfDay selectedTime =
ritual?.timeOfDay ?? const TimeOfDay(hour: 9, minute: 0);
- final String icon = ritual?.icon ?? "πŸ“Έ";
+ String selectedEmoji = ritual?.icon ?? "πŸ“Έ";
final formKey = GlobalKey<FormState>();
await showModalBottomSheet(
context: context,
isScrollControlled: true,
+ backgroundColor: Colors.transparent,
shape: const RoundedRectangleBorder(
- borderRadius: BorderRadius.vertical(top: Radius.circular(16)),
+ borderRadius: BorderRadius.vertical(top: Radius.circular(24)),
),
builder: (context) {
+ final colorScheme = getEnteColorScheme(context);
+ final textTheme = getEnteTextTheme(context);
return StatefulBuilder(
builder: (context, setState) {
- return Padding(
- padding: EdgeInsets.only(
- bottom: MediaQuery.of(context).viewInsets.bottom + 16,
- left: 16,
- right: 16,
- top: 16,
- ),
- child: Form(
- key: formKey,
- child: Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- Row(
- children: [
- Text(
- ritual == null ? "New ritual" : "Edit ritual",
- style: Theme.of(context).textTheme.titleMedium,
- ),
- const Spacer(),
- IconButton(
- icon: const Icon(Icons.close),
- onPressed: () => Navigator.of(context).pop(),
- ),
- ],
- ),
- TextFormField(
- controller: controller,
- autofocus: true,
- decoration: const InputDecoration(
- labelText: "Description",
+ return SafeArea(
+ child: Padding(
+ padding: EdgeInsets.only(
+ bottom: MediaQuery.of(context).viewInsets.bottom + 16,
+ left: 12,
+ right: 12,
+ top: 8,
+ ),
+ child: Container(
+ decoration: BoxDecoration(
+ color: colorScheme.backgroundElevated,
+ borderRadius: BorderRadius.circular(24),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withValues(alpha: 0.06),
+ blurRadius: 22,
+ offset: const Offset(0, 12),
),
- validator: (value) {
- if (value == null || value.trim().isEmpty) {
- return "Please enter a description";
- }
- return null;
- },
- ),
- const SizedBox(height: 12),
- Row(
- children: [
- const Text("Days"),
- const SizedBox(width: 12),
- Expanded(
- child: Wrap(
- spacing: 6,
- children: List.generate(
- days.length,
- (index) => ChoiceChip(
- label: Text(_weekLabel(index)),
- selected: days[index],
- onSelected: (value) {
- setState(() {
- days[index] = value;
- });
- },
+ ],
+ ),
+ child: SingleChildScrollView(
+ padding: const EdgeInsets.fromLTRB(20, 16, 20, 20),
+ child: Form(
+ key: formKey,
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ children: [
+ Text(
+ ritual == null ? "New ritual" : "Edit ritual",
+ style: textTheme.largeBold,
+ ),
+ const Spacer(),
+ IconButton(
+ icon: const Icon(Icons.close),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ ],
+ ),
+ const SizedBox(height: 12),
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Stack(
+ clipBehavior: Clip.none,
+ children: [
+ Container(
+ width: 70,
+ height: 70,
+ decoration: BoxDecoration(
+ color: colorScheme.fillFaintPressed,
+ shape: BoxShape.circle,
+ ),
+ child: Center(
+ child: Text(
+ selectedEmoji,
+ style: const TextStyle(fontSize: 32),
+ ),
+ ),
+ ),
+ Positioned(
+ right: -4,
+ bottom: -4,
+ child: Material(
+ color: colorScheme.backgroundElevated,
+ shape: const CircleBorder(),
+ elevation: 2,
+ child: InkWell(
+ customBorder: const CircleBorder(),
+ onTap: () async {
+ final emoji = await _pickEmoji(
+ context,
+ selectedEmoji,
+ );
+ if (emoji != null) {
+ setState(() {
+ selectedEmoji = emoji;
+ });
+ }
+ },
+ child: const Padding(
+ padding: EdgeInsets.all(6),
+ child: Icon(
+ Icons.edit_outlined,
+ size: 18,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(width: 12),
+ Expanded(
+ child: TextFormField(
+ controller: controller,
+ autofocus: true,
+ decoration: InputDecoration(
+ hintText: "Enter your task",
+ filled: true,
+ fillColor: colorScheme.fillFaint,
+ contentPadding: const EdgeInsets.symmetric(
+ horizontal: 14,
+ vertical: 14,
+ ),
+ border: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(16),
+ borderSide: BorderSide(
+ color: colorScheme.strokeFaint,
+ ),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(16),
+ borderSide: BorderSide(
+ color: colorScheme.strokeFaint,
+ ),
+ ),
+ ),
+ validator: (value) {
+ if (value == null || value.trim().isEmpty) {
+ return "Please enter a description";
+ }
+ return null;
+ },
+ ),
+ ),
+ ],
+ ),
+ const SizedBox(height: 20),
+ _sectionLabel(context, "Day"),
+ const SizedBox(height: 8),
+ Container(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 10,
+ vertical: 10,
+ ),
+ decoration: BoxDecoration(
+ color: colorScheme.fillFaint,
+ borderRadius: BorderRadius.circular(18),
+ ),
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: List.generate(
+ days.length,
+ (index) => _DayCircle(
+ label: _weekLabel(index),
+ selected: days[index],
+ colorScheme: colorScheme,
+ onTap: () {
+ setState(() {
+ days[index] = !days[index];
+ });
+ },
+ ),
),
),
),
- ),
- ],
- ),
- const SizedBox(height: 12),
- Row(
- children: [
- const Text("Time"),
- const SizedBox(width: 12),
- OutlinedButton.icon(
- onPressed: () async {
- final result = await showTimePicker(
- context: context,
- initialTime: selectedTime,
- );
- if (result != null) {
- setState(() {
- selectedTime = result;
- });
- }
- },
- icon: const Icon(Icons.schedule),
- label: Text(
- selectedTime.format(context),
+ const SizedBox(height: 16),
+ _sectionLabel(context, "Time"),
+ const SizedBox(height: 8),
+ GestureDetector(
+ onTap: () async {
+ final result = await showTimePicker(
+ context: context,
+ initialTime: selectedTime,
+ );
+ if (result != null) {
+ setState(() {
+ selectedTime = result;
+ });
+ }
+ },
+ child: Container(
+ padding: const EdgeInsets.symmetric(
+ horizontal: 14,
+ vertical: 14,
+ ),
+ decoration: BoxDecoration(
+ color: colorScheme.fillFaint,
+ borderRadius: BorderRadius.circular(18),
+ border: Border.all(
+ color: colorScheme.strokeFaint,
+ ),
+ ),
+ child: Row(
+ children: [
+ Expanded(
+ child: Text(
+ selectedTime.format(context),
+ style: textTheme.h3Bold,
+ ),
+ ),
+ Container(
+ padding: const EdgeInsets.all(10),
+ decoration: BoxDecoration(
+ color: colorScheme.backgroundElevated2,
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Icon(
+ Icons.schedule,
+ color: colorScheme.textMuted,
+ ),
+ ),
+ ],
+ ),
+ ),
),
- ),
- ],
- ),
- const SizedBox(height: 12),
- ValueListenableBuilder<String?>(
- valueListenable: selectedAlbumName,
- builder: (context, value, _) {
- return ListTile(
- contentPadding: EdgeInsets.zero,
- title: const Text("Album"),
- subtitle: Text(value ?? "Select album"),
- trailing: const Icon(Icons.chevron_right),
- onTap: () async {
- final result = await _pickAlbum(context);
- if (result != null) {
- selectedAlbumId = result.id;
- selectedAlbumName.value = result.displayName;
- }
- },
- );
- },
- ),
- const SizedBox(height: 8),
- Align(
- alignment: Alignment.centerRight,
- child: ElevatedButton(
- onPressed: () async {
- if (!formKey.currentState!.validate()) return;
- if (selectedAlbumId == null) {
- showToast(context, "Please select an album");
- return;
- }
- final updated =
- (ritual ?? activityService.createEmptyRitual())
- .copyWith(
- title: controller.text.trim(),
- daysOfWeek: days,
- timeOfDay: selectedTime,
- albumId: selectedAlbumId,
- albumName: selectedAlbumName.value,
- icon: icon,
- );
- await activityService.saveRitual(updated);
- Navigator.of(context).pop();
- },
- child: const Text("Save"),
+ const SizedBox(height: 16),
+ _sectionLabel(context, "Album"),
+ const SizedBox(height: 8),
+ GestureDetector(
+ onTap: () async {
+ final result = await _pickAlbum(context);
+ if (result != null) {
+ setState(() {
+ selectedAlbum = result;
+ selectedAlbumId = result.id;
+ selectedAlbumName = result.displayName;
+ });
+ }
+ },
+ child: _AlbumPreviewTile(
+ album: selectedAlbum,
+ fallbackName: selectedAlbumName,
+ ),
+ ),
+ const SizedBox(height: 20),
+ SizedBox(
+ width: double.infinity,
+ child: ElevatedButton(
+ style: ElevatedButton.styleFrom(
+ backgroundColor: colorScheme.primary500,
+ padding: const EdgeInsets.symmetric(
+ horizontal: 16,
+ vertical: 14,
+ ),
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(18),
+ ),
+ ),
+ onPressed: () async {
+ if (!formKey.currentState!.validate()) return;
+ if (selectedAlbumId == null) {
+ showToast(context, "Please select an album");
+ return;
+ }
+ final updated = (ritual ??
+ activityService.createEmptyRitual())
+ .copyWith(
+ title: controller.text.trim(),
+ daysOfWeek: days,
+ timeOfDay: selectedTime,
+ albumId: selectedAlbumId,
+ albumName: selectedAlbumName,
+ icon: selectedEmoji,
+ );
+ await activityService.saveRitual(updated);
+ Navigator.of(context).pop();
+ },
+ child: Text(
+ ritual == null ? "Save ritual" : "Update ritual",
+ style: textTheme.bodyBold
+ .copyWith(color: Colors.white),
+ ),
+ ),
+ ),
+ ],
),
),
- ],
+ ),
),
),
);
@@ -724,59 +874,130 @@ String _weekLabel(int index) {
Future<Collection?> _pickAlbum(BuildContext context) async {
final service = CollectionsService.instance;
- final albums = await service.getCollectionForWidgetSelection();
+ final albums =
+ List<Collection>.from(await service.getCollectionForWidgetSelection());
Collection? selected;
await showModalBottomSheet(
context: context,
+ isScrollControlled: true,
+ backgroundColor: Colors.transparent,
builder: (context) {
+ final colorScheme = getEnteColorScheme(context);
+ final textTheme = getEnteTextTheme(context);
final controller = TextEditingController();
return StatefulBuilder(
builder: (context, setState) {
- return Padding(
- padding: const EdgeInsets.all(16),
- child: Column(
- mainAxisSize: MainAxisSize.min,
- children: [
- Row(
- children: [
- const Text("Select album"),
- const Spacer(),
- IconButton(
- icon: const Icon(Icons.close),
- onPressed: () => Navigator.of(context).pop(),
+ return SafeArea(
+ child: Padding(
+ padding: EdgeInsets.only(
+ left: 12,
+ right: 12,
+ bottom: MediaQuery.of(context).viewInsets.bottom + 16,
+ top: 8,
+ ),
+ child: Container(
+ decoration: BoxDecoration(
+ color: colorScheme.backgroundElevated,
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: [
+ BoxShadow(
+ color: Colors.black.withValues(alpha: 0.06),
+ blurRadius: 18,
+ offset: const Offset(0, 10),
),
],
),
- TextField(
- controller: controller,
- decoration: const InputDecoration(
- labelText: "Create new album",
- ),
- onSubmitted: (value) async {
- if (value.trim().isEmpty) return;
- final created = await service.createAlbum(value.trim());
- albums.insert(0, created);
- setState(() {});
- },
- ),
- const SizedBox(height: 12),
- SizedBox(
- height: 320,
- child: ListView.builder(
- itemCount: albums.length,
- itemBuilder: (context, index) {
- final album = albums[index];
- return ListTile(
- title: Text(album.displayName),
- onTap: () {
- selected = album;
- Navigator.of(context).pop();
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Padding(
+ padding: const EdgeInsets.fromLTRB(16, 14, 8, 0),
+ child: Row(
+ children: [
+ Text(
+ "Select album",
+ style: textTheme.bodyBold,
+ ),
+ const Spacer(),
+ IconButton(
+ icon: const Icon(Icons.close),
+ onPressed: () => Navigator.of(context).pop(),
+ ),
+ ],
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.fromLTRB(16, 4, 16, 12),
+ child: TextField(
+ controller: controller,
+ textInputAction: TextInputAction.done,
+ decoration: InputDecoration(
+ hintText: "Create new album",
+ prefixIcon: const Icon(Icons.add_rounded),
+ filled: true,
+ fillColor: colorScheme.fillFaint,
+ border: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(14),
+ borderSide: BorderSide(
+ color: colorScheme.strokeFaint,
+ ),
+ ),
+ enabledBorder: OutlineInputBorder(
+ borderRadius: BorderRadius.circular(14),
+ borderSide: BorderSide(
+ color: colorScheme.strokeFaint,
+ ),
+ ),
+ ),
+ onSubmitted: (value) async {
+ final trimmed = value.trim();
+ if (trimmed.isEmpty) return;
+ final created = await service.createAlbum(trimmed);
+ controller.clear();
+ albums.insert(0, created);
+ setState(() {});
},
- );
- },
- ),
+ ),
+ ),
+ Flexible(
+ child: SizedBox(
+ height: 360,
+ child: albums.isEmpty
+ ? Center(
+ child: Text(
+ "No albums yet",
+ style: textTheme.small
+ .copyWith(color: colorScheme.textMuted),
+ ),
+ )
+ : ListView.separated(
+ padding:
+ const EdgeInsets.fromLTRB(16, 0, 16, 16),
+ itemBuilder: (context, index) {
+ final album = albums[index];
+ return GestureDetector(
+ behavior: HitTestBehavior.opaque,
+ onTap: () {
+ selected = album;
+ Navigator.of(context).pop();
+ },
+ child: AlbumColumnItemWidget(
+ album,
+ selectedCollections: selected == album
+ ? <Collection>[album]
+ : const <Collection>[],
+ ),
+ );
+ },
+ separatorBuilder: (_, __) =>
+ const SizedBox(height: 10),
+ itemCount: albums.length,
+ ),
+ ),
+ ),
+ ],
),
- ],
+ ),
),
);
},
@@ -785,3 +1006,250 @@ Future<Collection?> _pickAlbum(BuildContext context) async {
);
return selected;
}
+
+class _AlbumPreviewTile extends StatelessWidget {
+ const _AlbumPreviewTile({required this.album, required this.fallbackName});
+
+ final Collection? album;
+ final String? fallbackName;
+
+ @override
+ Widget build(BuildContext context) {
+ final colorScheme = getEnteColorScheme(context);
+ final textTheme = getEnteTextTheme(context);
+ return Container(
+ padding: const EdgeInsets.all(10),
+ decoration: BoxDecoration(
+ color: colorScheme.fillFaint,
+ borderRadius: BorderRadius.circular(18),
+ border: Border.all(color: colorScheme.strokeFaint),
+ ),
+ child: Row(
+ children: [
+ _AlbumThumbnail(album: album),
+ const SizedBox(width: 12),
+ Expanded(
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ "Album",
+ style: textTheme.miniMuted,
+ ),
+ const SizedBox(height: 2),
+ Text(
+ album?.displayName ?? fallbackName ?? "Select album",
+ style: textTheme.smallBold,
+ ),
+ ],
+ ),
+ ),
+ Icon(
+ Icons.chevron_right_rounded,
+ color: colorScheme.textMuted,
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class _AlbumThumbnail extends StatelessWidget {
+ const _AlbumThumbnail({required this.album});
+
+ final Collection? album;
+
+ @override
+ Widget build(BuildContext context) {
+ final colorScheme = getEnteColorScheme(context);
+ if (album == null) {
+ return Container(
+ width: 60,
+ height: 60,
+ decoration: BoxDecoration(
+ color: colorScheme.fillFaintPressed,
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Icon(
+ Icons.photo_album_outlined,
+ color: colorScheme.textMuted,
+ ),
+ );
+ }
+ return ClipRRect(
+ borderRadius: BorderRadius.circular(10),
+ child: SizedBox(
+ width: 60,
+ height: 60,
+ child: FutureBuilder<EnteFile?>(
+ future: CollectionsService.instance.getCover(album!),
+ builder: (context, snapshot) {
+ if (snapshot.hasData) {
+ return ThumbnailWidget(
+ snapshot.data!,
+ showFavForAlbumOnly: true,
+ shouldShowOwnerAvatar: false,
+ );
+ }
+ return Container(
+ color: colorScheme.fillFaintPressed,
+ );
+ },
+ ),
+ ),
+ );
+ }
+}
+
+class _DayCircle extends StatelessWidget {
+ const _DayCircle({
+ required this.label,
+ required this.selected,
+ required this.colorScheme,
+ required this.onTap,
+ });
+
+ final String label;
+ final bool selected;
+ final EnteColorScheme colorScheme;
+ final VoidCallback onTap;
+
+ @override
+ Widget build(BuildContext context) {
+ return GestureDetector(
+ onTap: onTap,
+ child: AnimatedContainer(
+ duration: const Duration(milliseconds: 180),
+ curve: Curves.easeOut,
+ width: 38,
+ height: 38,
+ decoration: BoxDecoration(
+ color:
+ selected ? colorScheme.primary500 : colorScheme.fillFaintPressed,
+ borderRadius: BorderRadius.circular(20),
+ boxShadow: selected
+ ? [
+ BoxShadow(
+ color: colorScheme.primary500.withValues(alpha: 0.3),
+ blurRadius: 12,
+ offset: const Offset(0, 6),
+ ),
+ ]
+ : [],
+ ),
+ child: Center(
+ child: Text(
+ label,
+ style: TextStyle(
+ color: selected ? Colors.white : colorScheme.textMuted,
+ fontWeight: FontWeight.w800,
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
+
+Widget _sectionLabel(BuildContext context, String label) {
+ final textTheme = getEnteTextTheme(context);
+ final colorScheme = getEnteColorScheme(context);
+ return Text(
+ label,
+ style: textTheme.smallBold.copyWith(color: colorScheme.textMuted),
+ );
+}
+
+Future<String?> _pickEmoji(BuildContext context, String current) async {
+ const emojiOptions = [
+ "πŸ“Έ",
+ "😊",
+ "🌿",
+ "β˜•οΈ",
+ "πŸŒ…",
+ "πŸƒ",
+ "🧘",
+ "πŸ“š",
+ "🎧",
+ "🍳",
+ "🎨",
+ "πŸ₯Ύ",
+ "πŸŒ™",
+ "πŸ“",
+ "🧠",
+ "🧹",
+ "🌻",
+ "🧩",
+ ];
+ String? selected;
+ final colorScheme = getEnteColorScheme(context);
+ await showModalBottomSheet(
+ context: context,
+ backgroundColor: colorScheme.backgroundElevated,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.vertical(top: Radius.circular(20)),
+ ),
+ builder: (context) {
+ return SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(16, 16, 16, 24),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ "Pick an emoji",
+ style: getEnteTextTheme(context).bodyBold,
+ ),
+ const SizedBox(height: 12),
+ GridView.count(
+ shrinkWrap: true,
+ crossAxisCount: 6,
+ childAspectRatio: 1,
+ mainAxisSpacing: 10,
+ crossAxisSpacing: 10,
+ children: emojiOptions.map((emoji) {
+ final isActive = emoji == current;
+ return InkWell(
+ borderRadius: BorderRadius.circular(12),
+ onTap: () {
+ selected = emoji;
+ Navigator.of(context).pop();
+ },
+ child: Container(
+ decoration: BoxDecoration(
+ color: isActive
+ ? colorScheme.primary500.withValues(alpha: 0.1)
+ : colorScheme.fillFaint,
+ borderRadius: BorderRadius.circular(12),
+ border: Border.all(
+ color: isActive
+ ? colorScheme.primary500
+ : colorScheme.strokeFaint,
+ ),
+ ),
+ child: Center(
+ child: Text(
+ emoji,
+ style: const TextStyle(fontSize: 22),
+ ),
+ ),
+ ),
+ );
+ }).toList(),
+ ),
+ const SizedBox(height: 8),
+ TextButton(
+ onPressed: () {
+ Navigator.of(context).pop();
+ },
+ child: const Text("Use keyboard emoji"),
+ ),
+ ],
+ ),
+ ),
+ );
+ },
+ );
+ return selected;
+}