TextSelectionThemeData is not changing selectionHandleColor in flutter

Viewed 784

Tested on Both physical device and simulator.

As we all know textSelectionHandleColor is deprecated. So, I decided to make some changes in my app code, unfortunately, selectionHandleColor is still default blue color we get, when we create new app.

TextSelectionTheme(
              data: TextSelectionThemeData(
                  cursorColor: kLightGreen,
                  selectionHandleColor: kLightGreen,
                  selectionColor: kGrey),
              child: TextField(
                keyboardType: TextInputType.number,
                style: TextStyle(
                  color: kOffWhite,
                  letterSpacing: 1.5,
                ),
                decoration: InputDecoration(
                  labelText: 'Label',
                  enabledBorder: UnderlineInputBorder(
                    borderSide: BorderSide(color: kLightGreen),
                  ),
                  focusedBorder: UnderlineInputBorder(
                    borderSide: BorderSide(color: kLightGreen),
                  ),
                  hintText: 'Hint',
                  hintStyle: TextStyle(
                    color: kOffWhite,
                    letterSpacing: 1.5,
                  ),
                  labelStyle: TextStyle(
                    color: kLightGreen,
                    letterSpacing: 1.5,
                  ),
                ),
              ),
            ),

Cursor color, selection color got changed except handle color. I have tried every possible way to change text selection handle color.

0 Answers
Related