helpButton static method

Widget helpButton({
  1. required String title,
  2. String? text,
  3. Widget? content,
  4. required BuildContext context,
  5. Color? background,
})

Implementation

static Widget helpButton({
  required String title,
  String? text,
  Widget? content,
  required BuildContext context,
  Color? background,
}) {
  return InkWell(
    onTap: () {
      PopupHelper.showDialog(
          context,
          title: title,
          icon: Icons.help,
          Padding(
            padding: const EdgeInsets.all(8.0),
            child: SizedBox(
                width: 300,
                child: text != null
                    ? Text(
                        text,
                      )
                    : content),
          ),
          button1: okButton(
              onPress: () {
                Navigator.pop(context);
              },
              context: context));
    },
    child: Padding(
      padding: const EdgeInsets.all(2.0),
      child: Container(
        decoration: BoxDecoration(
          borderRadius: const BorderRadius.all(Radius.circular(20)),
          color: background,
        ),
        child: const Icon(
          Icons.help,
          //color: Colors.white70,
        ),
      ),
    ),
  );
}