This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:easy_localization/easy_localization.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:example/app/application.dart'; | |
void main() { | |
runApp(EasyLocalization( | |
child: Application(), | |
useOnlyLangCode: true, | |
supportedLocales: [ | |
Locale.fromSubtags(languageCode: 'en'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"someText": "Some Text" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:easy_localization/easy_localization.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:example/pages/home/home_page.dart'; | |
class Application extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
final easyLocalization = EasyLocalization.of(context); | |
return MaterialApp( | |
home: HomePage(), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
assets: | |
- assets/localization/en-US.json | |
- assets/localization/ru-RU.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:easy_localization/easy_localization.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:example/app/application.dart'; | |
void main() { | |
runApp(EasyLocalization( | |
child: Application(), | |
supportedLocales: [ | |
Locale('en', 'US'), | |
Locale('ru', 'RU'), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies: | |
easy_localization: <last_version> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.view.LayoutInflater | |
import android.view.View | |
import android.view.ViewGroup | |
import android.widget.ImageView | |
import android.widget.TextView | |
import androidx.annotation.DrawableRes | |
import androidx.recyclerview.widget.DiffUtil | |
import androidx.recyclerview.widget.ListAdapter | |
import androidx.recyclerview.widget.RecyclerView |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<androidx.recyclerview.widget.RecyclerView | |
android:id="@+id/recyclerView" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="90dp" | |
android:padding="8dp"> | |
<ImageView | |
android:id="@+id/cover" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dependencies { | |
implementation "androidx.recyclerview:recyclerview:1.1.0" | |
} |
NewerOlder