Skip to content

Commit

Permalink
feat: add optional clipBehavior (#113)
Browse files Browse the repository at this point in the history
Co-authored-by: Felix Angelov <felix@shorebird.dev>
  • Loading branch information
wolfenrain and felangel committed Nov 21, 2023
1 parent b96066b commit cba40ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/flow_builder.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class FlowBuilder<T> extends StatefulWidget {
this.onComplete,
this.controller,
this.observers = const <NavigatorObserver>[],
this.clipBehavior = Clip.hardEdge,
}) : assert(
state != null || controller != null,
'requires either state or controller',
Expand All @@ -74,6 +75,12 @@ class FlowBuilder<T> extends StatefulWidget {
/// A list of [NavigatorObserver] for this [FlowBuilder].
final List<NavigatorObserver> observers;

/// In cases where clipping is not desired, consider setting this property to
/// [Clip.none].
///
/// Defaults to [Clip.hardEdge].
final Clip clipBehavior;

@override
State<FlowBuilder<T>> createState() => _FlowBuilderState<T>();
}
Expand Down Expand Up @@ -179,6 +186,7 @@ class _FlowBuilderState<T> extends State<FlowBuilder<T>> {
key: _navigatorKey,
pages: _pages,
observers: widget.observers,
clipBehavior: widget.clipBehavior,
onPopPage: (route, dynamic result) {
if (_history.length > 1) {
_history.removeLast();
Expand Down

0 comments on commit cba40ba

Please sign in to comment.