generate method

  1. @override
dynamic generate(
  1. dynamic theme
)
override

Implementation

@override
generate(dynamic theme) {
  if (theme == null) {
    if (style != null) {
      return DrawerThemeData(
        backgroundColor: style!.background,
        shape: style!.shape(),
        elevation: style!.elevation,
        width: style!.width,
      );
    } else {
      return null;
    }
  } else {
    if (style != null) {
      return (theme as DrawerThemeData).copyWith(
        backgroundColor: style!.background ?? theme.backgroundColor,
        shape: style!.shape() ?? theme.shape,
        elevation: style!.elevation ?? theme.elevation,
        width: style!.width ?? theme.width,
      );
    } else {
      return theme as DrawerThemeData;
    }
  }
}