flutter_profile/example/lib/utils/example_profile_service.dart

40 lines
874 B
Dart
Raw Permalink Normal View History

2022-10-31 17:15:05 +01:00
// SPDX-FileCopyrightText: 2022 Iconica
//
// SPDX-License-Identifier: BSD-3-Clause
2022-11-25 12:09:38 +01:00
import 'dart:async';
import 'package:flutter/material.dart';
2022-09-21 14:37:16 +02:00
import 'package:flutter_profile/flutter_profile.dart';
class ExampleProfileService extends ProfileService {
ExampleProfileService();
@override
void pageBottomAction() {
debugPrint('Bottom page action');
}
@override
void editProfile(
User user,
String key,
2022-11-15 11:20:48 +01:00
String? value,
) {
debugPrint('Editing key: $key with $value');
}
@override
2022-11-25 12:09:38 +01:00
FutureOr<void> uploadImage(BuildContext context,
{required Function(bool isUploading) onUploadStateChanged}) {
debugPrint('Updating avatar');
}
@override
FutureOr<bool> changePassword(
BuildContext context, String currentPassword, String newPassword) {
debugPrint('$currentPassword -> $newPassword');
return true;
}
}