fix: remove get package, upgrade Flutter 3.44 compat deps
- Remove `get` package (incompatible with Flutter 3.44/Dart 3.12 due to removed ThemeData.backgroundColor and final IconData class) - Replace GetMaterialApp → MaterialApp with GlobalKey navigatorKey - Convert AuthenticationRepository and all 7 controllers from GetxController to plain singletons - Replace Get.snackbar/offAll/to/back/defaultDialog with app_navigator helpers and native Flutter APIs - Add ApiService.baseUrl static + parseJson method - Add UserModel.getUser static method - Add UserProvider.score via ScoresModel API - Fix user?.photo → user?.picture in drawer_menu, service_after - Fix logout(uid!) → logout() in drawer_menu - Fix photo_view_web.dart missing dart:typed_data import - Remove getCoordsOfCity call from ubicacion.dart - Fix UserModel.getUser?.name null-safety in map/service.dart - Upgrade: google_maps_flutter ^2.9.0, url_launcher ^6.3.0, font_awesome_flutter ^10.8.0, image_picker ^1.1.2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
33ee7ea2f4
commit
eb01e96e5d
@@ -1,51 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:prosappco/src/utils/app_navigator.dart';
|
||||
|
||||
class NotificationSnackbar {
|
||||
static void show({
|
||||
required String title,
|
||||
required String message,
|
||||
SnackPosition position = SnackPosition.TOP,
|
||||
Duration duration = const Duration(seconds: 4),
|
||||
Color backgroundColor = Colors.red,
|
||||
Color textColor = Colors.white,
|
||||
double borderRadius = 10.0,
|
||||
EdgeInsets margin = const EdgeInsets.all(10.0),
|
||||
SnackStyle snackStyle = SnackStyle.FLOATING,
|
||||
Duration animationDuration = const Duration(milliseconds: 800),
|
||||
bool isDismissible = true,
|
||||
DismissDirection dismissDirection = DismissDirection.horizontal,
|
||||
Curve forwardAnimationCurve = Curves.easeOutBack,
|
||||
Curve reverseAnimationCurve = Curves.easeInBack,
|
||||
Icon icon = const Icon(Icons.warning, color: Colors.white),
|
||||
bool shouldIconPulse = true,
|
||||
}) {
|
||||
Get.snackbar(
|
||||
title,
|
||||
message,
|
||||
snackPosition: position,
|
||||
duration: duration,
|
||||
backgroundColor: backgroundColor,
|
||||
colorText: textColor,
|
||||
borderRadius: borderRadius,
|
||||
margin: margin,
|
||||
snackStyle: snackStyle,
|
||||
animationDuration: animationDuration,
|
||||
isDismissible: isDismissible,
|
||||
dismissDirection: dismissDirection,
|
||||
forwardAnimationCurve: forwardAnimationCurve,
|
||||
reverseAnimationCurve: reverseAnimationCurve,
|
||||
icon: icon,
|
||||
shouldIconPulse: shouldIconPulse,
|
||||
titleText: Text(
|
||||
title,
|
||||
style: const TextStyle(
|
||||
fontSize: 18.0, fontWeight: FontWeight.bold, color: Colors.white),
|
||||
),
|
||||
messageText: Text(
|
||||
message,
|
||||
style: const TextStyle(fontSize: 16.0, color: Colors.white),
|
||||
),
|
||||
);
|
||||
showAppSnackBar(title, message, color: backgroundColor);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user