fix: minor const/final lint fix

This commit is contained in:
Alberto Ponces 2022-08-08 00:24:45 +01:00
parent 2539a0cc63
commit 047e00cf2c

View File

@ -2,11 +2,11 @@ import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart'; import 'package:google_fonts/google_fonts.dart';
class SearchBar extends StatefulWidget { class SearchBar extends StatefulWidget {
String? hintText = "Search"; final String? hintText;
Color? backgroundColor; final Color? backgroundColor;
Color? hintTextColor; final Color? hintTextColor;
SearchBar({ const SearchBar({
required this.hintText, required this.hintText,
this.backgroundColor = const Color(0xff1B222B), this.backgroundColor = const Color(0xff1B222B),
this.hintTextColor = Colors.white, this.hintTextColor = Colors.white,
@ -28,7 +28,9 @@ class _SearchBarState extends State<SearchBar> {
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),
color: widget.backgroundColor, color: widget.backgroundColor,
border: Border.all( border: Border.all(
color: widget.backgroundColor != null ? widget.backgroundColor! : Colors.white, color: widget.backgroundColor != null
? widget.backgroundColor!
: Colors.white,
width: 1, width: 1,
), ),
), ),