Flutter Package: Enhance Attendance Tracking with a Custom Widget Ruler

attendance_ruler

Key Definition

  • A package that gives us a attendance ruler a custom widget. This widget is used to show the attendance in and out time on the ruler with easy customization.

Preview

attendance_ruler

Basic Usage

Import it to your project file

import 'package:attendance_ruler/attendance_ruler.dart';

And add it in its most basic form like it:

AttendanceRuler(
  attendanceDataModel: AttendanceDataModel(
    attendanceDate: DateTime(2024, 01, 01),
    attendanceInOutTimes: [
      InOutTime(
        inTime: const TimeOfDay(hour: 10, minute: 00),
        outTime: const TimeOfDay(hour: 19, minute: 00),
      ),
    ],
  ),
  attendanceRulerDecoration: const AttendanceRulerDecoration(),
);

Required parameters of AttendanceRuler


ParameterDescriptionAttendanceDataModel attendanceDataModelData model for the attendanceAttendanceRulerDecoration attendanceRulerDecorationDecorate the AttendanceRuler Widget

Optional parameters of AttendanceRuler


ParameterDefaultDescriptionSize? sizeIf null then this will be used – Size(MediaQuery.of(context).size.width, 10.0)The size that this AttendanceRuler should aim for, given the layout

Required parameters of AttendanceDataModel


ParameterDescriptionDateTime attendanceDateDate of the attendanceList attendanceInOutTimesDefines the in and out time for the date

Optional parameters of InOutTime


ParameterDefaultDescriptionTimeOfDay? inTime—In times for the dayTimeOfDay? outTime—Out times for the day

Optional parameters of AttendanceRulerDecoration


ParameterDefaultDescriptionColor backgroundColorColor(0xFFd9f8ff)Defines the backgroundColor of the Attendance RulerBorderRadiusGeometry? borderRadiusIf null then this will be used – BorderRadius.circular(20.0)Defines the borderRadius of the ruler backgrounddouble verticalPadding4.0Defines the verticalPadding of the ruler background boxdouble horizontalPadding10.0Defines the horizontalPadding of the ruler background boxColor rulerLineColorColor(0xFF24d8ff)Defines the rulerLineColor of the Attendance Rulerdouble rulerLineWidth1.0Defines the rulerLineWidth of the Attendance RulerColor rulerTimeColorColor(0xFF64c3d1)Defines the rulerTimeColor of the Attendance RulerAxis layoutDirectionAxis.horizontalThe axis along which the Attendance Ruler layout.Radius? rulerTimeCircularRadiusIf null then this will be used (rulerHeight / 2)Defines the Radius for the time on the rulerRulerTimeRoundedCornerStyle rulerTimeRoundedCornerStyleRulerTimeRoundedCornerStyle.firstAndLastRoundedDefines the RoundedCornerStyle for the time on the rulesRulerTimeFormat rulerTimeFormatRulerTimeFormat.twentyFourHoursDefines the HoursFormat 24 or 12 for the Ruler Timeint dayStartHour0Defines the attendance dayStartHour time

Guideline for contributors


  • Contribution towards my repository is always welcome, i request contributors to create a pull request for development.

Guideline to report an issue/feature request


It would be great for me if the reporter can share the below things to understand the root cause of the issue.

  • Library version
  • Code snippet
  • Logs if applicable
  • Device specification like (Manufacturer, OS version, etc)
  • Screenshot/video with steps to reproduce the issue
  • Library used

LICENSE!

attendance_ruler is MIT-licensed.

GitHub

View Github


Description of the image

Related Posts