Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
RockinPaul committed May 16, 2021
1 parent 8bd67ae commit 90eb6c5
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 20 deletions.
1 change: 0 additions & 1 deletion lib/blocs/account_cubit/account_cubit.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,6 @@ class AccountCubit extends Cubit<AccountState> {

Future<void> uploadImage(List<int> bytes) async {
emit(AccountPictureUploadInProgress());
print('Call with bytes: $bytes');
fileUploadBloc.add(StartUpload(
bytes: bytes,
endpoint: Endpoint.accountPicture,
Expand Down
2 changes: 0 additions & 2 deletions lib/blocs/file_upload_bloc/file_upload_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,7 @@ class FileUploadBloc extends Bloc<FileUploadEvent, FileUploadState> {
size: event.size,
);
} else if (event is ClearUploads) {
print('Files in repo before: ${repository.files}');
repository.clearFiles();
print('Files in repo: ${repository.files}');
yield NothingToUpload();
}
}
Expand Down
13 changes: 2 additions & 11 deletions lib/pages/profile/edit_profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class _EditProfileState extends State<EditProfile> {
}

void _save() {
print('Save profile!');
final firstName = _firstNameController.text;
final lastName = _lastNameController.text;
final oldPassword = _oldPasswordController.text;
Expand Down Expand Up @@ -72,14 +71,7 @@ class _EditProfileState extends State<EditProfile> {

@override
Widget build(BuildContext context) {
return BlocConsumer<AccountCubit, AccountState>(
listenWhen: (_, current) =>
current is AccountLoadFailure ||
current is AccountSaveFailure ||
current is AccountPictureUploadFailure,
listener: (context, state) {
print('AccountCubit state in EditProfile listener: $state');
},
return BlocBuilder<AccountCubit, AccountState>(
buildWhen: (_, current) =>
current is AccountLoadInProgress ||
current is AccountSaveInProgress ||
Expand All @@ -91,8 +83,7 @@ class _EditProfileState extends State<EditProfile> {
current is AccountPictureUpdateSuccess ||
current is AccountPictureUpdateFailure,
builder: (context, state) {
print('AccountCubit state in EditProfile builder: $state');

// print('AccountCubit state in EditProfile builder: $state');
final _isUpdating = state is AccountPictureUpdateInProgress ||
state is AccountPictureUploadInProgress;

Expand Down
4 changes: 1 addition & 3 deletions lib/pages/profile/profile.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ class _ProfileState extends State<Profile> {
if (state is AccountPictureUploadSuccess) {
_picture = state.link;
}

print('AccountCubit state in Profile: $state');

// print('AccountCubit state in Profile: $state');
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Expand Down
3 changes: 0 additions & 3 deletions lib/repositories/account_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,8 @@ class AccountRepository extends JsonSerializable {
AccountField firstName;
@JsonKey(required: true, name: 'lastname')
AccountField lastName;
@JsonKey(required: false)
LanguageField language;
@JsonKey(required: false)
AccountField picture;
@JsonKey(required: false)
PasswordField password;

AccountRepository({
Expand Down

0 comments on commit 90eb6c5

Please sign in to comment.