sized_icon_button 0.0.1 copy "sized_icon_button: ^0.0.1" to clipboard
sized_icon_button: ^0.0.1 copied to clipboard

Create different size of Icon Buttons.

example/lib/main.dart

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

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: Scaffold(
        appBar: AppBar(
          title: Text("DEMO"),
        ),
        body: Container(
            padding: EdgeInsets.all(16),
            child: Wrap(
              direction: Axis.horizontal,
              spacing: 16,
              children: [
                SizedIconButton(
                  icon: Icon(
                    Icons.alarm,
                  ),
                  onPressed: () {
                    print("onPressed");
                  },
                ),
                SizedIconButton(
                  color: Colors.blue,
                  icon: Icon(
                    Icons.accessible,
                    color: Colors.white,
                    size: 32,
                  ),
                  onPressed: () {
                    print("onPressed");
                  },
                ),
                SizedIconButton(
                  color: Colors.black12,
                  padding: EdgeInsets.all(4),
                  icon: Icon(
                    Icons.alarm,
                    size: 14,
                  ),
                  onPressed: () {
                    print("onPressed");
                  },
                ),
                SizedIconButton(
                  color: Colors.blue.shade100,
                  padding: EdgeInsets.all(24),
                  tooltip: 'Alarm',
                  icon: Icon(
                    Icons.alarm,
                    color: Colors.black,
                    size: 48,
                  ),
                  onPressed: () {
                    print("onPressed");
                  },
                ),
                SizedIconButton(
                  color: Colors.red,
                  icon: Icon(
                    Icons.alarm,
                    color: Colors.white,
                    size: 32,
                  ),
                  onPressed: () {
                    print("onPressed");
                  },
                ),
              ],
            )),
      ),
    );
  }
}
1
likes
140
pub points
44%
popularity

Publisher

verified publishercrawlink.com

Create different size of Icon Buttons.

Homepage

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on sized_icon_button