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

Animated button widget with built-in press transitions

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'beautiful_widgets demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue),
        useMaterial3: true,
      ),
      home: const DemoPage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text('BeautifulButton demo')),
      body: ListView(
        padding: const EdgeInsets.all(16),
        children: [
          _demoButton(
            label: 'ScaleTransition',
            type: TransactionType.ScaleTransition,
          ),
          const SizedBox(height: 12),
          _demoButton(
            label: 'SlideTransition',
            type: TransactionType.SlideTransition,
          ),
          const SizedBox(height: 12),
          _demoButton(
            label: 'FadeTransition',
            type: TransactionType.FadeTransition,
          ),
          const SizedBox(height: 12),
          _demoButton(
            label: 'RotationTransition',
            type: TransactionType.RotationTransition,
          ),
          const SizedBox(height: 12),
          _demoButton(
            label: 'SizeTransition',
            type: TransactionType.SizeTransition,
          ),
        ],
      ),
    );
  }

  Widget _demoButton({required String label, required TransactionType type}) {
    return BeautifulButton(
      label,
      transactionType: type,
      minimumSize: const Size.fromHeight(48),
      onPressed: () {},
    );
  }
}
1
likes
150
points
106
downloads

Publisher

unverified uploader

Weekly Downloads

Animated button widget with built-in press transitions

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on beautiful_widgets