Sugar class
The operations can be used in DSL.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
- colorWithOpacity ↔ Color
-
getter/setter pair
Static Methods
-
colorsShade(
MaterialColor color, int i) → Color -
colorsWithOpacity(
Color c, double o) → Color -
convertToString<
T> ({required T orginalValue}) → String -
height(
BuildContext context) → double -
ifEqual<
T, K> (T actual, T expect, {required K trueValue(), required K falseValue()}) → K -
ifEqualBool<
T, K> (bool state, {required K trueValue(), required K falseValue()}) → K -
ifRange<
T, K> (T actual, List< T> expect, {required K trueValue, required K falseValue}) → K -
indexedWidgetBuilder(
IndexedWidgetBuilder builder) → IndexedWidgetBuilder -
isButtonStyle(
{Color? backgroundColor, Color? foregroundColor, Color? overlayColor, Color? shadowColor, Color? surfaceTintColor, double? elevation, TextStyle? textStyle, EdgeInsetsGeometry? padding, Size? minimumSize, Size? fixedSize, Size? maximumSize, BorderSide? side, OutlinedBorder? shape, MouseCursor? mouseCursor, VisualDensity? visualDensity, MaterialTapTargetSize? tapTargetSize, Duration? animationDuration, bool? enableFeedback, AlignmentGeometry? alignment, InteractiveInkFeatureFactory? splashFactory}) → ButtonStyle -
isDuration(
{int days = 0, int hours = 0, int minutes = 0, int seconds = 0, int milliseconds = 0, int microseconds = 0}) → Duration -
isNestedScrollViewHeaderSliversBuilder(
{required BuildContext context, required bool innerBoxIsScrolled, required List< Widget> headerSliverBuilder}) → NestedScrollViewHeaderSliversBuilder -
listBuilder(
{Key? key, Axis scrollDirection = Axis.vertical, bool reverse = false, ScrollController? controller, bool? primary, ScrollPhysics? physics, bool shrinkWrap = false, EdgeInsetsGeometry? padding, double? itemExtent, Widget? prototypeItem, bool addAutomaticKeepAlives = true, bool addRepaintBoundaries = true, bool addSemanticIndexes = true, double? cacheExtent, int? semanticChildCount, DragStartBehavior dragStartBehavior = DragStartBehavior.start, ScrollViewKeyboardDismissBehavior keyboardDismissBehavior = ScrollViewKeyboardDismissBehavior.manual, String? restorationId, Clip clipBehavior = Clip.hardEdge, required IndexedWidgetBuilder itemBuilder, int? itemCount}) → ListView - ListView.builder()
-
map<
T, E> (List< E> data, {required T builder(E item)}) → List<T> - Map operation without index
-
mapEach<
T, E> (List< E> data, T f(int index, E item)) → List<T> - Map operation with index
-
nullableIndexedWidgetBuilder(
NullableIndexedWidgetBuilder builder) → NullableIndexedWidgetBuilder -
onTapEmpty(
) → Null Function() -
paddingBottom(
BuildContext context) → double -
paddingTop(
BuildContext context) → double -
popMenuButton<
T> ({Key? key, required PopupMenuItemBuilder< T> itemBuilder, PopupMenuItemSelected<T> ? onSelected, T? initialValue, EdgeInsetsGeometry padding = const EdgeInsets.all(8.0), PopupMenuCanceled? onCanceled, String? tooltip, double? elevation, Widget? child, Widget? icon, double? iconSize, ShapeBorder? shape, Offset offset = Offset.zero, bool enabled = true, Color? color, bool? enableFeedback}) → PopupMenuButton - popmenu
-
requestFocus(
BuildContext context) → Null Function() -
sliverChildBuilderDelegate(
{Key? key, required NullableIndexedWidgetBuilder builder, int? childCount}) → SliverChildBuilderDelegate -
sliverGridDelegateWithFixedCrossAxisCount(
{required int crossAxisCount, double mainAxisSpacing = 0.0, double crossAxisSpacing = 0.0, double childAspectRatio = 1.0}) → SliverGridDelegateWithFixedCrossAxisCount -
switchCase<
T, K> (T key, List< SugarSwitchCaseObj< caseObjects, K defaultValue()) → KT, K> > -
transitionBuilder(
TransitionBuilder builder) → TransitionBuilder -
widgetBuilder(
WidgetBuilder builder) → WidgetBuilder -
width(
BuildContext context) → double