mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-23 10:36:24 +08:00
refa: article (#757)
Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
24
lib/models/dynamics/opus_detail/fallback_layers.dart
Normal file
24
lib/models/dynamics/opus_detail/fallback_layers.dart
Normal file
@@ -0,0 +1,24 @@
|
||||
import 'layer.dart';
|
||||
|
||||
class FallbackLayers {
|
||||
bool? isCriticalGroup;
|
||||
List<Layer>? layers;
|
||||
|
||||
FallbackLayers({this.isCriticalGroup, this.layers});
|
||||
|
||||
factory FallbackLayers.fromJson(Map<String, dynamic> json) {
|
||||
return FallbackLayers(
|
||||
isCriticalGroup: json['is_critical_group'] as bool?,
|
||||
layers: (json['layers'] as List<dynamic>?)
|
||||
?.map((e) => Layer.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Map<String, dynamic> toJson() => {
|
||||
'is_critical_group': isCriticalGroup,
|
||||
'layers': layers?.map((e) => e.toJson()).toList(),
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user