Commit 1429e580d4cbd2d13fc413dfff28052b592822a1

Authored by 常守达
1 parent df0b28f4

fix(my): 头像点击修改

... ... @@ -220,110 +220,110 @@ class _Avatar extends StatelessWidget {
@override
Widget build(BuildContext context) {
var controller = Get.find<MyController>();
return Stack(
clipBehavior: Clip.none,
children: [
ClipOval(
child: SizedBox(
width: 80,
height: 80,
child: CachedNetworkImage(
imageUrl: avatarUrl,
fit: BoxFit.cover,
),
),
),
Positioned(
right: 0,
bottom: 0,
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Get.bottomSheet(SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
GestureDetector(
onTap: () {
Get.back();
controller.pickAvatar(fromCamera: true);
},
child: Container(
width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: 16),
height: 52,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16),
),
),
alignment: Alignment.center,
child: Text(
l10n.filming,
style: TextStyle(
color: context.colors.textPrimary,
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
),
return GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
Get.bottomSheet(SafeArea(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
GestureDetector(
onTap: () {
Get.back();
controller.pickAvatar(fromCamera: true);
},
child: Container(
width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: 16),
height: 52,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(16),
topRight: Radius.circular(16),
),
GestureDetector(
onTap: () {
Get.back();
controller.pickAvatar(fromCamera: false);
},
child: Container(
width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: 16),
height: 52,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(16),
bottomRight: Radius.circular(16),
),
),
alignment: Alignment.center,
child: Text(
l10n.uploadPhotos,
style: TextStyle(
color: context.colors.textPrimary,
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
),
),
alignment: Alignment.center,
child: Text(
l10n.filming,
style: TextStyle(
color: context.colors.textPrimary,
fontSize: 14,
fontWeight: FontWeight.w400,
),
GestureDetector(
onTap: () {
Get.back();
},
child: Container(
width: double.infinity,
margin: EdgeInsets.only(left: 16, right: 16, top: 8),
height: 52,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
alignment: Alignment.center,
child: Text(
l10n.cancel,
style: TextStyle(
color: context.colors.textSecondary,
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
),
),
),
),
GestureDetector(
onTap: () {
Get.back();
controller.pickAvatar(fromCamera: false);
},
child: Container(
width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: 16),
height: 52,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.only(
bottomLeft: Radius.circular(16),
bottomRight: Radius.circular(16),
),
],
),
alignment: Alignment.center,
child: Text(
l10n.uploadPhotos,
style: TextStyle(
color: context.colors.textPrimary,
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
),
));
},
),
GestureDetector(
onTap: () {
Get.back();
},
child: Container(
width: double.infinity,
margin: EdgeInsets.only(left: 16, right: 16, top: 8),
height: 52,
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.circular(16),
),
alignment: Alignment.center,
child: Text(
l10n.cancel,
style: TextStyle(
color: context.colors.textSecondary,
fontSize: 14,
fontWeight: FontWeight.w400,
),
),
),
),
],
),
));
},
child: Stack(
clipBehavior: Clip.none,
children: [
ClipOval(
child: SizedBox(
width: 80,
height: 80,
child: CachedNetworkImage(
imageUrl: avatarUrl,
fit: BoxFit.cover,
),
),
),
Positioned(
right: 0,
bottom: 0,
child: Container(
width: 24,
height: 24,
... ... @@ -339,8 +339,8 @@ class _Avatar extends StatelessWidget {
),
),
),
),
],
],
),
);
}
}
... ...