Skip to content

Step Numbers have very low visibility #7

@MSatyam-Mishra

Description

@MSatyam-Mishra

`int currentStep = 0;
CupertinoStepper _buildStepper(StepperType type) {
final canCancel = currentStep > 0;
final canContinue = currentStep < 4;

  return CupertinoStepper(
    type: type,
    currentStep: currentStep,
    onStepTapped: (step) => setState(() => currentStep = step),
    onStepCancel: canCancel ? () => setState(() => --currentStep) : null,
    onStepContinue:
        canContinue ? () => setState(() => ++currentStep) : null,
    steps: List.generate(5, (index) {
      bool isCompleted = index < currentStep;
      bool isActive = currentStep == index;

      return Step(
        title: Text(
          [
            "Information",
            "Budget",
            "Targeting",
            "Creatives",
            "Bid Multiplier"
          ][index],
          style:
              TextStyle(color: isCompleted ? Colors.white : Colors.black),
        ),
        state: isCompleted ? StepState.complete : StepState.indexed,
        isActive: isActive,
        stepStyle: StepStyle(
          color: isCompleted
              ? Colors.green.shade600 
              : isActive
                  ? Colors.blue.shade600 
                  : Colors.black, 
          connectorColor:
              const Color.fromARGB(255, 59, 59, 59), 
          connectorThickness: 3.0, 
          border: Border.all(
            color: isActive ? Colors.blue.shade800 : Colors.black,
            width: isActive ? 2.5 : 1.5,
          ),
          boxShadow: 
           
              BoxShadow(
                color: Colors.blue.shade200,
                blurRadius: 6,
                spreadRadius: 1,
              ),
     
        
          indexStyle: TextStyle(
            color: isCompleted ? Colors.white : Colors.black,
            fontWeight: FontWeight.bold,
          ),
        ),
        content: LimitedBox(
          maxWidth: 300,
          maxHeight: 300,
          child: Container(
            decoration: BoxDecoration(
              color: isCompleted
                  ? Colors.green.shade100
                  : CupertinoColors.systemGrey,
              borderRadius: BorderRadius.circular(10),
            ),
          ),
        ),
      );
    }),
  );
}`

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions