LanguageService class abstract
This class should be extended in you project and each of its method should have an implementation. It is added as a dependency in the LanguagePickerBloc. In your implementation you can add in the constructor of the class a data source as a dependency from which to get the list of languages used in your app and send requests to update the currently selected language for the user.
getAll method returns the list of all language that the app will use.
getLanguageList returns the list of all languages and marks the currently
selected language as selected in the List<SelectedLanguageModel>.
getCurrent returns the currently selected language.
setCurrent receives as parameter the language, that should be set as current.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getAll(
) → Future< List< LanguageModel> > -
getCurrent(
) → Future< LanguageModel> -
getLanguageList(
) → Future< List< SelectedLanguageModel> > -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setCurrent(
LanguageModel language) → Future< void> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited