rating_summary 1.0.2+1 copy "rating_summary: ^1.0.2+1" to clipboard
rating_summary: ^1.0.2+1 copied to clipboard

Create a summary statistic Widget to display the rating and average rating of a product.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:rating_summary/rating_summary.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Rating Summary Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(),
      debugShowCheckedModeBanner: false,
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Rating Summary Example'),
      ),
      body: const Padding(
        padding: EdgeInsets.all(20.0),
        child: RatingSummary(
          counter: 13,
          average: 3.846,
          counterFiveStars: 5,
          counterFourStars: 4,
          counterThreeStars: 2,
          counterTwoStars: 1,
          counterOneStars: 1,
        ),
      ),
    );
  }
}
35
likes
140
pub points
89%
popularity

Publisher

verified publisherflo-dev.me

Create a summary statistic Widget to display the rating and average rating of a product.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

flutter, flutter_rating_bar

More

Packages that depend on rating_summary