maxBottomSheet function

dynamic maxBottomSheet(
  1. BuildContext context,
  2. Widget child, {
  3. String? subtitle,
  4. String? title,
  5. double? height,
  6. required CountryListConfig countryListConfig,
})

Implementation

maxBottomSheet(BuildContext context, Widget child,
    {String? subtitle,
    String? title,
    double? height,
    required CountryListConfig countryListConfig}) {
  return showBottomSheet(
      backgroundColor: countryListConfig.modalBackgoroundColor,
      context: context,
      builder: (BuildContext context) {
        return Material(
          child: Container(
            color: countryListConfig.modalBackgoroundColor,
            height: height,
            child: Column(
              mainAxisSize: MainAxisSize.min,
              crossAxisAlignment: CrossAxisAlignment.start,
              children: [
                maxIndicatorModal(
                    color: countryListConfig.modalIndicatorColor!),
                const SizedBox(height: 6),
                if (title != null)
                  Container(
                    padding: const EdgeInsets.only(left: 16),
                    alignment: Alignment.centerLeft,
                    child: Text(
                      title,
                      style: countryListConfig.modalTitleTextStyle,
                    ),
                  ),
                if (title != null) const SizedBox(height: 16),
                // // if (title != null) divideThick(),
                // const SizedBox(height: 6),
                child,
              ],
            ),
          ),
        );
      });
}