Dynamic props dialog into operator
You can't doing logic operation when defining class attribute in python. To customize the layout of redo panel—the dialog box that usually came out when you call operator—is using draw method.
Say you want to certain property is hidden when you change another property, first you define property to toggle the change, with EnumProperty
options: EnumProperty(
        name=&quot;Options&quot;,
        default=0,
        items = [
            # identifier    name       description   number
            ('option_a', &quot;Option A&quot;, &quot;Active Button&quot;, 0),
            ('option_b', &quot;Option B&quot;, &quot;Show a Slider&quot;, 1)]
        )

items is a sequence of enum items, list of tuples. You can read the documentation here. Then you define the layout in method draw.
def draw(self, context):
    layout = self.layout
    layout.prop(self, &quot;options&quot;)

    if self.options == &quot;option_a&quot;:
        layout.prop(self, &quot;prop_A&quot;)
    elif self.options == &quot;option_b&quot;:
        layout.prop(self, &quot;prop_B&quot;)
    else:
        ...

Make sure to draw the layout for enum property as well, unless it will not show you anything on the panel. When you define draw, blender will not automatically draw the layout for all defined properties so you have to do it manually.
Complete code:
import bpy

from bpy.props import EnumProperty, BoolProperty, FloatProperty

class PUPA_OT_FitArmature(bpy.types.Operator):
    bl_idname = &quot;view3d.fit_armature&quot;
    bl_label = &quot;Fit Armature&quot;
    bl_options = {'REGISTER', 'UNDO'}
   
    options: EnumProperty(
        name=&quot;Options&quot;,
        default=0,
        items = [
            ('option_a', &quot;Option A&quot;, &quot;Active Button&quot;, 0),
            ('option_b', &quot;Option B&quot;, &quot;Show a Slider&quot;, 1)]
        )

    test_checkbox: BoolProperty(
        name=&quot;Test Checkbox &quot;,
        description=&quot;Test Checkbox&quot;, 
        default= False
    )

    slider: FloatProperty(
        name=&quot;Slider&quot;,
        description=&quot;Allow Change Some Size&quot;, 
        default= 0.1,
        min =0.01,
        max = 2
    )

    def draw(self, context):
        layout = self.layout

        layout.prop(self, &quot;options&quot;)

        if self.options == &quot;option_a&quot;:
            layout.prop(self, &quot;test_checkbox&quot;)
        elif self.options == &quot;option_b&quot;:
            layout.prop(self, &quot;slider&quot;)

    def testM(self, context):
        print(&quot;test&quot;)

    def execute(self, context):
        self.testM(bpy.context)
        
        return {&quot;FINISHED&quot;}


def register():
    bpy.utils.register_class(PUPA_OT_FitArmature)


def unregister():
    bpy.utils.unregister_class(PUPA_OT_FitArmature)


if __name__ == &quot;__main__&quot;:
    register()

Result: