Skip to content

Commit

Permalink
Prefix & docs tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
stasgora committed Jul 10, 2021
1 parent 81194fb commit 0967d4d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
10 changes: 5 additions & 5 deletions example/simple.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ 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;
import 'package:round_spot/round_spot.dart' as rs;

void main() {
runApp(round_spot.initialize(
runApp(rs.initialize(
child: ExampleApp(),
config: round_spot.Config(
config: rs.Config(
uiElementSize: 12,
),
localRenderCallback: (data, info) async {
Expand All @@ -22,7 +22,7 @@ class ExampleApp extends StatelessWidget {
Widget build(BuildContext context) {
return MaterialApp(
title: 'Example Application',
navigatorObservers: [round_spot.Observer()],
navigatorObservers: [rs.Observer()],
initialRoute: 'first',
routes: {
'first': (context) => Scaffold(
Expand All @@ -33,7 +33,7 @@ class ExampleApp extends StatelessWidget {
),
),
'second': (context) => Scaffold(
body: round_spot.Detector(
body: rs.Detector(
areaID: 'list',
child: ListView(
children: [
Expand Down
12 changes: 6 additions & 6 deletions lib/round_spot.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,34 +6,34 @@
/// Wrap your [MaterialApp] widget to [initialize()] the library:
/// ```dart
/// void main() {
/// runApp(round_spot.initialize(
/// runApp(rs.initialize(
/// child: Application()
/// ));
/// }
/// ```
/// Add an [Observer] for monitoring the navigator:
/// ```dart
/// MaterialApp(
/// navigatorObservers: [ round_spot.Observer() ]
/// navigatorObservers: [ rs.Observer() ]
/// )
/// ```
///
/// ### Configuration
/// Provide the callbacks for saving the processed output:
/// ```dart
/// round_spot.initialize(
/// rs.initialize(
/// localRenderCallback: (data, info) => sendHeatMapImage(data)
/// )
/// ```
/// Use [Config] to make the tool better fit your needs:
/// ```dart
/// round_spot.initialize(
/// config: round_spot.Config(
/// rs.initialize(
/// config: rs.Config(
/// minSessionEventCount: 5,
/// uiElementSize: 15,
/// heatMapPixelRatio: 2.0,
/// ),
/// loggingLevel: round_spot.LogLevel.warning // recommended for integration testing
/// loggingLevel: rs.LogLevel.warning // recommended for integration testing
/// )
/// ```
///
Expand Down
2 changes: 1 addition & 1 deletion lib/src/entry_point.dart
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ typedef DataCallback = void Function(Uint8List data);
/// Should be invoked in `main()` or otherwise wrap the [MaterialApp] widget:
/// ```dart
/// void main() {
/// runApp(round_spot.initialize(
/// runApp(rs.initialize(
/// child: Application()
/// ));
/// }
Expand Down
4 changes: 1 addition & 3 deletions lib/src/widgets/detector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import '../utils/components.dart';
/// To correctly monitor interactions with scrollable space a [Detector]
/// has to be placed as a direct parent of that widget:
/// ```dart
/// round_spot.Detector(
/// rs.Detector(
/// areaID: id,
/// child: ListView(
/// children: /* children */,
Expand Down Expand Up @@ -57,8 +57,6 @@ import '../utils/components.dart';
/// will be included here in addition to the default screen maps.
class Detector extends StatefulWidget {
/// The widget below this widget to be observed.
///
/// If you need to lay out multiple children in a column use [ListDetector].
final Widget child;

/// Consistently identifies the same visual region
Expand Down

0 comments on commit 0967d4d

Please sign in to comment.