buildElevatedButton method Null safety

dynamic buildElevatedButton(
  1. BuildContext context,
  2. String title,
  3. void onPressedFunction(
      )
    )

    Builds an elevated button that has a title and an onPressedFunction callback.

    Returns a SizedBox.

    Implementation

    static buildElevatedButton(BuildContext context, String title, void Function() onPressedFunction) {
      return SizedBox(
        width: Sizes.getLoginStyleSize(context).width,
        child: ElevatedButton(
          onPressed: onPressedFunction,
          style: ElevatedButton.styleFrom(
            foregroundColor: Colors.white, backgroundColor: Colors.transparent, padding: const EdgeInsets.all(0.0),
            shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(80.0)),
          ),
          child: Ink(
            decoration: BoxDecoration(
                gradient: LinearGradient(colors: CustomColors.loginRegisterColors(),
                  begin: Alignment.topLeft,
                  end: Alignment.bottomRight,
                ),
                borderRadius: BorderRadius.circular(30.0)
            ),
            child: Container(
              width: Sizes.getLoginStyleSize(context).width,
              height: Sizes.getLoginStyleSize(context).height,
              alignment: Alignment.center,
              child: Text(title, style: (Sizes.getScreenSize(context).width < 400) ? Theme.of(context).textTheme.bodyText1 : Theme.of(context).textTheme.headline2),
            ),
          ),
        ),
      );
    }