@@ -117,9 +117,9 @@ class _GFRatingState extends State<GFRating> {
117117 }
118118 },
119119 onHorizontalDragUpdate: (dragDetails) {
120- RenderBox box = context.findRenderObject ();
121- var _pos = box.globalToLocal (dragDetails.globalPosition);
122- var i = _pos.dx / widget.itemSize;
120+ final RenderBox box = context.findRenderObject ();
121+ final _pos = box.globalToLocal (dragDetails.globalPosition);
122+ final i = _pos.dx / widget.itemSize;
123123 var newRating = widget.allowHalfRating ? i : i.round ().toDouble ();
124124 if (newRating > widget.itemCount) {
125125 newRating = widget.itemCount.toDouble ();
@@ -144,12 +144,14 @@ class _GFRatingState extends State<GFRating> {
144144 child: TextFormField (
145145 controller: widget.ratingController,
146146 keyboardType: TextInputType .number,
147- decoration: widget.inputDecorations == null ? InputDecoration (
148- border: const OutlineInputBorder (),
149- hintText: 'Enter rating' ,
150- labelText: 'Enter rating' ,
151- suffixIcon: widget.suffixIcon,
152- ) : widget.inputDecorations,
147+ decoration: widget.inputDecorations == null
148+ ? InputDecoration (
149+ border: const OutlineInputBorder (),
150+ hintText: 'Enter rating' ,
151+ labelText: 'Enter rating' ,
152+ suffixIcon: widget.suffixIcon,
153+ )
154+ : widget.inputDecorations,
153155 ),
154156 ),
155157 Material (
0 commit comments