Skip to content

Commit b700e87

Browse files
author
fuzzagrosner
committed
[Setup] update doc and changelog for 0.0.7
1 parent 4ed9a58 commit b700e87

File tree

3 files changed

+51
-24
lines changed

3 files changed

+51
-24
lines changed

CHANGELOG.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,34 @@
1+
## [0.0.7] - 1/2/2018
2+
3+
NEW - Upgrade to Flutter 1.1.4
4+
5+
NEW - all widgets are now marked private imports, meaning switch imports from:
6+
```dart
7+
import 'package:platty/widgets/alert.dart';
8+
import 'package:platty/widgets/button.dart';
9+
```
10+
11+
to:
12+
```dart
13+
import 'package:platty/platty.dart';
14+
```
15+
16+
This will clean up the imports and make it easier to use the library.
17+
18+
NEW - Library now utilizes new `CupertinoTheme` and `MaterialBasedCupertinoThemeData` to bridge styling gap between widgets finally.
19+
20+
`androidTheme` -> `unifiedTheme` and no longer a function. The app will utilize the material theme and properly bridge it to
21+
Cupertino world.
22+
23+
`buttonColor` for `Theme` is now reflected in `PButton` iOS as well.
24+
25+
`bottomAppBarColor` for `Theme` now actually works with android and iOS `PTabBar`.
26+
27+
`caption` from `TextTheme` used in `Theme` now propagates to `PTabBar` as the inactive color on iOS and Android, to match behavior expected.
28+
29+
`iconColor` for a `PNavBar` utilizes the `IconTheme` if no `iconColor` specified. Defaults to `CupertinoColors.ActiveBlue` if all missing.
30+
31+
132
## [0.0.6] - 12/29/2018
233

334
Fixes issue where `PSliverNavigationBar` on iOS, when specifying title and `iosLargeTitle`, displays both a `middle`

README.md

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,25 +15,25 @@ Want to use bottom tabs in your app that resolve to platform specific UI? No pro
1515

1616
List of Widget Files:
1717

18-
[Alerts](/lib/widgets/alert.dart)
18+
[Alerts](/lib/src/widgets/alert.dart)
1919

20-
[Back Button](/lib/widgets/back_button.dart)
20+
[Back Button](/lib/src/widgets/back_button.dart)
2121

22-
[Buttons](/lib/widgets/button.dart)
22+
[Buttons](/lib/src/widgets/button.dart)
2323

24-
[Navigation Bars](/lib/widgets/navigation_bar.dart)
24+
[Navigation Bars](/lib/src/widgets/navigation_bar.dart)
2525

26-
[Progress](/lib/widgets/progress.dart)
26+
[Progress](/lib/src/widgets/progress.dart)
2727

28-
[Routing](/lib/widgets/routing.dart)
28+
[Routing](/lib/src/widgets/routing.dart)
2929

30-
[Scaffold](/lib/widgets/scaffold.dart)
30+
[Scaffold](/lib/src/widgets/scaffold.dart)
3131

32-
[Slider](/lib/widgets/slider.dart)
32+
[Slider](/lib/src/widgets/slider.dart)
3333

34-
[Switch](/lib/widgets/switches.dart)
34+
[Switch](/lib/src/widgets/switches.dart)
3535

36-
[TabView](/lib/widgets/tabs.dart)
36+
[TabView](/lib/src/widgets/tabs.dart)
3737

3838

3939
## Getting Started
@@ -54,10 +54,8 @@ class MyApp extends StatelessWidget {
5454
Widget build(BuildContext context) {
5555
return PlatformApp(
5656
title: 'Flutter Demo',
57-
58-
// specify Android Material Theme data here. it's a lazy evaluated function, only rendering if platform is Android.
59-
androidTheme: () => ThemeData(
60-
57+
// specify our app theme here. We do the leg work of bridging it to Cupertino.
58+
unifiedTheme: ThemeData(
6159
primarySwatch: Colors.lightBlue,
6260
bottomAppBarColor: Colors.red,
6361
),
@@ -68,14 +66,8 @@ class MyApp extends StatelessWidget {
6866
6967
```
7068

71-
`PlatformApp` unifies all of the same properties between `MaterialApp` and `CupertinoApp` to allow you to choose.
72-
73-
_NOTE_: Not specifying a `renderPlatform` will render a `CupertinoApp` on `iOS`, and might cause issues with widgets that expect
74-
a material app instance.
75-
76-
_NOTE_: There is not a `CupertinoTheme` just yet in Flutter. Check out this [pull request](https://github.com/flutter/flutter/pull/23759) .
77-
once that is in the main flutter releases, we can then create `PTheme` that merges `MaterialTheme` and `CupertinoTheme`
78-
instances. For now it is highly recommended to specify `targetPlatform: TargetPlatform.android` in the constructor of `PlatformApp`.
69+
`PlatformApp` unifies all of the same properties between `MaterialApp` and `CupertinoApp` to allow both instances of widgets in the hiearchy and
70+
switching styling based on platform.
7971

8072
Now you replace widgets that are included in this library with their "P" counterparts:
8173

@@ -101,13 +93,17 @@ Now you replace widgets that are included in this library with their "P" counter
10193

10294
`AlertDialog`/`CupertinoAlertDialog` -> `PAlertDialog`
10395

96+
### Properties Specific to a platform have a prefix
10497
Any widgets that have ios-only or android-only counterparts, they are prefixed to `android`/`ios` accordingly:
10598

10699
For example `PButton`, `androidShape` applies to `RaisedButton.shape` property. It does not exist on a `CupertinoButton`.
107100
However `CupertinoButton` has a `borderRadius` and `pressedOpacity`. Those two props become `iosBorderRadius` and `iosPressedOpacity`.
108101

109102
## Helpers
110103

104+
This library bundles a few standard functions to easily return code that is unique for each platform. Instead of checking
105+
and switching on the result of `Theme.of(context).targetPlatform`, utilize the following methods:
106+
111107
### Specific Platform Instance
112108

113109
To have a specific `P`-Widget utilize a specific platform theme only, such as Material or Cupertino, you can wrap
@@ -226,4 +222,4 @@ Column(
226222
],
227223
),
228224
229-
```
225+
```

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: platty
22
description: Platform Conforming Widgets for Flutter!
3-
version: 0.0.6
3+
version: 0.0.7
44
author: Andrew Grosner <andrew@fuzzproductions.com>
55
homepage: https://github.com/fuzz-productions/platty
66

0 commit comments

Comments
 (0)