Skip to content

Commit

Permalink
_fileName/_firstName bug investigated.
Browse files Browse the repository at this point in the history
  • Loading branch information
RockinPaul committed May 1, 2021
1 parent 2f9fe38 commit aeedbee
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/blocs/account_cubit/account_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ class AccountCubit extends Cubit<AccountState> {
..listen(
(FileUploadState state) {
if (state is FileUploaded) {
print('Uploaded file: ${state.files.first.filename}');
emit(AccountPictureUpdated());
}
},
Expand Down
7 changes: 6 additions & 1 deletion lib/pages/profile/edit_profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,11 @@ class _EditProfileState extends State<EditProfile> {

void _save() {
print('Save profile!');

print('FILENAME: $_fileName');
print('PIC: $_picture');
print('SHOULD: $_shouldUpdateImage');

if (_canSave) {
// context.read<AccountCubit>()
// ..updateInfo(
Expand Down Expand Up @@ -143,7 +148,7 @@ class _EditProfileState extends State<EditProfile> {
if (paths != null && paths.length > 0) {
setState(() {
_fileName = paths[0].path;
_picture = _firstName;
_picture = _fileName;
_shouldUpdateImage = true;
});
print('Filename to be saved: $_fileName');
Expand Down

0 comments on commit aeedbee

Please sign in to comment.