mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
fix: ProviderNotFound exception in overlay demo example
This commit is contained in:
@ -41,20 +41,22 @@ class ListOverlay extends StatelessWidget {
|
|||||||
return OverlayContainer(
|
return OverlayContainer(
|
||||||
constraints: BoxConstraints.tight(Size(width, totalHeight)),
|
constraints: BoxConstraints.tight(Size(width, totalHeight)),
|
||||||
padding: padding,
|
padding: padding,
|
||||||
child: Column(
|
child: SingleChildScrollView(
|
||||||
children: [
|
child: Column(
|
||||||
ListView.builder(
|
children: [
|
||||||
shrinkWrap: true,
|
ListView.builder(
|
||||||
itemBuilder: itemBuilder,
|
shrinkWrap: true,
|
||||||
itemCount: itemCount,
|
itemBuilder: itemBuilder,
|
||||||
controller: controller,
|
itemCount: itemCount,
|
||||||
),
|
controller: controller,
|
||||||
if (footer != null)
|
|
||||||
Padding(
|
|
||||||
padding: footer!.padding,
|
|
||||||
child: footer!.widget,
|
|
||||||
),
|
),
|
||||||
],
|
if (footer != null)
|
||||||
|
Padding(
|
||||||
|
padding: footer!.padding,
|
||||||
|
child: footer!.widget,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ class OverlayContainer extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final theme = context.watch<AppTheme>();
|
final theme = context.watch<AppTheme?>() ?? AppTheme.fromType(ThemeType.light);
|
||||||
return Material(
|
return Material(
|
||||||
type: MaterialType.transparency,
|
type: MaterialType.transparency,
|
||||||
child: Container(
|
child: Container(
|
||||||
|
Reference in New Issue
Block a user