Skip to content

Conversation

@iloveuhyeon
Copy link
Collaborator

πŸ’‘ κ°œμš”

  • Account Apiλ₯Ό μ—°κ²°ν–ˆμŠ΅λ‹ˆλ‹€

πŸ“ƒ μž‘μ—…λ‚΄μš©

πŸ”€ 변경사항

πŸ™‹β€β™‚οΈ μ§ˆλ¬Έμ‚¬ν•­

🍴 μ‚¬μš©λ°©λ²•

🎸 기타

Defines the `AccountApi` interface using Retrofit for interacting with the account-related endpoints.

This includes a method for retrieving the user's account information.
Adds the `MyAccountResponseDto` to represent the structure of the account information received from the remote API.
This DTO includes fields for ID, KRW balance, and USD balance,
using `freezed` for immutable data classes and `json_serializable` for JSON conversion.
Also creates empty directories with `.gitkeep` for local request/response DTOs and remote request DTOs.
Implements the account data source interface.
This retrieves user account information from the API.
Defines an abstract AccountRepository and its implementation, AccountRepositoryImpl, to handle fetching user account details.

This setup provides a clear separation of concerns for data access and allows for easier testing and future modifications.
@iloveuhyeon iloveuhyeon self-assigned this Jul 8, 2025
@iloveuhyeon iloveuhyeon added the 개발 κΈ°λŠ₯을 κ°œλ°œν•˜κ±°λ‚˜ 퍼블리싱을 μ§„ν–‰ν• λ•Œ label Jul 8, 2025
@iloveuhyeon iloveuhyeon linked an issue Jul 8, 2025 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR connects the Account API to the app, updates DI, and enforces new lint rules.

  • Adds flutter_lints and updates analysis_options.yaml
  • Introduces AccountApi, its data source, DTO, and DI registrations
  • Refactors controllers to return success booleans, updates navigation calls, and cleans up imports & const usage

Reviewed Changes

Copilot reviewed 40 out of 43 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
pubspec.yaml Added flutter_lints
analysis_options.yaml Enabled strict const and lint rules
lib/data/account/service/account_api.dart New Retrofit API interface for account
lib/data/account/dto/remote/response/my_account_response_dto.dart DTO for account response
lib/data/account/data_sources/account_data_source_impl.dart Implementation of AccountDataSource
lib/data/account/data_sources/account_data_source.dart AccountDataSource abstraction
lib/core/config/di/dependencies.dart Registered AccountApi and AccountDataSource
lib/presentation/sign_up/controller/*.dart Refactored start/sendVerificationCode to return bool
lib/presentation/sign_in/controller/sign_in_controller.dart Refactored signIn to return bool
(multiple) Various const/coding-style cleanups
Comments suppressed due to low confidence (4)

pubspec.yaml:59

  • The flutter_lints package is intended for development only and should be moved to dev_dependencies to avoid shipping linter code in production builds.
  flutter_lints: ^6.0.0

lib/data/account/service/account_api.dart:1

  • New account API endpoints have been added but no tests are included. Please add unit tests for AccountApi.getMyAccount() (e.g., using a mock Dio) to ensure correct request formation and error handling.
import 'package:dio/dio.dart';

lib/core/config/di/dependencies.dart:42

  • [nitpick] When registering AccountApi, consider passing a named baseUrl or using the same instantiation pattern as other APIs to avoid inconsistencies if multiple base URLs are needed.
    di.registerLazySingleton<AccountApi>(() => AccountApi(di.get<Dio>()));

analysis_options.yaml:1

  • [nitpick] Enabled prefer_const_declarations and prefer_const_constructors, but many widgets lack const. Consider running dart fix --apply to update codebase and satisfy the new lint rules.
include: package:flutter_lints/flutter.yaml

}

void signIn(BuildContext context) {
bool signIn() {
Copy link

Copilot AI Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar to other controllers, signIn returns false before the async sign-in completes. Consider making this method async and await the use case so that the returned boolean reflects the real outcome.

Suggested change
bool signIn() {
Future<bool> signIn() async {

Copilot uses AI. Check for mistakes.
aiden30015
aiden30015 previously approved these changes Jul 8, 2025
Copy link
Contributor

@aiden30015 aiden30015 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μˆ˜κ³ ν•˜μ…¨μŠ΅λ‹ˆλ‹€..

Copy link
Contributor

@bluemoon983 bluemoon983 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

μˆ˜κ³ ν•˜μ…¨μŠ΅λ‹ˆλ‹€

@iloveuhyeon iloveuhyeon merged commit 37b4a3b into develop Jul 9, 2025
1 check passed
@iloveuhyeon iloveuhyeon deleted the feature/#23-connect-Account-Api branch July 9, 2025 05:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

개발 κΈ°λŠ₯을 κ°œλ°œν•˜κ±°λ‚˜ 퍼블리싱을 μ§„ν–‰ν• λ•Œ

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Account Apiλ₯Ό μ—°κ²°ν•©λ‹ˆλ‹€

4 participants