the array cast should happen inside the `getWidget` method