update look & feel of attribution list
This commit is contained in:
@@ -1,7 +1,6 @@
|
|||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:mzansi_innovation_hub/main.dart';
|
import 'package:mzansi_innovation_hub/main.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_single_child_scroll.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/mih_single_child_scroll.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_button.dart';
|
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/mih_package_tool_body.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_package_components/mih_icons.dart';
|
import 'package:mzansi_innovation_hub/mih_package_components/mih_icons.dart';
|
||||||
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
|
||||||
@@ -21,72 +20,30 @@ class _MihAttributesState extends State<MihAttributes> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TableRow displayIcon(IconData icon, String creator, String link) {
|
Widget displayAttribution(IconData resource, String creator, String link) {
|
||||||
return TableRow(
|
return GestureDetector(
|
||||||
children: [
|
onTap: () {
|
||||||
TableCell(
|
launchUrlLink(
|
||||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
Uri.parse(
|
||||||
child: SizedBox(
|
link,
|
||||||
height: 150,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(bottom: 15.0),
|
|
||||||
child: FittedBox(
|
|
||||||
child: Center(
|
|
||||||
child: Icon(
|
|
||||||
icon,
|
|
||||||
// size: 125,
|
|
||||||
color: MihColors.getSecondaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
);
|
||||||
TableCell(
|
},
|
||||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
child: Column(
|
||||||
child: Padding(
|
children: [
|
||||||
padding: const EdgeInsets.all(15.0),
|
Icon(
|
||||||
child: Center(
|
resource,
|
||||||
child: Text(
|
color: MihColors.getSecondaryColor(
|
||||||
creator,
|
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
||||||
textAlign: TextAlign.center,
|
size: 100,
|
||||||
style: const TextStyle(
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
const SizedBox(height: 5),
|
||||||
TableCell(
|
Text(
|
||||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
creator,
|
||||||
child: Padding(
|
style: const TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
|
||||||
padding: const EdgeInsets.only(bottom: 15.0),
|
|
||||||
child: MihButton(
|
|
||||||
onPressed: () {
|
|
||||||
launchUrlLink(
|
|
||||||
Uri.parse(
|
|
||||||
link,
|
|
||||||
),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
buttonColor: MihColors.getGreenColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
width: 100,
|
|
||||||
child: Text(
|
|
||||||
"Visit",
|
|
||||||
style: TextStyle(
|
|
||||||
color: MihColors.getPrimaryColor(
|
|
||||||
MzansiInnovationHub.of(context)!.theme.mode == "Dark"),
|
|
||||||
fontSize: 20,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
),
|
],
|
||||||
],
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,157 +89,50 @@ class _MihAttributesState extends State<MihAttributes> {
|
|||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 700,
|
width: 900,
|
||||||
child: Table(
|
child: Wrap(
|
||||||
defaultVerticalAlignment: TableCellVerticalAlignment.middle,
|
alignment: WrapAlignment.center,
|
||||||
columnWidths: const {
|
runSpacing: 10,
|
||||||
0: FlexColumnWidth(1),
|
spacing: 10,
|
||||||
1: FlexColumnWidth(1),
|
|
||||||
2: FlexColumnWidth(1),
|
|
||||||
},
|
|
||||||
children: [
|
children: [
|
||||||
const TableRow(
|
displayAttribution(MihIcons.mihRing, "Tarah Meth",
|
||||||
children: [
|
|
||||||
TableCell(
|
|
||||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(bottom: 15.0),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
"Resources",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 25,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TableCell(
|
|
||||||
verticalAlignment: TableCellVerticalAlignment.middle,
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(bottom: 15.0),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
"Creator",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 25,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
TableCell(
|
|
||||||
child: Padding(
|
|
||||||
padding: const EdgeInsets.only(bottom: 15.0),
|
|
||||||
child: Center(
|
|
||||||
child: Text(
|
|
||||||
"Link",
|
|
||||||
style: TextStyle(
|
|
||||||
fontSize: 25,
|
|
||||||
fontWeight: FontWeight.bold,
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
displayIcon(MihIcons.mihRing, "Tarah Meth",
|
|
||||||
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
||||||
displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
displayAttribution(MihIcons.mihLogo, "Tarah Meth",
|
||||||
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
"https://www.linkedin.com/in/tarah-meth-3b6309254/"),
|
||||||
displayIcon(
|
displayAttribution(
|
||||||
MihIcons.mzansiAi, "Ollama", "https://ollama.com/"),
|
MihIcons.mzansiAi, "Ollama", "https://ollama.com/"),
|
||||||
displayIcon(MihIcons.mzansiWallet, "Freepik",
|
displayAttribution(MihIcons.mzansiWallet, "Freepik",
|
||||||
"https://www.flaticon.com/free-icon/wallet-passes-app_3884407?term=wallet&page=1&position=21&origin=search&related_id=3884407"),
|
"https://www.flaticon.com/free-icon/wallet-passes-app_3884407?term=wallet&page=1&position=21&origin=search&related_id=3884407"),
|
||||||
displayIcon(MihIcons.patientProfile, "RaftelDesign",
|
displayAttribution(MihIcons.patientProfile, "RaftelDesign",
|
||||||
"https://www.flaticon.com/free-icon/patient_2376100?term=medication&page=1&position=6&origin=search&related_id=2376100"),
|
"https://www.flaticon.com/free-icon/patient_2376100?term=medication&page=1&position=6&origin=search&related_id=2376100"),
|
||||||
displayIcon(MihIcons.patientProfile, "Srip",
|
displayAttribution(MihIcons.patientProfile, "Srip",
|
||||||
"https://www.flaticon.com/free-icon/hospital_1233930?term=medical+snake&page=1&position=7&origin=search&related_id=1233930"),
|
"https://www.flaticon.com/free-icon/hospital_1233930?term=medical+snake&page=1&position=7&origin=search&related_id=1233930"),
|
||||||
displayIcon(MihIcons.calendar, "Freepik",
|
displayAttribution(MihIcons.calendar, "Freepik",
|
||||||
"https://www.flaticon.com/free-icon/calendar_2278049?term=calendar&page=1&position=5&origin=search&related_id=2278049"),
|
"https://www.flaticon.com/free-icon/calendar_2278049?term=calendar&page=1&position=5&origin=search&related_id=2278049"),
|
||||||
displayIcon(MihIcons.calculator, "Freepik",
|
displayAttribution(MihIcons.calculator, "Freepik",
|
||||||
"https://www.flaticon.com/free-icon/calculator_2374409?term=calculator&page=1&position=20&origin=search&related_id=2374409"),
|
"https://www.flaticon.com/free-icon/calculator_2374409?term=calculator&page=1&position=20&origin=search&related_id=2374409"),
|
||||||
displayIcon(MihIcons.aboutMih, "Chanut",
|
displayAttribution(MihIcons.aboutMih, "Chanut",
|
||||||
"https://www.flaticon.com/free-icon/info_151776?term=about&page=1&position=8&origin=search&related_id=151776"),
|
"https://www.flaticon.com/free-icon/info_151776?term=about&page=1&position=8&origin=search&related_id=151776"),
|
||||||
displayIcon(MihIcons.personalProfile, "Freepik",
|
displayAttribution(MihIcons.personalProfile, "Freepik",
|
||||||
"https://www.flaticon.com/free-icon/user_1077063?term=profile&page=1&position=6&origin=search&related_id=1077063"),
|
"https://www.flaticon.com/free-icon/user_1077063?term=profile&page=1&position=6&origin=search&related_id=1077063"),
|
||||||
displayIcon(MihIcons.businessProfile, "Gravisio",
|
displayAttribution(MihIcons.businessProfile, "Gravisio",
|
||||||
"https://www.flaticon.com/free-icon/contractor_11813336?term=company+profile&page=1&position=2&origin=search&related_id=11813336"),
|
"https://www.flaticon.com/free-icon/contractor_11813336?term=company+profile&page=1&position=2&origin=search&related_id=11813336"),
|
||||||
displayIcon(MihIcons.patientManager, "Vector Tank",
|
displayAttribution(MihIcons.patientManager, "Vector Tank",
|
||||||
"https://www.flaticon.com/free-icon/doctor_10215061?term=doctor&page=1&position=73&origin=search&related_id=10215061"),
|
"https://www.flaticon.com/free-icon/doctor_10215061?term=doctor&page=1&position=73&origin=search&related_id=10215061"),
|
||||||
displayIcon(MihIcons.profileSetup, "Freepik",
|
displayAttribution(MihIcons.profileSetup, "Freepik",
|
||||||
"https://www.flaticon.com/free-icon/add-user_748137?term=profile+add&page=1&position=1&origin=search&related_id=748137"),
|
"https://www.flaticon.com/free-icon/add-user_748137?term=profile+add&page=1&position=1&origin=search&related_id=748137"),
|
||||||
displayIcon(MihIcons.businessSetup, "kerismaker",
|
displayAttribution(MihIcons.businessSetup, "kerismaker",
|
||||||
"https://www.flaticon.com/free-icon/business_13569850?term=company+add&page=1&position=25&origin=search&related_id=13569850"),
|
"https://www.flaticon.com/free-icon/business_13569850?term=company+add&page=1&position=25&origin=search&related_id=13569850"),
|
||||||
displayIcon(MihIcons.calculator, "fawazahmed0",
|
displayAttribution(MihIcons.calculator, "fawazahmed0",
|
||||||
"https://github.com/fawazahmed0/exchange-api"),
|
"https://github.com/fawazahmed0/exchange-api"),
|
||||||
displayIcon(MihIcons.iDontKnow, "Freepik",
|
displayAttribution(MihIcons.iDontKnow, "Freepik",
|
||||||
"https://www.flaticon.com/free-icon/i-dont-know_5359909?term=i+dont+know&page=1&position=7&origin=search&related_id=5359909"),
|
"https://www.flaticon.com/free-icon/i-dont-know_5359909?term=i+dont+know&page=1&position=7&origin=search&related_id=5359909"),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
// SizedBox(
|
const SizedBox(
|
||||||
// width: 500,
|
height: 30,
|
||||||
// child: Column(
|
),
|
||||||
// children: [
|
|
||||||
// const SizedBox(
|
|
||||||
// width: double.infinity,
|
|
||||||
// child: Row(
|
|
||||||
// mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
||||||
// mainAxisSize: MainAxisSize.max,
|
|
||||||
// children: [
|
|
||||||
// Flexible(
|
|
||||||
// child: Text(
|
|
||||||
// "Icon",
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontSize: 25,
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Flexible(
|
|
||||||
// child: Text(
|
|
||||||
// "Creator",
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontSize: 25,
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// Flexible(
|
|
||||||
// child: Text(
|
|
||||||
// "Link",
|
|
||||||
// style: TextStyle(
|
|
||||||
// fontSize: 25,
|
|
||||||
// fontWeight: FontWeight.bold,
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// ),
|
|
||||||
// const Padding(
|
|
||||||
// padding: EdgeInsets.symmetric(vertical: 10.0),
|
|
||||||
// child: Divider(),
|
|
||||||
// ),
|
|
||||||
// displayIcon(MihIcons.mihLogo, "Tarah Meth",
|
|
||||||
// "https://app.mzansi-innovation-hub.co.za/"),
|
|
||||||
// const SizedBox(height: 10),
|
|
||||||
// displayIcon(MihIcons.mihLogo, "Test",
|
|
||||||
// "https://www.flaticon.com/free-icons/mih"),
|
|
||||||
// const SizedBox(height: 10),
|
|
||||||
// displayIcon(MihIcons.mihLogo, "Test",
|
|
||||||
// "https://www.flaticon.com/free-icons/mih"),
|
|
||||||
// const SizedBox(height: 10),
|
|
||||||
// displayIcon(MihIcons.mihLogo, "Test",
|
|
||||||
// "https://www.flaticon.com/free-icons/mih"),
|
|
||||||
// const SizedBox(height: 10),
|
|
||||||
// ],
|
|
||||||
// ),
|
|
||||||
// )
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user