osom_rating 0.0.1 copy "osom_rating: ^0.0.1" to clipboard
osom_rating: ^0.0.1 copied to clipboard

outdated

A new flutter plugin project.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:osom_rating/osom_rating.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  double ratingValue = 3.45;

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Osom Rating Demo'),
        ),
        body: OsomRating(
          rating: ratingValue,
          sizeStar: 60,
          colorStar: Colors.blue,
          colorEmptyStar: Colors.red,
          minimunHalfValue: 4,
          totalStars: 5,
          onTapped: (currentRating) {
            setState(() {
              this.ratingValue = currentRating;
            });
          },
          onDoubleTapped: () {
            setState(() {
              this.ratingValue = 0;
            });
          },
        ),
      ),
    );
  }
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

A new flutter plugin project.

Homepage

License

unknown (LICENSE)

Dependencies

flutter

More

Packages that depend on osom_rating