From c37f103a56cbd7dc6d2eb44929e5892554bc9722 Mon Sep 17 00:00:00 2001 From: sulav-crisps Date: Tue, 12 Apr 2022 20:08:17 +0545 Subject: [PATCH 1/4] Feature: Added leading of NavigationPane --- example/lib/main.dart | 5 ++++- example/pubspec.lock | 2 +- .../controls/navigation/navigation_view/pane.dart | 13 ++++++++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index bf2dd9dc3..2e343b66d 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -60,13 +60,16 @@ void main() async { runApp(const MyApp()); } + + class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return ChangeNotifierProvider( - create: (_) => AppTheme(), + + create: (_) => AppTheme(), builder: (context, _) { final appTheme = context.watch(); return FluentApp( diff --git a/example/pubspec.lock b/example/pubspec.lock index b6846b864..e5e66dcdb 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -91,7 +91,7 @@ packages: path: ".." relative: true source: path - version: "3.10.1" + version: "3.10.2" flutter: dependency: "direct main" description: flutter diff --git a/lib/src/controls/navigation/navigation_view/pane.dart b/lib/src/controls/navigation/navigation_view/pane.dart index 8843f5821..9e88b59d8 100644 --- a/lib/src/controls/navigation/navigation_view/pane.dart +++ b/lib/src/controls/navigation/navigation_view/pane.dart @@ -85,6 +85,7 @@ class NavigationPane with Diagnosticable { this.customPane, this.menuButton, this.scrollController, + this.leading, this.indicator = const StickyNavigationIndicator(), }) : assert(selected == null || selected >= 0); @@ -168,6 +169,9 @@ class NavigationPane with Diagnosticable { /// display mode is toggled. final ScrollController? scrollController; + /// The leading Widget for the Pane + final Widget? leading; + /// A function called when building the navigation indicator final Widget? indicator; @@ -421,7 +425,14 @@ class _TopNavigationPane extends StatelessWidget { child: Row(key: pane.paneKey, children: [ Expanded( child: Row(children: [ - if (appBar != null) NavigationAppBar.buildLeading(context, appBar!), + if(pane.leading != null) + Padding( + padding: const EdgeInsets.symmetric( + horizontal: 8.0, + vertical: 6.0, + ), + child: pane.leading!, + ), if (pane.header != null) Padding( padding: const EdgeInsets.symmetric( From d0bf5f2a4fca7b27c823054d4387e2c7738de280 Mon Sep 17 00:00:00 2001 From: sulav-crisps Date: Tue, 12 Apr 2022 20:22:26 +0545 Subject: [PATCH 2/4] Added Change in Changelog --- CHANGELOG.md | 1 + example/lib/main.dart | 2 +- example/lib/screens/forms.dart | 3 +- example/lib/screens/settings.dart | 3 +- example/lib/theme.dart | 2 +- lib/fluent_ui.dart | 53 ++++++++----------- lib/generated/l10n.dart | 1 + lib/src/controls/form/auto_suggest_box.dart | 2 +- lib/src/controls/form/combo_box.dart | 3 +- .../controls/form/pickers/date_picker.dart | 1 - .../controls/form/pickers/time_picker.dart | 5 +- lib/src/controls/form/text_form_box.dart | 2 +- lib/src/controls/inputs/buttons/base.dart | 3 +- lib/src/controls/inputs/buttons/theme.dart | 3 +- lib/src/controls/inputs/checkbox.dart | 3 +- lib/src/controls/inputs/chip.dart | 1 - lib/src/controls/inputs/pill_button_bar.dart | 3 +- lib/src/controls/inputs/radio_button.dart | 1 - lib/src/controls/inputs/slider.dart | 3 +- lib/src/controls/inputs/split_button.dart | 3 +- .../navigation/navigation_view/view.dart | 7 +-- lib/src/controls/navigation/tab_view.dart | 1 - lib/src/controls/surfaces/info_bar.dart | 1 - lib/src/controls/surfaces/tooltip.dart | 3 +- lib/src/controls/utils/hover_button.dart | 1 - lib/src/controls/utils/scrollbar.dart | 1 - lib/src/styles/acrylic.dart | 3 +- lib/src/styles/theme.dart | 1 - lib/src/styles/typography.dart | 1 - lib/src/utils/popup.dart | 3 +- test/app_test.dart | 3 +- 31 files changed, 43 insertions(+), 80 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 97358cea1..0f929545c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ Date format: DD/MM/YYYY - Do not use duplicated `Scrollbar`s ([#279](https://github.com/bdlukaa/fluent_ui/pull/279/)) - Allow custom height on `NavigationPane` header. ([#260](https://github.com/bdlukaa/fluent_ui/pull/260/)) - Allow to define the minimal tab width ([#282](https://github.com/bdlukaa/fluent_ui/pull/282/)) +- Allow applying custom leading Widget to NavigationPane([#286](https://github.com/bdlukaa/fluent_ui/pull/286/)) ## [3.10.2] - [09/04/2022] diff --git a/example/lib/main.dart b/example/lib/main.dart index 2e343b66d..8fa5a16c3 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -8,12 +8,12 @@ import 'package:url_strategy/url_strategy.dart'; import 'package:window_manager/window_manager.dart'; import 'screens/colors.dart'; +import 'screens/commandbars.dart'; import 'screens/flyouts.dart'; import 'screens/forms.dart'; import 'screens/icons.dart'; import 'screens/inputs.dart'; import 'screens/mobile.dart'; -import 'screens/commandbars.dart'; import 'screens/others.dart'; import 'screens/settings.dart'; import 'screens/typography.dart'; diff --git a/example/lib/screens/forms.dart b/example/lib/screens/forms.dart index b8a827bbb..ff5ed1c6f 100644 --- a/example/lib/screens/forms.dart +++ b/example/lib/screens/forms.dart @@ -1,8 +1,7 @@ // ignore_for_file: avoid_print -import 'package:fluent_ui/fluent_ui.dart'; - import 'package:email_validator/email_validator.dart'; +import 'package:fluent_ui/fluent_ui.dart'; class Forms extends StatefulWidget { const Forms({Key? key}) : super(key: key); diff --git a/example/lib/screens/settings.dart b/example/lib/screens/settings.dart index a1c89e3a6..66c6aa0f4 100644 --- a/example/lib/screens/settings.dart +++ b/example/lib/screens/settings.dart @@ -1,8 +1,7 @@ // ignore_for_file: constant_identifier_names -import 'package:flutter/foundation.dart'; - import 'package:fluent_ui/fluent_ui.dart'; +import 'package:flutter/foundation.dart'; import 'package:flutter_acrylic/flutter_acrylic.dart'; import 'package:provider/provider.dart'; diff --git a/example/lib/theme.dart b/example/lib/theme.dart index d0d12de7a..f3d92e0a3 100644 --- a/example/lib/theme.dart +++ b/example/lib/theme.dart @@ -1,7 +1,7 @@ import 'package:fluent_ui/fluent_ui.dart'; import 'package:flutter/foundation.dart'; -import 'package:system_theme/system_theme.dart'; import 'package:flutter_acrylic/flutter_acrylic.dart'; +import 'package:system_theme/system_theme.dart'; enum NavigationIndicators { sticky, end } diff --git a/lib/fluent_ui.dart b/lib/fluent_ui.dart index 20431dde1..6178d0c2d 100644 --- a/lib/fluent_ui.dart +++ b/lib/fluent_ui.dart @@ -1,6 +1,5 @@ library fluent_ui; -export 'package:flutter/widgets.dart' hide TextBox; export 'package:flutter/material.dart' show Brightness, @@ -28,43 +27,41 @@ export 'package:flutter/material.dart' TextSelectionTheme, TextSelectionThemeData, SelectableText; +export 'package:flutter/widgets.dart' hide TextBox; export 'package:scroll_pos/scroll_pos.dart'; export 'src/app.dart'; -export 'src/icons.dart'; -export 'src/localization.dart'; -export 'src/utils.dart'; - -export 'src/navigation/route.dart'; - -export 'src/controls/navigation/bottom_navigation.dart'; -export 'src/layout/page.dart'; - +export 'src/controls/form/auto_suggest_box.dart'; +export 'src/controls/form/combo_box.dart'; +export 'src/controls/form/form_row.dart'; +export 'src/controls/form/pickers/date_picker.dart'; +export 'src/controls/form/pickers/time_picker.dart'; +export 'src/controls/form/selection_controls.dart'; +export 'src/controls/form/text_box.dart'; +export 'src/controls/form/text_form_box.dart'; export 'src/controls/inputs/buttons/base.dart'; -export 'src/controls/inputs/buttons/theme.dart'; export 'src/controls/inputs/buttons/button.dart'; -export 'src/controls/inputs/buttons/icon_button.dart'; export 'src/controls/inputs/buttons/filled_button.dart'; +export 'src/controls/inputs/buttons/icon_button.dart'; export 'src/controls/inputs/buttons/outlined_button.dart'; export 'src/controls/inputs/buttons/text_button.dart'; - +export 'src/controls/inputs/buttons/theme.dart'; export 'src/controls/inputs/checkbox.dart'; export 'src/controls/inputs/chip.dart'; export 'src/controls/inputs/dropdown_button.dart'; export 'src/controls/inputs/pill_button_bar.dart'; export 'src/controls/inputs/radio_button.dart'; export 'src/controls/inputs/rating.dart'; +export 'src/controls/inputs/slider.dart'; export 'src/controls/inputs/split_button.dart'; export 'src/controls/inputs/toggle_button.dart'; export 'src/controls/inputs/toggle_switch.dart'; -export 'src/controls/inputs/slider.dart'; - +export 'src/controls/navigation/bottom_navigation.dart'; export 'src/controls/navigation/navigation_view/view.dart'; export 'src/controls/navigation/tab_view.dart'; export 'src/controls/navigation/tree_view.dart'; - -export 'src/controls/surfaces/calendar/calendar_view.dart'; export 'src/controls/surfaces/bottom_sheet.dart'; +export 'src/controls/surfaces/calendar/calendar_view.dart'; export 'src/controls/surfaces/card.dart'; export 'src/controls/surfaces/commandbar.dart'; export 'src/controls/surfaces/dialog.dart'; @@ -75,30 +72,22 @@ export 'src/controls/surfaces/list_tile.dart'; export 'src/controls/surfaces/progress_indicators.dart'; export 'src/controls/surfaces/snackbar.dart'; export 'src/controls/surfaces/tooltip.dart'; - export 'src/controls/utils/divider.dart'; export 'src/controls/utils/hover_button.dart'; export 'src/controls/utils/info_badge.dart'; export 'src/controls/utils/scrollbar.dart'; - -export 'src/controls/form/auto_suggest_box.dart'; -export 'src/controls/form/text_box.dart'; -export 'src/controls/form/combo_box.dart'; -export 'src/controls/form/pickers/date_picker.dart'; -export 'src/controls/form/pickers/time_picker.dart'; -export 'src/controls/form/text_form_box.dart'; -export 'src/controls/form/form_row.dart'; -export 'src/controls/form/selection_controls.dart'; - +export 'src/icons.dart'; export 'src/layout/dynamic_overflow.dart'; - -export 'src/styles/motion/page_transitions.dart'; +export 'src/layout/page.dart'; +export 'src/localization.dart'; +export 'src/navigation/route.dart'; export 'src/styles/acrylic.dart'; export 'src/styles/color.dart' hide ColorConst; +export 'src/styles/focus.dart'; export 'src/styles/mica.dart'; +export 'src/styles/motion/page_transitions.dart'; export 'src/styles/theme.dart'; export 'src/styles/typography.dart'; - -export 'src/styles/focus.dart'; +export 'src/utils.dart'; export 'src/utils/horizontal_scroll_view.dart'; export 'src/utils/label.dart'; diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 5507c49f7..3a8a80512 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -1,6 +1,7 @@ // GENERATED CODE - DO NOT MODIFY BY HAND import 'package:flutter/material.dart'; import 'package:intl/intl.dart'; + import 'intl/messages_all.dart'; // ************************************************************************** diff --git a/lib/src/controls/form/auto_suggest_box.dart b/lib/src/controls/form/auto_suggest_box.dart index 1d286642e..ed91c1a57 100644 --- a/lib/src/controls/form/auto_suggest_box.dart +++ b/lib/src/controls/form/auto_suggest_box.dart @@ -1,6 +1,6 @@ import 'dart:ui' as ui; -import 'package:fluent_ui/fluent_ui.dart'; +import 'package:fluent_ui/fluent_ui.dart'; import 'package:flutter/foundation.dart'; enum TextChangedReason { diff --git a/lib/src/controls/form/combo_box.dart b/lib/src/controls/form/combo_box.dart index 189c9192f..7a1e6c51d 100644 --- a/lib/src/controls/form/combo_box.dart +++ b/lib/src/controls/form/combo_box.dart @@ -1,12 +1,11 @@ import 'dart:math' as math; import 'dart:ui' show window; +import 'package:fluent_ui/fluent_ui.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; -import 'package:fluent_ui/fluent_ui.dart'; - import 'pickers/pickers.dart'; const Duration _kComboboxMenuDuration = Duration(milliseconds: 300); diff --git a/lib/src/controls/form/pickers/date_picker.dart b/lib/src/controls/form/pickers/date_picker.dart index 5ea0d25d1..1c997b18c 100644 --- a/lib/src/controls/form/pickers/date_picker.dart +++ b/lib/src/controls/form/pickers/date_picker.dart @@ -1,5 +1,4 @@ import 'package:fluent_ui/fluent_ui.dart'; - import 'package:fluent_ui/src/utils/popup.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; diff --git a/lib/src/controls/form/pickers/time_picker.dart b/lib/src/controls/form/pickers/time_picker.dart index 298095094..f42502135 100644 --- a/lib/src/controls/form/pickers/time_picker.dart +++ b/lib/src/controls/form/pickers/time_picker.dart @@ -1,8 +1,7 @@ import 'package:fluent_ui/fluent_ui.dart'; -import 'package:flutter/rendering.dart'; -import 'package:flutter/foundation.dart'; - import 'package:fluent_ui/src/utils/popup.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/rendering.dart'; import 'pickers.dart'; diff --git a/lib/src/controls/form/text_form_box.dart b/lib/src/controls/form/text_form_box.dart index 896d92f61..920f807ad 100644 --- a/lib/src/controls/form/text_form_box.dart +++ b/lib/src/controls/form/text_form_box.dart @@ -1,8 +1,8 @@ import 'dart:ui' as ui; +import 'package:fluent_ui/fluent_ui.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/services.dart'; -import 'package:fluent_ui/fluent_ui.dart'; /// A [FormField] that contains a [TextBox]. /// diff --git a/lib/src/controls/inputs/buttons/base.dart b/lib/src/controls/inputs/buttons/base.dart index fe98fee10..aadf8e865 100644 --- a/lib/src/controls/inputs/buttons/base.dart +++ b/lib/src/controls/inputs/buttons/base.dart @@ -1,7 +1,6 @@ // import 'package:flutter/material.dart' as m; -import 'package:flutter/foundation.dart'; - import 'package:fluent_ui/fluent_ui.dart'; +import 'package:flutter/foundation.dart'; /// {@template fluent_ui.buttons.base} /// Buttons give people a way to trigger an action. They’re typically found in diff --git a/lib/src/controls/inputs/buttons/theme.dart b/lib/src/controls/inputs/buttons/theme.dart index d53802b49..b2de61798 100644 --- a/lib/src/controls/inputs/buttons/theme.dart +++ b/lib/src/controls/inputs/buttons/theme.dart @@ -1,8 +1,7 @@ import 'dart:ui' show lerpDouble; -import 'package:flutter/foundation.dart'; - import 'package:fluent_ui/fluent_ui.dart'; +import 'package:flutter/foundation.dart'; class ButtonStyle with Diagnosticable { const ButtonStyle({ diff --git a/lib/src/controls/inputs/checkbox.dart b/lib/src/controls/inputs/checkbox.dart index 1d7976030..d87391488 100644 --- a/lib/src/controls/inputs/checkbox.dart +++ b/lib/src/controls/inputs/checkbox.dart @@ -1,8 +1,7 @@ +import 'package:fluent_ui/fluent_ui.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; -import 'package:fluent_ui/fluent_ui.dart'; - /// A check box is used to select or deselect action items. It can /// be used for a single item or for a list of multiple items that /// a user can choose from. The control has three selection states: diff --git a/lib/src/controls/inputs/chip.dart b/lib/src/controls/inputs/chip.dart index 5934052eb..12fc55572 100644 --- a/lib/src/controls/inputs/chip.dart +++ b/lib/src/controls/inputs/chip.dart @@ -1,7 +1,6 @@ import 'dart:ui' show lerpDouble; import 'package:fluent_ui/fluent_ui.dart'; - import 'package:flutter/foundation.dart'; const double _kChipSpacing = 6.0; diff --git a/lib/src/controls/inputs/pill_button_bar.dart b/lib/src/controls/inputs/pill_button_bar.dart index 083d1f764..c80fcd394 100644 --- a/lib/src/controls/inputs/pill_button_bar.dart +++ b/lib/src/controls/inputs/pill_button_bar.dart @@ -1,6 +1,5 @@ -import 'package:flutter/foundation.dart'; - import 'package:fluent_ui/fluent_ui.dart'; +import 'package:flutter/foundation.dart'; const double _kMinHeight = 28.0; const double _kMaxHeight = 46.0; diff --git a/lib/src/controls/inputs/radio_button.dart b/lib/src/controls/inputs/radio_button.dart index 60212e38b..7c2f6ba1f 100644 --- a/lib/src/controls/inputs/radio_button.dart +++ b/lib/src/controls/inputs/radio_button.dart @@ -1,5 +1,4 @@ import 'package:fluent_ui/fluent_ui.dart'; - import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; diff --git a/lib/src/controls/inputs/slider.dart b/lib/src/controls/inputs/slider.dart index 0cff56a6e..fbfd51b7b 100644 --- a/lib/src/controls/inputs/slider.dart +++ b/lib/src/controls/inputs/slider.dart @@ -1,10 +1,9 @@ import 'dart:math' as math; import 'package:fluent_ui/fluent_ui.dart'; - import 'package:flutter/foundation.dart'; -import 'package:flutter/rendering.dart'; import 'package:flutter/material.dart' as m; +import 'package:flutter/rendering.dart'; /// A slider is a control that lets the user select from a /// range of values by moving a thumb control along a track. diff --git a/lib/src/controls/inputs/split_button.dart b/lib/src/controls/inputs/split_button.dart index fa4fb1b81..15f29fd26 100644 --- a/lib/src/controls/inputs/split_button.dart +++ b/lib/src/controls/inputs/split_button.dart @@ -1,8 +1,7 @@ import 'dart:ui' show lerpDouble; -import 'package:flutter/foundation.dart'; - import 'package:fluent_ui/fluent_ui.dart'; +import 'package:flutter/foundation.dart'; /// A Split Button has two parts that can be invoked separately. /// One part behaves like a standard button and invokes an immediate action. diff --git a/lib/src/controls/navigation/navigation_view/view.dart b/lib/src/controls/navigation/navigation_view/view.dart index 2261419ef..246eee28f 100644 --- a/lib/src/controls/navigation/navigation_view/view.dart +++ b/lib/src/controls/navigation/navigation_view/view.dart @@ -1,16 +1,11 @@ import 'package:fluent_ui/fluent_ui.dart'; - import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; part 'body.dart'; - part 'indicators.dart'; - -part 'pane_items.dart'; - part 'pane.dart'; - +part 'pane_items.dart'; part 'style.dart'; /// The default size used by the app top bar. diff --git a/lib/src/controls/navigation/tab_view.dart b/lib/src/controls/navigation/tab_view.dart index 11bba276f..8eb4e39f0 100644 --- a/lib/src/controls/navigation/tab_view.dart +++ b/lib/src/controls/navigation/tab_view.dart @@ -1,5 +1,4 @@ import 'package:fluent_ui/fluent_ui.dart'; - import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/rendering.dart'; diff --git a/lib/src/controls/surfaces/info_bar.dart b/lib/src/controls/surfaces/info_bar.dart index ebbeb97e2..a27b0879a 100644 --- a/lib/src/controls/surfaces/info_bar.dart +++ b/lib/src/controls/surfaces/info_bar.dart @@ -1,7 +1,6 @@ import 'dart:ui'; import 'package:fluent_ui/fluent_ui.dart'; - import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart' show Icons; diff --git a/lib/src/controls/surfaces/tooltip.dart b/lib/src/controls/surfaces/tooltip.dart index fd717785d..283954b9e 100644 --- a/lib/src/controls/surfaces/tooltip.dart +++ b/lib/src/controls/surfaces/tooltip.dart @@ -2,11 +2,10 @@ import 'dart:async'; import 'dart:math' as math; import 'dart:ui' show lerpDouble; +import 'package:fluent_ui/fluent_ui.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; import 'package:flutter/rendering.dart'; - -import 'package:fluent_ui/fluent_ui.dart'; import 'package:flutter/services.dart'; /// A tooltip is a short description that is linked to another diff --git a/lib/src/controls/utils/hover_button.dart b/lib/src/controls/utils/hover_button.dart index 738ca5666..f47f408b4 100644 --- a/lib/src/controls/utils/hover_button.dart +++ b/lib/src/controls/utils/hover_button.dart @@ -1,5 +1,4 @@ import 'package:fluent_ui/fluent_ui.dart'; - import 'package:flutter/rendering.dart'; typedef ButtonStateWidgetBuilder = Widget Function( diff --git a/lib/src/controls/utils/scrollbar.dart b/lib/src/controls/utils/scrollbar.dart index cedb4f4ea..4cfb94474 100644 --- a/lib/src/controls/utils/scrollbar.dart +++ b/lib/src/controls/utils/scrollbar.dart @@ -1,7 +1,6 @@ import 'dart:ui' show lerpDouble; import 'package:fluent_ui/fluent_ui.dart'; - import 'package:flutter/foundation.dart'; import 'package:flutter/gestures.dart'; diff --git a/lib/src/styles/acrylic.dart b/lib/src/styles/acrylic.dart index f0b20e2f1..0c6ccbdc6 100644 --- a/lib/src/styles/acrylic.dart +++ b/lib/src/styles/acrylic.dart @@ -2,11 +2,10 @@ import 'dart:math' as math; import 'dart:ui' show ImageFilter; import 'dart:ui' as ui show Image; +import 'package:fluent_ui/fluent_ui.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart' as m; -import 'package:fluent_ui/fluent_ui.dart'; - const double kBlurAmount = 30.0; const double kDefaultAcrylicAlpha = 0.8; diff --git a/lib/src/styles/theme.dart b/lib/src/styles/theme.dart index bf69f6d62..bdee104d5 100644 --- a/lib/src/styles/theme.dart +++ b/lib/src/styles/theme.dart @@ -1,5 +1,4 @@ import 'package:fluent_ui/fluent_ui.dart'; - import 'package:flutter/foundation.dart'; import 'package:flutter/rendering.dart'; diff --git a/lib/src/styles/typography.dart b/lib/src/styles/typography.dart index 493ff2881..1689863fb 100644 --- a/lib/src/styles/typography.dart +++ b/lib/src/styles/typography.dart @@ -1,5 +1,4 @@ import 'package:fluent_ui/fluent_ui.dart'; - import 'package:flutter/foundation.dart'; /// The typography applied to a [ThemeData]. It implements Window's [Type Ramp](https://docs.microsoft.com/en-us/windows/uwp/design/style/typography#type-ramp) diff --git a/lib/src/utils/popup.dart b/lib/src/utils/popup.dart index f84e8615b..5b36c4f1a 100644 --- a/lib/src/utils/popup.dart +++ b/lib/src/utils/popup.dart @@ -1,8 +1,7 @@ +import 'package:fluent_ui/fluent_ui.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart' as m; -import 'package:fluent_ui/fluent_ui.dart'; - class PopUp extends StatefulWidget { const PopUp({ Key? key, diff --git a/test/app_test.dart b/test/app_test.dart index 99a5671f2..0807761d9 100644 --- a/test/app_test.dart +++ b/test/app_test.dart @@ -1,8 +1,7 @@ +import 'package:fluent_ui/fluent_ui.dart'; import 'package:flutter/material.dart' as m; import 'package:flutter_test/flutter_test.dart'; -import 'package:fluent_ui/fluent_ui.dart'; - Widget wrapApp({required Widget child}) { return FluentApp(home: child); } From 36072f39743ca0fdd00f0bb8ace14ec187c8f08c Mon Sep 17 00:00:00 2001 From: imp-sike <93368594+imp-sike@users.noreply.github.com> Date: Tue, 12 Apr 2022 20:28:43 +0545 Subject: [PATCH 3/4] Update CHANGELOG.md --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f929545c..bc2b985a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ Date format: DD/MM/YYYY - Do not use duplicated `Scrollbar`s ([#279](https://github.com/bdlukaa/fluent_ui/pull/279/)) - Allow custom height on `NavigationPane` header. ([#260](https://github.com/bdlukaa/fluent_ui/pull/260/)) - Allow to define the minimal tab width ([#282](https://github.com/bdlukaa/fluent_ui/pull/282/)) -- Allow applying custom leading Widget to NavigationPane([#286](https://github.com/bdlukaa/fluent_ui/pull/286/)) +- Allow applying custom leading Widget to NavigationPane([#286](https://github.com/bdlukaa/fluent_ui/pull/287/)) ## [3.10.2] - [09/04/2022] From 1df7201b2fa6b6d8fd8cab68e691691bcef8e9bd Mon Sep 17 00:00:00 2001 From: sulav-crisps Date: Tue, 12 Apr 2022 21:07:36 +0545 Subject: [PATCH 4/4] Run dartfmt --- example/lib/main.dart | 5 +---- lib/src/controls/navigation/navigation_view/pane.dart | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/example/lib/main.dart b/example/lib/main.dart index 8fa5a16c3..def8f731c 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -60,16 +60,13 @@ void main() async { runApp(const MyApp()); } - - class MyApp extends StatelessWidget { const MyApp({Key? key}) : super(key: key); @override Widget build(BuildContext context) { return ChangeNotifierProvider( - - create: (_) => AppTheme(), + create: (_) => AppTheme(), builder: (context, _) { final appTheme = context.watch(); return FluentApp( diff --git a/lib/src/controls/navigation/navigation_view/pane.dart b/lib/src/controls/navigation/navigation_view/pane.dart index 9e88b59d8..ab017c90e 100644 --- a/lib/src/controls/navigation/navigation_view/pane.dart +++ b/lib/src/controls/navigation/navigation_view/pane.dart @@ -425,7 +425,7 @@ class _TopNavigationPane extends StatelessWidget { child: Row(key: pane.paneKey, children: [ Expanded( child: Row(children: [ - if(pane.leading != null) + if (pane.leading != null) Padding( padding: const EdgeInsets.symmetric( horizontal: 8.0,