amend window to always include menu
This commit is contained in:
@@ -5,7 +5,6 @@ import 'package:mzansi_innovation_hub/main.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_button.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_dropdown_input.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_inputs_and_buttons/mih_text_input.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_delete_message.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_error_message.dart';
|
||||
@@ -154,33 +153,26 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
||||
builder: (context) => MihPackageWindow(
|
||||
fullscreen: false,
|
||||
windowTitle: "Employee Details",
|
||||
windowTools: Padding(
|
||||
padding: const EdgeInsets.only(top: 5.0),
|
||||
child: MihFloatingMenu(
|
||||
animatedIcon: AnimatedIcons.menu_close,
|
||||
direction: SpeedDialDirection.down,
|
||||
children: [
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Delete Employee",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
showDeleteWarning(index);
|
||||
},
|
||||
),
|
||||
],
|
||||
menuOptions: [
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Delete Employee",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
showDeleteWarning(index);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
onWindowTapClose: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
||||
@@ -189,7 +189,6 @@ class _BuildUserListState extends State<BuildUserList> {
|
||||
const SizedBox(height: 10.0),
|
||||
],
|
||||
),
|
||||
windowTools: null,
|
||||
onWindowTapClose: () {
|
||||
Navigator.pop(context);
|
||||
}));
|
||||
|
||||
@@ -2,7 +2,6 @@ import 'dart:convert';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_floating_menu.dart';
|
||||
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_package_window.dart';
|
||||
import 'package:supertokens_flutter/http.dart' as http;
|
||||
|
||||
@@ -155,33 +154,26 @@ class _BuildEmployeeListState extends State<BuildEmployeeList> {
|
||||
builder: (context) => MihPackageWindow(
|
||||
fullscreen: false,
|
||||
windowTitle: "Employee Details",
|
||||
windowTools: Padding(
|
||||
padding: const EdgeInsets.only(top: 5.0),
|
||||
child: MihFloatingMenu(
|
||||
animatedIcon: AnimatedIcons.menu_close,
|
||||
direction: SpeedDialDirection.down,
|
||||
children: [
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Delete Employee",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
showDeleteWarning(index);
|
||||
},
|
||||
),
|
||||
],
|
||||
menuOptions: [
|
||||
SpeedDialChild(
|
||||
child: Icon(
|
||||
Icons.delete,
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
),
|
||||
label: "Delete Employee",
|
||||
labelBackgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
labelStyle: TextStyle(
|
||||
color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
backgroundColor:
|
||||
MzanziInnovationHub.of(context)!.theme.successColor(),
|
||||
onTap: () {
|
||||
showDeleteWarning(index);
|
||||
},
|
||||
),
|
||||
),
|
||||
],
|
||||
onWindowTapClose: () {
|
||||
Navigator.pop(context);
|
||||
},
|
||||
|
||||
@@ -190,125 +190,9 @@ class _BuildUserListState extends State<BuildUserList> {
|
||||
const SizedBox(height: 10.0),
|
||||
],
|
||||
),
|
||||
windowTools: null,
|
||||
onWindowTapClose: () {
|
||||
Navigator.pop(context);
|
||||
}));
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// barrierDismissible: false,
|
||||
// builder: (context) => Dialog(
|
||||
// child: Stack(
|
||||
// children: [
|
||||
// Container(
|
||||
// padding: const EdgeInsets.all(10.0),
|
||||
// width: 700.0,
|
||||
// //height: 475.0,
|
||||
// decoration: BoxDecoration(
|
||||
// color: MzanziInnovationHub.of(context)!.theme.primaryColor(),
|
||||
// borderRadius: BorderRadius.circular(25.0),
|
||||
// border: Border.all(
|
||||
// color:
|
||||
// MzanziInnovationHub.of(context)!.theme.secondaryColor(),
|
||||
// width: 5.0),
|
||||
// ),
|
||||
// child: SingleChildScrollView(
|
||||
// padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
// child: Column(
|
||||
// mainAxisSize: MainAxisSize.min,
|
||||
// children: [
|
||||
// Text(
|
||||
// "Add Employee",
|
||||
// textAlign: TextAlign.center,
|
||||
// style: TextStyle(
|
||||
// color: MzanziInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .secondaryColor(),
|
||||
// fontSize: 35.0,
|
||||
// fontWeight: FontWeight.bold,
|
||||
// ),
|
||||
// ),
|
||||
// const SizedBox(height: 25.0),
|
||||
// MIHTextField(
|
||||
// controller: fnameController,
|
||||
// hintText: "Username Name",
|
||||
// editable: false,
|
||||
// required: true,
|
||||
// ),
|
||||
// const SizedBox(height: 10.0),
|
||||
// MIHTextField(
|
||||
// controller: lnameController,
|
||||
// hintText: "Email",
|
||||
// editable: false,
|
||||
// required: true,
|
||||
// ),
|
||||
// const SizedBox(height: 10.0),
|
||||
// MIHDropdownField(
|
||||
// controller: typeController,
|
||||
// hintText: "Title",
|
||||
// dropdownOptions: const ["Doctor", "Assistant"],
|
||||
// required: true,
|
||||
// editable: true,
|
||||
// ),
|
||||
// const SizedBox(height: 10.0),
|
||||
// MIHDropdownField(
|
||||
// controller: accessController,
|
||||
// hintText: "Access",
|
||||
// dropdownOptions: const ["Full", "Partial"],
|
||||
// required: true,
|
||||
// editable: true,
|
||||
// ),
|
||||
// const SizedBox(height: 30.0),
|
||||
// SizedBox(
|
||||
// width: 300,
|
||||
// height: 50,
|
||||
// child: MIHButton(
|
||||
// buttonText: "Add",
|
||||
// buttonColor: MzanziInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .secondaryColor(),
|
||||
// textColor: MzanziInnovationHub.of(context)!
|
||||
// .theme
|
||||
// .primaryColor(),
|
||||
// onTap: () {
|
||||
// if (isRequiredFieldsCaptured()) {
|
||||
// createBusinessUserAPICall(index);
|
||||
// } else {
|
||||
// showDialog(
|
||||
// context: context,
|
||||
// builder: (context) {
|
||||
// return const MIHErrorMessage(
|
||||
// errorType: "Input Error");
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
// },
|
||||
// ),
|
||||
// )
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// Positioned(
|
||||
// top: 5,
|
||||
// right: 5,
|
||||
// width: 50,
|
||||
// height: 50,
|
||||
// child: IconButton(
|
||||
// onPressed: () {
|
||||
// Navigator.pop(context);
|
||||
// },
|
||||
// icon: Icon(
|
||||
// Icons.close,
|
||||
// color: MzanziInnovationHub.of(context)!.theme.errorColor(),
|
||||
// size: 35,
|
||||
// ),
|
||||
// ),
|
||||
// ),
|
||||
// ],
|
||||
// ),
|
||||
// ),
|
||||
// );
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user