Skip to content

Commit

Permalink
Change isCupertinoStyle to return true if TargetPlatform is macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mono0926 committed Mar 3, 2022
1 parent ec1bed6 commit 8c5c224
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 8 deletions.
8 changes: 6 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.4.0

- Change `isCupertinoStyle` to return `true` if TargetPlatform is macOS

## 1.3.0

- Deprecate `alertStyle` of `showOkAlertDialog`/`showOkCancelAlertDialog`, which was mistakenly defined, and add `style` property instead.
Expand Down Expand Up @@ -65,7 +69,7 @@
## 0.7.2

- Support validation for showTextInputDialog
- Fix destructive color of showTextInputDialog for Cupertino
- Fix destructive color of showTextInputDialog for Cupertino

## 0.7.1

Expand Down Expand Up @@ -143,4 +147,4 @@

## 0.1.0

- Initial release
- Initial release
2 changes: 1 addition & 1 deletion example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ packages:
path: ".."
relative: true
source: path
version: "1.3.0"
version: "1.4.0"
animations:
dependency: transitive
description:
Expand Down
4 changes: 1 addition & 3 deletions lib/src/extensions/theme_data.dart
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import 'package:flutter/material.dart';

extension ThemeDataEx on ThemeData {
// ignore: lines_longer_than_80_chars
// TODO(mono): Add platform == TargetPlatform.macOS when it is supported on stable
/// Return true is the platform is suitable for Cupertino(iOS) style
bool get isCupertinoStyle =>
platform == TargetPlatform.iOS; // || platform == TargetPlatform.macOS;
platform == TargetPlatform.iOS || platform == TargetPlatform.macOS;
}
9 changes: 8 additions & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.11"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3"
meta:
dependency: "direct main"
description:
Expand Down Expand Up @@ -155,7 +162,7 @@ packages:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.4.3"
version: "0.4.8"
typed_data:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: adaptive_dialog
description: Show alert dialog or modal action sheet adaptively according to platform.
version: 1.3.0
version: 1.4.0
homepage: https://github.com/mono0926/adaptive_dialog
environment:
sdk: '>=2.15.0 <3.0.0'
Expand Down

0 comments on commit 8c5c224

Please sign in to comment.