FlutterLogo Widget

What is FlutterLogo Widget?

The FlutterLogo widget that paints the Flutter logo.

Default Constructor

The default constructor creates a widget that paints the Flutter logo.

FlutterLogo(
        size:
        textColor:
        style:
      );

Constructor Parameters

It contains many input parameters which can be configured to change its behavior and appearance.

The size parameter is to provide size of the logo in logical pixels. The logo will be fit into a square this size.

The textColor parameter is to apply the color used to paint the "Flutter" text on the logo.

The style parameter is to whether and where to draw the "Flutter" text. By default, FlutterLogoStyle.markOnly only the logo itself is drawn.

Code snippet

The following code snippet shows how to configure FlutterLogo widget.

FlutterLogo(
        size: 100,
        textColor: Colors.white,
        style: FlutterLogoStyle.stacked,
      );

Demo Code

This example shows Flutter's logo above the "Flutter" label.

import 'package:flutter/material.dart';

class FlutterLogoDemo extends StatelessWidget {
  
  Widget build(BuildContext context) {
    return Container(
      child: FlutterLogo(
        size: 100,
        textColor: Colors.white,
        // Show Flutter's logo above the "Flutter" label.
        style: FlutterLogoStyle.stacked,
      ),
    );
  }
}

class MyApp extends StatelessWidget {
  static const String _title = 'FlutterLogo Widget Demo';

  
  Widget build(BuildContext context) {
    return MaterialApp(
      title: _title,
      home: Scaffold(
        appBar: AppBar(title: const Text(_title)),
        body: FlutterLogoDemo(),
      ),
    );
  }
}

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