Scrollable Rating Indicator
Step 1: We cannot directly remove the time stamp from Scrollable Rating Indicator but using the intl.dart package we can easily filter the date stamp from time stamp. So open your flutter project’s pubspec.yaml in code
dependencies: flutter: sdk: flutter flutter_rating_bar: ^3.0.1+1
Step 2: After done saving the pubspec.yaml file, Open your flutter project root folder in Command Prompt or Terminal and execute flutter pub get command.
flutter pub get
import 'package:flutter_rating_bar/flutter_rating_bar.dart';
import 'package:flutter/material.dart'; import 'package:flutter_rating_bar/flutter_rating_bar.dart'; void main() => runApp(MyApp()); class MyApp extends StatefulWidget { @override _MyAppState createState() => _MyAppState(); } class _MyAppState extends State<MyApp> { var _ratingController = TextEditingController(); bool _isRTLMode = false; @override void initState() { _ratingController.text = "3.0"; super.initState(); } @override Widget build(BuildContext context) { return MaterialApp( debugShowCheckedModeBanner: false, theme: ThemeData( primarySwatch: Colors.deepPurple, appBarTheme: AppBarTheme( textTheme: TextTheme( title: Theme.of(context).textTheme.title.copyWith( color: Colors.white, ), ), ), ), home: Builder( builder: (context) => Scaffold( appBar: AppBar( title: Text('Flutter Rating Bar'), ), body: Directionality( textDirection: _isRTLMode ? TextDirection.rtl : TextDirection.ltr, child: SingleChildScrollView( child: Column( crossAxisAlignment: CrossAxisAlignment.center, mainAxisSize: MainAxisSize.min, children: <Widget>[ SizedBox( height: 20.0, ), _heading('Scrollable Rating Indicator'), RatingBarIndicator( rating: 8.2, itemCount: 20, itemSize: 30.0, physics: BouncingScrollPhysics(), itemBuilder: (context, _) => Icon( Icons.star, color: Colors.deepPurple, ), ), ], ), ), ), ), ), ); }
Widget _heading(String text) => Column( children: [ Text( text, style: TextStyle( fontWeight: FontWeight.w300, fontSize: 24.0, ), ), SizedBox( height: 20.0, ), ], ); }