Add placeholder to the Text widget. When the text is empty, the placeholder will be displayed. You are also allowed to add style to placeholder.
Add placeholder to the Text widget
Getting Started #
import 'package:flutter/material.dart' hide Text; import 'package:text_placeholder/text_placeholder.dart'; //... final text1 = Text("magic", placeholder: "", style: TextStyle(), placeholderStyle: TextStyle());
This project is a starting point for a Dart package, a library module containing code that can be shared easily across multiple Flutter or Dart projects.
For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.