The documentation says you can pass null or an empty string to the shadow directive to remove the shadow. I'm dynamically passing a number value or null depending on the platform with this method:
public iosShadow(level: string): number {
if (this.platform === 'ios') {
return Number(level);
}
return null;
}
And view:
<StackLayout [shadow]="iosShadow(2)">
...
</StackLayout>
Though I always get this error when passing null: Cannot read property 'elevation' of null
The documentation says you can pass
nullor an empty string to the shadow directive to remove the shadow. I'm dynamically passing a number value or null depending on the platform with this method:And view:
Though I always get this error when passing null:
Cannot read property 'elevation' of null