Loading...
Searching...
No Matches

Ready-to-use navigation view with built-in UI: zoom controls, floor selector, follow me toggle and user location layer. Automatically wires SDK listeners (building focus, sublocation, camera) and keeps widgets in sync. Widget configs are passed directly to each widget. More...

Public Member Functions

 DefaultNavigationView (Key key, onViewCreated, viewConfig, zoomControlsConfig, followMeButtonConfig, floorSelectorConfig, configController, textDirection)
 
void onViewCreated (LocationWindow arg)
 
Object createState ()
 

Detailed Description

Ready-to-use navigation view with built-in UI: zoom controls, floor selector, follow me toggle and user location layer. Automatically wires SDK listeners (building focus, sublocation, camera) and keeps widgets in sync. Widget configs are passed directly to each widget.

onViewCreated provides direct access to the underlying LocationWindow.

Basic usage with default config:

// Create with default config
final defaultView = DefaultNavigationView(
onViewCreated: (LocationWindow window) {
// Handle window creation
},
);

Custom config at init (visibility, widget configs passed directly):

return DefaultNavigationView(
viewConfig: DefaultNavigationViewConfig(
visibleWidgets: NavigationWidgetVisibility.zoomControls | NavigationWidgetVisibility.followMeButton,
),
zoomControlsConfig: ZoomControlsConfig(
buttonBackgroundColor: Color(0xF2FAFAFA),
),
followMeButtonConfig: FollowMeButtonConfig(
accentColor: Color(0xFF30AAD9),
),
// followMeButtonConfig: FollowMeButtonConfig(followMeIcon: Image.asset('assets/my_follow_icon.png')),
// zoomControlsConfig: ZoomControlsConfig(zoomInIcon: Icon(Icons.add), zoomOutIcon: Icon(Icons.remove)),
onViewCreated: (window) {},
);

Runtime config update via DefaultNavigationViewController:

_configController.updateConfig(
viewConfig: DefaultNavigationViewConfig(
visibleWidgets: NavigationWidgetVisibility.followMeButton,
),
followMeConfig: FollowMeButtonConfig(accentColor: Color(0xFFFF0000)),
); // null = keep current; updates apply immediately

Direct widget access for advanced customization:

final configController = DefaultNavigationViewController(
viewConfig: DefaultNavigationViewConfig(visibleWidgets: NavigationWidgetVisibility.all),
);
return DefaultNavigationView(
configController: configController,
onViewCreated: (window) {
// Later: configController.updateConfig(viewConfig: ..., zoomConfig: ..., followMeConfig: ..., floorConfig: ...);
},
);

Definition at line 48 of file default_navigation_view.dart.

Constructor & Destructor Documentation

◆ DefaultNavigationView()

DefaultNavigationView.DefaultNavigationView ( Key key,
onViewCreated ,
viewConfig ,
zoomControlsConfig ,
followMeButtonConfig ,
floorSelectorConfig ,
configController ,
textDirection  )
inline

Definition at line 49 of file default_navigation_view.dart.

Member Function Documentation

◆ createState()

Object DefaultNavigationView.createState ( )

◆ onViewCreated()

void DefaultNavigationView.onViewCreated ( LocationWindow arg)

The documentation for this class was generated from the following file: