heart_toggle 0.0.3 copy "heart_toggle: ^0.0.3" to clipboard
heart_toggle: ^0.0.3 copied to clipboard

A Flutter package with a heart shapped toggle. Inspired from a react component and dribble.

example/lib/main.dart

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

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Heart Toggle Demo',
      theme: ThemeData(
        primarySwatch: Colors.pink,
      ),
      home: Scaffold(
        appBar: AppBar(
          centerTitle: true,
          title: Text('Heart Toggle Demo'),
        ),
        body: Center(
          child: HeartToggle(
            props: HeartToggleProps(
              size: 260.0,
              passiveFillColor: Colors.grey[200]!,
              ballElevation: 4.0,
              heartElevation: 4.0,
              ballColor: Colors.white,
              onChanged: (toggled) => {},
            ),
          ),
        ),
      ),
    );
  }
}
11
likes
130
pub points
0%
popularity

Publisher

unverified uploader

A Flutter package with a heart shapped toggle. Inspired from a react component and dribble.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Apache-2.0 (LICENSE)

Dependencies

flutter

More

Packages that depend on heart_toggle