What is flutter_platform_widgets?
masterThe flutter_platform_widgets package provides a set of platform-aware widgets that automatically switch between Material (Android) and Cupertino (iOS/macOS) implementations based on the current target platform. This eliminates the need for manual conditional logic (e.g., if (platform == TargetPlatform.iOS) ...) throughout your codebase.
Instead of writing separate branches for different platforms, you use Platform prefixed widgets like PlatformElevatedButton.
Widget build(BuildContext context) {
return PlatformElevatedButton(
onPressed: () => onAction(),
child: PlatformText('Action'),
);
}