Reputation: 89
I'm trying to create a notification on top using the overlay_support 1.2.1 widget. I did everything based on the example, but I always get a boot error as shown in the image below.
Upvotes: 0
Views: 2649
Reputation: 6022
From
void main() {
runApp(MaterialApp(
home: MyApp()),
);
}
To
void main() {
runApp(
OverlaySupport.global((
child: MaterialApp(
home: MyApp()),
),
);
}
Upvotes: 0
Reputation: 15
I encounter error too but you can wrap your material app with OverlaySupport.global(). Note if you're dealing with multiple screen, you will wrap the main screen i.e. the first screen.
Upvotes: 0
Reputation: 31
wrap your material app with OverlaySupport.global()picture showing what i mentioned
Upvotes: 3