forked from eatvio/eatvio_app
feature(registration): remove .env
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
//import 'package:eatvio_app/presentation/auth/auth_screen/auth_screen.dart';
|
||||
import 'dart:async';
|
||||
import 'dart:convert';
|
||||
|
||||
import 'package:eatvio_app/app_router.dart';
|
||||
import 'package:eatvio_app/presentation/users/subscribers_screen/models/subscribers_model.dart';
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '/core/app_export.dart';
|
||||
import 'package:eatvio_app/presentation/users/subscribers_screen/models/subscribers_model.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
import 'dart:convert';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:flutter_dotenv/flutter_dotenv.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:http/http.dart' as http;
|
||||
|
||||
import '/core/app_export.dart';
|
||||
|
||||
part 'subscribers_event.dart';
|
||||
part 'subscribers_state.dart';
|
||||
@@ -32,7 +32,7 @@ class SubscribersBloc extends Bloc<SubscribersEvent, SubscribersState> {
|
||||
AppRouter.navigatorKey.currentContext?.goNamed('authScreen');
|
||||
}
|
||||
final response = await http.get(
|
||||
Uri.parse(dotenv.env['SERVER_ROOT']! + '/profile/subscribers'),
|
||||
Uri.parse(baseUrl + '/api/profile/subscribers'),
|
||||
headers: {
|
||||
'Authorization': 'Bearer $token',
|
||||
},
|
||||
|
||||
@@ -12,14 +12,12 @@ class SubscribersState extends Equatable {
|
||||
}
|
||||
|
||||
class SubscribersInitialState extends SubscribersState {
|
||||
SubscribersInitialState({required SubscribersModel myProfileModelObj})
|
||||
: super(myProfileModelObj: myProfileModelObj);
|
||||
SubscribersInitialState({required SubscribersModel myProfileModelObj}) : super(myProfileModelObj: myProfileModelObj);
|
||||
}
|
||||
|
||||
/// Represents the state of Subscribers in the application.
|
||||
class SubscribersLoadedState extends SubscribersState {
|
||||
SubscribersLoadedState({this.myProfileModelObj, this.subscribers})
|
||||
: super(myProfileModelObj: null);
|
||||
SubscribersLoadedState({this.myProfileModelObj, this.subscribers}) : super(myProfileModelObj: null);
|
||||
|
||||
SubscribersModel? myProfileModelObj;
|
||||
dynamic subscribers;
|
||||
|
||||
Reference in New Issue
Block a user