Skip to content

V4.0.0 #59

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 26 commits into from
Jul 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e45400c
feat: remove deprecations
gonuit Jul 6, 2024
5c99f0c
feat: add TransformedAnimation
gonuit Jul 6, 2024
ac97c84
feat: add transform and normalize methods
gonuit Jul 6, 2024
ae78af4
feat: redesign CustomMaterialIndicator
gonuit Jul 6, 2024
c6dc38d
feat: add CustomMaterialIndicator.adaptive constructor
gonuit Jul 6, 2024
12d21b3
example app: update material indicator example
gonuit Jul 6, 2024
1351f41
chore: bump app version
gonuit Jul 6, 2024
e07cf7b
docs: update changelog
gonuit Jul 6, 2024
d7c63ad
example app: replace deprecated MaterialStateProperty with WidgetStat…
gonuit Jul 6, 2024
75bd940
feat: handle indicator controller changes
gonuit Jul 6, 2024
d40516a
format: reformat code to 80 line length
gonuit Jul 6, 2024
80f4331
fix: missing overscroll dragDetails updates
gonuit Jul 7, 2024
9432f71
feat: exposed positioned indicator container
gonuit Jul 7, 2024
b1947bd
example app: update app design (use dark mode)
gonuit Jul 7, 2024
ec0053d
docs: update changelog
gonuit Jul 7, 2024
700d465
feat: add indicatorSize and useMaterialContainer parameters for the C…
gonuit Jul 7, 2024
f357390
example app: add sections and tooltips
gonuit Jul 7, 2024
f0200c9
example app: add tooltip for presentation screen (overview)
gonuit Jul 7, 2024
7b29375
docs: update example gifs
gonuit Jul 9, 2024
323ad5c
example app: add ball indicator example
gonuit Jul 11, 2024
c1a4c33
example app: add drag details example
gonuit Jul 12, 2024
9f3397d
example app: update web example
gonuit Jul 12, 2024
3ad14fb
chore: bump package version
gonuit Jul 12, 2024
2751dfa
docs: update readme
gonuit Jul 12, 2024
0cfb63e
docs: update readme
gonuit Jul 18, 2024
c53a421
Merge branch 'master' into v4.0.0
gonuit Jul 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,6 @@ build/
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages

# Flutter version manager
.fvm

# FVM Version Cache
.fvm/
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
## 4.0.0-dev.3
- **CustomRefreshIndicator**:
- Removed deprecated parameters: *indicatorCancelDuration*, *indicatorSettleDuration*, *indicatorFinalizeDuration* and *completeStateDuration* .If you are still using them, switch to the *duration* parameter.
- Improved handling of indicator controller changes.
- Fixed missing *dragDetails* data when overscrolling.
- **IndicatorController**:
- Added *minValue* and *maxValue* static constants.
- Added *transform* method. Allows you to transform controller animation values from the range *0.0* → *1.5* to another range.
- Added *normalize* method. Normalizes *value* by converting it to the range *0.0* → *1.0*. This allows the animation to be used directly with most Flutter widgets and tweens. You can still use *clamp* if you want to remove values above *1.0* instead of transforming the whole range.
- **CustomMaterialIndicator**:
- Redesigned/reimplemented. Now, when *indicatorBuilder* argument is not provided, it completely recreates the look and behavior of the built-in *RefreshIndicator* widget.
- Added *CustomMaterialIndicator.adaptive* constructor.
- *indicatorBuilder* parameter is now optional.
- The deprecated parameter *withRotation* has been removed. It was confusing and was not related to the material indicator design. To add rotation to the indicator, you need to implement rotation yourself 😔.
- Added *color*, *semanticsValue*, *semanticsLabel* and *strokeWidth* parameters. They are applied only when the default *indicatorBuilder* is used (given a null value).
- Removed deprecated *IndicatorBuilderDelegate* and *MaterialIndicatorDelegate* classes.
- Added *TransformedAnimation* class that allows transforming the parent animation value.
- Exposed a *PositionedIndicatorContainer* widget that allows easy positioning of the indicator.
- **Example app**:
- Updated custom material indicator example.
- Updated application design.
- Added tooltips.
- Added *ball indicator* example, which is an overview of the drag details based indicator.
- Updated web example.
## 3.1.2
- Deprecated the *withRotation* argument of the *CustomMaterialIndicator* widget. The rotation function will be removed in the upcoming version.
- Fixed missing drag detail (*IndicatorController.dragDetails*) information from scroll events.
Expand Down
38 changes: 22 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,17 @@ If you just want to replace the content of the material indicator, you can use _
```dart
CustomMaterialIndicator(
onRefresh: onRefresh, // Your refresh logic
builder: (context, controller) {
return Icon(
Icons.ac_unit,
color: Colors.blue,
size: 30,
backgroundColor: Colors.white,
indicatorBuilder: (context, controller) {
return Padding(
padding: const EdgeInsets.all(6.0),
child: CircularProgressIndicator(
color: Colors.redAccent,
value: controller.state.isLoading ? null : math.min(controller.value, 1.0),
),
);
},
child: scrollable,
child: child,
)
```

Expand Down Expand Up @@ -74,19 +77,22 @@ Your creativity sets the boundaries! Explore our examples (just scroll a bit

# Examples

Almost all of these examples are available in the example application.
All these examples are available in the example application.

| Plane indicator [[SOURCE](example/lib/indicators/plane_indicator.dart)][[DEMO](https://custom-refresh-indicator.klyta.it/#/plane)] | Ice cream [[SOURCE](example/lib/indicators/ice_cream_indicator.dart)][[DEMO](https://custom-refresh-indicator.klyta.it/#/ice-cream)] | Warp [[SOURCE](example/lib/indicators/warp_indicator.dart)][[DEMO](https://custom-refresh-indicator.klyta.it/#/warp)] |
| :--------------------------------------------------------------------------------------------------------------------------------: | :----------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------: |
| ![plane_indicator](readme/plane_indicator.gif) | ![ice_cream_indicator](readme/ice_cream_indicator.gif) | ![warp_indicator](readme/warp_indicator.gif) |
| Plane indicator | Ice cream | Warp |
| :-----------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------: |
| ![plane_indicator](readme/plane_indicator.gif) | ![ice_cream_indicator](readme/ice_cream_indicator.gif) | ![warp_indicator](readme/warp_indicator.gif) |
| [[SOURCE](example/lib/indicators/plane_indicator.dart)] [[DEMO](https://custom-refresh-indicator.klyta.it/#/plane)] | [[SOURCE](example/lib/indicators/ice_cream_indicator.dart)] [[DEMO](https://custom-refresh-indicator.klyta.it/#/ice-cream)] | [[SOURCE](example/lib/indicators/warp_indicator.dart)] [[DEMO](https://custom-refresh-indicator.klyta.it/#/warp)] |

| With complete state [[SOURCE](example/lib/indicators/check_mark_indicator.dart)][[DEMO](https://custom-refresh-indicator.klyta.it/#/check-mark)] | Pull to fetch more [[SOURCE](example/lib/indicators/swipe_action.dart)][[DEMO](https://custom-refresh-indicator.klyta.it/#/fetch-more)] | Envelope [[SOURCE](example/lib/indicators/envelope_indicator.dart)][[DEMO](https://custom-refresh-indicator.klyta.it/#/envelope)] |
| :----------------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------------------: |
| ![indicator_with_complete_state](readme/indicator_with_complete_state.gif) | ![fetch_more](readme/fetch_more.gif) | ![Envelope indicator](readme/envelope_indicator.gif) |
| With complete state | Pull to fetch more | Envelope |
| :---------------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: |
| ![complete_state](readme/complete_state.gif) | ![fetch_more](readme/fetch_more.gif) | ![Envelope indicator](readme/envelope_indicator.gif) |
| [[SOURCE](example/lib/indicators/check_mark_indicator.dart)] [[DEMO](https://custom-refresh-indicator.klyta.it/#/check-mark)] | [[SOURCE](example/lib/indicators/swipe_action.dart)] [[DEMO](https://custom-refresh-indicator.klyta.it/#/fetch-more)] | [[SOURCE](example/lib/indicators/envelope_indicator.dart)] [[DEMO](https://custom-refresh-indicator.klyta.it/#/envelope)] |

| Programmatically controlled [[SOURCE](example/lib/screens/programmatically_controlled_indicator_screen.dart)][[DEMO](https://custom-refresh-indicator.klyta.it/#/programmatically-controlled)] | Your indicator | Your indicator |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------: |
| ![programmatically_controlled](readme/programmatically_controlled.gif) | Have you created a fancy refresh indicator? This place is for you. [Open PR](https://github.com/gonuit/flutter-custom-refresh-indicator/pulls). | Have you created a fancy refresh indicator? This place is for you. [Open PR](https://github.com/gonuit/flutter-custom-refresh-indicator/pulls). |
| Controlled | Based on drag details | Your indicator |
| :-----------------------------------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------------------------------------------------------------------------------------: | :-------------------------------------------------------------------------------------: |
| ![programmatically_controlled](readme/programmatically_controlled.gif) | ![drag_details](readme/drag_details.gif) | Have you created a fancy refresh indicator? This place is for you. |
| [[SOURCE](example/lib/screens/programmatically_controlled_indicator_screen.dart)] [[DEMO](https://custom-refresh-indicator.klyta.it/#/programmatically-controlled)] | [[SOURCE](example/lib/indicators/ball_indicator.dart)] [[DEMO](https://custom-refresh-indicator.klyta.it/#/drag-details)] | [[OPEN PULL REQUEST](https://github.com/gonuit/flutter-custom-refresh-indicator/pulls)] |

---

Expand Down
2 changes: 1 addition & 1 deletion example/ios/Flutter/AppFrameworkInfo.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@
<key>CFBundleVersion</key>
<string>1.0</string>
<key>MinimumOSVersion</key>
<string>11.0</string>
<string>12.0</string>
</dict>
</plist>
8 changes: 4 additions & 4 deletions example/ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1430;
LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
331C8080294A63A400263BE5 = {
Expand Down Expand Up @@ -345,7 +345,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down Expand Up @@ -473,7 +473,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -522,7 +522,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1430"
LastUpgradeVersion = "1510"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
Loading
Loading