Skip to content
On this page

Rating

A control for viewing or selecting a rating.

Rating in FluttyUIRating in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

Rating

const Rating({
  super.key,
  required this.value,
  this.onChanged,
  this.maxRating = 5,
  this.size,
  this.color,
  this.spacing,
  this.dimension,
  this.strokeWidth,
});
ParameterTypeRequiredDefault
keyKey?Nonull
valuedoubleYes—
onChangedValueChanged<double>?Nonull
maxRatingintNo5
sizeRatingSize?Nonull
colorColor?Nonull
spacingdouble?Nonull
dimensiondouble?Nonull
strokeWidthdouble?Nonull

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/feedbacks/rating/rating.dart

This reference is generated from the Rating declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI