So we are using a key let say paidTo in the parent app and then we developed another child package which is having same key in intl.arb but it has placeholder as well,
Sample String from .arb file of the PARENT APP,
"paidTo": "Paid to ",
Sample string from .arb file of the CHILD PACKAGE,
"paidTo" : "Paid to {payeeName}",
"@paidTo" : {
"placeholders": {
"payeeName" : {
"type" : "String",
"example" : "John"
}
}
}
This is the exact error,
Closure call with mismatched arguments: function 'MessageLookupByLibrary.simpleMessage.<anonymous closure>'
Receiver: Closure: () => String
Tried calling: MessageLookupByLibrary.simpleMessage.<anonymous closure>("payeeName")
Found: MessageLookupByLibrary.simpleMessage.<anonymous closure>() => String
and stack trace of this is:
When the exception was thrown, this was the stack:
#0 Object.noSuchMethod (dart:core-patch/object_patch.dart:38:5)
#1 _objectNoSuchMethod (dart:core-patch/object_patch.dart:85:9)
#2 Function._apply (dart:core-patch/function_patch.dart:11:73)
#3 Function.apply (dart:core-patch/function_patch.dart:34:12)
#4 MessageLookupByLibrary.evaluateMessage (package:intl/message_lookup_by_library.dart:123:21)
#5 MessageLookupByLibrary.lookupMessage (package:intl/message_lookup_by_library.dart:117:14)
#6 CompositeMessageLookup.lookupMessage (package:intl/message_lookup_by_library.dart:53:21)
#7 Intl._lookupMessage (package:intl/intl.dart:180:10)
#8 Intl._message (package:intl/intl.dart:174:12)
#9 Intl.message (package:intl/intl.dart:168:7)
Flutter doctor:
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.3.9, on macOS 13.5.2 22G91 darwin-arm (Rosetta), locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses
[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.1)
[✓] VS Code (version 1.82.2)