added add siswa and dana sosial

This commit is contained in:
kicap
2023-05-18 18:58:21 +08:00
parent 949474b8ef
commit e0b5213a3b
14 changed files with 519 additions and 161 deletions

View File

@ -7,8 +7,8 @@ class MyHttpServices {
final log = getLogger('MyHttpServices');
final _options = BaseOptions(
baseUrl: dotenv.env['api_url']!,
connectTimeout: const Duration(seconds: 60),
receiveTimeout: const Duration(seconds: 60),
connectTimeout: const Duration(seconds: 120),
receiveTimeout: const Duration(seconds: 120),
);
late Dio _dio;

View File

@ -0,0 +1,11 @@
class OtherFunction {
int umur(String tanggalLahir) {
// change tanggalLahir to DateTime
DateTime date = DateTime.parse(tanggalLahir);
// get current date
DateTime now = DateTime.now();
// get difference in year
int year = now.year - date.year;
return year;
}
}