Browse Source

added visual density rule to follow for action widgets passed to TitleBarWidget

ashilkn 2 years ago
parent
commit
1364ef3e04
1 changed files with 4 additions and 0 deletions
  1. 4 0
      lib/ui/components/title_bar_widget.dart

+ 4 - 0
lib/ui/components/title_bar_widget.dart

@@ -6,6 +6,10 @@ class TitleBarWidget extends StatelessWidget {
   final String? caption;
   final Widget? flexibleSpaceTitle;
   final String? flexibleSpaceCaption;
+  //If passing IconButton, set visualDensity to -2 (horizontal & vertical).
+  //This could be applicable to other widgets too. If layout looks different see if
+  // VisualDensity property exists for the widget and try to find the right values.
+  // https://api.flutter.dev/flutter/material/VisualDensity-class.html
   final List<Widget>? actionIcons;
   final bool isTitleBigWithoutLeading;
   const TitleBarWidget({