Skip to content

Commit

Permalink
init new collection: focus on name field
Browse files Browse the repository at this point in the history
Signed-off-by: phuoc <[email protected]>
  • Loading branch information
phuocbitmark committed Jan 8, 2024
1 parent a7d3353 commit b7b781b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/screen/playlists/add_new_playlist/add_new_playlist.dart
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,9 @@ class _AddNewPlaylistScreenState extends State<AddNewPlaylistScreen>
nftBloc.add(GetTokensByOwnerEvent(pageKey: PageKey.init()));
}));
bloc.add(InitPlaylist(playListModel: widget.playListModel));
WidgetsBinding.instance.addPostFrameCallback((context) {
_focusCollectionName();
});
}

@override
Expand All @@ -76,6 +79,10 @@ class _AddNewPlaylistScreenState extends State<AddNewPlaylistScreen>
injector<ConfigurationService>().showCreatePlaylistTip.value = false;
}

void _focusCollectionName() {
FocusScope.of(context).requestFocus(_focusNode);
}

void _scrollListenerToLoadMore() {
if (_controller.position.pixels + 100 >=
_controller.position.maxScrollExtent) {
Expand Down

0 comments on commit b7b781b

Please sign in to comment.