feat: add close button to image picker widget for improved user interaction and navigation
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:camera/camera.dart';
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:rasadyar_core/core.dart';
|
||||
|
||||
@@ -49,6 +50,27 @@ class _RImagePickerState extends State<RImagePicker> {
|
||||
children: [
|
||||
CameraPreview(widget.controller.cameraController!),
|
||||
|
||||
Positioned(
|
||||
top: 50,
|
||||
right: 10,
|
||||
child: GestureDetector(
|
||||
onTap: () => Get.back(),
|
||||
child: Container(
|
||||
width: 40.w,
|
||||
height: 40.h,
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white.withAlpha(50),
|
||||
borderRadius: BorderRadius.circular(10.r),
|
||||
),
|
||||
child: Icon(
|
||||
CupertinoIcons.clear,
|
||||
color: Colors.white,
|
||||
size: 20,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
|
||||
Positioned(
|
||||
bottom: 40,
|
||||
right: 10,
|
||||
|
||||
Reference in New Issue
Block a user