getPreferredSize static method
- OudsTopBarSize? size,
- double? expandedHeight,
Returns the preferred size based on the platform: OudsToolbarTop size for iOS, OudsTopAppBar size for Android and other platforms.
This method is static, so it can be called outside this class without instantiating the widget. Note: The parameters is only required for Android; it is ignored on iOS.
Parameters:
size: The size of the top bar.expandedHeight: The expanded height of the bar.
Returns:
- A Size object representing the preferred size.
Implementation
static Size getPreferredSize({OudsTopBarSize? size, double? expandedHeight}){
return defaultTargetPlatform == TargetPlatform.iOS
? OudsToolbarTop.getPreferredSize
: OudsTopAppBar.getPreferredSize(size: size!,expandedHeight: expandedHeight);
}