Showing
1 changed file
with
102 additions
and
102 deletions
| @@ -220,110 +220,110 @@ class _Avatar extends StatelessWidget { | @@ -220,110 +220,110 @@ class _Avatar extends StatelessWidget { | ||
| 220 | @override | 220 | @override |
| 221 | Widget build(BuildContext context) { | 221 | Widget build(BuildContext context) { |
| 222 | var controller = Get.find<MyController>(); | 222 | var controller = Get.find<MyController>(); |
| 223 | - return Stack( | ||
| 224 | - clipBehavior: Clip.none, | ||
| 225 | - children: [ | ||
| 226 | - ClipOval( | ||
| 227 | - child: SizedBox( | ||
| 228 | - width: 80, | ||
| 229 | - height: 80, | ||
| 230 | - child: CachedNetworkImage( | ||
| 231 | - imageUrl: avatarUrl, | ||
| 232 | - fit: BoxFit.cover, | ||
| 233 | - ), | ||
| 234 | - ), | ||
| 235 | - ), | ||
| 236 | - Positioned( | ||
| 237 | - right: 0, | ||
| 238 | - bottom: 0, | ||
| 239 | - child: GestureDetector( | ||
| 240 | - behavior: HitTestBehavior.opaque, | ||
| 241 | - onTap: () { | ||
| 242 | - Get.bottomSheet(SafeArea( | ||
| 243 | - child: Column( | ||
| 244 | - mainAxisSize: MainAxisSize.min, | ||
| 245 | - children: [ | ||
| 246 | - GestureDetector( | ||
| 247 | - onTap: () { | ||
| 248 | - Get.back(); | ||
| 249 | - controller.pickAvatar(fromCamera: true); | ||
| 250 | - }, | ||
| 251 | - child: Container( | ||
| 252 | - width: double.infinity, | ||
| 253 | - margin: EdgeInsets.symmetric(horizontal: 16), | ||
| 254 | - height: 52, | ||
| 255 | - decoration: BoxDecoration( | ||
| 256 | - color: Colors.white, | ||
| 257 | - borderRadius: BorderRadius.only( | ||
| 258 | - topLeft: Radius.circular(16), | ||
| 259 | - topRight: Radius.circular(16), | ||
| 260 | - ), | ||
| 261 | - ), | ||
| 262 | - alignment: Alignment.center, | ||
| 263 | - child: Text( | ||
| 264 | - l10n.filming, | ||
| 265 | - style: TextStyle( | ||
| 266 | - color: context.colors.textPrimary, | ||
| 267 | - fontSize: 14, | ||
| 268 | - fontWeight: FontWeight.w400, | ||
| 269 | - ), | ||
| 270 | - ), | ||
| 271 | - ), | 223 | + return GestureDetector( |
| 224 | + behavior: HitTestBehavior.opaque, | ||
| 225 | + onTap: () { | ||
| 226 | + Get.bottomSheet(SafeArea( | ||
| 227 | + child: Column( | ||
| 228 | + mainAxisSize: MainAxisSize.min, | ||
| 229 | + children: [ | ||
| 230 | + GestureDetector( | ||
| 231 | + onTap: () { | ||
| 232 | + Get.back(); | ||
| 233 | + controller.pickAvatar(fromCamera: true); | ||
| 234 | + }, | ||
| 235 | + child: Container( | ||
| 236 | + width: double.infinity, | ||
| 237 | + margin: EdgeInsets.symmetric(horizontal: 16), | ||
| 238 | + height: 52, | ||
| 239 | + decoration: BoxDecoration( | ||
| 240 | + color: Colors.white, | ||
| 241 | + borderRadius: BorderRadius.only( | ||
| 242 | + topLeft: Radius.circular(16), | ||
| 243 | + topRight: Radius.circular(16), | ||
| 272 | ), | 244 | ), |
| 273 | - GestureDetector( | ||
| 274 | - onTap: () { | ||
| 275 | - Get.back(); | ||
| 276 | - controller.pickAvatar(fromCamera: false); | ||
| 277 | - }, | ||
| 278 | - child: Container( | ||
| 279 | - width: double.infinity, | ||
| 280 | - margin: EdgeInsets.symmetric(horizontal: 16), | ||
| 281 | - height: 52, | ||
| 282 | - decoration: BoxDecoration( | ||
| 283 | - color: Colors.white, | ||
| 284 | - borderRadius: BorderRadius.only( | ||
| 285 | - bottomLeft: Radius.circular(16), | ||
| 286 | - bottomRight: Radius.circular(16), | ||
| 287 | - ), | ||
| 288 | - ), | ||
| 289 | - alignment: Alignment.center, | ||
| 290 | - child: Text( | ||
| 291 | - l10n.uploadPhotos, | ||
| 292 | - style: TextStyle( | ||
| 293 | - color: context.colors.textPrimary, | ||
| 294 | - fontSize: 14, | ||
| 295 | - fontWeight: FontWeight.w400, | ||
| 296 | - ), | ||
| 297 | - ), | ||
| 298 | - ), | 245 | + ), |
| 246 | + alignment: Alignment.center, | ||
| 247 | + child: Text( | ||
| 248 | + l10n.filming, | ||
| 249 | + style: TextStyle( | ||
| 250 | + color: context.colors.textPrimary, | ||
| 251 | + fontSize: 14, | ||
| 252 | + fontWeight: FontWeight.w400, | ||
| 299 | ), | 253 | ), |
| 300 | - GestureDetector( | ||
| 301 | - onTap: () { | ||
| 302 | - Get.back(); | ||
| 303 | - }, | ||
| 304 | - child: Container( | ||
| 305 | - width: double.infinity, | ||
| 306 | - margin: EdgeInsets.only(left: 16, right: 16, top: 8), | ||
| 307 | - height: 52, | ||
| 308 | - decoration: BoxDecoration( | ||
| 309 | - color: Colors.white, | ||
| 310 | - borderRadius: BorderRadius.circular(16), | ||
| 311 | - ), | ||
| 312 | - alignment: Alignment.center, | ||
| 313 | - child: Text( | ||
| 314 | - l10n.cancel, | ||
| 315 | - style: TextStyle( | ||
| 316 | - color: context.colors.textSecondary, | ||
| 317 | - fontSize: 14, | ||
| 318 | - fontWeight: FontWeight.w400, | ||
| 319 | - ), | ||
| 320 | - ), | ||
| 321 | - ), | 254 | + ), |
| 255 | + ), | ||
| 256 | + ), | ||
| 257 | + GestureDetector( | ||
| 258 | + onTap: () { | ||
| 259 | + Get.back(); | ||
| 260 | + controller.pickAvatar(fromCamera: false); | ||
| 261 | + }, | ||
| 262 | + child: Container( | ||
| 263 | + width: double.infinity, | ||
| 264 | + margin: EdgeInsets.symmetric(horizontal: 16), | ||
| 265 | + height: 52, | ||
| 266 | + decoration: BoxDecoration( | ||
| 267 | + color: Colors.white, | ||
| 268 | + borderRadius: BorderRadius.only( | ||
| 269 | + bottomLeft: Radius.circular(16), | ||
| 270 | + bottomRight: Radius.circular(16), | ||
| 322 | ), | 271 | ), |
| 323 | - ], | 272 | + ), |
| 273 | + alignment: Alignment.center, | ||
| 274 | + child: Text( | ||
| 275 | + l10n.uploadPhotos, | ||
| 276 | + style: TextStyle( | ||
| 277 | + color: context.colors.textPrimary, | ||
| 278 | + fontSize: 14, | ||
| 279 | + fontWeight: FontWeight.w400, | ||
| 280 | + ), | ||
| 281 | + ), | ||
| 324 | ), | 282 | ), |
| 325 | - )); | ||
| 326 | - }, | 283 | + ), |
| 284 | + GestureDetector( | ||
| 285 | + onTap: () { | ||
| 286 | + Get.back(); | ||
| 287 | + }, | ||
| 288 | + child: Container( | ||
| 289 | + width: double.infinity, | ||
| 290 | + margin: EdgeInsets.only(left: 16, right: 16, top: 8), | ||
| 291 | + height: 52, | ||
| 292 | + decoration: BoxDecoration( | ||
| 293 | + color: Colors.white, | ||
| 294 | + borderRadius: BorderRadius.circular(16), | ||
| 295 | + ), | ||
| 296 | + alignment: Alignment.center, | ||
| 297 | + child: Text( | ||
| 298 | + l10n.cancel, | ||
| 299 | + style: TextStyle( | ||
| 300 | + color: context.colors.textSecondary, | ||
| 301 | + fontSize: 14, | ||
| 302 | + fontWeight: FontWeight.w400, | ||
| 303 | + ), | ||
| 304 | + ), | ||
| 305 | + ), | ||
| 306 | + ), | ||
| 307 | + ], | ||
| 308 | + ), | ||
| 309 | + )); | ||
| 310 | + }, | ||
| 311 | + child: Stack( | ||
| 312 | + clipBehavior: Clip.none, | ||
| 313 | + children: [ | ||
| 314 | + ClipOval( | ||
| 315 | + child: SizedBox( | ||
| 316 | + width: 80, | ||
| 317 | + height: 80, | ||
| 318 | + child: CachedNetworkImage( | ||
| 319 | + imageUrl: avatarUrl, | ||
| 320 | + fit: BoxFit.cover, | ||
| 321 | + ), | ||
| 322 | + ), | ||
| 323 | + ), | ||
| 324 | + Positioned( | ||
| 325 | + right: 0, | ||
| 326 | + bottom: 0, | ||
| 327 | child: Container( | 327 | child: Container( |
| 328 | width: 24, | 328 | width: 24, |
| 329 | height: 24, | 329 | height: 24, |
| @@ -339,8 +339,8 @@ class _Avatar extends StatelessWidget { | @@ -339,8 +339,8 @@ class _Avatar extends StatelessWidget { | ||
| 339 | ), | 339 | ), |
| 340 | ), | 340 | ), |
| 341 | ), | 341 | ), |
| 342 | - ), | ||
| 343 | - ], | 342 | + ], |
| 343 | + ), | ||
| 344 | ); | 344 | ); |
| 345 | } | 345 | } |
| 346 | } | 346 | } |
-
Please register or login to post a comment