FSX-Translate/lib/global/app_config.dart
2024-08-19 15:11:49 +08:00

16 lines
501 B
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import 'package:flutter_translate/common/utils/date_utils.dart';
const appName = 'Easy translation';
/// 广告开关,默认关
const adSwitch = false;
/// 保底逻辑:本地设定截止日期(提交日期+3天网络时间超过则默认展示所有广告
DateTime getGuaranteedDate () {
DateTime? commitDate = DateUtils.getDateTime('2024-08-15 18:00:00');
if (commitDate != null) {
return commitDate.add(const Duration(days: 3));
} else {
return DateTime.now();
}
}