v.1.0.18 dotenv for debug
This commit is contained in:
parent
1c3310716c
commit
7a27a89397
@ -1,4 +1,8 @@
|
|||||||
Workout Test and Diet 4 You Common Util Functions
|
Workout Test and Diet 4 You Common Util Functions
|
||||||
|
|
||||||
|
Version 1.0.18
|
||||||
|
debug by dotenv
|
||||||
|
|
||||||
Version 1.0.17
|
Version 1.0.17
|
||||||
Webapi remove http.get utf8 decode
|
Webapi remove http.get utf8 decode
|
||||||
|
|
||||||
|
@ -1,17 +1,24 @@
|
|||||||
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:flutter/foundation.dart';
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||||
|
// ignore: depend_on_referenced_packages
|
||||||
import 'package:intl/intl.dart';
|
import 'package:intl/intl.dart';
|
||||||
|
|
||||||
mixin Logging {
|
mixin Logging {
|
||||||
void log(String message) {
|
void log(String message) {
|
||||||
if ( kDebugMode ) {
|
String debug = dotenv.get("debug", fallback: "0");
|
||||||
|
String? platformDebug = Platform.environment['debug'];
|
||||||
|
if (debug == "2") {
|
||||||
|
print("Debug-mode: $kDebugMode, dotenv: $debug, platform: $platformDebug");
|
||||||
|
}
|
||||||
|
if (kDebugMode || debug == "1" || platformDebug == "1") {
|
||||||
DateTime time = DateTime.now();
|
DateTime time = DateTime.now();
|
||||||
print(DateFormat('yyyy-MM-dd HH:mm:ss ').format(time) + message);
|
print(DateFormat('yyyy-MM-dd HH:mm:ss ').format(time) + message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void trace(String message) {
|
void trace(String message) {
|
||||||
if ( kDebugMode ) {
|
log(message);
|
||||||
log(message);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
name: workouttest_util
|
name: workouttest_util
|
||||||
description: Workout Test app and web functions.
|
description: Workout Test app and web functions.
|
||||||
version: 1.0.17
|
version: 1.0.18
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
sdk: ">=2.18.6 <3.0.0"
|
sdk: ">=2.18.6 <3.0.0"
|
||||||
@ -18,6 +18,7 @@ dependencies:
|
|||||||
firebase_messaging: ^14.2.1
|
firebase_messaging: ^14.2.1
|
||||||
firebase_remote_config: ^3.0.9
|
firebase_remote_config: ^3.0.9
|
||||||
flutter_facebook_auth: ^5.0.7
|
flutter_facebook_auth: ^5.0.7
|
||||||
|
flutter_dotenv: ^5.0.2
|
||||||
google_sign_in: ^5.4.3
|
google_sign_in: ^5.4.3
|
||||||
|
|
||||||
http: ^0.13.5
|
http: ^0.13.5
|
||||||
|
Loading…
Reference in New Issue
Block a user