displayerELO method Null safety

SizedBox displayerELO(
  1. String title,
  2. String content,
  3. bool horizontal,
  4. BuildContext context
)

Returns a SizedBox that contains a content to display. It has a title and can be horizontal or not.

Implementation

static SizedBox displayerELO (String title, String content, bool horizontal, BuildContext context){
  double width = 1.5*((horizontal) ? Sizes.getPixelSizeWidth(0.4375303841, context) : Sizes.getPixelSizeWidth(0.1944579485, context));
  double height = 1.5*((horizontal) ? Sizes.getPixelSize(0.04611482592, context) : Sizes.getPixelSize(0.09222965183, context));
  if(content.length > 13) height *= 2;
  return SizedBox(
    child: Center(
        child: Column(
          children: [
            Text(title, style: Theme.of(context).textTheme.bodyText1,),
            SizedBox(height: Sizes.getPixelSize(0.01152870649, context)),
            SizedBox(
                child: Container(
                    height: height,
                    width: width,

                    decoration: BoxDecoration(
                      gradient: LinearGradient(
                          begin: Alignment.centerLeft,
                          end: Alignment.centerRight,
                          colors: CustomColors.displayInfo1()
                      ),
                      borderRadius: const BorderRadius.all(Radius.circular(10.0)),
                    ),
                    child: Center(child: Text(textAlign: TextAlign.center,content, style: Theme.of(context).textTheme.headline2,))
                )
            )
          ],
        )
    ),
  );
}