factory 키워드를 사용하여 하나의 생성자만 있는 클래스는 확장이 안된다.
최근 플러터를 통하여 앱 프로젝트를 만들고 코딩하고있을때 있던 일이였다. 어플에 http통신을 구현할려고 하는데, dart언어에 기본적으로 httpclient 객체가 지원하고 있었다. 그래서 해당 객체의 자식클래스를 만들어서 코딩할려고 할려고 하니 갑자기 에러창이 뜨게 되었다. import "dart:io"; class Custom extends HttpClient {/*****/} //error message /*The class 'Custom' cannot extend 'HttpClient' because 'HttpClient' only has factory constructors (no generative constructors), and 'Custom' has at least one generative constructor. Try implementing the class instead, adding a generative (not factory) constructor to the superclass Custom, or a factory constructor to the subclass....