awesome_button 1.0.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 75

AwesomeButton #

This is a pre-built button for flutter with an awesome look.

Installation #

Add the awesome_button to your dependencies in your pubspec.yaml.

  awesome_button: ^1.0.2

Usage #

Import the AwesomeButton.dart using this line below.

import 'package:awesome_button/awesome_button.dart';

Add the AwesomeButton widget to your widget tree and provide your parameter to it, like examples below.

Example #

Alt text

AwesomeButton(
  blurRadius: 10.0,
  splashColor: Color.fromRGBO(255, 255, 255, .4),
  borderRadius: BorderRadius.circular(37.5),
  height: 75.0,
  width: 200.0,
  onTap: () => print("tapped"),
  color: Colors.redAccent,
  child: Text(
    "Awesome Button",
    style: TextStyle(
      color: Colors.white,
      fontSize: 20.0,
    ),
  ),
),

Alt text

AwesomeButton(
  blurRadius: 10.0,
  splashColor: Color.fromRGBO(255, 255, 255, .4),
  borderRadius: BorderRadius.circular(50.0),
  height: 100.0,
  width: 100.0,
  onTap: () => print("tapped"),
  color: Colors.greenAccent,
  child: Icon(
    Icons.account_circle,
    color: Colors.white,
    size: 50.0,
  ),
),

Alt text

AwesomeButton(
  blurRadius: 10.0,
  splashColor: Color.fromRGBO(255, 255, 255, .4),
  borderRadius: BorderRadius.circular(25.0),
  height: 75.0,
  width: 200.0,
  onTap: () => print("tapped"),
  color: Colors.orangeAccent,
  child: Text(
    "Awesome Button",
    style: TextStyle(
      color: Colors.white,
      fontSize: 20.0,
    ),
   ),
),

1.0.2 #

  • Formating the awesome_button.dart file.
  • Adding main.dart in example.

1.0.1 #

  • Correcting the README.md file.

1.0.0 #

  • Initial version.

example/main.dart

import 'package:flutter/material.dart';
import 'package:awesome_button/awesome_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: HomePage(),
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: AwesomeButton(
          blurRadius: 10.0,
          splashColor: Color.fromRGBO(255, 255, 255, .4),
          borderRadius: BorderRadius.circular(25.0),
          height: 75.0,
          width: 200.0,
          onTap: () => print("tapped"),
          color: Colors.orangeAccent,
          child: Text(
            "Awesome Button",
            style: TextStyle(
              color: Colors.white,
              fontSize: 20.0,
            ),
          ),
        ),
      ),
    );
  }
}

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  awesome_button: ^1.0.2

2. Install it

You can install packages from the command line:

with Flutter:


$ flutter pub get

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:awesome_button/awesome_button.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
51
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
75
Learn more about scoring.

We analyzed this package on Oct 22, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.5.1
  • pana: 0.12.21
  • Flutter: 1.9.1+hotfix.4

Platforms

Detected platforms: Flutter

References Flutter, and has no conflicting libraries.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
flutter 0.0.0
Transitive dependencies
collection 1.14.11 1.14.12
meta 1.1.7
sky_engine 0.0.99
typed_data 1.1.6
vector_math 2.0.8
Dev dependencies
flutter_test