Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

moo #8

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.hoga_load">
<uses-permission android:name="android.permission.INTERNET"/>
<application
android:label="hoga_load"
android:name="${applicationName}"
Expand Down
6 changes: 6 additions & 0 deletions android/gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@ org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true

<<<<<<< HEAD
=======

>>>>>>> nada



Binary file added assets/images/1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/3.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/30day.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/4.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/Group 959.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/Rectangle 18.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/Rectangle 21.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/Rectangle 26.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/Vector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/bronze.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/gold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/image1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/image2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/image3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/image4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/img1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/img2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/img3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/img4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/img5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/img7.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/img8.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/jop.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/images/load.png
Binary file added assets/images/omg6.png
Binary file added assets/images/product.png
Binary file added assets/images/silver.png
Binary file added assets/images/star.png
41 changes: 41 additions & 0 deletions lib/core/bloc_observer.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import 'dart:async';

import 'package:bloc/bloc.dart';

class SimpleBlocObserver extends BlocObserver {
@override
void onCreate(BlocBase bloc) {
super.onCreate(bloc);
print('onCreate -- bloc: ${bloc.runtimeType}');
}

@override
void onEvent(Bloc bloc, Object? event) {
super.onEvent(bloc, event);
print('onEvent -- bloc: ${bloc.runtimeType}, event: $event');
}

@override
void onChange(BlocBase bloc, Change change) {
super.onChange(bloc, change);
print('onChange -- bloc: ${bloc.runtimeType}, change: $change');
}

@override
void onTransition(Bloc bloc, Transition transition) {
super.onTransition(bloc, transition);
print('onTransition -- bloc: ${bloc.runtimeType}, transition: $transition');
}

@override
void onError(BlocBase bloc, Object error, StackTrace stackTrace) {
print('onError -- bloc: ${bloc.runtimeType}, error: $error');
super.onError(bloc, error, stackTrace);
}

@override
void onClose(BlocBase bloc) {
super.onClose(bloc);
print('onClose -- bloc: ${bloc.runtimeType}');
}
}
3 changes: 2 additions & 1 deletion lib/core/color_manager/color_manager.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:ui';

import 'package:flutter/material.dart';

class ColorManager {
Expand All @@ -15,7 +16,7 @@ class ColorManager {
static const Color lightGrey =Color(0xFF808080);

static const Color darkBrown =Color(0xFFDC52F);
static const Color orange=Color(0xFFFDC52F);
static const Color yellow=Color(0xFFFDC52F);

// static const Color grey =Color(0xFFE8E8E8);

Expand Down
37 changes: 17 additions & 20 deletions lib/core/data/api/api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,39 @@ import '../models/response.dart';
class Api{
String baseUrl='https://hegaload.com/api/';

Future<dynamic> getHttp({required url, data,authToken})async{
Future<dynamic> getHttp({required url, data,authToken,self})async{
try{

var response=await Dio().get(baseUrl+'$url',options:
Options(headers:{
"auth":authToken
"auth":authToken,
"self":self
} ),
queryParameters: data

);

if(response.statusCode==200){return response.data;}
}on DioError catch(e){
ResponseModel responseModel=ResponseModel.fromJson(e.response);
print('------------------------');
ResponseModel responseModel=ResponseModel.fromJson(e.response!.data);
print('------------------------');
print(responseModel.status);
print(responseModel.message);
print(e.response);
print('------------------------');

showToast(msg: responseModel.message.toString(), state: ToastedStates.ERROR);
throw Exception();


print(e.response!.data['message']);
showToast(msg: e.response!.data['message'].toString(), state: ToastedStates.ERROR);

}
}

Future<dynamic> postHttp({required url, required data,authToken,queryParams })async{
Future<dynamic> postHttp({required url, data,authToken,queryParams })async{

try{
var response=await Dio().post(baseUrl+'$url',data: data,queryParameters:queryParams,options:
Options(headers:{
"auth":authToken
"auth":authToken,
}, )
);

Expand All @@ -52,17 +52,14 @@ class Api{

}on DioError catch(e){

// ResponseModel responseModel=ResponseModel.fromJson(e.response!.data());
// print('------------------------');
// print(responseModel.status);
// print(responseModel.message);
// print('------------------------');
print(e.response);
print(e.response!.data['message']);
showToast(msg: e.response!.data['message'].toString(), state: ToastedStates.ERROR);
throw Exception();

ResponseModel responseModel=ResponseModel.fromJson(e.response!.data);
print('------------------------');
print(responseModel.status);
print(responseModel.message);
print('------------------------');

// showToast(msg: responseModel.message.toString(), state: ToastedStates.ERROR);
throw Exception(responseModel.message);
}
}

Expand Down
64 changes: 0 additions & 64 deletions lib/core/data/models/GetProduct_model.dart

This file was deleted.

148 changes: 0 additions & 148 deletions lib/core/data/models/GetVehicle_model.dart

This file was deleted.

File renamed without changes.
Loading