Skip to content

Commit

Permalink
Update documentation + small documentation fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolaVerbeeck committed Oct 3, 2021
1 parent d5206f0 commit 05be59d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,12 @@ pane: NavigationPane(

### Navigation body

A navigation body is used to implement page transitions into a navigation view. It knows what is the current diplay mode of the parent `NavigationView`, if any, and define the page transitions accordingly.
A navigation body is used to implement page transitions into a navigation view. It knows what is the current display mode of the parent `NavigationView`, if any, and define the page transitions accordingly.

For top mode, the horizontal page transition is used. For the others, drill in page transition is used.

You can also supply a builder function to create the pages instead of a list of widgets. For this use the `NavigationBody.builder` constructor.

```dart
int _currentIndex = 0;
Expand Down Expand Up @@ -985,12 +987,12 @@ String? comboBoxValue;
SizedBox(
width: 200,
child: ComboBox<String>(
child: Combobox<String>(
header: 'Colors',
placeholder: 'Selected list item',
isExpanded: true,
items: values
.map((e) => ComboboxMenuItem<String>(
.map((e) => ComboboxItem<String>(
value: e,
child: Text(e),
))
Expand Down Expand Up @@ -1457,7 +1459,7 @@ The list of equivalents between this library and `flutter/material.dart`
| - | ToggleButton |
| Switch | ToggleSwitch |
| TextField | TextBox |
| DropdownButton | ComboBox |
| DropdownButton | Combobox |
| - | AutoSuggestBox |
| AlertDialog | ContentDialog |
| MaterialBanner | InfoBar |
Expand Down
3 changes: 3 additions & 0 deletions lib/src/controls/navigation/navigation_view/body.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ class NavigationBody extends StatefulWidget {
itemCount = null,
super(key: key);

/// Creates a navigation body that uses a builder to supply child pages
///
/// [index] must be greater than 0 and less than [itemCount] if it is provided
const NavigationBody.builder({
Key? key,
required this.index,
Expand Down

0 comments on commit 05be59d

Please sign in to comment.