merge branches
This commit is contained in:
@@ -84,8 +84,10 @@ List<SingleChildWidget> get viewModels {
|
||||
),
|
||||
ChangeNotifierProvider(
|
||||
create:
|
||||
(context) =>
|
||||
TenderDetailViewModel(tenderDetailRepository: context.read()),
|
||||
(context) => TenderDetailViewModel(
|
||||
tenderDetailRepository: context.read(),
|
||||
tendersRepository: context.read(),
|
||||
),
|
||||
),
|
||||
|
||||
ChangeNotifierProvider(
|
||||
|
||||
@@ -15,7 +15,8 @@ class AssetsManager {
|
||||
static const userIcon = 'assets/svgs/user_icon.svg';
|
||||
static const passwordIcon = 'assets/svgs/password_icon.svg';
|
||||
static const passwordVisibility = 'assets/svgs/password_visibility.svg';
|
||||
static const passwordVisibilityOff = 'assets/svgs/password_visibility_off.svg';
|
||||
static const passwordVisibilityOff =
|
||||
'assets/svgs/password_visibility_off.svg';
|
||||
|
||||
// tenders page
|
||||
static const tenderLogo = 'assets/icons/tenderLogo.png';
|
||||
@@ -44,4 +45,8 @@ class AssetsManager {
|
||||
static const tickCircle = 'assets/icons/tick-circle.svg';
|
||||
static const arrowLeft = 'assets/svgs/arrow_left.svg';
|
||||
static const export = 'assets/svgs/export.svg';
|
||||
|
||||
//profile page
|
||||
static const sun = 'assets/icons/sun.svg';
|
||||
static const moon = 'assets/icons/moon.svg';
|
||||
}
|
||||
|
||||
@@ -47,6 +47,8 @@ class AppStrings {
|
||||
|
||||
//profile
|
||||
static const String profile = 'Profile';
|
||||
static const String settings = 'Settings';
|
||||
static const String appTheme = 'App Theme';
|
||||
|
||||
//your tenders
|
||||
static const String yourTendersTitle = 'Your tenders';
|
||||
|
||||
@@ -11,6 +11,7 @@ import 'network_connectivity.dart';
|
||||
class NetworkManager {
|
||||
final Dio mainDio;
|
||||
final NetworkConnectivity _connectivity = NetworkConnectivity();
|
||||
bool _interceptorsAdded = false;
|
||||
|
||||
NetworkManager()
|
||||
: mainDio = Dio(
|
||||
@@ -21,9 +22,13 @@ class NetworkManager {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
),
|
||||
);
|
||||
) {
|
||||
_addInterceptors();
|
||||
}
|
||||
|
||||
void _addInterceptors() {
|
||||
if (_interceptorsAdded) return;
|
||||
|
||||
Future<void> addInterceptors() async {
|
||||
final requestInterceptor = InterceptorsWrapper(
|
||||
onRequest: (options, handler) {
|
||||
appLogger.info('🌐 Request: ${options.method} ${options.path}');
|
||||
@@ -47,6 +52,7 @@ class NetworkManager {
|
||||
);
|
||||
|
||||
mainDio.interceptors.add(requestInterceptor);
|
||||
_interceptorsAdded = true;
|
||||
}
|
||||
|
||||
/// Enhanced makeRequest method with comprehensive error handling
|
||||
@@ -71,8 +77,6 @@ class NetworkManager {
|
||||
SharedPreferences prefs = await SharedPreferences.getInstance();
|
||||
Dio dioInstance = mainDio;
|
||||
|
||||
await addInterceptors();
|
||||
|
||||
Future<Response> makeApiCall(String token) async {
|
||||
final headers =
|
||||
token.isEmpty
|
||||
|
||||
@@ -137,6 +137,9 @@ class AppColors {
|
||||
static Color get blue0 =>
|
||||
_isDarkMode ? const Color(0xFF4C6367) : const Color(0xFFD6F4F8);
|
||||
|
||||
static Color get error =>
|
||||
_isDarkMode ? const Color(0xFFFF3232) : const Color(0xFFC02525);
|
||||
|
||||
static Color get red0 =>
|
||||
_isDarkMode
|
||||
? const Color(0xFF312F2F)
|
||||
|
||||
Reference in New Issue
Block a user