The BeetleHR SDK Flutter
The BeetleHR SDK Flutter is a powerful software development kit that allows developers to integrate BeetleHR functionality into their Flutter applications. BeetleHR is a human resources management platform that provides various features related to employee management, such as attendance tracking, leave management, and employee performance evaluation. This documentation will guide you through the process of integrating and utilizing the BeetleHR SDK in your Flutter projects.
Features
Here are all the features available on our sdk, take advantage and make your development easier with us.
Server
x
feature to retrieve server status from an endpoint
Authentication Employee
x
login with email and passwordx
reset password with email
Profile Employee
x
get profile employeex
update profile
Attendance Employee
x
get attendence overviewx
upload attendence imagex
get attendence logsx
check branch officex
get attendance detailx
check accept clockx
clock attendencex
get schedulex
check accept clock attendancex
get schedule logx
get clock button typex
sync attendancex
upload attendance imagex
cancel attendancex
break timex
check breaktime setting
Notice Employee
x
Retrieves the notice board datax
Retrieves all approval requests based on the specified parametersx
Retrieves the approval request detailx
Approves a request with the providedbody
andid
x
Rejects a request and returns the responsex
Retrieves notification data and returns the responsex
Retrieves the details of a notification based on itsid
x
Retrieves employee data based on name filtering parameters
Payroll Employee
x
Retrieves a list of payrollsx
Retrieves the details of a payrollx
Retrieves a list of THR (holiday allowance) payrollsx
Retrieves the details of a THR (holiday allowance) payroll
Beetlehr SDK Versions
Note: Updated to new sdk with new features.
Documentation
Get Started
Add dependency
You can add beetlehr_sdk in your pubspec.yaml or use the command to add beetlerhr_sdk as a dependency with the latest stable version:
flutter pub add beetlehr_sdk
If you want to use it directly from github you can add it in pubspec.yaml as follows:
dependencies:
flutter:
sdk: flutter
beetlehr_sdk:
git:
url: https://github.com/kodingworks/beetlehr_sdk.git
ref: master # branch name
Initialisasi Client
Before using the function on the sdk, make sure you initialize the client. You can use Dependency Injection (DI) like get_it. so you don't have to always initialize your Client. here's an example of initialization that you can try:
BeetleHRClient client = BeetleHRClient(
'https://demo.beetlehr.com/api/v1',
isLog: true,
);
Usage Simple
Here is an example of using login authentication with email and password, you don't need to save the token because this package already helps save it. but we still return the token from the login result so you can use it for other purposes. here's an example:
void login() async {
try {
final client = BeetleHRClient(
'https://demo.beetlehr.com/api/v1',
isLog: true,
);
final result = await client.loginWithEmail(
email: 'email@email.com',
password: 'password',
);
print(result.meta); // return MetaData
print(result.token); // return String
print(result.user); // return UserModel
} catch (e) {
print('Something wrong!');
}
}
Error Handling
Name | Item |
---|---|
Exception | ServerException |
GeneralServerException | |
TimeOutServerException | |
NotFoundServerException | |
UnAuthenticationServerException | |
UnAuthorizeServerException | |
InternalServerException | |
Failure | CodeFailure |
ServerFailure |
Community & Group Discussion
You could join us at Telegram Group https://t.me/+Fbaf_eCVHEg4NTY1
Contributing
We are very glad if you want to contribute and join our community. Please take note when you make a pull request. You must be very clear when making a commit message. When you contribute code, the best thing to do is imitate the existing pattern BeetleHR code.
License
Beetlehr SDK is released under the MIT license.