Skip to content

Commit c6b4310

Browse files
committed
feat: release v0.6.0
1 parent cecede0 commit c6b4310

File tree

7 files changed

+50
-22
lines changed

7 files changed

+50
-22
lines changed

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"cSpell.words": [
3+
"autocorrect",
4+
"autofocus",
5+
"Cupertino"
6+
]
7+
}

CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
## 0.6.0
2+
- Thanks again to [Brendan](https://github.com/definitelyme) enough_platform_widgets is now compatible with Flutter 3.7.
3+
14
## 0.5.0
2-
- Thanks to [Brendan](https://github.com/definitelyme) enough_platform_widgets is now compatible with Flutter 3.3 .
5+
- Thanks to [Brendan](https://github.com/definitelyme) enough_platform_widgets is now compatible with Flutter 3.3.
36

47
## 0.4.0
58
- Thanks to [fotiDim](https://github.com/fotiDim) `PlatformInkWell.pressColor` is now available to add tap effects visible on iOS.

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ More cross platform widgets for Flutter developers.
44

55
Based on these great packages:
66
* [flutter_platform_widgets](https://pub.dev/packages/flutter_platform_widgets)
7-
* [cupertino_list_tile](https://pub.dev/packages/cupertino_list_tile)
87
* [cupertino_stepper](cupertino_stepper)
98

109
Licensed commercially friendly under the [MIT License](LICENSE).
@@ -15,14 +14,14 @@ Platform widgets use their material or cupertino equivalent based on the chosen
1514

1615
* `DecoratedPlatformTextField` provides a cross platform replacement for the material `TextField`
1716
* `DialogHelper` helps to show platform specific dialogs
18-
* `PlatformBottomBar` shows a `BottomAppBar` on materal and a `CupertinoBar` on cupertino
17+
* `PlatformBottomBar` shows a `BottomAppBar` on material and a `CupertinoBar` on cupertino
1918
* `PlatformCheckboxListTile` is a platform aware simple checkbox list tile
2019
* `PlatformChip` a simple cross-platform `Chip` replacement
2120
* `PlatformDialogActionButton` is a platform aware dialog action
2221
* `PlatformDialogActionText` provides a platform aware dialog action text
2322
* `DropdownButton` is a replacement for the material `DropdownButton`
2423
* `PlatformFilledButtonIcon` uses an `ElevatedButton.filled` on material and a `CupertinoButton.filled` on cupertino
25-
* `DensePlatformIconButton` replaces the material `IconButon`
24+
* `DensePlatformIconButton` replaces the material `IconButton`
2625
* `PlatformInkWell` is a rectangular area of a that responds to touch and is based either on `InkWell` or on `CupertinoInkWell`
2726
* `PlatformListTile` provides either a `ListTile` or a `CupertinoListTile`
2827
* `PlatformPageScaffold` provides a `PlatformScaffold` with the additional option to define a bottom bar.

lib/src/platform/decorated_platform_textfield.dart

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ class DecoratedPlatformTextField extends StatelessWidget {
199199
/// See also:
200200
///
201201
/// * [TextInputAction.next] and [TextInputAction.previous], which
202-
/// automatically shift the focus to the next/previous focusable item when
202+
/// automatically shift the focus to the next/previous focus-able item when
203203
/// the user is done editing.
204204
final ValueChanged<String>? onSubmitted;
205205

@@ -250,8 +250,6 @@ class DecoratedPlatformTextField extends StatelessWidget {
250250
/// The appearance of the keyboard.
251251
///
252252
/// This setting is only honored on iOS devices.
253-
///
254-
/// If unset, defaults to the brightness of [ThemeData.primaryColorBrightness].
255253
final Brightness? keyboardAppearance;
256254

257255
/// {@macro flutter.widgets.editableText.scrollPadding}
@@ -506,8 +504,12 @@ class DecoratedPlatformTextField extends StatelessWidget {
506504
obscureText: obscureText,
507505
onChanged: onChanged,
508506
keyboardAppearance: keyboardAppearance,
509-
placeholder: cupertinoShowLabel ? decoration?.hintText : decoration?.labelText ?? decoration?.hintText,
510-
prefix: decoration?.prefix ?? decoration?.prefixIcon ?? (cupertinoShowLabel ? null : icon),
507+
placeholder: cupertinoShowLabel
508+
? decoration?.hintText
509+
: decoration?.labelText ?? decoration?.hintText,
510+
prefix: decoration?.prefix ??
511+
decoration?.prefixIcon ??
512+
(cupertinoShowLabel ? null : icon),
511513
suffix: decoration?.suffix ?? decoration?.suffixIcon,
512514
suffixMode: cupertinoSuffixMode,
513515
clearButtonMode: OverlayVisibilityMode.editing,
@@ -548,7 +550,9 @@ class DecoratedPlatformTextField extends StatelessWidget {
548550
restorationId: restorationId,
549551
);
550552
final labelText = decoration?.labelText;
551-
if (cupertinoShowLabel && cupertinoAlignLabelOnTop && labelText != null) {
553+
if (cupertinoShowLabel &&
554+
cupertinoAlignLabelOnTop &&
555+
labelText != null) {
552556
if (icon != null) {
553557
content = Row(
554558
mainAxisAlignment: MainAxisAlignment.start,

lib/src/platform/dialog_helper.dart

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ class DialogHelper {
2929
content: Text(query),
3030
actions: [
3131
CupertinoDialogAction(
32-
child: cancelActionText != null ? Text(cancelActionText) : Icon(CupertinoIcons.clear),
32+
child: cancelActionText != null
33+
? Text(cancelActionText)
34+
: Icon(CupertinoIcons.clear),
3335
onPressed: () => Navigator.of(context).pop(false),
3436
),
3537
CupertinoDialogAction(
@@ -49,9 +51,10 @@ class DialogHelper {
4951
actionButtonStyle = TextButton.styleFrom(
5052
backgroundColor: Colors.red,
5153
disabledForegroundColor: Colors.white,
52-
onSurface: Colors.white,
54+
foregroundColor: Colors.white,
5355
);
54-
actionTextStyle = theme.textTheme.button!.copyWith(color: Colors.white);
56+
actionTextStyle =
57+
theme.textTheme.labelLarge?.copyWith(color: Colors.white);
5558
}
5659

5760
return showDialog<bool>(
@@ -60,7 +63,9 @@ class DialogHelper {
6063
content: Text(query),
6164
actions: [
6265
TextButton(
63-
child: cancelActionText != null ? PlatformText(cancelActionText) : Icon(Icons.cancel),
66+
child: cancelActionText != null
67+
? PlatformText(cancelActionText)
68+
: Icon(Icons.cancel),
6469
onPressed: () => Navigator.of(context).pop(false),
6570
),
6671
TextButton(
@@ -87,7 +92,10 @@ class DialogHelper {
8792
String? cancelActionText,
8893
}) {
8994
return showWidgetDialog(context, Text(text),
90-
title: title, actions: actions, okActionText: okActionText, cancelActionText: cancelActionText);
95+
title: title,
96+
actions: actions,
97+
okActionText: okActionText,
98+
cancelActionText: cancelActionText);
9199
}
92100

93101
/// Shows a dialog with the given [content].
@@ -106,15 +114,21 @@ class DialogHelper {
106114
String? cancelActionText,
107115
}) {
108116
actions ??= [
109-
if (defaultActions == DialogActions.cancel || defaultActions == DialogActions.okAndCancel) ...{
117+
if (defaultActions == DialogActions.cancel ||
118+
defaultActions == DialogActions.okAndCancel) ...{
110119
PlatformTextButton(
111-
child: cancelActionText != null ? PlatformText(cancelActionText) : Icon(CommonPlatformIcons.cancel),
120+
child: cancelActionText != null
121+
? PlatformText(cancelActionText)
122+
: Icon(CommonPlatformIcons.cancel),
112123
onPressed: () => Navigator.of(context).pop(false),
113124
),
114125
},
115-
if (defaultActions == DialogActions.ok || defaultActions == DialogActions.okAndCancel) ...{
126+
if (defaultActions == DialogActions.ok ||
127+
defaultActions == DialogActions.okAndCancel) ...{
116128
PlatformTextButton(
117-
child: okActionText != null ? PlatformText(okActionText) : Icon(CommonPlatformIcons.ok),
129+
child: okActionText != null
130+
? PlatformText(okActionText)
131+
: Icon(CommonPlatformIcons.ok),
118132
onPressed: () => Navigator.of(context).pop(true),
119133
),
120134
},

lib/src/platform/platform_dialog_action_text.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,10 @@ class PlatformDialogActionText extends StatelessWidget {
3333
actionButtonStyle = TextButton.styleFrom(
3434
backgroundColor: Colors.red,
3535
disabledForegroundColor: Colors.white,
36-
onSurface: Colors.white,
36+
foregroundColor: Colors.white,
3737
);
38-
actionTextStyle = theme.textTheme.button!.copyWith(color: Colors.white);
38+
actionTextStyle =
39+
theme.textTheme.labelLarge?.copyWith(color: Colors.white);
3940
}
4041
return TextButton(
4142
child: Text(text.toUpperCase(), style: actionTextStyle),

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: enough_platform_widgets
22
description: Useful platform aware widgets to bring a Material app to Cupertino.
3-
version: 0.5.0
3+
version: 0.6.0
44
homepage: https://github.com/Enough-Software/enough_platform_widgets
55

66
environment:

0 commit comments

Comments
 (0)