You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactor for Flutter-only extensions and package split
Split Flutter-specific extensions into mayr_flutter_extensions, removing all general Dart extensions (String, DateTime, Number, etc.) and related tests. Updated README, CHANGELOG, LICENSE, and example to reflect the new package structure and usage. Added CONTRIBUTING.md and .github/agents/README.md for contributor guidance. Introduced lib/mayr_flutter_extensions.dart as the main export, and cleaned up imports to only include Flutter-relevant extensions.
This directory contains instructions for GitHub Copilot agents working on this repository.
4
+
5
+
## Flutter Package Structure
6
+
7
+
This is a Flutter package that provides Flutter-specific extension methods. The package works in conjunction with `mayr_dart_extensions` which provides general Dart extensions.
8
+
9
+
### Key Guidelines
10
+
11
+
-**Flutter-Only Focus**: This package should only contain extensions specific to Flutter SDK (widgets, BuildContext, etc.)
12
+
-**Dart Extensions**: General Dart type extensions (String, int, DateTime, Duration, etc.) belong in `mayr_dart_extensions`
13
+
-**No Duplication**: Do not add extensions that duplicate functionality from `mayr_dart_extensions`
14
+
15
+
### Testing Requirements
16
+
17
+
- All extension methods must have corresponding tests
18
+
- Run `flutter test` to execute tests
19
+
- Use `dart format .` to format code
20
+
- Use `dart analyze .` to check for issues
21
+
22
+
### Code Style
23
+
24
+
- Follow the existing code patterns in the package
25
+
- Use descriptive method names
26
+
- Add comprehensive dartdoc comments with examples
27
+
- Keep methods focused and single-purpose
28
+
29
+
### Related Packages
30
+
31
+
-**mayr_dart_extensions**: General Dart extensions (https://pub.dev/packages/mayr_dart_extensions)
32
+
- Users typically install both packages together in Flutter apps
-`dateTime.isYesterday()`, `dateTime.isToday()`, and `dateTime.isTomorrow()` are now getter properties:
23
-
-`dateTime.isYesterday`
24
-
-`dateTime.isToday`
25
-
-`dateTime.isTomorrow`
26
-
-`dateTime.isInPast()` and `dateTime.isInFuture()` are also now getter properties:
27
-
-`dateTime.isInPast`
28
-
-`dateTime.isInFuture`
29
-
30
-
### Removed
31
-
-`dateTime.toDateString(...)`
32
-
-`dateTime.toDateStringUK(...)`
33
-
-`dateTime.toDateStringUS(...)`
34
-
-`dateTime.toDateTimeString(...)`
35
-
-`dateTime.isExpired()`
36
-
37
-
## [0.2.0] - [29-04-2025]
38
-
39
-
### Added
40
-
-`T?.orDefault(T fallback)` Added
41
-
-`String.copyToClipboard()` Added
42
-
-`String.toUri()` Added
43
-
- More dartdocs to properties and methods
44
-
45
-
### Changed
46
-
-`String.toDateTime()` now uses tryParse, so null is returned if parse fails and error is not thrown
47
-
- Added namespaces to extensions to prevent clash with user extensions
48
-
49
-
50
-
## [0.1.1] - Minor cleanups
51
-
52
-
### Changed
53
-
- Removed certain files that are not required to use package from pub
54
-
55
-
56
-
## [0.1.0] - Rebrand to mayr_*
57
-
58
-
### Changed
59
-
- Package name was rebranded from `flutter_util_extensions` to `mayr_extensions`
60
-
61
-
62
-
## [0.0.2]
63
-
64
-
### Changed
65
-
- Relaxed `intl` dependency constraint to `>=0.19.0 <0.21.0` for wider compatibility.
66
-
67
-
68
-
## [0.0.1] - Initial Release
69
-
70
-
### Added
71
-
- BuildContext extensions:
72
-
- Access to form, navigator, overlay, scaffold, media query, brightness, platform checks, and widget size.
73
-
- Device type checks (phone, tablet, desktop).
74
-
- Added `showSnackBar()` utility method.
75
-
- DateTime extensions:
76
-
- Checkers for time of day, expiry, and comparisons.
77
-
- Manipulators to add/subtract dates, months, years, etc.
78
-
- Conversions to various string formats and age calculation.
79
-
- Duration extension:
80
-
-`delay()` method for simple async delays.
81
-
- Dynamic extensions:
82
-
-`nullOnDebug()`, `onlyOnDebug()`, and `maybe()` based on probability.
83
-
- Image extension:
84
-
- Easily create a `CircleAvatar` widget with an image.
85
-
- Number extensions:
86
-
- Comparison helpers, random number generators, number formatters, and conversions to Duration.
87
-
- String extensions:
88
-
- Pattern matching, parsing to different cases (camelCase, snakeCase, etc.), and pretty printing (JSON, YAML, XML).
89
-
- Pattern checkers for emails, URLs, IP addresses, and more.
90
-
- Widget extensions:
91
-
- Helpers for padding, sizing, positioning, clipping, visibility, and touch management via `InkWellManager`.
92
-
93
-
### Notes
94
-
- First public release.
95
-
- Still evolving — contributions and feedback welcome!
8
+
## [1.0.0] - 2025-01-17
9
+
10
+
### 🎉 Initial Release
11
+
12
+
This is the first release of **mayr_flutter_extensions** as a standalone Flutter-specific extension package, separated from the original `mayr_extensions` package.
13
+
14
+
### Package Philosophy
15
+
16
+
This package is part of the **MayR Extensions** family:
0 commit comments