14 lines
376 B
Dart
14 lines
376 B
Dart
import 'package:flutter/foundation.dart';
|
|
|
|
class UserFollowProvider extends ChangeNotifier {
|
|
final Map<String, bool> _followStatus = {};
|
|
|
|
bool isUserFollowed(String userId) {
|
|
return _followStatus[userId] ?? false;
|
|
}
|
|
|
|
void updateFollowStatus({required String userId, required bool isFollowed}) {
|
|
_followStatus[userId] = isFollowed;
|
|
notifyListeners();
|
|
}
|
|
} |