Skip to content

Commit 0f30e4e

Browse files
committed
🚑️ Fix context usages for inherited theme data
1 parent f28a701 commit 0f30e4e

File tree

1 file changed

+19
-21
lines changed

1 file changed

+19
-21
lines changed

lib/src/delegates/asset_picker_builder_delegate.dart

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2175,29 +2175,27 @@ class DefaultAssetPickerBuilderDelegate
21752175
}
21762176
});
21772177
}
2178-
return CNP<DefaultAssetPickerProvider>.value(
2179-
value: provider,
2180-
builder: (BuildContext context, _) {
2181-
return AnnotatedRegion<SystemUiOverlayStyle>(
2182-
value: overlayStyle,
2183-
child: Theme(
2184-
data: theme,
2185-
child: Material(
2186-
color: theme.canvasColor,
2187-
child: Stack(
2188-
fit: StackFit.expand,
2189-
children: <Widget>[
2190-
if (isAppleOS)
2191-
appleOSLayout(context)
2192-
else
2193-
androidLayout(context),
2194-
if (Platform.isIOS) iOSPermissionOverlay(context),
2195-
],
2196-
),
2178+
return AnnotatedRegion<SystemUiOverlayStyle>(
2179+
value: overlayStyle,
2180+
child: Theme(
2181+
data: theme,
2182+
child: CNP<DefaultAssetPickerProvider>.value(
2183+
value: provider,
2184+
builder: (BuildContext context, _) => Material(
2185+
color: theme.canvasColor,
2186+
child: Stack(
2187+
fit: StackFit.expand,
2188+
children: <Widget>[
2189+
if (isAppleOS)
2190+
appleOSLayout(context)
2191+
else
2192+
androidLayout(context),
2193+
if (Platform.isIOS) iOSPermissionOverlay(context),
2194+
],
21972195
),
21982196
),
2199-
);
2200-
},
2197+
),
2198+
),
22012199
);
22022200
}
22032201
}

0 commit comments

Comments
 (0)