Replies: 1 comment 1 reply
-
Checkout darts documentation about library
So for your example, you should do the following:
library news;
export 'src/news_model.dart' show NewsModel;
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:flutter/foundation.dart';
part 'news_model.freezed.dart;
@freezed
class NewsModel with _$NewsModel {...} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to have a class that uses freezed, which is part of a library?
I've tried it, but couldn't figure out if I was declaring it wrong or not or if it is just not possible due to the restrictions of
part
andpart of
usage;Example bellow
news.dart
news_model.dart
Beta Was this translation helpful? Give feedback.
All reactions