Merge pull request #247 from yaso-meth/NEW--KenLogger

ken logger
This commit is contained in:
yaso-meth
2025-08-14 09:43:35 +02:00
committed by GitHub
3 changed files with 96 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import 'package:file_picker/file_picker.dart';
import 'package:flutter/material.dart';
import 'package:flutter_speed_dial/flutter_speed_dial.dart';
import 'package:geolocator/geolocator.dart';
import 'package:ken_logger/ken_logger.dart';
import 'package:mzansi_innovation_hub/main.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/app_user.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_objects/business.dart';
@@ -10,6 +11,7 @@ import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_business_profile_preview.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_package_components/mih_personal_profile_preview.dart';
import 'package:mzansi_innovation_hub/mih_components/mih_pop_up_messages/mih_loading_circle.dart';
import 'package:mzansi_innovation_hub/mih_config/mih_colors.dart';
import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/components/mih_business_info_card.dart';
// import 'package:mzansi_innovation_hub/mih_packages/mzansi_profile/business_profile/components/mih_business_info_card.dart';
import 'package:mzansi_innovation_hub/mih_services/mih_alert_services.dart';
@@ -186,6 +188,90 @@ class _PackageToolOneState extends State<PackageToolOne> {
],
),
const SizedBox(height: 20),
Center(
child: MihButton(
onPressed: () {
KenLogger.success("Successfully tested");
},
buttonColor: MihColors.getGreenColor(context),
elevation: 10,
width: 300,
child: Text(
"Success Logger",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
),
),
const SizedBox(height: 10),
Center(
child: MihButton(
onPressed: () {
KenLogger.error("Successfully tested");
},
buttonColor: MihColors.getRedColor(context),
elevation: 10,
width: 300,
child: Text(
"Error Logger",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
),
),
const SizedBox(height: 10),
Center(
child: MihButton(
onPressed: () {
KenLogger.warning("Successfully tested");
},
buttonColor: MihColors.getOrangeColor(context),
elevation: 10,
width: 300,
child: Text(
"Warning Logger",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
),
),
const SizedBox(height: 10),
Center(
child: MihButton(
onPressed: () {
KenLogger.info("Successfully tested");
},
buttonColor: MihColors.getBluishPurpleColor(context),
elevation: 10,
width: 300,
child: Text(
"Info Logger",
style: TextStyle(
color: MzansiInnovationHub.of(context)!
.theme
.primaryColor(),
fontSize: 20,
fontWeight: FontWeight.bold,
),
),
),
),
const SizedBox(height: 10),
CountryCodePicker(
padding: EdgeInsetsGeometry.all(0),
onChanged: (selectedCode) {

View File

@@ -696,6 +696,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "4.9.0"
ken_logger:
dependency: "direct main"
description:
name: ken_logger
sha256: d48e3606688555a32a152a7d51c85a6f046b4157a6342812987c4722e90f998f
url: "https://pub.dev"
source: hosted
version: "0.0.3"
leak_tracker:
dependency: transitive
description:
@@ -1590,5 +1598,5 @@ packages:
source: hosted
version: "3.1.1"
sdks:
dart: ">=3.8.0 <3.9.0"
dart: ">=3.8.1 <3.9.0"
flutter: ">=3.29.0"

View File

@@ -47,6 +47,7 @@ dependencies:
redacted: ^1.0.13
custom_rating_bar: ^3.0.0
country_code_picker: ^3.3.0
ken_logger: ^0.0.3
dev_dependencies:
flutter_test: