tambah lihat informasi dan halaman lainnya

This commit is contained in:
kicap 2023-07-14 11:31:03 +08:00
parent e0b5213a3b
commit 757198cb83
26 changed files with 1220 additions and 102 deletions

8
.env
View File

@ -1,2 +1,6 @@
url = 'http://20.20.20.25/panti_asuhan2/'
api_url = 'http://20.20.20.25/panti_asuhan2/api/'
url = 'https://panti-asuhan.s-keytech.com/'
api_url = 'https://panti-asuhan.s-keytech.com/api/'
# url = 'http://172.29.85.181/panti_asuhan2/'
# api_url = 'http://172.29.85.181/panti_asuhan2/api/'
# url = 'http://20.20.20.25/panti_asuhan2/'
# api_url = 'http://20.20.20.25/panti_asuhan2/api/'

1
.gitignore vendored
View File

@ -31,6 +31,7 @@ migrate_working_dir/
.pub-cache/
.pub/
/build/
.env
# Symbolication related
app.*.symbols

View File

@ -1,6 +1,7 @@
import 'package:panti_asuhan/ui/views/admin_index_tracking/admin_index/admin_index_view.dart';
import 'package:panti_asuhan/ui/views/admin_index_tracking/dana_sosial_admin/dana_sosial_admin_view.dart';
import 'package:panti_asuhan/ui/views/admin_index_tracking/data_siswa/data_siswa_view.dart';
import 'package:panti_asuhan/ui/views/admin_index_tracking/edit_siswa/edit_siswa_view.dart';
import 'package:panti_asuhan/ui/views/admin_index_tracking/profil/profil_view.dart';
import 'package:panti_asuhan/ui/views/tambah_dana_sosial/tambah_dana_sosial_view.dart';
import 'package:stacked_services/stacked_services.dart';
@ -10,6 +11,9 @@ import '../services/http_services.dart';
import '../services/my_easyloading.dart';
import '../ui/views/admin_index_tracking/add_siswa_dialog/add_siswa_dialog/add_siswa_dialog_view.dart';
import '../ui/views/admin_index_tracking/admin_index_tracking_view.dart';
import '../ui/views/admin_index_tracking/sejarah/sejarah_view.dart';
import '../ui/views/admin_index_tracking/struktur_organisasi/struktur_organisasi_view.dart';
import '../ui/views/admin_index_tracking/visi_misi/visi_misi_view.dart';
import '../ui/views/login_screen/login_screen_view.dart';
import '../ui/views/splash_screen/splash_screen_view.dart';
@ -24,9 +28,13 @@ import '../ui/views/splash_screen/splash_screen_view.dart';
MaterialRoute(page: DanaSosialAdminView),
MaterialRoute(page: DataSiswaView),
MaterialRoute(page: ProfilView),
MaterialRoute(page: VisiMisiView),
MaterialRoute(page: SejarahView),
MaterialRoute(page: StrukturOrganisasiView),
],
),
MaterialRoute(page: TambahDanaSosialView),
MaterialRoute(page: EditSiswaView)
],
dialogs: [
StackedDialog(classType: AddSiswaDialogView),

View File

@ -5,18 +5,26 @@
// **************************************************************************
// ignore_for_file: no_leading_underscores_for_library_prefixes
import 'package:flutter/material.dart' as _i6;
import 'package:flutter/material.dart' as _i7;
import 'package:flutter/material.dart';
import 'package:panti_asuhan/ui/views/admin_index_tracking/admin_index/admin_index_view.dart'
as _i7;
as _i8;
import 'package:panti_asuhan/ui/views/admin_index_tracking/admin_index_tracking_view.dart'
as _i4;
import 'package:panti_asuhan/ui/views/admin_index_tracking/dana_sosial_admin/dana_sosial_admin_view.dart'
as _i8;
import 'package:panti_asuhan/ui/views/admin_index_tracking/data_siswa/data_siswa_view.dart'
as _i9;
import 'package:panti_asuhan/ui/views/admin_index_tracking/profil/profil_view.dart'
import 'package:panti_asuhan/ui/views/admin_index_tracking/data_siswa/data_siswa_view.dart'
as _i10;
import 'package:panti_asuhan/ui/views/admin_index_tracking/edit_siswa/edit_siswa_view.dart'
as _i6;
import 'package:panti_asuhan/ui/views/admin_index_tracking/profil/profil_view.dart'
as _i11;
import 'package:panti_asuhan/ui/views/admin_index_tracking/sejarah/sejarah_view.dart'
as _i13;
import 'package:panti_asuhan/ui/views/admin_index_tracking/struktur_organisasi/struktur_organisasi_view.dart'
as _i14;
import 'package:panti_asuhan/ui/views/admin_index_tracking/visi_misi/visi_misi_view.dart'
as _i12;
import 'package:panti_asuhan/ui/views/login_screen/login_screen_view.dart'
as _i3;
import 'package:panti_asuhan/ui/views/splash_screen/splash_screen_view.dart'
@ -24,7 +32,7 @@ import 'package:panti_asuhan/ui/views/splash_screen/splash_screen_view.dart'
import 'package:panti_asuhan/ui/views/tambah_dana_sosial/tambah_dana_sosial_view.dart'
as _i5;
import 'package:stacked/stacked.dart' as _i1;
import 'package:stacked_services/stacked_services.dart' as _i11;
import 'package:stacked_services/stacked_services.dart' as _i15;
class Routes {
static const splashScreenView = '/';
@ -35,11 +43,14 @@ class Routes {
static const tambahDanaSosialView = '/tambah-dana-sosial-view';
static const editSiswaView = '/edit-siswa-view';
static const all = <String>{
splashScreenView,
loginScreenView,
adminIndexTrackingView,
tambahDanaSosialView,
editSiswaView,
};
}
@ -61,37 +72,50 @@ class StackedRouter extends _i1.RouterBase {
Routes.tambahDanaSosialView,
page: _i5.TambahDanaSosialView,
),
_i1.RouteDef(
Routes.editSiswaView,
page: _i6.EditSiswaView,
),
];
final _pagesMap = <Type, _i1.StackedRouteFactory>{
_i2.SplashScreenView: (data) {
return _i6.MaterialPageRoute<dynamic>(
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => const _i2.SplashScreenView(),
settings: data,
maintainState: false,
);
},
_i3.LoginScreenView: (data) {
return _i6.MaterialPageRoute<dynamic>(
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => const _i3.LoginScreenView(),
settings: data,
maintainState: false,
);
},
_i4.AdminIndexTrackingView: (data) {
return _i6.MaterialPageRoute<dynamic>(
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => const _i4.AdminIndexTrackingView(),
settings: data,
maintainState: false,
);
},
_i5.TambahDanaSosialView: (data) {
return _i6.MaterialPageRoute<dynamic>(
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => const _i5.TambahDanaSosialView(),
settings: data,
maintainState: false,
);
},
_i6.EditSiswaView: (data) {
final args = data.getArgs<EditSiswaViewArguments>(nullOk: false);
return _i7.MaterialPageRoute<dynamic>(
builder: (context) =>
_i6.EditSiswaView(idSiswa: args.idSiswa, key: args.key),
settings: data,
maintainState: false,
);
},
};
@override
@ -100,6 +124,22 @@ class StackedRouter extends _i1.RouterBase {
Map<Type, _i1.StackedRouteFactory> get pagesMap => _pagesMap;
}
class EditSiswaViewArguments {
const EditSiswaViewArguments({
required this.idSiswa,
this.key,
});
final int idSiswa;
final _i7.Key? key;
@override
String toString() {
return '{"idSiswa": "$idSiswa", "key": "$key"}';
}
}
class AdminIndexTrackingViewRoutes {
static const adminIndexView = '';
@ -109,11 +149,20 @@ class AdminIndexTrackingViewRoutes {
static const profilView = 'profil-view';
static const visiMisiView = 'visi-misi-view';
static const sejarahView = 'sejarah-view';
static const strukturOrganisasiView = 'struktur-organisasi-view';
static const all = <String>{
adminIndexView,
danaSosialAdminView,
dataSiswaView,
profilView,
visiMisiView,
sejarahView,
strukturOrganisasiView,
};
}
@ -121,47 +170,80 @@ class AdminIndexTrackingViewRouter extends _i1.RouterBase {
final _routes = <_i1.RouteDef>[
_i1.RouteDef(
AdminIndexTrackingViewRoutes.adminIndexView,
page: _i7.AdminIndexView,
page: _i8.AdminIndexView,
),
_i1.RouteDef(
AdminIndexTrackingViewRoutes.danaSosialAdminView,
page: _i8.DanaSosialAdminView,
page: _i9.DanaSosialAdminView,
),
_i1.RouteDef(
AdminIndexTrackingViewRoutes.dataSiswaView,
page: _i9.DataSiswaView,
page: _i10.DataSiswaView,
),
_i1.RouteDef(
AdminIndexTrackingViewRoutes.profilView,
page: _i10.ProfilView,
page: _i11.ProfilView,
),
_i1.RouteDef(
AdminIndexTrackingViewRoutes.visiMisiView,
page: _i12.VisiMisiView,
),
_i1.RouteDef(
AdminIndexTrackingViewRoutes.sejarahView,
page: _i13.SejarahView,
),
_i1.RouteDef(
AdminIndexTrackingViewRoutes.strukturOrganisasiView,
page: _i14.StrukturOrganisasiView,
),
];
final _pagesMap = <Type, _i1.StackedRouteFactory>{
_i7.AdminIndexView: (data) {
return _i6.MaterialPageRoute<dynamic>(
builder: (context) => const _i7.AdminIndexView(),
_i8.AdminIndexView: (data) {
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => const _i8.AdminIndexView(),
settings: data,
maintainState: false,
);
},
_i8.DanaSosialAdminView: (data) {
return _i6.MaterialPageRoute<dynamic>(
builder: (context) => const _i8.DanaSosialAdminView(),
_i9.DanaSosialAdminView: (data) {
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => const _i9.DanaSosialAdminView(),
settings: data,
maintainState: false,
);
},
_i9.DataSiswaView: (data) {
return _i6.MaterialPageRoute<dynamic>(
builder: (context) => const _i9.DataSiswaView(),
_i10.DataSiswaView: (data) {
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => const _i10.DataSiswaView(),
settings: data,
maintainState: false,
);
},
_i10.ProfilView: (data) {
return _i6.MaterialPageRoute<dynamic>(
builder: (context) => const _i10.ProfilView(),
_i11.ProfilView: (data) {
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => const _i11.ProfilView(),
settings: data,
maintainState: false,
);
},
_i12.VisiMisiView: (data) {
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => _i12.VisiMisiView(),
settings: data,
maintainState: false,
);
},
_i13.SejarahView: (data) {
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => _i13.SejarahView(),
settings: data,
maintainState: false,
);
},
_i14.StrukturOrganisasiView: (data) {
return _i7.MaterialPageRoute<dynamic>(
builder: (context) => _i14.StrukturOrganisasiView(),
settings: data,
maintainState: false,
);
@ -174,7 +256,7 @@ class AdminIndexTrackingViewRouter extends _i1.RouterBase {
Map<Type, _i1.StackedRouteFactory> get pagesMap => _pagesMap;
}
extension NavigatorStateExtension on _i11.NavigationService {
extension NavigatorStateExtension on _i15.NavigationService {
Future<dynamic> navigateToSplashScreenView([
int? routerId,
bool preventDuplicates = true,
@ -231,6 +313,23 @@ extension NavigatorStateExtension on _i11.NavigationService {
transition: transition);
}
Future<dynamic> navigateToEditSiswaView({
required int idSiswa,
_i7.Key? key,
int? routerId,
bool preventDuplicates = true,
Map<String, String>? parameters,
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
transition,
}) async {
return navigateTo<dynamic>(Routes.editSiswaView,
arguments: EditSiswaViewArguments(idSiswa: idSiswa, key: key),
id: routerId,
preventDuplicates: preventDuplicates,
parameters: parameters,
transition: transition);
}
Future<dynamic> navigateToNestedAdminIndexViewInAdminIndexTrackingViewRouter([
int? routerId,
bool preventDuplicates = true,
@ -288,6 +387,50 @@ extension NavigatorStateExtension on _i11.NavigationService {
transition: transition);
}
Future<dynamic> navigateToNestedVisiMisiViewInAdminIndexTrackingViewRouter([
int? routerId,
bool preventDuplicates = true,
Map<String, String>? parameters,
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
transition,
]) async {
return navigateTo<dynamic>(AdminIndexTrackingViewRoutes.visiMisiView,
id: routerId,
preventDuplicates: preventDuplicates,
parameters: parameters,
transition: transition);
}
Future<dynamic> navigateToNestedSejarahViewInAdminIndexTrackingViewRouter([
int? routerId,
bool preventDuplicates = true,
Map<String, String>? parameters,
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
transition,
]) async {
return navigateTo<dynamic>(AdminIndexTrackingViewRoutes.sejarahView,
id: routerId,
preventDuplicates: preventDuplicates,
parameters: parameters,
transition: transition);
}
Future<dynamic>
navigateToNestedStrukturOrganisasiViewInAdminIndexTrackingViewRouter([
int? routerId,
bool preventDuplicates = true,
Map<String, String>? parameters,
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
transition,
]) async {
return navigateTo<dynamic>(
AdminIndexTrackingViewRoutes.strukturOrganisasiView,
id: routerId,
preventDuplicates: preventDuplicates,
parameters: parameters,
transition: transition);
}
Future<dynamic> replaceWithSplashScreenView([
int? routerId,
bool preventDuplicates = true,
@ -344,6 +487,23 @@ extension NavigatorStateExtension on _i11.NavigationService {
transition: transition);
}
Future<dynamic> replaceWithEditSiswaView({
required int idSiswa,
_i7.Key? key,
int? routerId,
bool preventDuplicates = true,
Map<String, String>? parameters,
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
transition,
}) async {
return replaceWith<dynamic>(Routes.editSiswaView,
arguments: EditSiswaViewArguments(idSiswa: idSiswa, key: key),
id: routerId,
preventDuplicates: preventDuplicates,
parameters: parameters,
transition: transition);
}
Future<dynamic>
replaceWithNestedAdminIndexViewInAdminIndexTrackingViewRouter([
int? routerId,
@ -402,4 +562,48 @@ extension NavigatorStateExtension on _i11.NavigationService {
parameters: parameters,
transition: transition);
}
Future<dynamic> replaceWithNestedVisiMisiViewInAdminIndexTrackingViewRouter([
int? routerId,
bool preventDuplicates = true,
Map<String, String>? parameters,
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
transition,
]) async {
return replaceWith<dynamic>(AdminIndexTrackingViewRoutes.visiMisiView,
id: routerId,
preventDuplicates: preventDuplicates,
parameters: parameters,
transition: transition);
}
Future<dynamic> replaceWithNestedSejarahViewInAdminIndexTrackingViewRouter([
int? routerId,
bool preventDuplicates = true,
Map<String, String>? parameters,
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
transition,
]) async {
return replaceWith<dynamic>(AdminIndexTrackingViewRoutes.sejarahView,
id: routerId,
preventDuplicates: preventDuplicates,
parameters: parameters,
transition: transition);
}
Future<dynamic>
replaceWithNestedStrukturOrganisasiViewInAdminIndexTrackingViewRouter([
int? routerId,
bool preventDuplicates = true,
Map<String, String>? parameters,
Widget Function(BuildContext, Animation<double>, Animation<double>, Widget)?
transition,
]) async {
return replaceWith<dynamic>(
AdminIndexTrackingViewRoutes.strukturOrganisasiView,
id: routerId,
preventDuplicates: preventDuplicates,
parameters: parameters,
transition: transition);
}
}

3
lib/app/mycd Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
ffmpeg -i "rtsp://admin:admin123@192.168.2.109/cam/realmonitor?channel=1&subtype=1" -acodec copy -vcodec copy abcd.mp4 -y

View File

@ -1,27 +1,25 @@
class DanaSosialModel {
String? idDanaSosial;
String? keterangan;
String? nama;
String? jumlah;
String? tanggal;
String? jenis;
String? createdAt;
String? updatedAt;
DanaSosialModel(
{this.idDanaSosial,
this.keterangan,
this.nama,
this.jumlah,
this.tanggal,
this.jenis,
this.createdAt,
this.updatedAt});
DanaSosialModel.fromJson(Map<String, dynamic> json) {
idDanaSosial = json['id_dana_sosial'];
keterangan = json['keterangan'];
nama = json['nama'];
jumlah = json['jumlah'];
tanggal = json['tanggal'];
jenis = json['jenis'];
createdAt = json['created_at'];
updatedAt = json['updated_at'];
}
@ -29,10 +27,9 @@ class DanaSosialModel {
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id_dana_sosial'] = idDanaSosial;
data['keterangan'] = keterangan;
data['nama'] = nama;
data['jumlah'] = jumlah;
data['tanggal'] = tanggal;
data['jenis'] = jenis;
data['created_at'] = createdAt;
data['updated_at'] = updatedAt;
return data;

View File

@ -1,3 +1,5 @@
import 'package:intl/intl.dart';
class OtherFunction {
int umur(String tanggalLahir) {
// change tanggalLahir to DateTime
@ -8,4 +10,9 @@ class OtherFunction {
int year = now.year - date.year;
return year;
}
String commaFormat(int number) {
final formatter = NumberFormat('#,###');
return formatter.format(number);
}
}

View File

@ -16,12 +16,19 @@ class AdminIndexTrackingViewModel extends IndexTrackingViewModel {
'icon': Icons.people_alt_outlined,
'header': 'List Siswa'
},
{'name': 'Dana Sosial', 'icon': Icons.money, 'header': 'Dana Sosial'},
{'name': 'Dana', 'icon': Icons.money, 'header': 'Dana Sosial'},
{
'name': 'Profil',
'icon': Icons.list_alt_rounded,
'icon': Icons.person_4_outlined,
'header': 'Profil Panti Asuhan'
}
},
{'name': 'V & M', 'icon': Icons.list_alt_rounded, 'header': 'Visi & Misi'},
{'name': 'Sejarah', 'icon': Icons.list_outlined, 'header': 'Sejarah'},
{
'name': 'S O',
'icon': Icons.people_alt_outlined,
'header': 'Struktur Organisasi'
},
];
List<Map<String, dynamic>> get bottomNavBarList => _bottomNavBarList;
@ -30,6 +37,9 @@ class AdminIndexTrackingViewModel extends IndexTrackingViewModel {
AdminIndexTrackingViewRoutes.dataSiswaView,
AdminIndexTrackingViewRoutes.danaSosialAdminView,
AdminIndexTrackingViewRoutes.profilView,
AdminIndexTrackingViewRoutes.visiMisiView,
AdminIndexTrackingViewRoutes.sejarahView,
AdminIndexTrackingViewRoutes.strukturOrganisasiView
];
String header = 'Dana Sosial';

View File

@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'package:panti_asuhan/app/themes/app_colors.dart';
import 'package:panti_asuhan/services/other_function.dart';
import 'package:stacked/stacked.dart';
import '../../../../app/themes/app_text.dart';
@ -102,6 +103,10 @@ class DanaSosialAdminView extends StatelessWidget {
horizontal: 15, vertical: 10),
itemCount: model.danaSosialModelList.length,
itemBuilder: (context, index) {
String jumlahDonasi = OtherFunction().commaFormat(
int.parse(
model.danaSosialModelList[index].jumlah ??
'0'));
return Card(
child: ListTile(
title: Text(
@ -109,10 +114,19 @@ class DanaSosialAdminView extends StatelessWidget {
'',
style: boldTextStyle.copyWith(
fontSize: 13, color: mainColor)),
subtitle: Text(
'Rp. ${model.danaSosialModelList[index].jumlah}',
style: regularTextStyle.copyWith(
fontSize: 13, color: mainColor)),
subtitle: Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
model.danaSosialModelList[index].nama ??
'',
style: regularTextStyle.copyWith(
fontSize: 13, color: mainColor)),
Text('Rp. $jumlahDonasi',
style: regularTextStyle.copyWith(
fontSize: 13, color: mainColor)),
],
),
trailing: Container(
width: 50,
height: 50,

View File

@ -1,9 +1,9 @@
import 'package:flutter/material.dart';
import 'package:panti_asuhan/services/other_function.dart';
import 'package:stacked/stacked.dart';
import '../../../../app/themes/app_colors.dart';
import '../../../../app/themes/app_text.dart';
import '../../../../services/other_function.dart';
import './data_siswa_view_model.dart';
class DataSiswaView extends StatelessWidget {
@ -100,16 +100,24 @@ class DataSiswaView extends StatelessWidget {
subtitle: Text(
'Umur : ${OtherFunction().umur(model.siswaModelList[index].tanggalLahir ?? '')}'),
// circle avatar
trailing: Container(
width: 50,
height: 50,
decoration: BoxDecoration(
color: mainColor,
borderRadius: BorderRadius.circular(50),
),
child: const Icon(
Icons.person,
color: Colors.white,
trailing: GestureDetector(
onTap: () {
model.log.i(
'Edit${model.siswaModelList[index].idSiswa!}');
model.goToEditSiswa(int.parse(model
.siswaModelList[index].idSiswa!));
},
child: Container(
width: 50,
height: 50,
decoration: BoxDecoration(
color: mainColor,
borderRadius: BorderRadius.circular(50),
),
child: const Icon(
Icons.person,
color: Colors.white,
),
),
)),
);

View File

@ -1,3 +1,5 @@
import 'package:panti_asuhan/ui/views/admin_index_tracking/edit_siswa/edit_siswa_view.dart';
import '../../../../app/app.dialogs.dart';
import '../../../../app/app.locator.dart';
import '../../../../app/app.logger.dart';
@ -39,8 +41,8 @@ class DataSiswaViewModel extends CustomBaseViewModel {
log.i(siswaModelList);
} catch (e) {
log.e(e);
setBusy(false);
} finally {
setBusy(false);
easyLoading.dismissLoading();
}
}
@ -55,4 +57,8 @@ class DataSiswaViewModel extends CustomBaseViewModel {
siswaModelList = [];
await getData();
}
goToEditSiswa(int idSiswa) async {
navigationService.navigateToView(EditSiswaView(idSiswa: idSiswa));
}
}

View File

@ -0,0 +1,236 @@
import 'package:flutter/material.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:stacked/stacked.dart';
import 'package:validatorless/validatorless.dart';
import '../../../../app/themes/app_colors.dart';
import '../../../widgets/my_textformfield.dart';
import './edit_siswa_view_model.dart';
class EditSiswaView extends StatelessWidget {
final int idSiswa;
const EditSiswaView({required this.idSiswa, Key? key}) : super(key: key);
@override
Widget build(BuildContext context) {
return ViewModelBuilder<EditSiswaViewModel>.reactive(
viewModelBuilder: () => EditSiswaViewModel(),
onViewModelReady: (EditSiswaViewModel model) async {
await model.init(
idSiswa,
);
},
builder: (
BuildContext context,
EditSiswaViewModel model,
Widget? child,
) {
return Scaffold(
appBar: AppBar(
title: const Text(
"Informasi Data Siswa",
style: TextStyle(
color: Colors.white,
fontSize: 20,
),
),
backgroundColor: mainColor,
elevation: 0,
// back button color to white
iconTheme: const IconThemeData(color: Colors.white),
),
body: Padding(
padding: const EdgeInsets.all(20.0),
child: SingleChildScrollView(
child: Column(
mainAxisSize: MainAxisSize.min,
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Center(
child: Stack(
children: [
CircleAvatar(
radius: 50,
backgroundColor: fontParagraphColor,
backgroundImage: model.siswaModel != null
? NetworkImage(
'${dotenv.env['url']}${model.siswaModel!.imgUrl}',
)
: null,
child: model.siswaModel == null
? const Icon(
Icons.person,
size: 50,
color: Colors.white,
)
: null,
),
],
),
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'Nama',
controller: model.namaController,
validator:
Validatorless.required('Nama tidak boleh kosong'),
enabled: false,
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'Tanggal Lahir',
controller: model.tanggalLahirController,
readOnly: true,
validator: Validatorless.required(
'Tanggal lahir tidak boleh kosong'),
enabled: false,
onTap: () {
// model.changeDate(context);
},
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'Tempat Lahir',
controller: model.tempatLahirController,
enabled: false,
validator: Validatorless.required(
'Tempat lahir tidak boleh kosong'),
),
const SizedBox(height: 10),
// create dropdown button
MyTextFormField(
labelText: 'Jenis Kelamin',
controller: model.jkController,
enabled: false,
validator: Validatorless.required(
'Pendidikan SMP tidak boleh kosong'),
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'No. Telepon',
controller: model.noTelponController,
enabled: false,
keyboardType: TextInputType.number,
validator: Validatorless.multiple(
[
Validatorless.required(
'No. telepon tidak boleh kosong'),
Validatorless.number('No. telepon harus berupa angka'),
],
),
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'Agama',
controller: model.agamaController,
enabled: false,
keyboardType: TextInputType.emailAddress,
validator:
Validatorless.required('Agama tidak boleh kosong'),
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'Kewarganegaraan',
controller: model.kewarganegaraanController,
enabled: false,
keyboardType: TextInputType.emailAddress,
validator: Validatorless.required(
'Kewarganegaraan tidak boleh kosong'),
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'Alamat',
controller: model.alamatController,
enabled: false,
maxLines: 2,
validator:
Validatorless.required('Alamat tidak boleh kosong'),
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'Pendidikan SD',
controller: model.pendidikanSDController,
enabled: false,
validator: Validatorless.required(
'Pendidikan SD tidak boleh kosong'),
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'Pendidikan SMP',
controller: model.pendidikanSMPController,
enabled: false,
validator: Validatorless.required(
'Pendidikan SMP tidak boleh kosong'),
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'Pendidikan SMA',
controller: model.pendidikanSMAController,
enabled: false,
validator: Validatorless.required(
'Pendidikan SMA tidak boleh kosong'),
),
const SizedBox(height: 10),
MyTextFormField(
labelText: 'Kemampuan',
controller: model.kemampuanController,
enabled: false,
maxLines: 4,
validator:
Validatorless.required('Kemampuan tidak boleh kosong'),
),
const SizedBox(height: 10),
MyTextFormField(
labelText: "Hobi",
controller: model.hobiController,
enabled: false,
maxLines: 4,
validator:
Validatorless.required('Hobi tidak boleh kosong'),
),
// Row(
// mainAxisAlignment: MainAxisAlignment.end,
// children: [
// TextButton(
// onPressed: () {},
// child: const Text(
// 'Batal',
// style: TextStyle(
// color: dangerColor,
// ),
// ),
// ),
// TextButton(
// onPressed: () async {
// // if (model.formKey.currentState!.validate()) {
// // bool res = await model.postData();
// // model.log.i("res: $res");
// // if (res) {
// // completer(
// // DialogResponse(
// // confirmed: true,
// // ),
// // );
// // }
// // }
// },
// child: const Text(
// 'Simpan',
// style: TextStyle(
// color: blueColor,
// ),
// ),
// ),
// ],
// ),
],
),
),
),
);
},
);
}
}

View File

@ -0,0 +1,67 @@
import 'package:flutter/material.dart';
import '../../../../app/app.locator.dart';
import '../../../../app/app.logger.dart';
import '../../../../app/core/custom_base_view_model.dart';
import '../../../../model/siswa_model.dart';
import '../../../../services/http_services.dart';
import '../../../../services/my_easyloading.dart';
class EditSiswaViewModel extends CustomBaseViewModel {
final log = getLogger('EditSiswaViewModel');
final _httpService = locator<MyHttpServices>();
final easyLoading = locator<MyEasyLoading>();
SiswaModel? siswaModel;
List<String> jenisKelaminList = ['Laki-laki', 'Perempuan'];
String jenisKelamin = 'Laki-laki';
TextEditingController namaController = TextEditingController();
TextEditingController tanggalLahirController = TextEditingController();
TextEditingController tempatLahirController = TextEditingController();
TextEditingController alamatController = TextEditingController();
TextEditingController noTelponController = TextEditingController();
TextEditingController agamaController = TextEditingController();
TextEditingController kewarganegaraanController = TextEditingController();
TextEditingController pendidikanSDController = TextEditingController();
TextEditingController pendidikanSMPController = TextEditingController();
TextEditingController pendidikanSMAController = TextEditingController();
TextEditingController kemampuanController = TextEditingController();
TextEditingController hobiController = TextEditingController();
TextEditingController jkController = TextEditingController();
Future<void> init(int idSiswa) async {
log.i('idSiswa: $idSiswa');
getData(idSiswa);
}
getData(int idSiswa) async {
// log.i('idSiswa: $idSiswa');
setBusy(true);
easyLoading.showLoading();
try {
var response = await _httpService.get('siswa_detail?id=$idSiswa');
var datanya = response.data['data'];
siswaModel = SiswaModel.fromJson(datanya);
notifyListeners();
log.i(siswaModel!.imgUrl);
namaController.text = siswaModel!.nama!;
tanggalLahirController.text = siswaModel!.tanggalLahir!;
tempatLahirController.text = siswaModel!.tempatLahir!;
alamatController.text = siswaModel!.alamat!;
noTelponController.text = siswaModel!.noTelpon!;
agamaController.text = siswaModel!.agama!;
kewarganegaraanController.text = siswaModel!.kewarganegaraan!;
pendidikanSDController.text = siswaModel!.pendidikanSd!;
pendidikanSMPController.text = siswaModel!.pendidikanSmp!;
pendidikanSMAController.text = siswaModel!.pendidikanSma!;
kemampuanController.text = siswaModel!.kemampuan!;
hobiController.text = siswaModel!.hobi!;
jkController.text = siswaModel!.jenisKelamin!;
} catch (e) {
log.e(e);
} finally {
setBusy(false);
easyLoading.dismissLoading();
}
}
}

View File

@ -1,6 +1,7 @@
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import '../../../../app/themes/app_text.dart';
import './profil_view_model.dart';
class ProfilView extends StatelessWidget {
@ -18,10 +19,57 @@ class ProfilView extends StatelessWidget {
ProfilViewModel model,
Widget? child,
) {
return const Scaffold(
body: Center(
child: Text(
'ProfilView',
return Scaffold(
body: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20, vertical: 15),
child: Column(
children: [
const Center(
child: Image(
image: AssetImage("assets/logo.png"),
width: 200,
height: 200,
),
),
const SizedBox(height: 10),
Text(
"PANTI ASUHAN ABADI AISYIYAH",
style: boldTextStyle.copyWith(
fontSize: 20,
),
textAlign: TextAlign.center,
),
const SizedBox(height: 10),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: const [
Icon(Icons.phone),
SizedBox(width: 15),
Expanded(
child: Text(
"081 343 434 343",
textAlign: TextAlign.justify,
style: regularTextStyle,
),
),
],
),
const SizedBox(height: 10),
Row(
crossAxisAlignment: CrossAxisAlignment.center,
children: const [
Icon(Icons.location_on),
SizedBox(width: 15),
Expanded(
child: Text(
"Jln Panti Asuhan No. 3 Ujung Lare, Kec. Soreang, Kota Parepare, Sulawesi Selatan 91133",
textAlign: TextAlign.justify,
style: regularTextStyle,
),
),
],
),
],
),
),
);

View File

@ -0,0 +1,46 @@
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import './sejarah_view_model.dart';
class SejarahView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ViewModelBuilder<SejarahViewModel>.nonReactive(
viewModelBuilder: () => SejarahViewModel(),
onModelReady: (SejarahViewModel model) async {
await model.init();
},
builder: (
BuildContext context,
SejarahViewModel model,
Widget? child,
) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(20),
child: SingleChildScrollView(
child: Column(
children: [
const Center(
child: Image(
image: AssetImage("assets/logo.png"),
width: 150,
height: 150,
),
),
SizedBox(height: 20),
Text(
model.isi1 + '\n\n' + model.isi2,
style: const TextStyle(fontSize: 18),
textAlign: TextAlign.justify,
),
],
),
),
),
);
},
);
}
}

View File

@ -0,0 +1,11 @@
import 'package:panti_asuhan/app/core/custom_base_view_model.dart';
class SejarahViewModel extends CustomBaseViewModel {
String isi1 =
"Panti Asuhan Abadi Aisiyah Kota Parepare dibangun secara bertahap yang peletakan batu pertamanya pada tahun 1960, dan mulai ditempati pada tahun 1962, sehingga tahun berdirinya Panti Asuhan Abadi Aisyiyah Kota Parepare pada Tahun 1963";
String isi2 =
"Pada perkembangannya dibangun bangunan yang ada pada sebelah kiri bangunan p[ertama, kemudia dibangun lagi Mushollah, dan pembangunannya sepenuhnya bantuan prisden Soeharto pada waktu itu. Pada perkembangan berikutnya karena jalan masukke Panti Asuhan Masih berupa pematang sawah, maka oleh Hj. Syamsiah Jabbar sebagai pengelolah pertama meminta Pemerintah untuk meninjau jalan tersebut dan pada tahun 1964-1965 oleh Pemerintah dibangun jalanan beraspal";
Future<void> init() async {}
}

View File

@ -0,0 +1,320 @@
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import './struktur_organisasi_view_model.dart';
class StrukturOrganisasiView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ViewModelBuilder<StrukturOrganisasiViewModel>.nonReactive(
viewModelBuilder: () => StrukturOrganisasiViewModel(),
onModelReady: (StrukturOrganisasiViewModel model) async {
await model.init();
},
builder: (
BuildContext context,
StrukturOrganisasiViewModel model,
Widget? child,
) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(20),
child: SingleChildScrollView(
child: Column(
children: [
const Center(
child: Image(
image: AssetImage("assets/logo.png"),
width: 150,
height: 150,
),
),
const SizedBox(
height: 20,
),
const Text(
"Ketua",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(
height: 2,
),
Text(
model.Ketua,
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Sekretaris",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(
height: 2,
),
Text(
model.Sekretaris,
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Bendahara",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(
height: 2,
),
Text(
model.Bendahara,
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Pengasuh",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(
height: 2,
),
Text(
'${model.SeksiPengasuh1}\n${model.SeksiPengasuh2}\n${model.SeksiPengasuh3}\n${model.SeksiPengasuh4}',
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Ibadah",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(
height: 2,
),
Text(
'${model.SeksiIbadah1}\n${model.SeksiIbadah2}\n${model.SeksiIbadah3}\n${model.SeksiIbadah4}',
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Pendidikan",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(
height: 2,
),
Text(
'${model.SeksiPendidikan1}\n${model.SeksiPendidikan2}',
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Kesehatan",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(
height: 2,
),
Text(
model.SeksiKesehatan,
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Kebersihan",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
const SizedBox(
height: 2,
),
Text(
model.SeksiKebersihan,
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Keterampilan",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
Text(
model.SeksiKeterampilan1,
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Sarana Prasarana",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
Text(
model.SeksiSaranaPrasarana1,
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Konsumsi",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
Text(
'${model.SeksiKonsumsi1}\n${model.SeksiKonsumsi2}',
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Keamanan",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
Text(
'${model.SeksiKeamanan1}\n${model.SeksiKeamanan2}',
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Gedung",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
Text(
'${model.SeksiGedung1}\n${model.SeksiGedung2}\n${model.SeksiGedung3}\n${model.SeksiGedung4}',
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Seksi Wisma",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
Text(
'${model.SeksiWisma1}\n${model.SeksiWisma2}\n${model.SeksiWisma3}\n${model.SeksiWisma4}\n${model.SeksiWisma5}',
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Kelompok Putri",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
Text(
'${model.KelompokPutri1}\n${model.KelompokPutri2}\n${model.KelompokPutri3}',
style: const TextStyle(
fontSize: 20,
),
),
const SizedBox(
height: 20,
),
const Text(
"Kelompok Putra",
style: TextStyle(
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
Text(
'${model.KelompokPutra1}\n${model.KelompokPutra2}\n${model.KelompokPutra3}',
style: const TextStyle(
fontSize: 20,
),
),
],
),
),
),
);
},
);
}
}

View File

@ -0,0 +1,54 @@
import 'package:panti_asuhan/app/core/custom_base_view_model.dart';
class StrukturOrganisasiViewModel extends CustomBaseViewModel {
String Ketua = "Dr. Andi Fitriani D, S.Ag, M.Pd";
String Sekretaris = "Fitriana Buyanus, S.Si ., M.Kes";
String Bendahara = "Hj. Djaliah, A.Ma";
String SeksiPengasuh1 = "Dra Hj, CIA";
String SeksiPengasuh2 = "Dahang, S.Ag";
String SeksiPengasuh3 = "Sumadin, S.Pd.I";
String SeksiPengasuh4 = "Darwan";
String SeksiIbadah1 = "Drs. Najib La'ady";
String SeksiIbadah2 = "Sumadin, S.Pd.I";
String SeksiIbadah3 = "Ahmad";
String SeksiIbadah4 = "Darwan";
String SeksiPendidikan1 = "Dra. Hj. CIA";
String SeksiPendidikan2 = "Hj. Djaliah, A.Ma";
String SeksiKesehatan = "Haerul, SKM";
String SeksiKebersihan = "Bd. Lina Sutomo";
String SeksiKeterampilan1 = "Yuslihudriani, S.Pd";
String SeksiSaranaPrasarana1 = "Muh.Adham, ST";
String SeksiKonsumsi1 = "Fatmawati";
String SeksiKonsumsi2 = "Rasnaya";
String SeksiKeamanan1 = "Firdaus";
String SeksiKeamanan2 = "Ahmad";
String SeksiGedung1 = "Dra. Bangsuari";
String SeksiGedung2 = "Hidayani";
String SeksiGedung3 = "Dahang. S,Ag";
String SeksiGedung4 = "Saharia";
String SeksiWisma1 = "Drs. Muh, Yasmin";
String SeksiWisma2 = "Hj. Hadilah";
String SeksiWisma3 = "Muh.Adham, ST";
String SeksiWisma4 = "Ahmad";
String SeksiWisma5 = "Dahang, S.Ag";
String KelompokPutri1 = "St. Khadijah";
String KelompokPutri2 = "St. Aisyah";
String KelompokPutri3 = "St. Fatimah";
String KelompokPutra1 = "Ahmad Dahlan";
String KelompokPutra2 = "Ar. Fahruddin";
String KelompokPutra3 = "Amin Rais";
Future<void> init() async {}
}

View File

@ -0,0 +1,73 @@
import 'package:flutter/material.dart';
import 'package:stacked/stacked.dart';
import './visi_misi_view_model.dart';
class VisiMisiView extends StatelessWidget {
@override
Widget build(BuildContext context) {
return ViewModelBuilder<VisiMisiViewModel>.nonReactive(
viewModelBuilder: () => VisiMisiViewModel(),
onModelReady: (VisiMisiViewModel model) async {
await model.init();
},
builder: (
BuildContext context,
VisiMisiViewModel model,
Widget? child,
) {
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(20),
child: SingleChildScrollView(
child: Column(
children: [
const Center(
child: Image(
image: AssetImage("assets/logo.png"),
width: 150,
height: 150,
),
),
Center(
child: Text(
'Visi',
style: const TextStyle(fontSize: 20),
),
),
SizedBox(height: 10),
Text(
model.visi,
style: const TextStyle(fontSize: 18),
textAlign: TextAlign.justify,
),
SizedBox(height: 30),
Center(
child: Text(
'Misi',
style: const TextStyle(fontSize: 20),
),
),
SizedBox(height: 10),
Text(
model.misi1 +
'\n\n' +
model.misi2 +
'\n\n' +
model.misi3 +
'\n\n' +
model.misi4 +
'\n\n' +
model.misi5,
style: const TextStyle(fontSize: 18),
textAlign: TextAlign.justify,
),
],
),
),
),
);
},
);
}
}

View File

@ -0,0 +1,18 @@
import 'package:panti_asuhan/app/core/custom_base_view_model.dart';
class VisiMisiViewModel extends CustomBaseViewModel {
String visi =
"Terwujudnya anak asuhan yang berakhlak mulia sesuai dengan tujuan Pensyarikatan ";
String misi1 =
"1. Mengembangkan proses pengkaderan menuju masyarakat Islam yang sebenar-benarnya";
String misi2 =
"2. Memberikan pembinaan Berbasis Keluarga Islami sehingga melahirkan anak asuhan yang berkarakter";
String misi3 =
"3. Menegmbangkan Pendidikan Inklusif secara formal dan informal.";
String misi4 =
"4. Meningkatkan proses belajar sehingga menjadi anak asuhan yang berkualitas dan berprilaku Islami";
String misi5 =
"5. Menjadikan LKSA ABADI Aisyyah sebagai tempat beramal bagu seluruh lapisan masyarakat";
Future<void> init() async {}
}

View File

@ -63,6 +63,7 @@ class LoginScreenView extends StatelessWidget {
hintText: "Password",
prefixIcon: Icon(Icons.lock),
// controller: model.passwordController,
obscureText: true,
),
const SizedBox(
height: 10,

View File

@ -46,15 +46,15 @@ class TambahDanaSosialView extends StatelessWidget {
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text(
"Keterangan",
"Nama Donator",
style: regularTextStyle.copyWith(color: mainColor),
),
MyTextFormField(
hintText: "Keterangan",
controller: model.ketController,
maxLines: 3,
hintText: "Nama Donatur",
controller: model.namaController,
maxLines: 1,
validator: Validatorless.required(
'Keterangan tidak boleh kosong'),
'Nama Donatur tidak boleh kosong'),
),
const SizedBox(height: 20),
Text(
@ -82,46 +82,14 @@ class TambahDanaSosialView extends StatelessWidget {
readOnly: true,
controller: model.tanggalController,
validator: Validatorless.required(
'Tanggal lahir tidak boleh kosong'),
'Tanggal tidak boleh kosong'),
onTap: () {
model.changeDate(context);
},
),
const SizedBox(height: 20),
Text(
"Jenis Dana",
style: regularTextStyle.copyWith(color: mainColor),
),
Container(
width: double.infinity,
height: 60,
padding: const EdgeInsets.symmetric(horizontal: 20),
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(25),
border: Border.all(
color: mainColor,
),
),
child: DropdownButtonHideUnderline(
child: DropdownButton<String>(
value: model.jenisDana,
onChanged: (String? newValue) {
model.jenisDana = newValue!;
},
items: model.jenisDanaList
.map<DropdownMenuItem<String>>((String value) {
return DropdownMenuItem<String>(
value: value,
child: Text(value,
style: const TextStyle(fontSize: 16)),
);
}).toList(),
),
),
),
const SizedBox(height: 20),
MyButton(
text: "Simpan",
text: "Simpan Data",
onPressed: () {
if (model.formKey.currentState!.validate()) {
model.log.i('Form Valid');

View File

@ -18,7 +18,7 @@ class TambahDanaSosialViewModel extends CustomBaseViewModel {
final formKey = GlobalKey<FormState>();
TextEditingController ketController = TextEditingController();
TextEditingController namaController = TextEditingController();
TextEditingController jumlahController = TextEditingController();
TextEditingController tanggalController = TextEditingController();
@ -44,8 +44,7 @@ class TambahDanaSosialViewModel extends CustomBaseViewModel {
easyLoading.customLoading('Menambahkan data...');
try {
var formData = FormData.fromMap({
'jenis': jenisDana,
'keterangan': ketController.text,
'nama': namaController.text,
'jumlah': jumlahController.text,
'tanggal': tanggalController.text,
});

View File

@ -18,6 +18,8 @@ class MyTextFormField extends StatelessWidget {
this.readOnly = false,
this.onTap,
this.keyboardType = TextInputType.text,
this.initialValue,
this.enabled = true,
}) : super(key: key);
final String? labelText;
@ -33,10 +35,14 @@ class MyTextFormField extends StatelessWidget {
final bool readOnly;
final VoidCallback? onTap;
final TextInputType keyboardType;
final String? initialValue;
final bool enabled;
@override
Widget build(BuildContext context) {
return TextFormField(
enabled: enabled,
initialValue: initialValue,
onEditingComplete: onEditingComplete,
maxLines: maxLines,
controller: controller,

View File

@ -424,6 +424,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.6.3"
intl:
dependency: "direct main"
description:
name: intl
sha256: "3bc132a9dbce73a7e4a21a17d06e1878839ffbf975568bc875c60537824b0c4d"
url: "https://pub.dev"
source: hosted
version: "0.18.1"
io:
dependency: transitive
description:

View File

@ -49,6 +49,7 @@ dependencies:
# calendar_date_picker2: ^0.5.2
flutter_holo_date_picker: ^1.1.0
validatorless: ^1.2.3
intl:
dev_dependencies:
flutter_test: