platform library

Classes

CommonPlatformIcons
Common icons for both cupertino and material
CupertinoAlertDialogData
CupertinoAppData
CupertinoAppRouterData
CupertinoCheckboxData
CupertinoDatePickerData
CupertinoDialogActionData
CupertinoDialogData
CupertinoDropdownButtonData<T>
CupertinoElevatedButtonData
CupertinoIconButtonData
CupertinoListTileData
CupertinoModalSheetData
CupertinoNavigationBarData
CupertinoPageData
CupertinoPageRouteData
CupertinoPageScaffoldData
CupertinoPopupMenuCancelButtonData
CupertinoPopupMenuData
CupertinoPopupMenuOptionData
CupertinoProgressIndicatorData
CupertinoRadioData
CupertinoScrollbarData
CupertinoSearchBarData
CupertinoSliderData
CupertinoSliverAppBarData
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
EnoughPlatformSliverAppBar
Displays a SliverAppBar on material and a CupertinoSliverNavigationBar on cupertino
MaterialAlertDialogData
MaterialAppBarData
MaterialAppData
MaterialAppRouterData
MaterialCheckboxData
MaterialDatePickerData
MaterialDialogActionData
MaterialDialogData
MaterialDialogFlatActionData
MaterialDropdownButtonData<T>
MaterialElevatedButtonData
MaterialIconButtonData
MaterialListTileData
MaterialModalSheetData
MaterialNavBarData
MaterialNavigationBarData
MaterialPageData
MaterialPageRouteData
MaterialPopupMenuData
MaterialPopupMenuOptionData
MaterialProgressIndicatorData
MaterialRadioData
MaterialScaffoldData
MaterialScrollbarData
MaterialSearchBarData
MaterialSliderData
MaterialSliverAppBarData
MaterialSwitchData
MaterialTabController
MaterialTabControllerData
MaterialTabScaffoldData
MaterialTextButtonData
MaterialTextFieldData
MaterialTextFormFieldData
PlatformActionChip
PlatformAlertDialog
PlatformApp
PlatformAppBar
PlatformBottomBar
Shows a BottomAppBar on materal and a CupertinoBar on cupertino
PlatformCheckbox
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
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 switching platforms.
PlatformProviderState
PlatformRadio<T>
PlatformRadioListTile<T>
Provides a RadioListTile implementation for both material and cupertino
PlatformScaffold
PlatformScrollbar
PlatformSearchBar
PlatformSettingsData
PlatformSlider
PlatformSliverAppBar
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
PlatformTheme
PlatformThemeState
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
SelectablePlatformListTile
Uses either a ListTile or a CupertinoListTile

Enums

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

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, bool allowSnapshotting = true, PlatformBuilder<MaterialPageData>? material, PlatformBuilder<CupertinoPageData>? cupertino}) Page
platformPageRoute<T>({required BuildContext context, WidgetBuilder? builder, RouteSettings? settings, bool? maintainState, bool? fullscreenDialog, String? iosTitle, bool allowSnapshotting = true, bool barrierDismissible = false, 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, MaterialDialogData? material, CupertinoDialogData? cupertino, WidgetBuilder? builder, bool? barrierDismissible, RouteSettings? routeSettings, bool useRootNavigator = true, String? barrierLabel, Offset? anchorPoint}) 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.

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)