From 047e00cf2c53e006febc7f873631645a8c27e332 Mon Sep 17 00:00:00 2001 From: Alberto Ponces Date: Mon, 8 Aug 2022 00:24:45 +0100 Subject: [PATCH] fix: minor const/final lint fix --- lib/ui/widgets/search_bar.dart | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/ui/widgets/search_bar.dart b/lib/ui/widgets/search_bar.dart index 2d617ab6..68959d7c 100644 --- a/lib/ui/widgets/search_bar.dart +++ b/lib/ui/widgets/search_bar.dart @@ -2,11 +2,11 @@ import 'package:flutter/material.dart'; import 'package:google_fonts/google_fonts.dart'; class SearchBar extends StatefulWidget { - String? hintText = "Search"; - Color? backgroundColor; - Color? hintTextColor; + final String? hintText; + final Color? backgroundColor; + final Color? hintTextColor; - SearchBar({ + const SearchBar({ required this.hintText, this.backgroundColor = const Color(0xff1B222B), this.hintTextColor = Colors.white, @@ -28,7 +28,9 @@ class _SearchBarState extends State { borderRadius: BorderRadius.circular(12), color: widget.backgroundColor, border: Border.all( - color: widget.backgroundColor != null ? widget.backgroundColor! : Colors.white, + color: widget.backgroundColor != null + ? widget.backgroundColor! + : Colors.white, width: 1, ), ),