File tree Expand file tree Collapse file tree 2 files changed +39
-17
lines changed Expand file tree Collapse file tree 2 files changed +39
-17
lines changed Original file line number Diff line number Diff line change @@ -5,11 +5,26 @@ All notable changes to this project will be documented in this file.
55The format is based on [ Keep a Changelog] ( https://keepachangelog.com/en/1.0.0/ ) ,
66and this project adheres to [ Semantic Versioning] ( https://semver.org/spec/v2.0.0.html ) .
77
8+ ## [ 0.1.0] - 2024-07-11
9+
10+ ### Added
11+ - Tooltip functionality for hotspots
12+ - Custom icon support for hotspots
13+ - Comprehensive unit tests for the ImageHotspot widget
14+ - New customization options for image fitting (imageFit, imageWidth, imageHeight)
15+
16+ ### Changed
17+ - Refactored ImageHotspot widget for improved customization and flexibility
18+ - Updated example app to showcase new features and customization options
19+
20+ ### Improved
21+ - Enhanced documentation in README with detailed usage instructions and customization options
22+
823## [ 0.0.1] - 2024-07-10
924
1025### Added
11- - Basic functionality for creating image hotspots.
12- - Customizable hotspot positions.
13- - Actions triggered on hotspot taps.
14- - Initial documentation including README and LICENSE.
15- - Example project demonstrating how to use the ` ImageHotspot ` widget.
26+ - Basic functionality for creating image hotspots
27+ - Customizable hotspot positions
28+ - Actions triggered on hotspot taps
29+ - Initial documentation including README and LICENSE
30+ - Example project demonstrating how to use the ` ImageHotspot ` widget
Original file line number Diff line number Diff line change @@ -26,31 +26,38 @@ dependencies:
2626import 'package:flutter/material.dart';
2727import 'package:image_hotspot/image_hotspot.dart';
2828
29- void main() => runApp(MyApp());
29+ void main() => runApp(const MyApp());
3030
3131class MyApp extends StatelessWidget {
32+ const MyApp({super.key});
33+
3234 @override
3335 Widget build(BuildContext context) {
3436 return MaterialApp(
3537 home: Scaffold(
36- appBar: AppBar(title: Text('Image Hotspot Example')),
38+ appBar: AppBar(title: const Text('Image Hotspot Example')),
3739 body: Center(
3840 child: ImageHotspot(
3941 imagePath: 'assets/sample_image.jpg',
42+ imageWidth: 300,
43+ imageHeight: 200,
44+ imageFit: BoxFit.cover,
45+ showTooltip: true,
4046 hotspots: [
4147 Hotspot(
42- x: 50.0,
43- y: 100.0,
44- onTap: () {
45- print('Hotspot 1 tapped!');
46- },
48+ x: 10,
49+ y: 20,
50+ onTap: () => print('Hotspot 1 tapped'),
51+ tooltip: 'This is hotspot 1',
52+ color: Colors.blue,
53+ size: 30,
4754 ),
4855 Hotspot(
49- x: 150.0 ,
50- y: 200.0 ,
51- onTap: () {
52- print('Hotspot 2 tapped!');
53- } ,
56+ x: 200 ,
57+ y: 150 ,
58+ onTap: () => print('Hotspot 2 tapped'),
59+ // tooltip: 'This is hotspot 2',
60+ icon: Icon(Icons.star, color: Colors.yellow) ,
5461 ),
5562 ],
5663 ),
You can’t perform that action at this time.
0 commit comments