Skip to content

Commit ff9b3dc

Browse files
committed
Update README and CHANGELOG for version 0.1.0
- Enhance README with detailed usage instructions and new features - Update CHANGELOG to reflect new features and improvements in 0.1.0
1 parent 9d8590d commit ff9b3dc

File tree

2 files changed

+39
-17
lines changed

2 files changed

+39
-17
lines changed

CHANGELOG.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,26 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and 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

README.md

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,38 @@ dependencies:
2626
import 'package:flutter/material.dart';
2727
import 'package:image_hotspot/image_hotspot.dart';
2828
29-
void main() => runApp(MyApp());
29+
void main() => runApp(const MyApp());
3030
3131
class 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
),

0 commit comments

Comments
 (0)