You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
21 lines
494 B
21 lines
494 B
import 'dart:ui';
|
|
import 'package:equatable/equatable.dart';
|
|
|
|
class LanguageEntity extends Equatable {
|
|
final String code;
|
|
final String title;
|
|
final String displayName;
|
|
|
|
const LanguageEntity({required this.code, required this.title, required this.displayName});
|
|
|
|
Locale get locale {
|
|
final parts = code.split('_');
|
|
if (parts.length > 1) {
|
|
return Locale(parts[0], parts[1]);
|
|
}
|
|
return Locale(parts[0]);
|
|
}
|
|
|
|
@override
|
|
List<Object?> get props => [code, title];
|
|
}
|