forked from yaso_meth/mih-project
Merge pull request #216 from yaso-meth/BUG--Marque-and-env-fix
BUG--Marque-and-env-fix
This commit is contained in:
@@ -19,17 +19,27 @@ abstract class AppEnviroment {
|
||||
switch (env) {
|
||||
case Enviroment.dev:
|
||||
{
|
||||
//================= Android Dev Urls =================
|
||||
// baseApiUrl = "http://10.0.2.2:8080";
|
||||
// baseFileUrl = "http://10.0.2.2:9000";
|
||||
// baseAiUrl = "http://10.0.2.2:11434";
|
||||
// bannerAdUnitId = 'ca-app-pub-3940256099942544/9214589741';
|
||||
//================= Web & iOS Dev Urls =================
|
||||
baseApiUrl = "http://localhost:8080";
|
||||
baseFileUrl = "http://localhost:9000";
|
||||
baseAiUrl = "http://localhost:11434";
|
||||
bannerAdUnitId = 'ca-app-pub-3940256099942544/2435281174';
|
||||
break;
|
||||
if (kIsWeb) {
|
||||
//================= Web Dev Urls =================
|
||||
baseApiUrl = "http://localhost:8080";
|
||||
baseFileUrl = "http://localhost:9000";
|
||||
baseAiUrl = "http://localhost:11434";
|
||||
bannerAdUnitId = 'ca-app-pub-3940256099942544/2435281174';
|
||||
break;
|
||||
} else if (Platform.isAndroid) {
|
||||
//================= Android Dev Urls =================
|
||||
baseApiUrl = "http://10.0.2.2:8080";
|
||||
baseFileUrl = "http://10.0.2.2:9000";
|
||||
baseAiUrl = "http://10.0.2.2:11434";
|
||||
bannerAdUnitId = 'ca-app-pub-3940256099942544/9214589741';
|
||||
} else {
|
||||
//================= Web & iOS Dev Urls =================
|
||||
baseApiUrl = "http://localhost:8080";
|
||||
baseFileUrl = "http://localhost:9000";
|
||||
baseAiUrl = "http://localhost:11434";
|
||||
bannerAdUnitId = 'ca-app-pub-3940256099942544/2435281174';
|
||||
break;
|
||||
}
|
||||
}
|
||||
case Enviroment.prod:
|
||||
{
|
||||
|
||||
@@ -49,20 +49,20 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
|
||||
final String maintenanceMsg =
|
||||
"\tHeads up! We're doing maintenance on Thur, 15 May 2025 at 10 PM (CAT). MIH may be unavailable briefly.";
|
||||
|
||||
void _startMarquee() async {
|
||||
while (mounted) {
|
||||
final double maxScroll = _scrollController.position.maxScrollExtent;
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
await _scrollController.animateTo(
|
||||
maxScroll,
|
||||
duration: _marqueeController.duration!,
|
||||
curve: Curves.linear,
|
||||
);
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
_scrollController.jumpTo(0);
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
}
|
||||
}
|
||||
// void _startMarquee() async {
|
||||
// while (mounted) {
|
||||
// final double maxScroll = _scrollController.position.maxScrollExtent;
|
||||
// await Future.delayed(const Duration(milliseconds: 500));
|
||||
// await _scrollController.animateTo(
|
||||
// maxScroll,
|
||||
// duration: _marqueeController.duration!,
|
||||
// curve: Curves.linear,
|
||||
// );
|
||||
// await Future.delayed(const Duration(milliseconds: 500));
|
||||
// _scrollController.jumpTo(0);
|
||||
// await Future.delayed(const Duration(milliseconds: 500));
|
||||
// }
|
||||
// }
|
||||
|
||||
List<Map<String, Widget>> setNewBusinessUserPackages() {
|
||||
List<Map<String, Widget>> temp = [];
|
||||
@@ -182,12 +182,13 @@ class _MihBusinessHomeState extends State<MihBusinessHome>
|
||||
businessPackagesMap = setBusinessPackages();
|
||||
}
|
||||
searchPackage();
|
||||
_marqueeController = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(seconds: 12),
|
||||
);
|
||||
_scrollController = ScrollController();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => _startMarquee());
|
||||
//Scrolling Banner message
|
||||
// _marqueeController = AnimationController(
|
||||
// vsync: this,
|
||||
// duration: const Duration(seconds: 12),
|
||||
// );
|
||||
// _scrollController = ScrollController();
|
||||
// WidgetsBinding.instance.addPostFrameCallback((_) => _startMarquee());
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
@@ -57,20 +57,20 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
||||
final String maintenanceMsg =
|
||||
"\tHeads up! We're doing maintenance on Thur, 15 May 2025 at 10 PM (CAT). MIH may be unavailable briefly.";
|
||||
|
||||
void _startMarquee() async {
|
||||
while (mounted) {
|
||||
final double maxScroll = _scrollController.position.maxScrollExtent;
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
await _scrollController.animateTo(
|
||||
maxScroll,
|
||||
duration: _marqueeController.duration!,
|
||||
curve: Curves.linear,
|
||||
);
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
_scrollController.jumpTo(0);
|
||||
await Future.delayed(const Duration(milliseconds: 500));
|
||||
}
|
||||
}
|
||||
// void _startMarquee() async {
|
||||
// while (mounted) {
|
||||
// final double maxScroll = _scrollController.position.maxScrollExtent;
|
||||
// await Future.delayed(const Duration(milliseconds: 500));
|
||||
// await _scrollController.animateTo(
|
||||
// maxScroll,
|
||||
// duration: _marqueeController.duration!,
|
||||
// curve: Curves.linear,
|
||||
// );
|
||||
// await Future.delayed(const Duration(milliseconds: 500));
|
||||
// _scrollController.jumpTo(0);
|
||||
// await Future.delayed(const Duration(milliseconds: 500));
|
||||
// }
|
||||
// }
|
||||
|
||||
List<Map<String, Widget>> setNerUserPersonalPackage() {
|
||||
List<Map<String, Widget>> temp = [];
|
||||
@@ -224,12 +224,13 @@ class _MihPersonalHomeState extends State<MihPersonalHome>
|
||||
personalPackagesMap = setPersonalPackagesMap();
|
||||
}
|
||||
searchPackage();
|
||||
_marqueeController = AnimationController(
|
||||
vsync: this,
|
||||
duration: const Duration(seconds: 12),
|
||||
);
|
||||
_scrollController = ScrollController();
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) => _startMarquee());
|
||||
//Scrolling Banner message
|
||||
// _marqueeController = AnimationController(
|
||||
// vsync: this,
|
||||
// duration: const Duration(seconds: 12),
|
||||
// );
|
||||
// _scrollController = ScrollController();
|
||||
// WidgetsBinding.instance.addPostFrameCallback((_) => _startMarquee());
|
||||
}
|
||||
|
||||
@override
|
||||
|
||||
Reference in New Issue
Block a user