Skip to main content

Customizing the UI

PlayxUpdateUIOptions controls the dialog and the page. Every field is optional.

PlayxUpdateUIOptions(
title: (info) => 'Version ${info.newVersion} is here',
description: (info) => 'Update to get the latest features and fixes.',
showReleaseNotes: true,
releaseNotesTitle: (info) => "What's new",
updateButtonText: 'Update now',
dismissButtonText: 'Maybe later',
titleTextStyle: const TextStyle(fontSize: 22, fontWeight: FontWeight.bold),
updateButtonStyle: ElevatedButton.styleFrom(backgroundColor: Colors.green),
leading: Image.asset('assets/update.png', height: 120),
)

Texts​

OptionDefault
title"New version available."
descriptiona message with the new version
showReleaseNotesfalse
releaseNotesTitle"Release Notes:"
updateButtonText"Update"
dismissButtonText"Later" (dialog), "Not Now" (page), "Close App" (forced)

title, description and releaseNotesTitle receive the PlayxVersionUpdateInfo, so you can include versions in them.

Styles​

titleTextStyle, descriptionTextStyle, releaseNotesTitleTextStyle, releaseNotesTextStyle, updateButtonTextStyle, dismissButtonTextStyle, updateButtonStyle and dismissButtonStyle.

leading is a widget shown above the content, for an image or illustration.

Dismissal​

OptionMeaning
isDismissiblewhether the user can dismiss it. Defaults to true, except for a forced update
showDismissButtonOnForceUpdateshow the dismiss button on a forced update (default true)
displayTypedialog, page, or page on force update, see Update dialog and page

Actions​

OptionMeaning
onUpdatereplaces what the update button does. Receives the info and the LaunchMode
storeLauncheropens the store yourself and returns whether it opened, see Opening the store
onCancelruns when the dismiss button is tapped
launchModehow the store URL is launched (default LaunchMode.externalApplication)
preferStoreApptry the store app's deep link before the web URL (default true)
eventscallbacks for analytics, see Events
info

These options apply to the Flutter UI: the dialog and page. Android's native in-app update screens are controlled by Google Play.