getButton method Null safety

TextButton getButton(
  1. BuildContext context,
  2. String title,
  3. void onPressedFunction(
      )
    )

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

    Returns a TextButton

    Implementation

    static TextButton getButton(BuildContext context, String title, void Function() onPressedFunction){
    
        return TextButton(
          onPressed: onPressedFunction,
          style: ElevatedButton.styleFrom(
            foregroundColor: Colors.white, backgroundColor: Colors.deepPurple, fixedSize: Sizes.getLoginStyleSize(context)
          ),
          child: Text(title),
        );
    }