RtAppConstants class
Application-wide constants for UI styling, sizing, and configuration.
RtAppConstants implements the singleton pattern and provides centralized access
to constants used throughout the application. It uses mixins to organize related
constants into logical groups.
Constant categories (via mixins):
- SizeBoxMargin: Spacing and margin constants
- SplashScreenVar: Splash screen configuration
- BottomSheetHeaderConst: Bottom sheet styling
- CommonSearchTextFieldConst: Search field configuration
- NoItemFoundConst: Empty state UI constants
Example:
// Access via Utils facade
final padding = Utils.appConstants.commonPadding;
final fontSize = Utils.appConstants.textHeaderFontSize;
// Use in widgets
Container(
padding: EdgeInsets.all(Utils.appConstants.boxPadding),
child: Text(
'Hello',
style: TextStyle(fontSize: Utils.appConstants.normalFontSize),
),
);
Constructors
- RtAppConstants()
-
Factory constructor returning the singleton instance.
factory
Properties
- animationDurationSeconds ↔ int
-
Duration of splash animation in seconds.
getter/setter pairinherited
- animationOpacity ↔ double
-
Final opacity value for splash animation (1.0 = fully opaque).
getter/setter pairinherited
- backgroundColor ↔ Color
-
Background color for the splash screen.
getter/setter pairinherited
- boldFontFamily ↔ String
-
Font family name for bold text.
getter/setter pair
-
Elevation for bottom navigation bar.
getter/setter pair
- bottomSheetContainerBorderRadius ↔ BorderRadius
-
Border radius for bottom sheet container (rounded top corners).
getter/setter pairinherited
- bottomSheetImageClose ↔ Icon
-
Icon widget for bottom sheet close button.
getter/setter pairinherited
- boxPadding ↔ double
-
Box/card padding (8.0 logical pixels).
getter/setter pair
- btnClosePadding ↔ EdgeInsets
-
Padding for the close button in bottom sheets.
getter/setter pairinherited
- cardElevation ↔ double
-
Standard elevation for card widgets: 4.0.
getter/setter pairinherited
- commonPadding ↔ double
-
Common padding value (20.0 logical pixels).
getter/setter pair
- defaultButtonHeight ↔ double
-
Standard height for default buttons (50.0 logical pixels).
getter/setter pair
- defaultButtonRadius ↔ double
-
Border radius for default buttons (12.0 logical pixels).
getter/setter pair
- eight ↔ double
-
Fixed spacing value: 8 logical pixels.
getter/setter pairinherited
- extraLargeFontSize ↔ double
-
Extra large font size: 30 logical pixels.
getter/setter pairinherited
- followFollowingBorderColor ↔ Color
-
Border color for follower/following widgets.
getter/setter pair
- followFollowingBorderWidth ↔ double
-
Border width for follower/following widgets.
getter/setter pair
- followFollowingContentPadding ↔ EdgeInsets
-
Content padding for follower/following widgets.
getter/setter pair
- followFollowingCountFontWeight ↔ FontWeight
-
Font weight for follower/following count numbers.
getter/setter pair
- followFollowingTitleFontWeight ↔ FontWeight
-
Font weight for follower/following title labels.
getter/setter pair
- getVerticalBarPadding ↔ EdgeInsets
-
Padding for vertical divider bars.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- headerHeight ↔ double
-
Height of the bottom sheet header: 70 logical pixels.
getter/setter pairinherited
- headerLeftPadding ↔ double
-
Left padding for header sections (40.0 logical pixels).
getter/setter pair
- headerPadding ↔ EdgeInsets
-
Padding for bottom sheet header content.
getter/setter pairinherited
- headerRightPadding ↔ double
-
Right padding for header sections (40.0 logical pixels).
getter/setter pair
- iconNormalSize ↔ double
-
Standard size for normal icons (30.0 logical pixels).
getter/setter pair
- imgNoItemFound ↔ Icon
-
Default icon for "no items found" state.
getter/setter pairinherited
- imgSearch ↔ Icon
-
Search icon widget with white color.
getter/setter pairinherited
- imgSearchSize ↔ double
-
Size of the search icon: 34 logical pixels.
getter/setter pairinherited
- mediumFontFamily ↔ String
-
Font family name for medium weight text.
getter/setter pair
- normalFontSize ↔ double
-
Standard font size for normal text (13.0 logical pixels).
getter/setter pair
- regularFontFamily ↔ String
-
Font family name for regular weight text.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- screenPadding ↔ double
-
Screen-level padding (20.0 logical pixels).
getter/setter pair
- searchBarThemeColor ↔ MaterialColor
-
Theme color for search bar (unfocused state).
getter/setter pairinherited
- searchContainerBorderRadius ↔ BorderRadius
-
Border radius for search container (fully rounded).
getter/setter pairinherited
- searchContainerHeight ↔ double
-
getter/setter pair
- searchContainerMargin ↔ EdgeInsets
-
Top margin for search container.
getter/setter pair
- searchContainerPadding ↔ EdgeInsets
-
Padding around the search container.
getter/setter pairinherited
- searchContainerSuffixIconPadding ↔ EdgeInsets
-
Padding for search suffix icon container.
getter/setter pairinherited
- searchIconContainerBorderRadius ↔ BorderRadius
-
Border radius for search icon container.
getter/setter pairinherited
- searchTextFieldPadding ↔ EdgeInsets
-
Left padding inside the search text field.
getter/setter pairinherited
- seventy ↔ double
-
Fixed spacing value: 70 logical pixels.
getter/setter pairinherited
- sixteen ↔ double
-
Fixed spacing value: 16 logical pixels.
getter/setter pairinherited
- snackbarDuration ↔ int
-
Duration for snackbar display in seconds.
getter/setter pair
- snackbarFontFamily ↔ String
-
Font family for snackbar text.
getter/setter pair
- snackbarFontSize ↔ double
-
Font size for snackbar text (16.0 logical pixels).
getter/setter pair
- snackbarTextAlign ↔ TextAlign
-
Text alignment for snackbar messages.
getter/setter pair
- spaceBetweenFormFields ↔ double
-
Standard spacing between form fields: 10 logical pixels.
getter/setter pairinherited
- splashLogoSize ↔ double
-
Size of the splash screen logo (200.0 logical pixels).
getter/setter pairinherited
- ten ↔ double
-
Fixed spacing value: 10 logical pixels.
getter/setter pairinherited
- textButtonFontSize ↔ double
-
Font size for button text (16.0 logical pixels).
getter/setter pair
- textHeaderFontSize ↔ double
-
Font size for header text (18.0 logical pixels).
getter/setter pair
- textLetterSpacing ↔ double
-
Default letter spacing for text (0.5).
getter/setter pair
- textLineHeight ↔ double
-
Default line height multiplier for text (1.5).
getter/setter pair
- textSubHeaderFontSize ↔ double
-
Font size for sub-header text (15.0 logical pixels).
getter/setter pair
- toolbarImageRadius ↔ double
-
Border radius for toolbar images (4.0 logical pixels).
getter/setter pair
- toolbarPadding ↔ double
-
Toolbar padding (10.0 logical pixels).
getter/setter pair
- twenty ↔ double
-
Fixed spacing value: 20 logical pixels.
getter/setter pairinherited
- txtNoFollowingFoundStyle ↔ TextStyle
-
Text style for "no items found" message.
getter/setter pairinherited
- txtSearchFontWeight ↔ FontWeight
-
Font weight for search text.
getter/setter pairinherited
- txtSearchLetterSpacing ↔ double
-
Letter spacing for search text.
getter/setter pairinherited
- txtSearchTextStyle ↔ TextStyle
-
Text style for search field text and hints.
getter/setter pairinherited
- vwNoItemFoundBgColor ↔ Color
-
Background color for "no items found" container.
getter/setter pairinherited
- vwNoItemFoundBorderColor ↔ Color
-
Border color for "no items found" container.
getter/setter pairinherited
- vwNoItemFoundBorderRadius ↔ double
-
Border radius for "no items found" container: 12 logical pixels.
getter/setter pairinherited
- vwNoItemFoundBorderWidth ↔ double
-
Border width for "no items found" container.
getter/setter pairinherited
- vwNoItemFoundHeight ↔ double
-
Height of the "no items found" container: 140 logical pixels.
getter/setter pairinherited
- vwNoItemFoundPadding ↔ EdgeInsets
-
Padding inside the "no items found" container.
getter/setter pairinherited
- vwNoItemFoundWidth ↔ double
-
Width of the "no items found" container: 250 logical pixels.
getter/setter pairinherited
- zeroPointEight ↔ double
-
Fractional spacing value: 0.8 (80% of screen dimension).
getter/setter pairinherited
- zeroPointEighty ↔ double
-
Fractional spacing value: 0.80 (80% of screen dimension).
getter/setter pairinherited
- zeroPointFour ↔ double
-
Fractional spacing value: 0.4 (40% of screen dimension).
getter/setter pairinherited
- zeroPointOne ↔ double
-
Fractional spacing value: 0.1 (10% of screen dimension).
getter/setter pairinherited
- zeroPointSeventeen ↔ double
-
Fractional spacing value: 0.17 (17% of screen dimension).
getter/setter pairinherited
- zeroPointThree ↔ double
-
Fractional spacing value: 0.3 (30% of screen dimension).
getter/setter pairinherited
- zeroPointTwo ↔ double
-
Fractional spacing value: 0.2 (20% of screen dimension).
getter/setter pairinherited
- zeroPointZeroEight ↔ double
-
Fractional spacing value: 0.08 (8% of screen dimension).
getter/setter pairinherited
- zeroPointZeroFive ↔ double
-
Fractional spacing value: 0.05 (5% of screen dimension).
getter/setter pairinherited
- zeroPointZeroFour ↔ double
-
Fractional spacing value: 0.04 (4% of screen dimension).
getter/setter pairinherited
- zeroPointZeroOne ↔ double
-
Fractional spacing value: 0.01 (1% of screen dimension).
getter/setter pairinherited
- zeroPointZeroSeven ↔ double
-
Fractional spacing value: 0.07 (7% of screen dimension).
getter/setter pairinherited
- zeroPointZeroSix ↔ double
-
Fractional spacing value: 0.06 (6% of screen dimension).
getter/setter pairinherited
- zeroPointZeroThirteen ↔ double
-
Fractional spacing value: 0.13 (13% of screen dimension).
getter/setter pairinherited
- zeroPointZeroThree ↔ double
-
Fractional spacing value: 0.03 (3% of screen dimension).
getter/setter pairinherited
- zeroPointZeroTwentyFive ↔ double
-
Fractional spacing value: 0.025 (2.5% of screen dimension).
getter/setter pairinherited
- zeroPointZeroTwo ↔ double
-
Fractional spacing value: 0.02 (2% of screen dimension).
getter/setter pairinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → RtAppConstants
-
Returns the singleton instance of RtAppConstants.
no setter