primary_button 0.1.0 copy "primary_button: ^0.1.0" to clipboard
primary_button: ^0.1.0 copied to clipboard

A new Flutter package help developer to use stylish primary buttons

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:primary_button/PrimaryButton.dart';

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

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Primary button Demo',
      home: MyHomePage(title: 'Flutter Primary button Demo'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  MyHomePage({Key key, this.title}) : super(key: key);

  final String title;

  @override
  _MyHomePageState createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            PrimaryButton(
              onPressed: () => print("tapped"),
              fontSize: 18,
              textColor: Color(0xff212121),
              bgColor: Colors.green,
              width: 290,
              height: 50,
              buttonLabel: "START PLAYING",
            ),
          ],
        ),
      ),
    );
  }
}
2
likes
30
pub points
31%
popularity

Publisher

unverified uploader

A new Flutter package help developer to use stylish primary buttons

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on primary_button