youtube_explode/lib/src/videos/closed_captions/language.dart

24 lines
550 B
Dart
Raw Normal View History

2021-07-21 02:06:02 +02:00
import 'package:freezed_annotation/freezed_annotation.dart';
2020-11-13 09:21:01 +01:00
part 'language.g.dart';
2021-07-21 02:06:02 +02:00
part 'language.freezed.dart';
2020-02-24 14:28:52 +01:00
2020-02-23 20:29:08 +01:00
/// Language information.
2021-07-21 02:06:02 +02:00
@freezed
class Language with _$Language {
/// Initializes an instance of [Language]
const factory Language(
2020-02-23 20:29:08 +01:00
2021-07-21 02:06:02 +02:00
/// ISO 639-1 code of this language.
String code,
2020-02-23 20:29:08 +01:00
2021-07-23 12:54:29 +02:00
/// Full English name of this language. This could be an empty string.
2021-07-21 02:06:02 +02:00
String name) = _Language;
2020-02-24 14:28:52 +01:00
2021-07-21 02:06:02 +02:00
const Language._();
2020-11-13 09:21:01 +01:00
///
factory Language.fromJson(Map<String, dynamic> json) =>
_$LanguageFromJson(json);
2020-02-23 20:29:08 +01:00
}