Material Text Widget Tutorial

The Text widget displays a string of text with single style. The string might break across multiple lines or might all be displayed on the same line depending on the layout constraints.

Material Text Widget useful Inputs

  • First input is the string text.

  • textAlign: Whether and how to align text horizontally.

  • overflow: How overflowing text should be handled.

Material Text Widget example

    'Bismillah App',
    overflow: TextOverflow.ellipsis,

Full example

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

void main() => (runApp(TextExample()));

class TextExample extends StatelessWidget {
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Container(
        child: Text("Material Text"),