ApplangaFlutter class
Methods
captureScreenshotWithTag (String tag , {List <String > ? stringIds } )
→ Future <void >
captures a screenshot
A tag
is needed for a screenshot upload
useOcr
is
disposeState (State state )
→ void
You must dispose your registered states as well to prevent memory leaks
and unexpected behaviors.
getIcuString (String key , [Map <String , Object > ? args , Map <String , String > ? formattedArgs ] )
→ String ?
returns the most actual resolved by arguments icu string
key
is the string key
args
is a Map of arguments for that icu string
loadLocaleAndUpdate (Locale locale )
→ Future <void >
This method should be called when the locale changes.
It triggers an applanga update if it hasn't already
locale
is the current locale
mergePositions (List <ALStringPosition > showIdModePositions , List <ALStringPosition > actualPositions , List <TranslationTuple > actualTranslations )
→ List <ALStringPosition >
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerState (State state )
→ void
You can register your state here to improve the screenshot experience.
To get all string positions on your screen, applanga uses the latest
registered state as top level widget. It's recommended to register your
screens like HomeScreen or SettingsScreen. Consider Drawer as screen as
well.
setCurrentLocale (Locale locale )
→ void
setMetaData (Locale locale , String baseLanguage , String ? branchId , List <String > keys , {List <String > ? groups , List <String > ? languages , Map <String , List <String > > ? customLanguageFallback } )
→ Future <void >
Sets meta data only once. It triggers an update if there hasn't been one
for the default languages yet.
shows the screenshot menu
if visible
is true it will show the screenshot menu, otherwise it will
disappear
setShowIdModeEnabled (bool enabled )
→ Future <void >
enables applanga's show id mode
showDraftModeDialog ()
→ Future <void >
shows a draft mode dialog to enable applanga's draft mode
toString ()
→ String
A string representation of this object.
inherited
update ({List <String > ? languages , List <String > ? groups } )
→ Future <bool >
manually fetch latest localisation updates from applanga and applies them
to the current cache
languages
are the languages which should be updated, default language
is the current language
groups
are the groups which should be updated, default group is 'main'