gpt_draggable_fab 0.0.2 copy "gpt_draggable_fab: ^0.0.2" to clipboard
gpt_draggable_fab: ^0.0.2 copied to clipboard

A Simple Flutter Draggable Fab generated with ChatGPT

Draggable Fab generated with Chat GPT

pub package Test codecov License: MIT

Features #

Drag the fab wherever you want.

Getting started #

Add draggable fab to your pubspec

draggable_fab: 0.0.2

Usage #

use like normal fab :

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

  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  int _counter = 0;

  void _incrementCounter() {
    setState(() {
      _counter++;
    });
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.title),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            const Text(
              'You have pushed the button this many times:',
            ),
            Text(
              '$_counter',
              style: Theme.of(context).textTheme.headline4,
            ),
          ],
        ),
      ),
      floatingActionButton: DraggableFab(
        onPressed: _incrementCounter,
        tooltip: 'Increment',
        iconData: Icons.add,
      ), // This trailing comma makes auto-formatting nicer for build methods.
    );
  }
}
2
likes
130
pub points
33%
popularity

Publisher

verified publisherconnect-tech.sncf

A Simple Flutter Draggable Fab generated with ChatGPT

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on gpt_draggable_fab