Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions example/lib/navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class _MyAppState extends State<MyApp> {
ListTile(title: Text("Widget 2")),
],
onTap: (int position) => {setState(() => _currentIndex = position)},
separatorBuilder: (context, index) => Divider(),
),
),
);
Expand Down
9 changes: 8 additions & 1 deletion lib/navigation.dart
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,13 @@ class BackdropNavigationBackLayer extends StatelessWidget {
final ValueChanged<int> onTap;

/// Customizable separator used with [ListView.separated].
@Deprecated("Replace by use of `separatorBuilder`."
"This feature was deprecated after v0.4.1.")
final Widget separator;

/// Customizable separatorBuilder used with [ListView.separated].
final IndexedWidgetBuilder separatorBuilder;

/// Creates an instance of [BackdropNavigationBackLayer] to be used with
/// [BackdropScaffold].
///
Expand All @@ -57,6 +62,7 @@ class BackdropNavigationBackLayer extends StatelessWidget {
@required this.items,
this.onTap,
this.separator,
this.separatorBuilder,
}) : assert(items != null),
assert(items.isNotEmpty),
super(key: key);
Expand All @@ -76,7 +82,8 @@ class BackdropNavigationBackLayer extends StatelessWidget {
onTap?.call(position);
},
),
separatorBuilder: (builder, position) => separator ?? Container(),
separatorBuilder:
separatorBuilder ?? (builder, position) => separator ?? Container(),
);
}
}