Compatibility with 2.0.2 and up.
Removes the use of actionsForegroundColor
Compatibility with 1.22.4 and up.
Use the new version of the Android embedding API.
Update deprecated properties within flutter SDK.
Fix issue using Platform.isAndroid
on Flutter web causes a crash:
Another exception was thrown: Failed assertion: boolean expression must not be null
This is due to a an issue with what is a platform
Unify button styling between platforms more easily
Added many more examples of buttons, alerts, nav, etc
NEW: Added PTextField
with ability to use same between platforms in different visual paradigms
Updated readme
Rename PlatformRoute
to PRoute
Add many missing passdown props on PButton
/PFlatButton
for Android configuration
Added AlertData
which is used for PFlatButton
to style in alert mode easily.
Update to Flutter 1.10.14.
FIX - issue where using navigatorObservers
in the PlatformApp
threw an exception since if one is reused in
multiple instances, the framework will throw an exception. Now we utilize them in whatever the current render platform is only.
NEW - Upgrade to Flutter 1.1.4
NEW - all widgets are now marked private imports, meaning switch imports from:
import 'package:platty/widgets/alert.dart';
import 'package:platty/widgets/button.dart';
to:
import 'package:platty/platty.dart';
This will clean up the imports and make it easier to use the library.
NEW - Library now utilizes new CupertinoTheme
and MaterialBasedCupertinoThemeData
to bridge styling gap between widgets finally.
androidTheme
-> unifiedTheme
and no longer a function. The app will utilize the material theme and properly bridge it to
Cupertino world.
buttonColor
for Theme
is now reflected in PButton
iOS as well.
bottomAppBarColor
for Theme
now actually works with android and iOS PTabBar
.
caption
from TextTheme
used in Theme
now propagates to PTabBar
as the inactive color on iOS and Android, to match behavior expected.
iconColor
for a PNavBar
utilizes the IconTheme
if no iconColor
specified. Defaults to CupertinoColors.ActiveBlue
if all missing.
Fixes issue where PSliverNavigationBar
on iOS, when specifying title and iosLargeTitle
, displays both a middle
and the large title. This would require dev to pass null title
on iOS, requiring more work than necessary.
-
NEW - adds
MaterialPatcher
component to wrap certainCupertino
widgets so that material ancestors have a material reference and do not error out. This fixes error usingCupertinoApp
with some material ancestors withoutMaterial
parents. -
PlatformApp
can specify aPTheme
to be passed down the hierarchy instead. -
FIX - swapping rendering platform from the IDE did not hot reload widgets in debug mode.
-
NEW - adds
platformWrap
andplatformSelect
.platformWrap
enables platform-specific logic for a component by passing down thechild
and allowing you to wrap it:
platformWrap(
context,
child: PButton(
padding: EdgeInsets.all(0.0),
child: Text(title),
color: Colors.red,
onPressed: () {
Navigator.push(context, PlatformRoute.of(context, builder: page));
},
),
// CupertinoButton does not include a margin like MaterialButton.
renderCupertino: (context, child) => Padding(
padding: EdgeInsets.only(bottom: 8.0),
child: child,
),
);
You can specify any of renderCupertino
, renderMaterial
, or renderFuschia
(or none).
Any not specified default to the child
.
platformSelect
is a helper that enables returning different objects based on platform in a unified way.
In our PlatformAdaptingWidget
, we utilize it to return a different widget based on platform. You can use it to return any
return type based on platform:
Column(
children: [
platformSelect(context,
renderMaterial: (context) => Text("I am android"),
renderCupertino: (context) => Text("I am iOS"),
renderFuchsia: (context) => Text("I am FUCHSIA"))
],
),
renderMaterial
and renderCupertino
are required. renderFuchsia
defaults to material.
-
Adds support for Fuchsia in
PlatformAdaptingWidget
, which defaults torenderMaterial
. -
Added missing props for
MaterialButton
inPButton
to be passed down on Android.
Fix for PButton Border Radius on iOS. Previously did not utilize same default as CupertinoButton, causing button not to be rounded.
Initial Release of platty