Repository navigation
iPhone Duo, accessibility, InteractiveViewer, fixes and new feature requests (1.2.0)
This release brings iPhone Duo support: two panes the system places
around the fold, where the fold and the cameras are, the hinge, and the
vertical bar. It adds accessibility, with Semantics for VoiceOver and
TalkBack, and InteractiveViewer to pinch to zoom and pan. Every open
issue is fixed and every feature the community asked for is in (#58 to
#71 and #75), among them Overlay, Tooltip, SegmentedButton and date
range pickers. It also adds ShaderMask.
To get it, run dn upgrade. On an older dn, that prints the install
command for your system: run it, then dn upgrade again.
Code push: every framework build is a new build for code push. After
dn upgrade, fixes you send reach only apps released with this build, so
make a new release before sending fixes.
If you used these, your code changes:
TextInputType.url2is gone: useurl.TextInputTypeis now a class, as in Flutter, so aswitchover it
needs a default case.- The framework no longer has its own
showMediaPicker. Add the
dartnative_media_pickerplugin and call itsshowMediaPicker, without
context:.
New
- iPhone Duo. Show two panes side by side, stacked, or one over the
other withArrangementView: the system places them around the fold and
moves them when the phone folds or unfolds, and you choose how much space
each one gets. You can also ask where the fold and the cameras are
(MediaQuery.displayFeaturesOf,DisplayFeatureBuilder), how far the
phone is open (DeviceHinge.current), which bar buttons go into the
vertical bar along the side (BarButtonItemIOSConfig), and keep a
screen out of it (ScaffoldIOSConfig). On Android and older iPhones the
panes become a row, a column or a stack. - Accessibility. VoiceOver and TalkBack can now read controls you draw
yourself: wrap one inSemanticsto give it a name, say it is a button
or a heading, and let the screen reader tap it.MergeSemanticsreads a
label and its switch as one item,ExcludeSemanticshides decoration,
andIconandImagetake asemanticLabel. Thanks to
AbdurahmanAlmehdi (#63). InteractiveViewer. Pinch to zoom and drag to pan any widget, such
as a photo, with limits you set. It runs natively on iPhone and Android.
Thanks to AbdurahmanAlmehdi (#62).- Images behind a login.
Image.networkandNetworkImagetake
headers:, for example a bearer token, andprecacheImagesends them
too. Thanks to AbdurahmanAlmehdi (#62). Overlay. Show widgets above every screen, even above the app bar,
that stay while screens open and close, such as a toast that outlives
the page that showed it. Thanks to AbdurahmanAlmehdi (#67).TooltipandIconButton(tooltip:). A short label that appears on
a long press on Android, and on a mouse or trackpad hover on iPhone and
iPad. Screen readers read it too. Thanks to AbdurahmanAlmehdi (#68).SegmentedButton. Segments with a label and an icon, on the
platform's own segmented control. Android shows both, with a check mark
on the selected one; iPhone shows the label, or the icon when there is
no label. Thanks to AbdurahmanAlmehdi (#69).- Date pickers.
showDatePickeropens on the date you give and greys
out the days outsidefirstDateandlastDate. The new
showDateRangePickerpicks a start and an end date: Material's range
picker on Android, two date pickers in a sheet on iPhone, as in the
Calendar app. Thanks to AbdurahmanAlmehdi (#59). - Number keyboards with a decimal point or a minus sign:
TextInputType.numberWithOptions(decimal: true, signed: true). Thanks
to AbdurahmanAlmehdi (#58). - Plugins receive links on iPhone. The link that opened the app, links
that arrive while it runs, home screen quick actions and the push token
now reach plugins directly, so a deep-link plugin needs no extra code in
your app. If your ownAppDelegateorSceneDelegateimplements one of
these methods, mark itoverrideand callsuper. Thanks to
AbdurahmanAlmehdi (#65). keyboardDismissBehavioron lists.ListView,CustomScrollView
andSingleChildScrollViewnow takekeyboardDismissBehavior, as in
Flutter. On iPhone you can already drag the keyboard down while you
scroll; withonDragit closes as soon as the scroll starts, which suits
long forms. On Android,onDragcloses it the same way. Thanks to
AbdurahmanAlmehdi (#71).ShaderMask. Show a widget through a gradient, for example a title
that fades out at its edges. The system draws the mask, so content that
moves inside it is not redrawn. It supports thedstInanddstOut
blend modes, and the default,modulate, with white colours.- Smaller additions from Flutter:
ListView.separated,
Rect.fromCenterandEdgeInsetsDirectional.fromSTEB(#71);
PositionedDirectional, which places aStackchild by start and end so
it flips in right-to-left languages (#66); andCubic, for a curve of
your own (#70). Thanks to AbdurahmanAlmehdi.
Plugins
dartnative_lottie1.3.1. Your app's build no longer prints the
plugin's log lines. Raise the constraint to^1.3.1to take it.dartnative_background1.0.1. Apps thatimport dartnative_backgroundin theirAppDelegate, as its README shows, now
build with Xcode 27 as well as Xcode 26. Raise the constraint to
^1.0.1.dartnative_camera1.0.1 anddartnative_notifications1.0.1. Their
iOS libraries are built again so that every Xcode can read them; the code
is unchanged.
Fixed
- Animations move as they do in Flutter.
Curves.easeand the other
curves now have Flutter's exact values;Curves.easewas a different
curve before. Animations the platform runs itself, such as a page change
inPageView, keep the platform's own feel. Thanks to AbdurahmanAlmehdi
(#70). - Dialogs on iPhone. Content that fills the card's width, such as a
segmented control or a row of buttons, now fits inside the card instead
of running past its right edge. Thanks to definev (#75). - Right-to-left layouts.
Directionalityon part of a screen now
flips its rows and alignments, as in Flutter.Row,ColumnandFlex
also take atextDirection, for example to keep a phone number left to
right in an Arabic screen. Thanks to AbdurahmanAlmehdi (#60). - Text styles.
TextStyle.copyWithno longer drops the fields you
don't pass, and font features now apply, so
FontFeature.tabularFigures()lines up the numbers in a column. Thanks
to AbdurahmanAlmehdi (#61). dartnative_media_pickerandpackage:dartnativeimport together.
The framework had an older picker with the same names, so you needed
hide. Thanks to AbdurahmanAlmehdi (#64).- Landscape and iPhone Duo. A screen whose body starts with
Padding,
or with a list that haspadding:, keeps its padding beside the notch or
the Duo's vertical bar; the padding was lost. Tab content no longer
slides under the notch or the vertical bar. - Scrolling on iPhone. A list pulled past its end keeps following your
finger while something on screen updates, such as a timer; it used to
snap back at each update. - The right keyboard for each
keyboardType. On iPhone, street
addresses, dates, names and passwords opened the wrong keyboard. On
Android, names and addresses now get their own keyboards. showDatePickeron Android returned the evening of the day before
for users west of UTC.AppBaron iPhone. Changing only the title or one button's icon now
updates just that, instead of rebuilding every button in the bar.- Images.
ImageCachePolicy.memoryOnlynow really keeps images off
the disk.CircleAvatar.backgroundImagetakes an image, as in Flutter,
and shows it.Canvas.drawImageon iPhone uses the blend mode you set. - Smaller fixes.
GestureDetector.onScaleEndreports the pinch's
speed (it was always 0).TweenAnimationBuilderanimates to a new end
value. ChangingshowScrollBar,reverseorphysicsafter the first
build now takes effect.SegmentedControlon Android gives every
segment the same width and Material's text size. - Older plugin versions work. An app can stay on an older version of a
DartNative plugin, such asdartnative_lottie: 1.2.0, after upgrading;
dn pub getused to accept only the newest. - Package versions agree. Packages from pub.dev that are built into
DartNative, such ashttporcollection, now name the exact version
they were built with, so your lock file, your editor and the build all
use the same one. If yourpubspec.yamlrules that version out,
dn pub gettells you what to change.
Build: SDK 6376c57b931 · engine 868544bccad6. Install or update: curl -fsSL https://cdn.dartnative.com/install.sh | sh