Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Mobile Computing Group 5
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Hannes Raschke
Mobile Computing Group 5
Commits
698606cd
Commit
698606cd
authored
Jun 20, 2023
by
Florian Schindler
Browse files
Options
Downloads
Patches
Plain Diff
made transaction a hivetype
parent
fd69cea2
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
trackeroo/lib/logic/models/transaction.dart
+13
-0
13 additions, 0 deletions
trackeroo/lib/logic/models/transaction.dart
trackeroo/lib/logic/models/transaction.g.dart
+52
-0
52 additions, 0 deletions
trackeroo/lib/logic/models/transaction.g.dart
with
65 additions
and
0 deletions
trackeroo/lib/logic/models/transaction.dart
+
13
−
0
View file @
698606cd
import
'package:hive/hive.dart'
;
import
'package:trackeroo/logic/models/category.dart'
;
part
'transaction.g.dart'
;
@HiveType
(
typeId:
1
)
class
Transaction
{
@HiveField
(
0
)
String
title
;
@HiveField
(
1
)
double
amount
;
@HiveField
(
2
)
Category
category
;
@HiveField
(
3
)
DateTime
createdAt
=
DateTime
.
now
();
@HiveField
(
4
)
DateTime
dueDate
;
Transaction
({
...
...
This diff is collapsed.
Click to expand it.
trackeroo/lib/logic/models/transaction.g.dart
0 → 100644
+
52
−
0
View file @
698606cd
// GENERATED CODE - DO NOT MODIFY BY HAND
part of
'transaction.dart'
;
// **************************************************************************
// TypeAdapterGenerator
// **************************************************************************
class
TransactionAdapter
extends
TypeAdapter
<
Transaction
>
{
@override
final
int
typeId
=
1
;
@override
Transaction
read
(
BinaryReader
reader
)
{
final
numOfFields
=
reader
.
readByte
();
final
fields
=
<
int
,
dynamic
>{
for
(
int
i
=
0
;
i
<
numOfFields
;
i
++
)
reader
.
readByte
()
:
reader
.
read
(),
};
return
Transaction
(
title:
fields
[
0
]
as
String
,
amount:
fields
[
1
]
as
double
,
category:
fields
[
2
]
as
Category
,
dueDate:
fields
[
4
]
as
DateTime
,
).
.
createdAt
=
fields
[
3
]
as
DateTime
;
}
@override
void
write
(
BinaryWriter
writer
,
Transaction
obj
)
{
writer
.
.
writeByte
(
5
)
.
.
writeByte
(
0
)
.
.
write
(
obj
.
title
)
.
.
writeByte
(
1
)
.
.
write
(
obj
.
amount
)
.
.
writeByte
(
2
)
.
.
write
(
obj
.
category
)
.
.
writeByte
(
3
)
.
.
write
(
obj
.
createdAt
)
.
.
writeByte
(
4
)
.
.
write
(
obj
.
dueDate
);
}
@override
int
get
hashCode
=
>
typeId
.
hashCode
;
@override
bool
operator
==
(
Object
other
)
=
>
identical
(
this
,
other
)
||
other
is
TransactionAdapter
&&
runtimeType
==
other
.
runtimeType
&&
typeId
==
other
.
typeId
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment