project structure
This commit is contained in:
@@ -12,8 +12,8 @@ import '../../../../../../core/styles/app_images.dart';
|
||||
import '../../../../../../core/styles/app_text.dart';
|
||||
import '../../../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../../../shared/components/button_widget.dart';
|
||||
import '../../../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../../../countrySelection/presentation/bloc/choose_country_state.dart';
|
||||
import '../../../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../../../../../countrySelection/bloc/choose_country_state.dart';
|
||||
import '../../bloc/payment/invest_payment_bloc.dart';
|
||||
import '../../bloc/payment/invest_payment_state.dart';
|
||||
|
||||
|
||||
@@ -9,9 +9,9 @@ import 'package:tanami_app/shared/components/text_widget.dart';
|
||||
|
||||
import '../../../../../../core/styles/app_color.dart';
|
||||
import '../../../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../../../countrySelection/presentation/bloc/choose_country_event.dart';
|
||||
import '../../../../../countrySelection/presentation/bloc/choose_country_state.dart';
|
||||
import '../../../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../../../../../countrySelection/bloc/choose_country_event.dart';
|
||||
import '../../../../../countrySelection/bloc/choose_country_state.dart';
|
||||
|
||||
class InvestPayMethodSection extends StatelessWidget {
|
||||
const InvestPayMethodSection({super.key});
|
||||
|
||||
@@ -10,8 +10,8 @@ import 'package:tanami_app/shared/components/text_widget.dart';
|
||||
import '../../../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../../../core/utils/text_formatter/comma_input_text_formatter.dart';
|
||||
import '../../../../../../shared/components/text_from_field_widget.dart';
|
||||
import '../../../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../../../countrySelection/presentation/bloc/choose_country_state.dart';
|
||||
import '../../../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../../../../../countrySelection/bloc/choose_country_state.dart';
|
||||
import '../../bloc/payment/invest_payment_bloc.dart';
|
||||
import '../../bloc/payment/invest_payment_event.dart';
|
||||
import '../../bloc/payment/invest_payment_state.dart';
|
||||
|
||||
@@ -14,8 +14,8 @@ import '../../../../../../core/styles/app_images.dart';
|
||||
import '../../../../../../core/styles/app_text.dart';
|
||||
import '../../../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../../../core/utils/text_formatter/comma_input_text_formatter.dart';
|
||||
import '../../../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../../../countrySelection/presentation/bloc/choose_country_state.dart';
|
||||
import '../../../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../../../../../countrySelection/bloc/choose_country_state.dart';
|
||||
import '../../bloc/deposit/deposit_payment_bloc.dart';
|
||||
import '../../bloc/deposit/deposit_payment_event.dart';
|
||||
import '../../bloc/deposit/deposit_payment_state.dart';
|
||||
|
||||
@@ -8,9 +8,9 @@ import 'package:tanami_app/shared/components/text_widget.dart';
|
||||
|
||||
import '../../../../../../core/styles/app_color.dart';
|
||||
import '../../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../../countrySelection/presentation/bloc/choose_country_event.dart';
|
||||
import '../../../../countrySelection/presentation/bloc/choose_country_state.dart';
|
||||
import '../../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../../../../countrySelection/bloc/choose_country_event.dart';
|
||||
import '../../../../countrySelection/bloc/choose_country_state.dart';
|
||||
|
||||
class DepositPayMethodSection extends StatelessWidget {
|
||||
const DepositPayMethodSection({super.key});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
import '../../../../../Api_Helper/base_manager.dart';
|
||||
import '../../../../../shared/api/api_endpoints.dart';
|
||||
import '../../../../../shared/api/network_api_services.dart';
|
||||
import '../../../../Api_Helper/base_manager.dart';
|
||||
import '../../../../shared/api/api_endpoints.dart';
|
||||
import '../../../../shared/api/network_api_services.dart';
|
||||
|
||||
class GetCountryAPI {
|
||||
GetCountryAPI();
|
||||
@@ -1,8 +1,8 @@
|
||||
import 'package:bloc/bloc.dart';
|
||||
import 'package:tanami_app/features/countrySelection/presentation/bloc/GetCountry/getcountryevent_bloc.dart';
|
||||
import 'package:tanami_app/features/countrySelection/bloc/GetCountry/getcountryevent_bloc.dart';
|
||||
|
||||
import '../../../../../Api_Helper/base_manager.dart';
|
||||
import '../../../../../domain/model/GetCountry_model.dart';
|
||||
import '../../../../Api_Helper/base_manager.dart';
|
||||
import '../../domain/model/GetCountry_model.dart';
|
||||
import 'GetCountryAPI.dart';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import '../../../../../domain/model/GetCountry_model.dart';
|
||||
import '../../domain/model/GetCountry_model.dart';
|
||||
|
||||
abstract class GetCountryEvent {
|
||||
const GetCountryEvent();
|
||||
@@ -3,13 +3,13 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:gap/gap.dart';
|
||||
import 'package:tanami_app/core/styles/app_color.dart';
|
||||
import 'package:tanami_app/core/utils/constant/country_flag_data.dart';
|
||||
import 'package:tanami_app/features/countrySelection/presentation/bloc/GetCountry/getcountry_bloc.dart';
|
||||
import 'package:tanami_app/features/countrySelection/presentation/bloc/GetCountry/getcountryevent_bloc.dart';
|
||||
import 'package:tanami_app/features/countrySelection/bloc/GetCountry/getcountry_bloc.dart';
|
||||
import 'package:tanami_app/features/countrySelection/bloc/GetCountry/getcountryevent_bloc.dart';
|
||||
import 'package:tanami_app/shared/components/text_widget.dart';
|
||||
|
||||
import '../bloc/choose_country_bloc.dart';
|
||||
import '../bloc/choose_country_event.dart';
|
||||
import '../bloc/choose_country_state.dart';
|
||||
import '../../bloc/choose_country_bloc.dart';
|
||||
import '../../bloc/choose_country_event.dart';
|
||||
import '../../bloc/choose_country_state.dart';
|
||||
|
||||
class CountrySelectionList extends StatelessWidget {
|
||||
const CountrySelectionList({super.key});
|
||||
@@ -17,55 +17,6 @@ class CountrySelectionList extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final radioBloc = context.read<RadioBloc>();
|
||||
/* return BlocConsumer<GetCountryBlock, GetCountryState>(
|
||||
listener: (context, state) {
|
||||
/* if (state == GetCountryState.success) {
|
||||
const SnackBar(content: Text("Successfully fetch"));
|
||||
} else if (state == GetCountryState.error) {
|
||||
const SnackBar(content: Text(" error"));
|
||||
} else {
|
||||
const SnackBar(content: Text(" not fetch"));
|
||||
} */
|
||||
}, builder: (context, state) {
|
||||
print(state);
|
||||
if (state is CountryLoading) {
|
||||
return Center(child: CircularProgressIndicator());
|
||||
} else if (state is CountryLoaded) {
|
||||
return ListView.builder(
|
||||
itemCount: state.countryModel.data?.length ?? 0,
|
||||
itemBuilder: (context, index) {
|
||||
var country = state.countryModel.data![index];
|
||||
return ListTile(
|
||||
title: Row(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
// Adjust according to how you handle flags
|
||||
Image.asset(
|
||||
countryFlag[index],
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
const SizedBox(width: 10),
|
||||
Text(country.countryName ?? ''),
|
||||
],
|
||||
),
|
||||
leading: Radio<int>(
|
||||
activeColor: Colors.blue,
|
||||
value: index,
|
||||
groupValue: -1, // You can update this to manage selected index
|
||||
onChanged: (int? value) {
|
||||
// Handle radio button change
|
||||
},
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
} else if (state is CountryError) {
|
||||
return Center(child: Text(state.message));
|
||||
} else {
|
||||
return Center(child: Text('Press button to fetch country data'));
|
||||
}
|
||||
}); */
|
||||
|
||||
return BlocBuilder<RadioBloc, RadioState>(
|
||||
builder: (context, state) {
|
||||
|
||||
@@ -12,7 +12,7 @@ import '../../../../core/styles/app_text.dart';
|
||||
import '../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../shared/components/button_widget.dart';
|
||||
import '../../../../shared/components/text_widget.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../bloc/restore_password_bloc.dart';
|
||||
import '../bloc/restore_password_event.dart';
|
||||
import '../bloc/restore_password_state.dart';
|
||||
|
||||
@@ -12,7 +12,7 @@ import '../../../../core/styles/app_text.dart';
|
||||
import '../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../shared/components/button_widget.dart';
|
||||
import '../../../../shared/components/text_widget.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../bloc/restore_password_phone_verification_bloc.dart';
|
||||
import '../bloc/restore_password_phone_verification_event.dart';
|
||||
import '../bloc/restore_password_phone_verification_state.dart';
|
||||
|
||||
@@ -6,8 +6,8 @@ import 'package:tanami_app/core/utils/constant/country_flag_data.dart';
|
||||
|
||||
import '../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../shared/components/form_label_textfield.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_state.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_state.dart';
|
||||
import '../bloc/restore_password_phone_verification_bloc.dart';
|
||||
|
||||
class RestorePasswordPhoneVerificationForm extends StatelessWidget {
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
|
||||
import '../../../../core/styles/app_color.dart';
|
||||
import '../../../../shared/components/exit_app_dialog.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../bloc/login_bloc.dart';
|
||||
import 'login_layout.dart';
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ import '../../../../core/styles/app_text.dart';
|
||||
import '../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../shared/components/button_widget.dart';
|
||||
import '../../../../shared/components/text_widget.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../bloc/login_bloc.dart';
|
||||
import '../bloc/login_event.dart';
|
||||
import '../bloc/login_state.dart';
|
||||
|
||||
@@ -7,8 +7,8 @@ import 'package:tanami_app/core/utils/constant/country_flag_data.dart';
|
||||
import '../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../shared/components/bloc/password_field/password_visibility_bloc.dart';
|
||||
import '../../../../shared/components/form_label_textfield.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_state.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_state.dart';
|
||||
import '../bloc/login_bloc.dart';
|
||||
|
||||
class LoginForm extends StatelessWidget {
|
||||
|
||||
@@ -3,7 +3,7 @@ import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:tanami_app/features/register/presentation/bloc/register_bloc.dart';
|
||||
|
||||
import '../../../../core/styles/app_color.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import 'register_layout.dart';
|
||||
|
||||
class RegisterScreen extends StatelessWidget {
|
||||
|
||||
@@ -13,7 +13,7 @@ import '../../../../core/styles/app_color.dart';
|
||||
import '../../../../core/styles/app_text.dart';
|
||||
import '../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../shared/components/button_widget.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../bloc/register_bloc.dart';
|
||||
import '../bloc/register_event.dart';
|
||||
import '../bloc/register_state.dart';
|
||||
|
||||
@@ -6,8 +6,8 @@ import 'package:tanami_app/core/utils/constant/country_flag_data.dart';
|
||||
|
||||
import '../../../../core/utils/language/localizations_delegate.dart';
|
||||
import '../../../../shared/components/form_label_textfield.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/presentation/bloc/choose_country_state.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_bloc.dart';
|
||||
import '../../../countrySelection/bloc/choose_country_state.dart';
|
||||
import '../bloc/register_bloc.dart';
|
||||
|
||||
class RegisterForm extends StatelessWidget {
|
||||
|
||||
@@ -5,8 +5,8 @@ import 'package:gap/gap.dart';
|
||||
import 'package:tanami_app/core/routes/route_name.dart';
|
||||
import 'package:tanami_app/core/routes/routes.dart';
|
||||
import 'package:tanami_app/core/styles/app_color.dart';
|
||||
import 'package:tanami_app/features/countrySelection/presentation/bloc/GetCountry/getcountry_bloc.dart';
|
||||
import 'package:tanami_app/features/countrySelection/presentation/bloc/GetCountry/getcountryevent_bloc.dart';
|
||||
import 'package:tanami_app/features/countrySelection/bloc/GetCountry/getcountry_bloc.dart';
|
||||
import 'package:tanami_app/features/countrySelection/bloc/GetCountry/getcountryevent_bloc.dart';
|
||||
import 'package:tanami_app/shared/components/button_widget.dart';
|
||||
|
||||
import '../../../../core/styles/app_text.dart';
|
||||
|
||||
@@ -11,8 +11,8 @@ import 'core/utils/language/localizations_delegate.dart';
|
||||
import 'core/utils/secure/secure_storage_service.dart';
|
||||
import 'features/biometric/presentation/bloc/biometric_bloc.dart';
|
||||
import 'features/biometric/presentation/bloc/biometric_event.dart';
|
||||
import 'features/countrySelection/presentation/bloc/GetCountry/getcountry_bloc.dart';
|
||||
import 'features/countrySelection/presentation/bloc/choose_country_bloc.dart';
|
||||
import 'features/countrySelection/bloc/GetCountry/getcountry_bloc.dart';
|
||||
import 'features/countrySelection/bloc/choose_country_bloc.dart';
|
||||
import 'shared/components/bloc/bottom_nav_bar/bottom_navigation_bloc.dart';
|
||||
import 'shared/components/bloc/language/lng_bloc.dart';
|
||||
import 'shared/components/bloc/language/lng_event.dart';
|
||||
|
||||
Reference in New Issue
Block a user