animated_rating_bar 0.0.7 copy "animated_rating_bar: ^0.0.7" to clipboard
animated_rating_bar: ^0.0.7 copied to clipboard

Animated Rating Bar can be used for rating which enhaces User Experince by displaying beautiful animation like glows and sparks.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Animated Rating Bar',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      darkTheme: ThemeData(useMaterial3: true, brightness: Brightness.dark),
      home: const RatingScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        backgroundColor: Theme.of(context).colorScheme.inversePrimary,
        title: const Text("Animated Rating Bar"),
      ),
      body: Center(
        child: AnimatedRatingBar(
          activeFillColor: Theme.of(context).colorScheme.inversePrimary,
          strokeColor: Colors.green,
          initialRating: 0,
          height: 60,
          width: MediaQuery.of(context).size.width,
          animationColor: Colors.red,
          onRatingUpdate: (rating) {
            debugPrint(rating.toString());
          },
        ),
      ),
    );
  }
}
12
likes
150
pub points
83%
popularity

Publisher

verified publishervelocitybloc.dev

Animated Rating Bar can be used for rating which enhaces User Experince by displaying beautiful animation like glows and sparks.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, rive

More

Packages that depend on animated_rating_bar