rating_summary 1.0.0 copy "rating_summary: ^1.0.0" to clipboard
rating_summary: ^1.0.0 copied to clipboard

outdated

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,
          showAverage: true,
          counterFiveStars: 5,
          counterFourStars: 4,
          counterThreeStars: 2,
          counterTwoStars: 1,
          counterOneStars: 1,
        ),
      ),
    );
  }
}
48
likes
0
pub points
91%
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

License

unknown (license)

Dependencies

flutter, flutter_rating_bar

More

Packages that depend on rating_summary