Skip to content

armgit / ente

Public Imported from GitHub
0

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

[auth] UI improvements

Aman Rajb18d8bb5e6a8
diff --git a/auth/lib/ui/components/custom_icon_widget.dart b/auth/lib/ui/components/custom_icon_widget.dart
index 4825ddff60..7af65fc7f3 100644
--- a/auth/lib/ui/components/custom_icon_widget.dart
+++ b/auth/lib/ui/components/custom_icon_widget.dart
@@ -1,6 +1,7 @@
import 'package:ente_auth/theme/ente_theme.dart';
import 'package:ente_auth/ui/utils/icon_utils.dart';
import 'package:ente_auth/utils/totp_util.dart';
+import 'package:figma_squircle/figma_squircle.dart';
import 'package:flutter/material.dart';
class CustomIconWidget extends StatelessWidget {
@@ -13,23 +14,96 @@ class CustomIconWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
- return Container(
- width: 70,
- height: 70,
- decoration: BoxDecoration(
- border: Border.all(
- width: 1.5,
- color: getEnteColorScheme(context).tagChipSelectedColor,
- ),
- borderRadius: const BorderRadius.all(Radius.circular(12.0)),
+ return SizedBox(
+ height: 90,
+ width: 90,
+ child: Stack(
+ children: [
+ Container(
+ width: 80,
+ height: 80,
+ decoration: ShapeDecoration(
+ shape: SmoothRectangleBorder(
+ side: BorderSide(
+ width: 1.5,
+ color: getEnteColorScheme(context)
+ .tagChipSelectedColor
+ .withOpacity(0.5),
+ ),
+ borderRadius: SmoothBorderRadius(
+ cornerRadius: 15.5,
+ cornerSmoothing: 1.0,
+ ),
+ ),
+ ),
+ padding: const EdgeInsets.symmetric(
+ horizontal: 10,
+ vertical: 8,
+ ),
+ child: FittedBox(
+ fit: BoxFit.contain,
+ child: IconUtils.instance.getIcon(
+ context,
+ safeDecode(iconData).trim(),
+ width: 50,
+ ),
+ ),
+ ),
+ _getEditIcon(context),
+ ],
),
- padding: const EdgeInsets.all(8),
- child: FittedBox(
- fit: BoxFit.contain,
- child: IconUtils.instance.getIcon(
- context,
- safeDecode(iconData).trim(),
- width: 50,
+ );
+ }
+
+ Widget _getEditIcon(BuildContext context) {
+ return Positioned(
+ left: 60,
+ top: 60,
+ child: Center(
+ child: Container(
+ height: 28,
+ width: 28,
+ decoration: ShapeDecoration(
+ color: Colors.white,
+ shadows: const [
+ BoxShadow(
+ offset: Offset(0, 0),
+ blurRadius: 0.84,
+ color: Color.fromRGBO(0, 0, 0, 0.11),
+ ),
+ BoxShadow(
+ offset: Offset(0.84, 0.84),
+ blurRadius: 1.68,
+ color: Color.fromRGBO(0, 0, 0, 0.09),
+ ),
+ BoxShadow(
+ offset: Offset(2.53, 2.53),
+ blurRadius: 2.53,
+ color: Color.fromRGBO(0, 0, 0, 0.05),
+ ),
+ BoxShadow(
+ offset: Offset(5.05, 4.21),
+ blurRadius: 2.53,
+ color: Color.fromRGBO(0, 0, 0, 0.02),
+ ),
+ BoxShadow(
+ offset: Offset(7.58, 6.74),
+ blurRadius: 2.53,
+ color: Color.fromRGBO(0, 0, 0, 0.0),
+ ),
+ ],
+ shape: SmoothRectangleBorder(
+ borderRadius: SmoothBorderRadius(
+ cornerRadius: 8,
+ cornerSmoothing: 1.0,
+ ),
+ ),
+ ),
+ child: Icon(
+ Icons.edit,
+ size: 16,
+ color: Colors.black.withOpacity(0.9),
+ ),
),
),
);