refactor: Implement avatar image viewer and adjust design
Signed-off-by: Krille <c.kussowski@famedly.com>
This commit is contained in:
parent
2873a047f8
commit
3594fa4f6d
12 changed files with 151 additions and 59 deletions
|
|
@ -62,18 +62,13 @@ class Avatar extends StatelessWidget {
|
|||
clipBehavior: Clip.hardEdge,
|
||||
child: noPic
|
||||
? Container(
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: [name!.lightColorAvatar, name.color],
|
||||
begin: Alignment.topLeft,
|
||||
end: Alignment.bottomRight,
|
||||
),
|
||||
),
|
||||
decoration: BoxDecoration(color: name!.lightColorAvatar),
|
||||
alignment: Alignment.center,
|
||||
child: Text(
|
||||
fallbackLetters,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
fontFamily: 'RobotoMono',
|
||||
color: Colors.white,
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: (size / 2.5).roundToDouble(),
|
||||
|
|
@ -143,10 +138,12 @@ class Avatar extends StatelessWidget {
|
|||
],
|
||||
);
|
||||
if (onTap == null) return container;
|
||||
return InkWell(
|
||||
onTap: onTap,
|
||||
borderRadius: borderRadius,
|
||||
child: container,
|
||||
return MouseRegion(
|
||||
cursor: SystemMouseCursors.click,
|
||||
child: GestureDetector(
|
||||
onTap: onTap,
|
||||
child: container,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue