day weekly days list

Day Picker #

A Flutter widget library which helps us to select days in a week.

Test, Build and deployBuild Statuslikespopularitypub points

Screenshot #

Screenshot week day pickerScreenshot week day picker

Usage #

Add day_picker to your pubspec.yaml file.

flutter: sdk: flutter day_picker: 2.2.0

import the package:

import 'package:day_picker/day_picker.dart';

Constructor for the day_picker is given below.

SelectWeekDays({ required this.onSelect, this.backgroundColor, this.fontWeight, this.fontSize, this.daysFillColor, this.daysBorderColor, this.selectedDayTextColor, this.unSelectedDayTextColor, this.border = true, this.boxDecoration, this.padding = 8.0, required this.days, Key? key, }) : super(key: key);

Example here creates a day_picker with below style [with Gradient and no borders].

Screenshot week day picker List _days = [ DayInWeek( "Sun", ), DayInWeek( "Mon", ), DayInWeek( "Tue", isSelected: true ), DayInWeek( "Wed", ), DayInWeek( "Thu", ), DayInWeek( "Fri", ), DayInWeek( "Sat", ), ]; @override Widget build(BuildContext context) { return Scaffold( appBar: AppBar( title: Text("Select days in week"), ), body: Center( child: Padding( padding: const EdgeInsets.all(8.0), child: SelectWeekDays( fontSize: 14, fontWeight: FontWeight.w500, days: _days, border: false, boxDecoration: BoxDecoration( borderRadius: BorderRadius.circular(30.0), gradient: LinearGradient( begin: Alignment.topLeft, colors: [const Color(0xFFE55CE4), const Color(0xFFBB75FB)], tileMode: TileMode.repeated, // repeats the gradient over the canvas ), ), onSelect: (values) { //