round_spot 0.1.1 copy "round_spot: ^0.1.1" to clipboard
round_spot: ^0.1.1 copied to clipboard

outdated

Customizable, easy to use heat map interface analysis library

example/example.dart

import 'dart:io';

import 'package:flutter/material.dart';
import 'package:path_provider/path_provider.dart';
import 'package:round_spot/round_spot.dart' as round_spot;

void main() {
  runApp(round_spot.initialize(
    child: ExampleApp(),
    config: round_spot.Config(
      uiElementSize: 12,
    ),
    heatMapCallback: (data, info) async {
      var path = (await getApplicationDocumentsDirectory()).path;
      File('$path/${info.page}_${info.area}.png').writeAsBytes(data);
    },
  ));
}

class ExampleApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Example Application',
      navigatorObservers: [round_spot.Observer()],
      initialRoute: 'first',
      routes: {
        'first': (context) => Scaffold(
              appBar: AppBar(title: Text('First page')),
              floatingActionButton: FloatingActionButton(
                child: Icon(Icons.arrow_forward),
                onPressed: () => Navigator.pushNamed(context, 'second'),
              ),
            ),
        'second': (context) => Scaffold(
              body: SingleChildScrollView(
                child: round_spot.ListDetector(
                  areaID: 'list',
                  children: [
                    for (int i = 0; i < 50; i++) ListTile(title: Text('$i'))
                  ],
                ),
              ),
              appBar: AppBar(title: Text('Second page')),
            ),
      },
    );
  }
}
88
likes
0
pub points
55%
popularity

Publisher

verified publishersgora.dev

Customizable, easy to use heat map interface analysis library

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

enum_to_string, flutter, get_it, logging, simple_cluster

More

Packages that depend on round_spot