Created
June 4, 2018 18:03
-
-
Save HansMuller/15ae9ee53653ae6790570b755ecdc8a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Adding an icon to a TextFormField misaligns label when field is selected | |
// https://github.com/flutter/flutter/issues/18111 | |
import 'package:flutter/material.dart'; | |
class HomePage extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new Scaffold( | |
appBar: new AppBar(), | |
body: new Container( | |
padding: const EdgeInsets.all(16.0), | |
alignment: Alignment.center, | |
child: new TextField( | |
decoration: new InputDecoration( | |
labelText: 'primaryLink', | |
hintText: 'Primary link to story', | |
icon: const Icon(Icons.insert_link), | |
border: OutlineInputBorder() | |
), | |
), | |
), | |
); | |
} | |
} | |
void main() { | |
runApp(new MaterialApp(home: new HomePage())); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment