
You can try this logic, this way https:// will always be shown to the user, if user enters a url without https:// we are good, and if a user enters url with https:// we are again good.
Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
TextField(
controller: _controller,
decoration: InputDecoration(prefixText: "https://"),
),
RaisedButton(
child: Text("Submit"),
onPressed: () {
String text = _controller.text.toString();
if (!text.contains("https://")) {
text = "https://" + text;
}
// text here will always have https://
},
),
],
),