setTheme method

Future<void> setTheme(
  1. ApperoTheme? theme
)

Sets a custom theme for the feedback UI.

The theme controls colors and typography of the native feedback dialog. Pass null to reset to system default theme (which auto-detects light/dark mode).

theme - The theme to apply, or null for system default

Throws PlatformException if setting the theme fails.

Example:

import 'package:appero_flutter/appero.dart';

// Use custom theme 1
await Appero.instance.setTheme(customTheme1);

// Reset to system default
await Appero.instance.setTheme(null);

Implementation

Future<void> setTheme(ApperoTheme? theme) async {
  await _methodChannel.invokeMethod('setTheme', {
    'theme': theme?.toMap(),
  });
}