Even when using the provided completed code, the simulator doesn't allow you to preview the widget in the simulator. When you click the plus, the created widget isn't displayed as an option and even searching for it doesn't help
Simulator doesn't show the widgets
If you're doing this in the simulator, that's a known issue and is called out in the release notes:
Widgets might not appear in the widget gallery when using Simulator. (64222135)
Workaround: Debug with your extension’s scheme directly to Simulator.