fixed rendering bug on linux + ip configuration
This commit is contained in:
@ -7,12 +7,14 @@ part 'project.g.dart';
|
||||
class Project {
|
||||
final String id;
|
||||
final String name;
|
||||
final String ipAddress;
|
||||
final int port;
|
||||
final List<UdpPackage> packages;
|
||||
|
||||
Project({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.ipAddress,
|
||||
required this.port,
|
||||
required this.packages,
|
||||
});
|
||||
@ -25,12 +27,14 @@ class Project {
|
||||
Project copyWith({
|
||||
String? id,
|
||||
String? name,
|
||||
String? ipAddress,
|
||||
int? port,
|
||||
List<UdpPackage>? packages,
|
||||
}) {
|
||||
return Project(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
ipAddress: ipAddress ?? this.ipAddress,
|
||||
port: port ?? this.port,
|
||||
packages: packages ?? this.packages,
|
||||
);
|
||||
|
||||
@ -9,6 +9,7 @@ part of 'project.dart';
|
||||
Project _$ProjectFromJson(Map<String, dynamic> json) => Project(
|
||||
id: json['id'] as String,
|
||||
name: json['name'] as String,
|
||||
ipAddress: json['ipAddress'] as String,
|
||||
port: (json['port'] as num).toInt(),
|
||||
packages: (json['packages'] as List<dynamic>)
|
||||
.map((e) => UdpPackage.fromJson(e as Map<String, dynamic>))
|
||||
@ -18,6 +19,7 @@ Project _$ProjectFromJson(Map<String, dynamic> json) => Project(
|
||||
Map<String, dynamic> _$ProjectToJson(Project instance) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'ipAddress': instance.ipAddress,
|
||||
'port': instance.port,
|
||||
'packages': instance.packages,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user