Flutter Icon Size

Flutter Icon Size

To set specific size for an Icon widget, set size property with a double value, where the double value represents the number of logical pixels.

Syntax

Icon(
  Icons.account_balance,
  size: 50.0,
),

Example

Flutter Application with three Icon widgets, each with different size.

main.dart

import 'package:flutter/material.dart';

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

/// main application widget
class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  static const String _title = 'Flutter Application';

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

/// stateless widget that the main application instantiates
class MyStatelessWidget extends StatelessWidget {
  const MyStatelessWidget({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.stretch,
      children: const <Widget>[
        Icon(
          Icons.account_balance,
          size: 50.0,
        ),
        Icon(
          Icons.account_balance,
          size: 100.0,
        ),
        Icon(
          Icons.account_balance,
          size: 200.0,
        ),
      ],
    );
  }
}

Screenshot

Desclaimer: We are not affiliated, associated, authorized, endorsed by, or in any way officially connected with the Google, Apple or Flutter, or any of its subsidiaries or its affiliates. The names Google, Apple and Flutter as well as related names, marks, emblems and images are registered trademarks of their respective owners. This site googleflutter.com covers tutorials related to Flutter developed by Google.