flip_panel_plus 2.0.0
flip_panel_plus: ^2.0.0 copied to clipboard
3D flip-panel widgets for Flutter: a flip clock, a countdown timer with a controller, and animated flip panels for digits, images or any widget.
2.0.0 #
Modernised for current Flutter, with a new countdown API and a rewritten timing engine. The existing widgets keep their constructors, so most code upgrades by bumping the version.
Added #
FlipDigitStyle, the look of a digit in one reusable object, with gradient, border, shadow and text-style support, acopyWith, and four presets:dark,light,cardandminimal.FlipCountdownBuilder, the timing engine with no opinion about appearance, so any UI can be driven by it.completedBuilderonFlipCountdown, to replace the digits once it finishes.labelPosition(above or below),labelSpacing, andFlipCountdownLabels.short().curve, for easing the fold.digitFormatteronFlipDigitStyle, plusFlipDigitStyle.easternArabicNumerals, for other numeral systems.textDirectiononFlipCountdown, for mirroring the segments on request.- Segment visibility on
FlipClockPlus:showHours,showMinutesandshowSecondscan now be set directly. This was asked for in issue #1. FlipCountdown, a countdown widget that can target aDateTimeor aDuration, choose its segments automatically, and reportonTick/onDone.FlipCountdownController, with start, pause, resume, reset andaddTime, plusremaining,progressandstatus.FlipDigitandFlipNumber, value-driven flipping digits that can be used on their own, with no stream to wire up.referenceTime, so a countdown can be measured against a server clock instead of the device clock.defaultDigitBuilder, exposing the built-in digit styling for reuse.
Fixed #
- A parent rebuild no longer restarts a running clock or countdown. The
timing stream used to be recreated on every
build, so any rebuild silently started the countdown again and leaked the previous timer. - Countdown timing is now derived from elapsed time rather than by subtracting a fixed amount per tick, so a late or dropped tick cannot cause drift.
- The countdown keeps correct time while the app is backgrounded or the device is asleep, and cannot be rewound by moving the device clock backwards.
FlipClockPlusno longer mutates its own fields; it is aStatefulWidgetand themust_be_immutablesuppression is gone._FlipPanelPlusStateis now generic over its widget type, removing the internal casts and the mismatched builder signatures.- Timers and stream subscriptions are cancelled reliably on dispose.
- The days segment counts past 99 instead of clamping to
99. - Digits are now vertically centred in their panel. A text line box carries the font's ascent and descent, and digits have no descender, so centring the line box left visibly more space on one side of the glyph than the other.
- The separator now inherits the digits' weight, size and font, instead of rendering in a lighter, mismatched style.
- The separator stays level with the digits when captions are shown; a captioned segment is taller, and centring the row used to float the colon away from the digits.
- The countdown no longer mirrors itself inside an RTL app. A clock reads left
to right in every locale, but an ambient RTL
Directionalityreversed both the segment order (seconds where the hours belong) and the digits within each number, so12was displayed as21. - Countdown constructors no longer build a
DateTimefrom month0, day0.
Changed #
- Breaking: minimum SDK is now Dart 3.4 / Flutter 3.10.
- Breaking: typedefs are typed.
DigitBuilderisWidget Function(BuildContext, int)andStreamItemBuilder<T>isWidget Function(BuildContext, T); both previously tookdynamic. Existing lambdas that rely on inference keep working. - The library is split into
lib/src/, exported fromflip_panel_plus.dart. - Added a dependency on
package:clock, which lets the countdown be tested and driven withwithClock. - Generated platform folders are no longer part of the package.
flutter_lintsupgraded to^5.0.0; the package analyses with no issues.- Added a test suite covering the controller, the widgets and the rebuild fix.
1.0.0+3 #
- Update: pubspec.yaml description
- Format: Flutter format
1.0.0+2 #
- Update: pubspec.yaml description
- Delete: unnecessary code
1.0.0+1 #
- Update: the example
1.0.0 #
- migrate to null safety.
- Update: environment sdk and flutter
- Fix: fix some issues example app name
- Add: new properties [centerGapSpace , daysLabelStr, hoursLabelStr, minutesLabelStr, secondsLabelStr]
- Update: LICENSE
- Update: README.md file