get static method

Future<User?> get(
  1. String uid
)

사용자 정보 node 전체를 User 에 담아 리턴한다.

Implementation

static Future<User?> get(String uid) async {
  try {
    final nodeData = await ff.get<Map<dynamic, dynamic>>('users/$uid');
    if (nodeData == null) {
      return null;
    }

    nodeData['uid'] = uid;
    return User.fromJson(nodeData);
  } catch (e) {
    print('---> User.get($uid) error: $e');
    rethrow;
  }
}