main.dart
import 'package:flutter/material.dart';
void main(){
runApp(
MaterialApp(
home: Scaffold(
appBar: AppBar(
title: const Text("Flutter - Single Line Text")
),
body: const Center(
child: Text(
"Lorem Ipsum is simply dummy text of the"
" printing and typesetting industry.",
overflow: TextOverflow.ellipsis,
style: TextStyle(fontSize: 24),
maxLines: 1,
)
),
),
)
);
}
More flutter tutorials
- flutter – How to set Text background color
- flutter – How to set Text word spacing
- flutter – Text with emoji
- flutter – Text overflow
- flutter – Text capitalize first letter
- flutter – ElevatedButton onPressed
- flutter – How to add padding to ElevatedButton
- flutter – How to change ElevatedButton size
- flutter – How to change ElevatedButton splash color
- flutter – MaterialStateProperty size
- flutter – MaterialStateProperty padding
- flutter – MaterialStateProperty color
- flutter – How to change ElevatedButton border color
- flutter – How to create rounded corners ElevatedButton
- flutter – ElevatedButton border radius only