bubble_chart 0.1.0 copy "bubble_chart: ^0.1.0" to clipboard
bubble_chart: ^0.1.0 copied to clipboard

outdated

A Dart implementation of bubble chart.

example/lib/main.dart

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

final bubbles = [
  Bubble(
    color: Colors.blue,
    radius: 40,
    builder: (context) {
      return Text("ciao");
    },
    onTap: () {
      print("tap1");
    },
  ),
  Bubble(
    color: Colors.black87,
    radius: 38,
    builder: (context) {
      return Text("ciao");
    },
    onTap: () {
      print("tap2");
    },
  ),
  Bubble(
    color: Colors.red,
    radius: 20,
    builder: (context) {
      return Text("ciao");
    },
    onTap: () {
      print("tap3");
    },
  ),
  Bubble(
    color: Colors.brown,
    radius: 60,
    builder: (context) {
      return Text("ciao");
    },
    onTap: () {
      print("tap4");
    },
  ),
];

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        brightness: Brightness.dark,
        primarySwatch: Colors.blue,
      ),
      home: MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: BubbleChart(
        bubbles: bubbles,
      ),
    );
  }
}
15
likes
0
pub points
85%
popularity

Publisher

unverified uploader

A Dart implementation of bubble chart.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on bubble_chart