This question might seem pretty straightforward but whenever I tap on the textfield, it automatically gets a blue border around the textfield, as you can see in the attached image. I have tried changing the color of various properties on my end but nothing seems to work.
I am trying to change the color of the border to Colors.green.
My code is below -
class MainMap extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
theme: ThemeData(fontFamily: 'Quicksand',),
home: Map(),
);
}
}
// ----> Stateful Widget <-----
class Map extends StatefulWidget {
@override
_MapState createState() => _MapState();
}
class _MapState extends State<Map> {
LatLng currentLatLng;
Completer<GoogleMapController> _controller = Completer();
@override
void initState(){
super.initState();
Geolocator.getCurrentPosition().then((currLocation){
setState((){
currentLatLng = new LatLng(currLocation.latitude, currLocation.longitude);
});
});
}
@override
Widget build(BuildContext context) {
final mediaQuery = MediaQuery.of(context);
return new Scaffold(
body: Stack(
children: [
currentLatLng == null ?
Center(child: CircularProgressIndicator(),) :
GoogleMap(
myLocationEnabled: true,
myLocationButtonEnabled: false,
mapType: MapType.normal,
zoomControlsEnabled: false,
initialCameraPosition: CameraPosition(target: currentLatLng, zoom: 15),
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
),
// ------> TEXT FIELD CODE IS BELOW <---------
Container(
margin: EdgeInsets.symmetric(horizontal: mediaQuery.size.width * 0.05, vertical: (mediaQuery.padding.top + 20)),
child: TextField(
style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold,),
cursorColor: Colors.white,
decoration: InputDecoration(
contentPadding: EdgeInsets.all(15),
focusColor: Colors.white,
prefixIcon: Image.asset("assets/icons/search.png",scale: 15,),
suffixIcon: Image.asset("assets/icons/profile.png",scale: 14,),
filled: true,
fillColor: AppColors.darkGreenSearch,
hintText: "Location",
hintStyle: TextStyle(color: Colors.white, fontWeight: FontWeight.bold),
border: new OutlineInputBorder(
borderRadius: const BorderRadius.all(const Radius.circular(50.0)),
borderSide: BorderSide(color: AppColors.darkGreen,),
),
),
),
)
]),