I did it like this:
first overloaded this class function and added my field extra_field
public function form_fields() {
return array(
'image_size',
'link',
'link_text',
'link_classes',
'text',
'extra_field',
);
}
then used this filter
add_filter( 'simple_image_widget_instance', function( $instance, $new_instance, $old_instance, $id_base ) {
$instance['show'] = absint( $new_instance['extra_field'] );
return $instance;
}, 10, 4 );
then added the input field with this action
add_action( 'simple_image_widget_field-extra_field', function( $instance, $that ) {
?>
<p>
<label for="<?php echo esc_attr( $that->get_field_id( 'extra_field' ) ); ?>">Extra field</label>
<input class="widefat" id="<?php echo esc_attr( $that->get_field_id( 'extra_field' ) ); ?>" name="<?php echo esc_attr( $that->get_field_name( 'extra_field' ) ); ?>" type="number" step="1" min="1" max="" value="<?php echo $instance['extra_field'] ?>">
</p>
<?php
}, 10, 2);
Workes good and seemed correct atleast..