showSearchDialog method

void showSearchDialog(
  1. {required BuildContext context}
)

Dialog for menu action.

Implementation

void showSearchDialog({required BuildContext context}) async {
  if (isOverride) {
    clearOverrideTitleAndAuthor();
    mediaType.refreshTab();
    _overrideController.add(null);
  } else {
    await showDialog(
      context: context,
      builder: (context) => LyricsDialogPage(
        title: NowPlaying.instance.track.title ?? '',
        artist: NowPlaying.instance.track.artist ?? '',
        onSearch: (title, artist) {
          Navigator.pop(context);
          setOverrideTitleAndArtist(
            title: title,
            artist: artist,
          );

          mediaType.refreshTab();
          _overrideController.add(null);
        },
      ),
    );
  }
}