Skip to main content

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

Floating, draggable pucks that spring to the left or right screen edge.

example/lib/main.dart

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

void main() => runApp(const PuckDemo());

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

  @override
  Widget build(BuildContext context) => MaterialApp(
    title: 'Puck',
    theme: ThemeData(colorSchemeSeed: Colors.indigo),
    home: Scaffold(
      appBar: AppBar(title: const Text('Puck playground')),
      body: SafeArea(
        child: PuckOverlay(
          onTap: () => debugPrint('Puck tapped'),
          puck: const ColoredBox(
            color: Colors.indigo,
            child: Icon(Icons.menu, color: Colors.white),
          ),
          child: const Center(
            child: Text(
              'Drag or fling the puck.\nTap it to trigger an action.',
              textAlign: TextAlign.center,
            ),
          ),
        ),
      ),
    ),
  );
}
0
likes
0
points
186
downloads

Publisher

verified publisherflutterbountyhunters.com

Weekly Downloads

Floating, draggable pucks that spring to the left or right screen edge.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on puck