Line data Source code
1 : import 'package:widgetbook_annotation/widgetbook_annotation.dart'; 2 : import 'package:widgetbook_generator/code_generators/instances/primary_instance.dart'; 3 : 4 : /// Implements a DeviceTypeInstance 5 : class DeviceTypeInstance extends PrimaryInstance<DeviceType> { 6 : /// Creates a new instance of [DeviceTypeInstance] 7 3 : const DeviceTypeInstance({ 8 : required DeviceType deviceType, 9 2 : }) : super( 10 : value: deviceType, 11 : ); 12 : 13 1 : @override 14 : String toCode() { 15 2 : return value.toString(); 16 : } 17 : }