getOrderDetails method

dynamic getOrderDetails(
  1. BuildContext context,
  2. String image,
  3. String amount,
  4. String products,
  5. String name,
  6. String description,
)

Implementation

getOrderDetails(BuildContext context, String image, String amount,
    String products, String name, String description) {
  showModalBottomSheet<dynamic>(
    isScrollControlled: true,
    context: context,
    shape: RoundedRectangleBorder(
      borderRadius: BorderRadius.circular(30.0),
    ),
    backgroundColor: Colors.transparent,
    builder: (BuildContext context) {
      return Container(
        height: SizeConstant.getHeightWithScreen(400),
        padding: EdgeInsets.only(
            left: SizeConstant.getHeightWithScreen(15),
            bottom: SizeConstant.getHeightWithScreen(15),
            right: SizeConstant.getHeightWithScreen(15)),
        width: MediaQuery.of(context).size.width,
        decoration: BoxDecoration(
          color: ColorConstant.white,
          borderRadius: const BorderRadius.only(
            topLeft: Radius.circular(30.0),
            topRight: Radius.circular(30.0),
          ),
        ),
        child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Center(
                child: Container(
                  height: SizeConstant.getHeightWithScreen(4),
                  width: SizeConstant.getHeightWithScreen(77),
                  color: ColorConstant.pgvDotColor,
                  margin: EdgeInsets.all(SizeConstant.getHeightWithScreen(5)),
                ),
              ),
              Container(
                height: SizeConstant.getHeightWithScreen(194),
                padding: EdgeInsets.all(SizeConstant.getHeightWithScreen(15)),
                width: MediaQuery.of(context).size.width,
                decoration: BoxDecoration(
                  color: ColorConstant.white,
                  borderRadius: const BorderRadius.only(
                    topLeft: Radius.circular(30.0),
                    topRight: Radius.circular(30.0),
                  ),
                ),
                child: Image(
                  image: const AssetImage(
                    'assets/images/stock_check.png',
                    package: Constants.packageName,
                  ),
                  height: SizeConstant.getHeightWithScreen(194),
                  width: SizeConstant.getHeightWithScreen(330),
                ),
              ),
              SizedBox(
                height: SizeConstant.getHeightWithScreen(10),
              ),
              Text(
                name!,
                textDirection: TextDirection.ltr,
                style: TextStyle(
                  color: ColorConstant.black3,
                  fontSize: SizeConstant.xxlargeFont,
                  fontWeight: FontWeight.w500,
                ),
              ),
              SizedBox(height: SizeConstant.getHeightWithScreen(8)),
              Row(
                  mainAxisAlignment: MainAxisAlignment.spaceBetween,
                  children: [
                    Text(
                      amount,
                      textDirection: TextDirection.ltr,
                      style: TextStyle(
                        color: ColorConstant.black3,
                        fontSize: SizeConstant.xxlargeFont,
                        fontWeight: FontWeight.w500,
                      ),
                    ),
                    Text(
                      '${products} PC',
                      textDirection: TextDirection.ltr,
                      style: TextStyle(
                        color: ColorConstant.grey7,
                        fontSize: SizeConstant.mediumFont,
                        fontWeight: FontWeight.w500,
                      ),
                    ),
                  ]),
              SizedBox(height: SizeConstant.getHeightWithScreen(8)),
              Text(
                description == null ? "" : description!,
                style: TextStyle(
                  color: ColorConstant.grey5,
                  fontSize: SizeConstant.smallFont,
                  fontWeight: FontWeight.w500,
                ),
              ),
              SizedBox(height: SizeConstant.getHeightWithScreen(22)),
            ]),
      );
    },
  );
}