Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions lib/src/app.dart
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ class FluentApp extends StatefulWidget {
this.themeMode,
this.restorationScopeId,
this.scrollBehavior = const FluentScrollBehavior(),
this.useInheritedMediaQuery = false,
}) : routeInformationProvider = null,
routeInformationParser = null,
routerDelegate = null,
Expand Down Expand Up @@ -105,6 +106,7 @@ class FluentApp extends StatefulWidget {
this.actions,
this.restorationScopeId,
this.scrollBehavior = const FluentScrollBehavior(),
this.useInheritedMediaQuery = false,
}) : assert(routeInformationParser != null && routerDelegate != null,
'The routeInformationParser and routerDelegate cannot be null.'),
assert(supportedLocales.isNotEmpty),
Expand Down Expand Up @@ -344,6 +346,9 @@ class FluentApp extends StatefulWidget {

static bool debugAllowBannerOverride = true;

/// {@macro flutter.widgets.widgetsApp.useInheritedMediaQuery}
final bool useInheritedMediaQuery;

@override
_FluentAppState createState() => _FluentAppState();
}
Expand Down Expand Up @@ -469,6 +474,7 @@ class _FluentAppState extends State<FluentApp> {
actions: widget.actions,
restorationScopeId: widget.restorationScopeId,
localizationsDelegates: _localizationsDelegates,
useInheritedMediaQuery: widget.useInheritedMediaQuery
);
}

Expand Down Expand Up @@ -499,6 +505,7 @@ class _FluentAppState extends State<FluentApp> {
actions: widget.actions,
restorationScopeId: widget.restorationScopeId,
localizationsDelegates: _localizationsDelegates,
useInheritedMediaQuery: widget.useInheritedMediaQuery,
pageRouteBuilder: <T>(RouteSettings settings, WidgetBuilder builder) {
return FluentPageRoute<T>(settings: settings, builder: builder);
},
Expand Down