Skip to content

GlobalKey<SoundPlayerUIState>(); #32

Closed

Description

@putra4648

Is key for SoundPlayerUIState missing or moved to other documentation?

Activity

  1. relf108 commented on Aug 18, 2020

    @relf108
    Collaborator

    SoundPlayerUIState doesn't have a global key. To access the state you should be passing a key into one of the SoundPlayerUI constructors (fromLoader or fromTrack). This is common practice.

    var playerUIKey = GlobalKey<SoundPlayerUIState>(); 
    ...
    widget build(){
    return SoundPlayerUI.fromLoader(key : playerUIKey ... );
    }
    
    foo {
    var playerState = playerUIKey.getState();
    }
    
  2. putra4648 commented on Aug 19, 2020

    @putra4648
    Author

    All right then i will try it

  3. jenniestrongbow commented on Feb 7, 2021

    @jenniestrongbow

    SoundPlayerUIState isnt a type. How to import it? Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions