Implementation
static rangeScannedDeatilsBottomsheet(
final RangeScannedModel model, String productName) async {
return await Get.bottomSheet(
Container(
width: double.maxFinite,
decoration: BoxDecoration(
color: ColorConstant.white,
borderRadius: BorderRadius.only(
topLeft: Radius.circular(
SizeConstant.getHeightWithScreen(30),
),
topRight: Radius.circular(
SizeConstant.getHeightWithScreen(30),
),
),
),
child: Column(
mainAxisSize: MainAxisSize.min,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Container(
padding: EdgeInsets.only(
left: SizeConstant.getHeightWithScreen(15),
right: SizeConstant.getHeightWithScreen(15),
top: SizeConstant.getHeightWithScreen(20),
bottom: SizeConstant.getHeightWithScreen(16)),
decoration: BoxDecoration(
color: ColorConstant.statusBarColor,
borderRadius: BorderRadius.only(
topLeft:
Radius.circular(SizeConstant.getHeightWithScreen(30)),
topRight:
Radius.circular(SizeConstant.getHeightWithScreen(30)),
),
),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Expanded(
child: Text(
productName,
style: TextStyle(
fontSize: SizeConstant.xlargeFont,
fontWeight: FontWeight.w600,
overflow: TextOverflow.ellipsis,
color: ColorConstant.black3,
),
),
),
GestureDetector(
onTap: () {
Get.back();
},
child: Icon(
Icons.close,
color: ColorConstant.grey1,
size: SizeConstant.getHeightWithScreen(16),
),
)
],
),
SizedBox(
height: SizeConstant.getHeightWithScreen(10),
),
Row(
mainAxisAlignment: MainAxisAlignment.start,
children: [
Padding(
padding: EdgeInsets.only(
right: SizeConstant.getHeightWithScreen(29)),
child: Row(
children: [
Container(
width: 5,
height: 5,
margin: EdgeInsets.only(
right: SizeConstant.getHeightWithScreen(5)),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: ColorConstant.grey5,
),
),
Text(
"Range ${model.id}" ?? "-",
style: TextStyle(
fontSize: SizeConstant.smallXFont,
color: ColorConstant.grey5,
fontWeight: FontWeight.w500,
),
),
],
),
),
Row(
children: [
Container(
width: 5,
height: 5,
margin: EdgeInsets.only(
right: SizeConstant.getHeightWithScreen(5)),
decoration: BoxDecoration(
shape: BoxShape.circle,
color: ColorConstant.black3,
),
),
Text(
"${model.iccidList!.length.toString()} Assets",
style: TextStyle(
fontSize: SizeConstant.smallXFont,
color: ColorConstant.black3,
fontWeight: FontWeight.w500,
),
),
],
)
],
),
],
),
),
SizedBox(
height: SizeConstant.getHeightWithScreen(10),
),
Expanded(
child: ListView.separated(
separatorBuilder: (BuildContext context, int index) =>
SizedBox(
height: SizeConstant.getHeightWithScreen(5),
),
shrinkWrap: false,
itemCount: model.iccidList!.length,
itemBuilder: (ctx, id) => Container(
decoration: BoxDecoration(
color: ColorConstant.statusBarColor,
borderRadius: BorderRadius.all(
Radius.circular(
SizeConstant.getHeightWithScreen(5)),
),
),
margin: EdgeInsets.symmetric(
horizontal: SizeConstant.getHeightWithScreen(15)),
padding: EdgeInsets.symmetric(
horizontal: SizeConstant.getHeightWithScreen(15),
vertical: SizeConstant.getHeightWithScreen(10),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
Text(
"ICCID: ${model.iccidList![id].iccid}",
style: TextStyle(
fontSize: SizeConstant.smallFont,
fontWeight: FontWeight.w500,
color: ColorConstant.pgvDescTextColor,
),
),
],
),
)),
)
],
),
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.only(
topLeft: Radius.circular(
SizeConstant.getHeightWithScreen(30),
),
topRight: Radius.circular(
SizeConstant.getHeightWithScreen(30),
),
),
),
backgroundColor: ColorConstant.white,
);
}