You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
justMusic/Sources/justMUSIC/lib/components/search_bar_component.dart

33 lines
972 B

import 'package:flutter/Material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:google_fonts/google_fonts.dart';
import '../values/constants.dart';
class SearchBarComponent extends StatefulWidget {
final String? text;
const SearchBarComponent({Key? key, this.text}) : super(key: key);
@override
State<SearchBarComponent> createState() => _SearchBarComponentState();
}
class _SearchBarComponentState extends State<SearchBarComponent> {
@override
Widget build(BuildContext context) {
return ClipRRect(
borderRadius: BorderRadius.all(Radius.circular(20)),
child: Container(
color: searchBarColor,
width: double.infinity,
padding:
EdgeInsets.fromLTRB(defaultPadding, 16.sp, defaultPadding, 16.sp),
child: Text(
widget.text ?? "Chercher une musique...",
style: GoogleFonts.plusJakartaSans(color: Colors.white),
),
),
);
}
}