platform property
FeedViewPlatform
platform
The FeedView platform that's used by this FeedVIew.
The default value is AndroidFeedView on Android and CupertinoFeedView
on iOS.
Implementation
static FeedViewPlatform get platform {
if (_platform == null) {
switch (defaultTargetPlatform) {
case TargetPlatform.android:
_platform = const AndroidFeedView();
break;
case TargetPlatform.iOS:
_platform = const CupertinoFeedView();
break;
default:
throw UnsupportedError(
"Trying to use the default feedview implementation for $defaultTargetPlatform but there isn't a default one");
}
}
return _platform!;
}
void
platform=(FeedViewPlatform platform)
Sets a custom FeedViewPlatform
.
This property can be set to use a custom platform implementation for FeedViews.
Setting platform
doesn't affect FeedViews that were already created.
The default value is AndroidFeedView on Android and CupertinoFeedView
on iOS.
Implementation
static set platform(FeedViewPlatform platform) {
_platform = platform;
}