Skip to content

Instantly share code, notes, and snippets.

@ericorruption
Created February 21, 2020 09:17
Show Gist options
  • Save ericorruption/6d729c433faf1fb1907eb6843bf86934 to your computer and use it in GitHub Desktop.
Save ericorruption/6d729c433faf1fb1907eb6843bf86934 to your computer and use it in GitHub Desktop.
Multi line TextField clicks
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Assessment Documents Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Scaffold(
body: Padding(
padding: EdgeInsets.all(24),
child: Center(
child: TextField(
minLines: null,
maxLines: null,
controller: TextEditingController(text:
'line 1\n'
'\n'
'\n'
'line last'
),
),
),
),
),
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment