Skip to main content

Posts

Showing posts with the label text

Text Widget In Depth - Flutter

What's the most used widget in flutter? Text Widget. We use Text Widget in flutter to render text to our application. Text widget is very commonly used as an independent widget or as a sub widget in some other widget. E.g. as a child to a RaisedButton. Here is a small code which uses almost all the properties you might use when developing flutter application for Text Widget and also shows how you can use Text.rich() for multiple formatting of the text. import 'package:flutter/material.dart' ; void main() { runApp(MyApp()); } class MyApp extends StatelessWidget { @ override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false , home: HomePage(), ); } } class HomePage extends StatefulWidget { @ override _HomePageState createState() => _HomePageState(); } class _HomePageState extends State<HomePage> { @ override Widget build(BuildContext context) { return Scaffold( bo...