Skip to content

Entities

Ivan Galkin edited this page Jan 1, 2024 · 3 revisions

FPCAnimation

An abstraction of animation properties for animation widgets.
The default value is const FPCDefaultAnimation();.
Get the actual animation instance in the widget tree:

final FPCAnimation animation = context.fpcAnimation;

The method allows you to change the current animations:

context.fpcChangeDateTime(
  const Animations(),
);

FPCDateTime

An abstraction of dateTime properties for pickers.
The default value is FPCDefaultDateTime();.
Get the actual date time instance in the widget tree:

final FPCDateTime dateTime = context.fpcDateTime;

The method allows you to change the current date times:

context.fpcChangeDateTime(
  DateTimes()
);

FPCDuration

An abstraction of duration properties for animation widgets.
The default value is const FPCDefaultDuration();.
Get the actual duration instance in the widget tree:

final FPCDuration duration = context.fpcDuration;

The method allows you to change the current durations:

context.fpcChangeDuration(
  const Durations()
);

FPCFont

An abstraction of a font weights and families that text components use.
The default value is const FPCDefaultFont();.
Get the actual text style instance in the widget tree:

final FPCFont font = context.fpcFont;

The method allows you to change the current text styles:

context.fpcChangeFont(
  const Fonts()
);

FPCHaptic

An abstraction of vibration functions.
The default value is const FPCDefaultHaptic();.
Get the actual vibration functions instance in the widget tree:

final FPCHaptic haptic = context.fpcHaptic;

The method allows you to change the current haptic vibration:

context.fpcChangeHaptic(
  const Haptics()
);

FPCPlatform

Enum that all package components use for platform decomposition.
The default value is extension from defaultTargetPlatform FPCPlatform.values.fromTargetPlatform(defaultTargetPlatform);.
Get the actual platform in the widget tree using context:

final FPCPlatform platform = context.fpcPlatform;

The method allows you to change the current platform:

context.fpcChangePlatform(
  FPCPlatform.android
);

FPCSize

An abstraction of a sizes that all package components use.
The default value is const FPCDefaultSize();.
Get the actual sizes instance in the widget tree:

final FPCSize size = context.fpcSize;

The method allows you to change the current sizes:

context.fpcChangeSize(
  const Sizes()
);

You can get the actual state for platform-decomposing size properties:

final FPCSizeScope sizeScope = context.fpcSizeScope;

final BorderRadius borderRadiusBottomSheet = sizeScope.borderRadiusBottomSheet;
final BorderRadius borderRadiusButton = sizeScope.borderRadiusButton;
final BorderRadius borderRadiusCard = sizeScope.borderRadiusCard;
final BorderRadius borderRadiusDialog = sizeScope.borderRadiusDialog;
final BorderRadius borderRadiusField = sizeScope.borderRadiusField;
final BorderRadius borderRadiusPopUpMenu = sizeScope.borderRadiusPopUpMenu;
final BorderRadius borderRadiusSegmentControl = sizeScope.borderRadiusSegmentControl;
final BorderRadius borderRadiusSnackBar = sizeScope.borderRadiusSnackBar;
final BorderRadius borderRadiusToggle = sizeScope.borderRadiusToggle;

final double borderWidthButton = sizeScope.borderWidthButton;
final double borderWidthCard = sizeScope.borderWidthCard;
final double borderWidthField = sizeScope.borderWidthField;
final double borderWidthSegmentControl = sizeScope.borderWidthSegmentControl;
final double borderWidthSnackBar = sizeScope.borderWidthSnackBar;

FPCTheme

An abstraction of a theme that all package components use.
The default value is FPCDefaultLightTheme();.
There is also a dark theme for example - FPCDefaultDarkTheme();.
Get the actual theme instance in the widget tree:

final FPCTheme theme = context.fpcTheme;

The method allows you to change the current theme:

context.fpcChangeTheme(
  DarkTheme()
);

You can get the actual theme state for platform-decomposing entities:

final FPCThemeScope themeScope = context.fpcThemeScope;

final Color barrierColorExpandedBottomSheet = themeScope.barrierColorExpandedBottomSheet;
final Color barrierColorSmallBottomSheet = themeScope.barrierColorSmallBottomSheet;
final Color barrierColorDialog = themeScope.barrierColorDialog;

FPCTimeOfDay

An abstraction of TimeOfDay pickers.
The default value is FPCDefaultTimeOfDay();.
Get the actual time of day instance in the widget tree:

final FPCTimeOfDay timeOfDay = context.fpcTimeOfDay;

The method allows you to change the current times of day:

context.fpcChangeTimeOfDay(
  const TimesOfDay()
);
Clone this wiki locally