modify reservation table page, add socket io client for real time data update, modify makanan list page

This commit is contained in:
kicap
2023-08-25 04:21:55 +08:00
parent 6c5bfde828
commit d96a14e062
30 changed files with 726 additions and 165 deletions

View File

@ -85,9 +85,18 @@ class MejaDetailView extends StatelessWidget {
style: regularTextStyle,
children: [
TextSpan(
text: 'Tersedia',
text: model.theBool
? (model.reservasiMejaModel == null
? 'Loading'
: model.reservasiMejaModel!.status!
.toUpperCase())
: 'Tersedia',
style: regularTextStyle.copyWith(
color: Colors.green,
color: model.theBool
? (model.reservasiMejaModel == null
? Colors.grey
: Colors.red)
: Colors.green,
fontWeight: FontWeight.bold,
),
),
@ -146,10 +155,14 @@ class MejaDetailView extends StatelessWidget {
),
),
floatingActionButton: FloatingActionButton.extended(
onPressed: () {},
onPressed: () {
if (model.theBool == false) {
model.showReservasiMeja();
}
},
label: const Text('Pesan'),
icon: const Icon(Icons.add_shopping_cart),
backgroundColor: mainColor,
backgroundColor: mainColor.withOpacity(model.theBool ? 0.5 : 1),
),
floatingActionButtonAnimator: FloatingActionButtonAnimator.scaling,
floatingActionButtonLocation: