Skip to content

Commit

Permalink
allows set custom or dynamic bar size (#234)
Browse files Browse the repository at this point in the history
  • Loading branch information
urusai88 authored Feb 27, 2024
1 parent 75c1363 commit 7633812
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/keyboard_actions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ class KeyboardActions extends StatefulWidget {
/// Does not clear the focus if you tap on the node focused, useful for keeping the text cursor selection working. Usually used with tapOutsideBehavior as translucent
final bool keepFocusOnTappingNode;

/// Override default height of the bar. `null` is dynamic height
final double? barSize;

const KeyboardActions(
{this.child,
this.bottomAvoiderScrollPhysics,
Expand All @@ -98,7 +101,8 @@ class KeyboardActions extends StatefulWidget {
required this.config,
this.overscroll = 12.0,
this.disableScroll = false,
this.keepFocusOnTappingNode = false})
this.keepFocusOnTappingNode = false,
this.barSize = _kBarSize})
: assert(child != null);

@override
Expand Down Expand Up @@ -508,7 +512,7 @@ class KeyboardActionstate extends State<KeyboardActions>
crossFadeState:
_isShowing ? CrossFadeState.showFirst : CrossFadeState.showSecond,
firstChild: Container(
height: _kBarSize,
height: widget.barSize,
width: MediaQuery.of(context).size.width,
decoration: BoxDecoration(
border: Border(
Expand Down

0 comments on commit 7633812

Please sign in to comment.