The backgroundColor property in ThemeData was removed in newer Flutter versions. Replace theme.backgroundColor with theme.colorScheme.background to resolve the issue:
TextStyle(color: confirmTextColor ?? theme.colorScheme.background)
This will ensure compatibility with the updated Flutter theme system.