Skip to content

armgit / ente

Public Imported from GitHub
0

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

[mobile][photos] make entire mems banner tappable

Priyanshu Dangare0d549c0460cc
diff --git a/mobile/apps/photos/lib/ui/home/memories/craft_memories.dart b/mobile/apps/photos/lib/ui/home/memories/craft_memories.dart
index d3adc7c5ed..c87ede96e5 100644
--- a/mobile/apps/photos/lib/ui/home/memories/craft_memories.dart
+++ b/mobile/apps/photos/lib/ui/home/memories/craft_memories.dart
@@ -45,72 +45,70 @@ class _CraftMemoriesState extends State<CraftMemories> {
final l10n = AppLocalizations.of(context);
return Padding(
padding: const EdgeInsets.all(MemoryCoverWidget.gap / 2.0),
- child: SizedBox(
- width: widget.width,
- height: widget.height,
- child: ClipRRect(
- borderRadius: BorderRadius.circular(18),
- child: Stack(
- children: [
- Positioned.fill(
- child: rive.RiveWidgetBuilder(
- fileLoader: _riveFileLoader,
- builder: (BuildContext context, rive.RiveState state) {
- if (state is rive.RiveLoaded) {
- return rive.RiveWidget(
- controller: state.controller,
- fit: rive.Fit.cover,
- );
- }
- return const SizedBox.shrink();
- },
- ),
- ),
- Padding(
- padding: const EdgeInsets.all(16),
- child: Column(
- mainAxisAlignment: MainAxisAlignment.end,
- crossAxisAlignment: CrossAxisAlignment.start,
- children: [
- Text(
- l10n.craftingMemoriesFirstHalf,
- style: TextStyle(
- fontFamily: TextStyles.outfitFontFamily,
- package: TextStyles.fontPackage,
- color: Colors.white,
- fontWeight: FontWeight.w700,
- fontSize: widget.width * 0.115,
- height: 1,
- ),
- ),
- Text(
- l10n.craftingMemoriesSecondHalf,
- style: TextStyle(
- fontFamily: "Gochi Hand",
- package: TextStyles.fontPackage,
- color: Colors.white,
- fontSize: widget.width * 0.175,
- height: 1,
- ),
- ),
- const SizedBox(height: 6),
- GestureDetector(
- onTap: () async {
- if (await NotificationService.instance
- .requestPermissions(context) &&
- mounted) {
- widget.onNotificationsPermissionGranted?.call();
+ child: GestureDetector(
+ onTap: () async {
+ if (await NotificationService.instance.requestPermissions(context) &&
+ mounted) {
+ widget.onNotificationsPermissionGranted?.call();
+ }
+ },
+ onTapDown: (_) => setState(() => _isButtonPressed = true),
+ onTapUp: (_) => setState(() => _isButtonPressed = false),
+ onTapCancel: () => setState(() => _isButtonPressed = false),
+ child: AnimatedScale(
+ scale: _isButtonPressed ? 0.98 : 1,
+ duration: const Duration(milliseconds: 120),
+ curve: Curves.easeOutCubic,
+ child: SizedBox(
+ width: widget.width,
+ height: widget.height,
+ child: ClipRRect(
+ borderRadius: BorderRadius.circular(18),
+ child: Stack(
+ children: [
+ Positioned.fill(
+ child: rive.RiveWidgetBuilder(
+ fileLoader: _riveFileLoader,
+ builder: (BuildContext context, rive.RiveState state) {
+ if (state is rive.RiveLoaded) {
+ return rive.RiveWidget(
+ controller: state.controller,
+ fit: rive.Fit.cover,
+ );
}
+ return const SizedBox.shrink();
},
- onTapDown: (_) => setState(() => _isButtonPressed = true),
- onTapUp: (_) => setState(() => _isButtonPressed = false),
- onTapCancel: () =>
- setState(() => _isButtonPressed = false),
- child: AnimatedScale(
- scale: _isButtonPressed ? 0.98 : 1,
- duration: const Duration(milliseconds: 120),
- curve: Curves.easeOutCubic,
- child: DecoratedBox(
+ ),
+ ),
+ Padding(
+ padding: const EdgeInsets.all(16),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.end,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Text(
+ l10n.craftingMemoriesFirstHalf,
+ style: TextStyle(
+ fontFamily: TextStyles.outfitFontFamily,
+ package: TextStyles.fontPackage,
+ color: Colors.white,
+ fontWeight: FontWeight.w700,
+ fontSize: widget.width * 0.115,
+ height: 1,
+ ),
+ ),
+ Text(
+ l10n.craftingMemoriesSecondHalf,
+ style: TextStyle(
+ fontFamily: "Gochi Hand",
+ package: TextStyles.fontPackage,
+ color: Colors.white,
+ fontSize: widget.width * 0.175,
+ height: 1,
+ ),
+ ),
+ const SizedBox(height: 6),
+ DecoratedBox(
decoration: BoxDecoration(
color: Colors.white.withAlpha(128),
borderRadius: BorderRadius.circular(14),
@@ -132,12 +130,12 @@ class _CraftMemoriesState extends State<CraftMemories> {
),
),
),
- ),
+ ],
),
- ],
- ),
+ ),
+ ],
),
- ],
+ ),
),
),
),