Repository navigation
Unable to Change TextSelectionHandleColor using Theme Widget #34640
Description
Activity
You are using the wrong context, use
contextinstead ofcontext2.import 'package:flutter/material.dart'; void main() => runApp(MyApp()); class MyApp extends StatelessWidget { @override Widget build(BuildContext context) { return MaterialApp( title: "Summa App", theme: ThemeData( textSelectionHandleColor: Colors.red, ), home: MyTextField(), ); } } class MyTextField extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( body: Center( child: Builder( builder: (context2){ return Theme( data: Theme.of(context).copyWith( textSelectionHandleColor: Colors.green, //Not being used ), child: TextField(), ); }, ), ), ); } }- addedd: stackoverflowGood question for Stack OverflowGood question for Stack Overflowframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.p: material_uimaterial_ui package in flutter/packagesmaterial_ui package in flutter/packages
on Jun 18, 2019 @BaderEddineOuaich Thanks. But I already tried that. Still not working.
- removedd: stackoverflowGood question for Stack OverflowGood question for Stack Overflow
on Jun 19, 2019 @AlexVincent525 Can you post in #36220 with any additional info you have? If you have a possible solution, I'd be happy to help you get a PR merged.
@justinmc There's an implement to allow user modify the whole text selection with
ExtendedTextField. It's just not related to #36220 if we expose thetextSelectionControlwithTextField. Through extended theTextSelectionControlswe can custom the handle or the toolbar. See https://github.com/fluttercandies/extended_text_field/blob/master/README.md#textselectioncontrolsThis thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.- locked and limited conversation to collaborators
on Apr 2, 2020

I am trying to change
textSelectionColorandtextSelectionHandleColorfor particularTextField(not all). When I usedThemeWidget as parent for thatTextFieldit still uses thetextSelectionHandleColorfromMaterialApp. ThetextSelectionColoris woking fine.Example Code:
Flutter Doctor: