Line data Source code
1 : import 'package:widgetbook_annotation/widgetbook_annotation.dart'; 2 : import 'package:widgetbook_generator/code_generators/instances/instance.dart'; 3 : import 'package:widgetbook_generator/code_generators/properties/property.dart'; 4 : 5 : /// An instance for [DeviceSize] 6 : class DeviceSizeInstance extends Instance { 7 : /// Creates a new instance of [DeviceSizeInstance] 8 4 : DeviceSizeInstance({ 9 : required DeviceSize deviceSize, 10 4 : }) : super( 11 : name: 'DeviceSize', 12 4 : properties: [ 13 8 : Property.double(key: 'height', value: deviceSize.height), 14 8 : Property.double(key: 'width', value: deviceSize.width), 15 : ], 16 : ); 17 : }