prosapp_web_app has chat, dashboard, calendar, support, 13 providers and Fluro URL routing. Keep Dockerfile + nginx.conf from previous prosappweb. Upgrade google_fonts 6.2.1 → 8.1.0 (Dart 3.12 compat fix). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
1.0 KiB
Dart
45 lines
1.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
class SideMenuProvider extends ChangeNotifier {
|
|
static late AnimationController menuController;
|
|
static bool isOpen = false;
|
|
|
|
String _currentPage = '';
|
|
|
|
String get currentPage {
|
|
return _currentPage;
|
|
}
|
|
|
|
void setCurrentPageUrl(String routeName) {
|
|
_currentPage = routeName;
|
|
Future.delayed(const Duration(milliseconds: 100), () {
|
|
notifyListeners();
|
|
});
|
|
}
|
|
|
|
static Animation<double> movement =
|
|
Tween<double>(begin: -200, end: 0).animate(
|
|
CurvedAnimation(parent: menuController, curve: Curves.easeInOut),
|
|
);
|
|
|
|
static Animation<double> opacity = Tween<double>(begin: 0, end: 1).animate(
|
|
CurvedAnimation(parent: menuController, curve: Curves.easeInOut),
|
|
);
|
|
|
|
static void openMenu() {
|
|
isOpen = true;
|
|
menuController.forward();
|
|
}
|
|
|
|
static void closeMenu() {
|
|
isOpen = false;
|
|
menuController.reverse();
|
|
}
|
|
|
|
static void toggleMenu() {
|
|
(isOpen) ? menuController.reverse() : menuController.forward();
|
|
|
|
isOpen = !isOpen;
|
|
}
|
|
}
|