Skip to content

Commit 25760e1

Browse files
authored
FluentApp review (#351)
2 parents 17a353d + fda9e26 commit 25760e1

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Date format: DD/MM/YYYY
33
## [next]
44

55
- Show menu button on automatic minimal display mode ([#350](https://github.com/bdlukaa/fluent_ui/pull/350))
6+
- **BREAKING** `Map<ShortcutActivator, Intent>?` is now the typed used on `FluentApp.shortcuts` ([#351](https://github.com/bdlukaa/fluent_ui/pull/351))
67

78
## [3.12.0] - Flutter 3.0 - [13/05/2022]
89

lib/src/app.dart

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ import 'package:flutter_localizations/flutter_localizations.dart';
55
/// An application that uses fluent design.
66
///
77
/// A convenience widget that wraps a number of widgets that are commonly
8-
/// required for fluent design applications.
8+
/// required for fluent design applications. It builds upon a [WidgetsApp] by
9+
/// adding fluent-design specific functionality, such as [AnimatedFluentTheme].
910
///
1011
/// The [FluentApp] configures the top-level [Navigator] to search for routes
1112
/// in the following order:
@@ -29,6 +30,13 @@ import 'package:flutter_localizations/flutter_localizations.dart';
2930
///
3031
/// If [home], [routes], [onGenerateRoute], and [onUnknownRoute] are all null,
3132
/// and [builder] is not null, then no [Navigator] is created.
33+
///
34+
/// See also:
35+
///
36+
/// * [NavigationView], to provide fluent app-wide navigation
37+
/// * [Navigator], which is used to manage the app's stack of pages.
38+
/// * [WidgetsApp], which defines the basic app elements but does not depend on
39+
/// the fluent library.
3240
class FluentApp extends StatefulWidget {
3341
/// Creates a FluentApp.
3442
///
@@ -282,9 +290,9 @@ class FluentApp extends StatefulWidget {
282290
/// ```dart
283291
/// Widget build(BuildContext context) {
284292
/// return FluentApp(
285-
/// shortcuts: <LogicalKeySet, Intent>{
286-
/// ...WidgetsApp.defaultShortcuts,
287-
/// LogicalKeySet(LogicalKeyboardKey.select): const ActivateIntent(),
293+
/// shortcuts: <ShortcutActivator, Intent>{
294+
/// ... WidgetsApp.defaultShortcuts,
295+
/// const SingleActivator(LogicalKeyboardKey.select): const ActivateIntent(),
288296
/// },
289297
/// color: const Color(0xFFFF0000),
290298
/// builder: (BuildContext context, Widget? child) {
@@ -295,7 +303,7 @@ class FluentApp extends StatefulWidget {
295303
/// ```
296304
/// {@end-tool}
297305
/// {@macro flutter.widgets.widgetsApp.shortcuts.seeAlso}
298-
final Map<LogicalKeySet, Intent>? shortcuts;
306+
final Map<ShortcutActivator, Intent>? shortcuts;
299307

300308
/// {@macro flutter.widgets.widgetsApp.actions}
301309
/// {@tool snippet}
@@ -341,12 +349,6 @@ class FluentApp extends StatefulWidget {
341349
/// in a subtree.
342350
final ScrollBehavior scrollBehavior;
343351

344-
static bool showPerformanceOverlayOverride = false;
345-
346-
static bool debugShowWidgetInspectorOverride = false;
347-
348-
static bool debugAllowBannerOverride = true;
349-
350352
/// {@macro flutter.widgets.widgetsApp.useInheritedMediaQuery}
351353
final bool useInheritedMediaQuery;
352354

0 commit comments

Comments
 (0)