nextgen_button 0.0.6 copy "nextgen_button: ^0.0.6" to clipboard
nextgen_button: ^0.0.6 copied to clipboard

A customizable button widget for Flutter with support for icons, loading state, and various styling options.

example/lib/main.dart

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

void main() {
  runApp(const NextGenButtonExampleApp());
}

class NextGenButtonExampleApp extends StatelessWidget {
  const NextGenButtonExampleApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'NextGenButton Example',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const NextGenButtonExampleScreen(),
    );
  }
}

class NextGenButtonExampleScreen extends StatelessWidget {
  const NextGenButtonExampleScreen({super.key});

  void _handleButtonTap() {
    // Define the action to be performed on button tap
    print('NextGenButton tapped!');
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('NextGenButton Example'),
      ),
      body: Center(
        child: NextGenButton(
          onTap: _handleButtonTap,
          titleText: const Text('Click Me'),
          color: Colors.blue,
          borderColor: Colors.blueAccent,
          border: 2.0,
          radius: 8.0,
          height: 50.0,
          width: 200.0,
          elevation: 5.0,
          rightIcon: const Icon(Icons.arrow_forward, color: Colors.white),
          isLoading: false,
          leftIcon: const Icon(Icons.touch_app, color: Colors.white),
        ),
      ),
    );
  }
}
copied to clipboard
3
likes
160
points
25
downloads

Publisher

unverified uploader

Weekly Downloads

2024.07.09 - 2025.01.21

A customizable button widget for Flutter with support for icons, loading state, and various styling options.

Repository (GitHub)

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on nextgen_button