navigator

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

flutter-like navigation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pop

func Pop() tea.Cmd

func PopWithResult added in v1.0.2

func PopWithResult[T any](v T) tea.Cmd

func Push

func Push(m tea.Model) tea.Cmd

func PushAndRemoveUntil

func PushAndRemoveUntil(m tea.Model, predicate func(int, tea.Model) bool) tea.Cmd

pop until predicate returns true.

current model will not be popped when it returns true.

func PushReplacement

func PushReplacement(m tea.Model) tea.Cmd

Types

type Navigator struct {
	// contains filtered or unexported fields
}

func New

func New(initialModel tea.Model) Navigator
func (m Navigator) Init() tea.Cmd
func (m Navigator) Update(msg tea.Msg) (tea.Model, tea.Cmd)
func (m Navigator) View() string

type ResultMsg added in v1.0.2

type ResultMsg[T any] struct{ Value T }

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL