diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c6925e..dde550b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.18.2 + +- **FIX**: `InputOTP` component with RTL directionality. + ## 0.18.1 - **FIX**: Set `ShadCard` clipBehavior to `Clip.antialias`, add `clipBehavior` to `ShadCard` and `ShadCardTheme`. diff --git a/lib/src/components/input_otp.dart b/lib/src/components/input_otp.dart index 142bd85..66e855b 100644 --- a/lib/src/components/input_otp.dart +++ b/lib/src/components/input_otp.dart @@ -207,6 +207,7 @@ class ShadInputOTPState extends State { child: ShadDisabled( disabled: !widget.enabled, child: Row( + textDirection: TextDirection.ltr, mainAxisSize: MainAxisSize.min, children: widget.children.separatedBy(SizedBox(width: effectiveGap)), ), @@ -240,6 +241,7 @@ class _ShadInputOTPGroupState extends State { @override Widget build(BuildContext context) { return Row( + textDirection: TextDirection.ltr, mainAxisSize: MainAxisSize.min, children: widget.children, ); @@ -439,6 +441,7 @@ class _ShadInputOTPSlotState extends State { final lastIndexForGroup = otpProvider.widget.maxLength / otpProvider.groups; final isLastInGroup = (index + 1) % lastIndexForGroup == 0; + final isFirstInGroup = index % lastIndexForGroup == 0; final BorderRadius effectiveRadius; diff --git a/pubspec.yaml b/pubspec.yaml index b6b0c05..5ff6097 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,6 +1,6 @@ name: shadcn_ui description: shadcn-ui ported in Flutter. Awesome UI components for Flutter, fully customizable. -version: 0.18.1 +version: 0.18.2 homepage: https://flutter-shadcn-ui.mariuti.com repository: https://github.com/nank1ro/flutter-shadcn-ui documentation: https://flutter-shadcn-ui.mariuti.com