[Flutter] Freezed 패키지를 활용한 data class 생성

들어가며 Flutter를 가지고 서버 통신 기능을 가진 앱을 개발을 하다보면 DTO(Data Transfer Object)를 정의해야할 일이 빈번하게 발생합니다. JSON을 받아와서 데이터 클래스로 바꾸기 위해서 factory를 선언하고, toString()을 만들어주는 등, 이것저것 해야할 일이 많기도 하고 반복적으로 발생하는 일이기도 합니다. 특히나 Union타입을 사용해야하는 경우에는 직접 관련된 로직을 구현해야해서 골치가 아프기도 하죠.... https://blog.skku-comit.dev/flutter-freezed-data-class

Created 1y | Nov 12, 2023, 6:10:03 PM


Login to add comment

Other posts in this group

Experience seamless production updates with Shorebird in Flutter

Shorebird is a code-push solution designed specifically for Flutter, providing stability on both Android and iOS platforms. With Shorebird, you can address app issues without publishing updates to the

Jun 10, 2024, 10:20:07 AM | Hashnode flutter
Road Map For Flutter Developer

Creating a roadmap for learning Flutter involves breaking down the process into manageable steps. Here's a comprehensive roadmap that can guide you from a beginner to an advanced Flutter developer: 1.

Jun 9, 2024, 6:50:15 AM | Hashnode flutter
How to Implement Type-Safe Navigation with go_router in Flutter

Exciting News! Our blog has a new Home! 🚀 Background With type-safe navigation, your navigation logic becomes consistent and maintainable, significantly simplifying debugging and future code modificat

Jun 7, 2024, 11:40:04 AM | Hashnode flutter
Connect Xcode with apple developer account

In Flutter, while developing an app to test it in iOS environment we generally use simulators and connect any apple id to Xcode for building the app on iOS platform. While it's sufficient for developm

Jun 6, 2024, 7:40:04 PM | Hashnode flutter
Exploring Dart Compilers: Everything You Need to Know

When embarking on the journey of app development, the choice of programming and its associated compilation methods can significantly influence the efficiency and performance of your application. Dart,

Jun 6, 2024, 1:30:05 AM | Hashnode flutter
Unlocking the Power of Mixins in Flutter: A Beginner's Guide

Hey there! In this blog, I'll explain what mixins are and how they can help you write cleaner, more reusable code in your Flutter projects. Whether you're new to Flutter or looking to deepen your unde

Jun 5, 2024, 11:50:04 AM | Hashnode flutter
Understanding Mixins in Dart and Flutter

Hello friends, Today we'll explore an interesting and powerful concept in Dart and Flutter programming called mixins. Mixins are a fundamental feature that can greatly enhance the way we write and man

Jun 5, 2024, 7:20:06 AM | Hashnode flutter