15 changed files with 316 additions and 11 deletions
@ -0,0 +1,31 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2023. Open Mobile Platform LLC. |
||||||
|
* License: Proprietary. |
||||||
|
*/ |
||||||
|
import 'package:flutter_example_packages/base/package/package_dialog.dart'; |
||||||
|
|
||||||
|
/// Package values |
||||||
|
final packageBuildRunner = PackageDialog( |
||||||
|
key: 'build_runner', |
||||||
|
descEN: ''' |
||||||
|
The build_runner package provides a concrete way of generating files using |
||||||
|
Dart code. Files are always generated directly on disk, and rebuilds |
||||||
|
are incremental - inspired by tools such as Bazel. |
||||||
|
''', |
||||||
|
descRU: ''' |
||||||
|
Пакет build_runner предоставляет конкретный способ создания файлов с |
||||||
|
использованием кода Dart. Файлы всегда генерируются непосредственно на |
||||||
|
диске и перестраиваются являются инкрементными — вдохновлены такими |
||||||
|
инструментами, как Bazel. |
||||||
|
''', |
||||||
|
messageEN: ''' |
||||||
|
This is a platform independent plugin used in this app, should work |
||||||
|
for you too. |
||||||
|
''', |
||||||
|
messageRU: ''' |
||||||
|
Это плагин независимый от платформы, используется в этом приложении, |
||||||
|
должен работать и у вас. |
||||||
|
''', |
||||||
|
version: '2.3.3', |
||||||
|
isPlatformDependent: false, |
||||||
|
); |
@ -0,0 +1,73 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2023. Open Mobile Platform LLC. |
||||||
|
* License: Proprietary. |
||||||
|
*/ |
||||||
|
import 'package:flutter/foundation.dart'; |
||||||
|
|
||||||
|
@immutable |
||||||
|
class UserEntity { |
||||||
|
const UserEntity({ |
||||||
|
required this.name, |
||||||
|
required this.email, |
||||||
|
required this.age, |
||||||
|
}); |
||||||
|
|
||||||
|
factory UserEntity.fromJson(Map<String, dynamic> json) { |
||||||
|
return UserEntity( |
||||||
|
name: json['name'] as String, |
||||||
|
email: json['email'] as String, |
||||||
|
age: json['age'] as int, |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
final String name; |
||||||
|
final String email; |
||||||
|
final int age; |
||||||
|
|
||||||
|
UserEntity copyWith({ |
||||||
|
String? name, |
||||||
|
String? email, |
||||||
|
int? age, |
||||||
|
}) { |
||||||
|
return UserEntity( |
||||||
|
name: name ?? this.name, |
||||||
|
email: email ?? this.email, |
||||||
|
age: age ?? this.age, |
||||||
|
); |
||||||
|
} |
||||||
|
|
||||||
|
Map<String, dynamic> toJson() { |
||||||
|
return { |
||||||
|
'name': name, |
||||||
|
'email': email, |
||||||
|
'age': age, |
||||||
|
}; |
||||||
|
} |
||||||
|
|
||||||
|
@override |
||||||
|
String toString() { |
||||||
|
return 'UserEntity(' |
||||||
|
'name: $name' |
||||||
|
'email: $email' |
||||||
|
'age: $age' |
||||||
|
')'; |
||||||
|
} |
||||||
|
|
||||||
|
@override |
||||||
|
bool operator ==(dynamic other) { |
||||||
|
return other is UserEntity && |
||||||
|
other.name == name && |
||||||
|
other.email == email && |
||||||
|
other.age == age; |
||||||
|
} |
||||||
|
|
||||||
|
@override |
||||||
|
int get hashCode { |
||||||
|
return Object.hash( |
||||||
|
runtimeType, |
||||||
|
name, |
||||||
|
email, |
||||||
|
age, |
||||||
|
); |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,20 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2023. Open Mobile Platform LLC. |
||||||
|
* License: Proprietary. |
||||||
|
*/ |
||||||
|
import 'package:freezed_annotation/freezed_annotation.dart'; |
||||||
|
|
||||||
|
part 'user_entity_freezed.freezed.dart'; |
||||||
|
part 'user_entity_freezed.g.dart'; |
||||||
|
|
||||||
|
@freezed |
||||||
|
class UserEntityFreezed with _$UserEntityFreezed { |
||||||
|
const factory UserEntityFreezed({ |
||||||
|
required String name, |
||||||
|
required String email, |
||||||
|
required int age, |
||||||
|
}) = _UserEntityFreezed; |
||||||
|
|
||||||
|
factory UserEntityFreezed.fromJson(Map<String, dynamic> json) => |
||||||
|
_$UserEntityFreezedFromJson(json); |
||||||
|
} |
@ -0,0 +1,26 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2023. Open Mobile Platform LLC. |
||||||
|
* License: Proprietary. |
||||||
|
*/ |
||||||
|
import 'package:flutter_example_packages/base/package/package_dialog.dart'; |
||||||
|
|
||||||
|
/// Package values |
||||||
|
final packageFreezedAnnotation = PackageDialog( |
||||||
|
key: 'freezed_annotation', |
||||||
|
descEN: ''' |
||||||
|
Annotations for freezed. This package does nothing without freezed. |
||||||
|
''', |
||||||
|
descRU: ''' |
||||||
|
Аннотации для freezed. Этот пакет ничего не делает без freezed. |
||||||
|
''', |
||||||
|
messageEN: ''' |
||||||
|
This is a platform independent plugin used in this application in the demo |
||||||
|
of the freezed plugin. |
||||||
|
''', |
||||||
|
messageRU: ''' |
||||||
|
Это плагин независимый от платформы, используется в этом приложении в |
||||||
|
демострации работы плагина freezed. |
||||||
|
''', |
||||||
|
version: '2.2.0', |
||||||
|
isPlatformDependent: false, |
||||||
|
); |
@ -0,0 +1,28 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2023. Open Mobile Platform LLC. |
||||||
|
* License: Proprietary. |
||||||
|
*/ |
||||||
|
import 'package:flutter_example_packages/base/package/package_dialog.dart'; |
||||||
|
|
||||||
|
/// Package values |
||||||
|
final packageJsonAnnotation = PackageDialog( |
||||||
|
key: 'json_annotation', |
||||||
|
descEN: ''' |
||||||
|
Defines the annotations used by json_serializable to create code for |
||||||
|
JSON serialization and deserialization. |
||||||
|
''', |
||||||
|
descRU: ''' |
||||||
|
Определяет аннотации, используемые json_serializable для создания кода для |
||||||
|
JSON Serialization и Deserialization. |
||||||
|
''', |
||||||
|
messageEN: ''' |
||||||
|
This is a platform independent plugin used in this application in the demo |
||||||
|
of the freezed plugin. |
||||||
|
''', |
||||||
|
messageRU: ''' |
||||||
|
Это плагин независимый от платформы, используется в этом приложении в |
||||||
|
демострации работы плагина freezed. |
||||||
|
''', |
||||||
|
version: '4.8.0', |
||||||
|
isPlatformDependent: false, |
||||||
|
); |
@ -0,0 +1,26 @@ |
|||||||
|
/* |
||||||
|
* Copyright (c) 2023. Open Mobile Platform LLC. |
||||||
|
* License: Proprietary. |
||||||
|
*/ |
||||||
|
import 'package:flutter_example_packages/base/package/package_dialog.dart'; |
||||||
|
|
||||||
|
/// Package values |
||||||
|
final packageJsonSerializable = PackageDialog( |
||||||
|
key: 'json_serializable', |
||||||
|
descEN: ''' |
||||||
|
Provides Dart Build System builders for handling JSON. |
||||||
|
''', |
||||||
|
descRU: ''' |
||||||
|
Предоставляет Dart Build System System для обработки JSON. |
||||||
|
''', |
||||||
|
messageEN: ''' |
||||||
|
This is a platform independent plugin used in this application in the demo |
||||||
|
of the freezed plugin. |
||||||
|
''', |
||||||
|
messageRU: ''' |
||||||
|
Это плагин независимый от платформы, используется в этом приложении в |
||||||
|
демострации работы плагина freezed. |
||||||
|
''', |
||||||
|
version: '6.6.1', |
||||||
|
isPlatformDependent: false, |
||||||
|
); |
Loading…
Reference in new issue