mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-04-18 15:52:54 +00:00
76 lines
2.3 KiB
Dart
76 lines
2.3 KiB
Dart
// This file is automatically generated, so please do not edit it.
|
|
// @generated by `flutter_rust_bridge`@ 2.12.0.
|
|
|
|
// ignore_for_file: invalid_use_of_internal_member
|
|
|
|
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
|
|
|
|
import 'database/contact.dart';
|
|
import 'frb_generated.dart';
|
|
|
|
// These functions are ignored because they are not marked as `pub`: `get_instance`
|
|
// These types are ignored because they are neither used by any `pub` functions nor (for structs and enums) marked `#[frb(unignore)]`: `Twonly`
|
|
|
|
Future<void> initializeTwonly({required TwonlyConfig config}) =>
|
|
RustLib.instance.api.crateBridgeInitializeTwonly(config: config);
|
|
|
|
Future<List<Contact>> getAllContacts() =>
|
|
RustLib.instance.api.crateBridgeGetAllContacts();
|
|
|
|
Future<OtherPromotion> loadPromotions() =>
|
|
RustLib.instance.api.crateBridgeLoadPromotions();
|
|
|
|
class OtherPromotion {
|
|
const OtherPromotion({
|
|
required this.promotionId,
|
|
required this.publicId,
|
|
required this.fromContactId,
|
|
required this.threshold,
|
|
required this.announcementShare,
|
|
this.publicKeyVerifiedTimestamp,
|
|
});
|
|
final int promotionId;
|
|
final BigInt publicId;
|
|
final PlatformInt64 fromContactId;
|
|
final int threshold;
|
|
final Uint8List announcementShare;
|
|
final PlatformInt64? publicKeyVerifiedTimestamp;
|
|
|
|
@override
|
|
int get hashCode =>
|
|
promotionId.hashCode ^
|
|
publicId.hashCode ^
|
|
fromContactId.hashCode ^
|
|
threshold.hashCode ^
|
|
announcementShare.hashCode ^
|
|
publicKeyVerifiedTimestamp.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is OtherPromotion &&
|
|
runtimeType == other.runtimeType &&
|
|
promotionId == other.promotionId &&
|
|
publicId == other.publicId &&
|
|
fromContactId == other.fromContactId &&
|
|
threshold == other.threshold &&
|
|
announcementShare == other.announcementShare &&
|
|
publicKeyVerifiedTimestamp == other.publicKeyVerifiedTimestamp;
|
|
}
|
|
|
|
class TwonlyConfig {
|
|
const TwonlyConfig({
|
|
required this.databasePath,
|
|
});
|
|
final String databasePath;
|
|
|
|
@override
|
|
int get hashCode => databasePath.hashCode;
|
|
|
|
@override
|
|
bool operator ==(Object other) =>
|
|
identical(this, other) ||
|
|
other is TwonlyConfig &&
|
|
runtimeType == other.runtimeType &&
|
|
databasePath == other.databasePath;
|
|
}
|