platform library Null safety

Classes

CommonPlatformIcons
Common icons for both cupertino and material
CupertinoAlertDialogData
CupertinoAppData
CupertinoAppRouterData
CupertinoDatePickerData
CupertinoDialogActionData
CupertinoElevatedButtonData
CupertinoIconButtonData
CupertinoListTile
A single fixed-height row that typically contains some text as well as a leading or trailing icon.
CupertinoModalSheetData
CupertinoNavigationBarData
CupertinoPageData
CupertinoPageRouteData
CupertinoPageScaffoldData
CupertinoPopupMenuCancelButtonData
CupertinoPopupMenuData
CupertinoPopupMenuOptionData
CupertinoProgressIndicatorData
CupertinoSliderData
CupertinoSwitchData
CupertinoTabBarData
CupertinoTabControllerData
CupertinoTabScaffoldData
CupertinoTabViewData
CupertinoTextButtonData
CupertinoTextFieldData
CupertinoTextFormFieldData
DatePickerContentData
DecoratedPlatformTextField
Provides a cross platform replacement for the material TextField
DefaultCupertinoDatePicker
DensePlatformIconButton
Replaces the material IconButton with a platform aware solution
DialogHelper
Helps to display dialogs
ListTileTheme
An inherited widget that defines color and style parameters for ListTiles in this widget's subtree.
MaterialAlertDialogData
MaterialAppBarData
MaterialAppData
MaterialAppRouterData
MaterialDatePickerData
MaterialDialogActionData
MaterialDialogFlatActionData
MaterialElevatedButtonData
MaterialIconButtonData
MaterialModalSheetData
MaterialNavBarData
MaterialPageData
MaterialPageRouteData
MaterialPopupMenuData
MaterialPopupMenuOptionData
MaterialProgressIndicatorData
MaterialScaffoldData
MaterialSliderData
MaterialSwitchData
MaterialTabController
MaterialTabControllerData
MaterialTabScaffoldData
MaterialTextButtonData
MaterialTextFieldData
MaterialTextFormFieldData
PlatformActionChip
PlatformAlertDialog
PlatformApp
PlatformAppBar
PlatformBottomBar
Shows a BottomAppBar on materal and a CupertinoBar on cupertino
PlatformCheckboxListTile
A platform aware simple checkbox list tile
PlatformChip
Simple cross-platform Chip replacement
PlatformCircularProgressIndicator
PlatformDialogAction
PlatformDialogActionButton
A platform aware dialog action
PlatformDialogActionText
A platform aware dialog action text
PlatformDrawer
Creates a Drawer on material and a CupertinoPageScaffold on cupertiono
PlatformDropdownButton<T>
A platform aware DropdownButton
PlatformElevatedButton
PlatformFilledButtonIcon
Uses an ElevatedButton.filled on material and a CupertinoButton.filled on cupertino
PlatformIconButton
PlatformIcons
PlatformInfo
Checks the current platform paradigm
PlatformInkWell
A rectangular area of a that responds to touch.
PlatformListTile
Uses either a ListTile or a CupertinoListTile
PlatformNavBar
PlatformPageScaffold
Provides a basis for any cupertino (iOS / macOS) or material (Android, web) app.
PlatformPopupDivider<T>
PlatformPopupMenu
PlatformPopupMenuButton<T>
Provides a platform aware replacement for the material PopupMenuButton
PlatformPopupMenuEntry<T>
PlatformPopupMenuItem<T>
PlatformProgressIndicator
Uses a CircularProgressIndicator on material and a CupertinoActivityIndicator - or the 'CupertinoProgressBar' from the cupertino_progress_bar package when the given value is not null - on cupertino
PlatformProvider
A Provider that provides access to the functions of swicthing platforms.
PlatformProviderState
PlatformRadioListTile<T>
Provides a RadioListTile implementation for both material and cupertino
PlatformScaffold
PlatformSettingsData
PlatformSlider
PlatformSliverAppBar
Uses a SliverAppBar on material or a CupertinoSliverNavigationBar on cupertino
PlatformSnackApp
A base app that allows to show SnackBars on cupertino as well
PlatformStepper
A platform aware replacement for the material Stepper widget
PlatformStyleData
PlatformSwitch
PlatformTabController
PlatformTabScaffold
PlatformText
PlatformTextButton
PlatformTextButtonIcon
Simple replacement for TextButton.icon
PlatformTextField
PlatformTextFormField
PlatformToggleButtons
Provides a platform aware ToggleButtons replacement
PlatformToolbar
Provides a toolbar wrapper
PlatformWidget
PlatformWidgetBase<I extends Widget, A extends Widget>
PlatformWidgetBuilder
Provides a builder for either the Material or Cupertino platforms which take a child for common use
PopupMenuOption

Extensions

PlatformIconsExt

Constants

kDefaultRoundedBorderDecoration → const BoxDecoration
BoxDecoration(color: CupertinoDynamicColor.withBrightness(color: CupertinoColors.white, darkColor: CupertinoColors.black), border: _kDefaultRoundedBorder, borderRadius: BorderRadius.all(Radius.circula…

Functions

formatData(BuildContext context, String data) String
isCupertino(BuildContext context) bool
isMaterial(BuildContext context) bool
platform(BuildContext context) PlatformTarget
platformPage({required BuildContext context, Widget? child, String? title, String? name, bool? maintainState, bool? fullscreenDialog, LocalKey? key, String? restorationId, Object? arguments, PlatformBuilder<MaterialPageData>? material, PlatformBuilder<CupertinoPageData>? cupertino}) Page
platformPageRoute<T>({required BuildContext context, WidgetBuilder? builder, RouteSettings? settings, bool? maintainState, bool? fullscreenDialog, String? iosTitle, PlatformBuilder<MaterialPageRouteData>? material, PlatformBuilder<CupertinoPageRouteData>? cupertino}) PageRoute<T>
platformThemeData<T>(BuildContext context, {required T material(ThemeData theme), required T cupertino(CupertinoThemeData theme)}) → T
showPlatformDatePicker({required BuildContext context, required DateTime initialDate, required DateTime firstDate, required DateTime lastDate, PlatformBuilder<MaterialDatePickerData>? material, PlatformBuilder<CupertinoDatePickerData>? cupertino, DatePickerContentBuilder? cupertinoContentBuilder}) Future<DateTime?>
showPlatformDialog<T>({required BuildContext context, required WidgetBuilder builder, bool? barrierDismissible, RouteSettings? routeSettings, bool useRootNavigator = true, bool materialUseSafeArea = true, Color? materialBarrierColor = Colors.black54, String? barrierLabel}) Future<T?>
showPlatformModalSheet<T>({required BuildContext context, required WidgetBuilder builder, MaterialModalSheetData? material, CupertinoModalSheetData? cupertino}) Future<T?>
Displays either the showModalBottomSheet for material or showCupertinoModalPopup for cupertino
showPlatformSpecificDatePicker({required BuildContext context, required DateTime initialDate, required DateTime firstDate, required DateTime lastDate, DateTime? currentDate, DatePickerEntryMode initialEntryMode = DatePickerEntryMode.calendar, SelectableDayPredicate? selectableDayPredicate, String? helpText, String? cancelText, String? confirmText, Locale? locale, bool useRootNavigator = true, RouteSettings? routeSettings, TextDirection? textDirection, TransitionBuilder? builder, DatePickerMode initialDatePickerMode = DatePickerMode.day, String? errorFormatText, String? errorInvalidText, String? fieldHintText, String? fieldLabelText}) Future<DateTime?>
Shows a platform specific date picker with the given initialDateTime with a possible range starting with firstDate and ending with lastDate.
showPlatformTimePicker({required BuildContext context, required TimeOfDay initialTime, Widget builder(BuildContext, Widget?)?, bool useRootNavigator = true, TimePickerEntryMode initialEntryMode = TimePickerEntryMode.dial, String? cancelText, String? confirmText, String? helpText, RouteSettings? routeSettings}) Future<TimeOfDay?>
Shows a platform specific time picker with the given initialTime.

Enums

DialogActions
Common dialog actions
PlatformStyle
PlatformTarget
Extends on TargetPlatform to include web

Typedefs

DatePickerContentBuilder = Widget Function(DatePickerContentData data, CupertinoDatePickerData? cupertinoData)
PlatformBuilder<T> = T Function(BuildContext context, PlatformTarget platform)
PlatformIndexBuilder<T> = T Function(BuildContext context, PlatformTarget platform, int index)