showBottomSheet<T> method

Future<T?> showBottomSheet<T>(
  1. BuildContext context
)

Implementation

Future<T?> showBottomSheet<T>(BuildContext context) {
  return showModalBottomSheet(
    context: context,
    isScrollControlled: true,
    showDragHandle: false,
    enableDrag: false,
    useSafeArea: true,
    builder: (context) {
      return BottomSheet(
        onClosing: () {
          Navigator.of(context).pop();
        },
        enableDrag: false,
        showDragHandle: false,
        dragHandleSize: const Size(0, 0),
        builder: (context) {
          return Column(
            children: [
              const SizedBox(height: 10),
              Padding(
                padding: const EdgeInsets.only(
                  left: 13,
                  right: 13,
                  top: 0,
                  bottom: 0,
                ),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.start,
                  children: [
                    Expanded(
                      flex: 1,
                      child: IconButton(
                        onPressed: () {
                          Navigator.of(context).pop();
                        },
                        icon: const Icon(Icons.arrow_back),
                      ),
                    ),
                    Expanded(
                      flex: 4,
                      child: Center(
                        child: Text(options.textMapTitle),
                      ),
                    ),
                    const Expanded(
                      flex: 1,
                      child: SizedBox(),
                    )
                  ],
                ),
              ),
              Expanded(
                child: options.map,
              ),
            ],
          );
        },
      );
    },
  );
}