getTheme method

Returns the svg theme.

Implementation

@visibleForTesting
@protected
SvgTheme getTheme(BuildContext? context) {
  if (theme != null) {
    return theme!;
  }
  if (context != null) {
    final SvgTheme? defaultTheme = DefaultSvgTheme.of(context)?.theme;
    if (defaultTheme != null) {
      return defaultTheme;
    }
  }
  return const SvgTheme();
}