feat : new injection logic

test : some file :)
chore : upgrade android gradle
This commit is contained in:
2025-08-19 11:22:34 +03:30
parent 9b04c0374b
commit 7c3c1280b2
47 changed files with 1139 additions and 377 deletions

View File

@@ -1,39 +0,0 @@
import 'package:rasadyar_core/core.dart';
part 'car.g.dart';
@HiveType(typeId: 50)
class CarsLocal extends HiveObject {
@HiveField(0)
String? name;
@HiveField(1)
String? price;
CarsLocal({this.name, this.price});
factory CarsLocal.fromJson(Map<String, dynamic> json) {
return CarsLocal(name: json['name'] as String?, price: json['price'] as String?);
}
Map<String, dynamic> toJson() {
return {'name': name, 'price': price};
}
}
class Cars {
String? name;
String? price;
Cars({this.name, this.price});
factory Cars.fromJson(Map<String, dynamic> json) {
return Cars(name: json['name'] as String?, price: json['price'] as String?);
}
Map<String, dynamic> toJson() {
return {'name': name, 'price': price};
}
}

View File

@@ -0,0 +1,16 @@
import 'package:rasadyar_core/core.dart';
part 'tmp_locations.g.dart';
@HiveType(typeId: 100)
class TmpLocations extends HiveObject{
@HiveField(0)
double? lat;
@HiveField(1)
double? long;
TmpLocations({this.lat, this.long});
}

View File

@@ -1,32 +1,34 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'car.dart';
part of 'tmp_locations.dart';
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class CarsLocalAdapter extends TypeAdapter<CarsLocal> {
class TmpLocationsAdapter extends TypeAdapter<TmpLocations> {
@override
final typeId = 50;
final typeId = 100;
@override
CarsLocal read(BinaryReader reader) {
TmpLocations read(BinaryReader reader) {
final numOfFields = reader.readByte();
final fields = <int, dynamic>{
for (int i = 0; i < numOfFields; i++) reader.readByte(): reader.read(),
};
return CarsLocal(name: fields[0] as String?, price: fields[1] as String?);
return TmpLocations()
..lat = (fields[0] as num?)?.toDouble()
..long = (fields[1] as num?)?.toDouble();
}
@override
void write(BinaryWriter writer, CarsLocal obj) {
void write(BinaryWriter writer, TmpLocations obj) {
writer
..writeByte(2)
..writeByte(0)
..write(obj.name)
..write(obj.lat)
..writeByte(1)
..write(obj.price);
..write(obj.long);
}
@override
@@ -35,7 +37,7 @@ class CarsLocalAdapter extends TypeAdapter<CarsLocal> {
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is CarsLocalAdapter &&
other is TmpLocationsAdapter &&
runtimeType == other.runtimeType &&
typeId == other.typeId;
}