nextgen_button 0.0.7 copy "nextgen_button: ^0.0.7" to clipboard
nextgen_button: ^0.0.7 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/foundation.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
    if (kDebugMode) {
      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),
        ),
      ),
    );
  }
}
4
likes
150
points
46
downloads

Publisher

unverified uploader

Weekly Downloads

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on nextgen_button