Cant join team if in team Profile page resets properly Post button spam no longer leads to crash due to duplicate calls Housekeeping: Made some name changes moved homescreenpages from layout -> homeFeed Deleted 2 unused classes, authService.dart and old loginPage.dart then renamed startPage.dart -> loginPage.dart Set up openApi on backend and added URL in Service classes
26 lines
657 B
Dart
26 lines
657 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'autogenerated/informationModel.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class InformationModel {
|
|
final int? id; // Lägg till id
|
|
final String title;
|
|
final String content;
|
|
final String author;
|
|
final DateTime createdAt;
|
|
|
|
InformationModel({
|
|
this.id, // Gör id till optional om den inte alltid behövs
|
|
required this.title,
|
|
required this.content,
|
|
required this.author,
|
|
required this.createdAt,
|
|
});
|
|
|
|
factory InformationModel.fromJson(Map<String, dynamic> json) =>
|
|
_$InformationModelFromJson(json);
|
|
|
|
Map<String, dynamic> toJson() => _$InformationModelToJson(this);
|
|
}
|