You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
error: The redirected constructor '_Word Function({required String addedBy, required DateTime addedOn, required List antonyms, required String arabicRootWord, required String arabicWord, required List categories, required List dialects, required String englishWord, required List examples, required String frenchWord, required String fuldeRootWord, required String fuldeWord, required String hausaWord, required String id, required bool isApproved, required DateTime lastModifiedOn, required String latin, required List meanings, required String modifiedBy, required String partOfSpeech, required String photoUrl, required List sounds, required List synonyms, required String word, required WordClass wordClass})' has incompatible parameters with 'Word Function({required String addedBy, required DateTime addedOn, required List antonyms, required String arabicRootWord, required String arabicWord, required List categories, required List dialects, required String englishWord, required List examples, required String frenchWord, required String fuldeRootWord, required String fuldeWord, required String hausaWord, required String id, required bool isApproved, required DateTime lastModifiedOn, required String latin, required List meanings, required String modifiedBy, required String partOfSpeech, required String photoUrl, required List sounds, required List synonyms, required CustomTag tag, required String word, required WordClass wordClass})'. (redirect_to_invalid_function_type at [fulfulde_dictionary] lib/app/data/models/word/word.dart:47)
import 'package:freezed_annotation/freezed_annotation.dart';
import 'package:fulfulde_dictionary/app/data/models/fulde_sound/fulde_sound.dart';
import 'package:fulfulde_dictionary/app/data/models/word_class/word_class.dart';
import 'package:uuid/uuid.dart';
import '../../extensions/firestore_ext.dart';
import '../../helpers/json_converters.dart';
import '../custom_tag/custom_tag.dart';
part 'word.freezed.dart';
part 'word.g.dart';
// latin root, latin equivalent, isApproved
// add latin to all
@freezed
class Word with $Word {
const Word.();
factory Word({
required String id,
required String word,
required String latin,
required WordClass wordClass,
required String photoUrl,
required String fuldeWord,
required String hausaWord,
required String arabicWord,
required String englishWord,
required String partOfSpeech,
required String fuldeRootWord,
required String arabicRootWord,
required String frenchWord,
required String addedBy,
required bool isApproved,
required List categories,
required List antonyms,
required List dialects,
required List examples,
required List meanings,
required List synonyms,
required List sounds,
required String modifiedBy,
required CustomTag tag,
@DateTimeConverter() required DateTime addedOn,
@DateTimeConverter() required DateTime lastModifiedOn,
}) = _Word;
factory Word.empty() => Word(
id: const Uuid().v1(),
word: '',
latin: '',
photoUrl: '',
wordClass: WordClass.empty(),
fuldeWord: '',
hausaWord: '',
arabicWord: '',
englishWord: '',
partOfSpeech: '',
fuldeRootWord: '',
arabicRootWord: '',
frenchWord: '',
addedBy: '',
isApproved: false,
modifiedBy: '',
tag: CustomTag.empty(),
categories: [],
antonyms: [],
dialects: [],
examples: [],
meanings: [],
synonyms: [],
sounds: [],
addedOn: DateTime.now(),
lastModifiedOn: DateTime.now(),
);
factory Word.fromJson(Map<String, Object?> json) => _$WordFromJson(json);
factory Word.fromFirestore(DocumentSnapshot<Map<String, dynamic>> doc) =>
Word.fromJson(doc.data()!);
}
Beta Was this translation helpful? Give feedback.
All reactions