mirror of
https://github.com/appwrite/sdk-for-flutter.git
synced 2026-04-07 19:27:41 +00:00
feat: update for 1.0.0-RC1
This commit is contained in:
@@ -158,7 +158,7 @@ class Avatars extends Service {
|
||||
/// of image returned is 100x100px.
|
||||
///
|
||||
///
|
||||
Future<Uint8List> getInitials({String? name, int? width, int? height, String? color, String? background}) async {
|
||||
Future<Uint8List> getInitials({String? name, int? width, int? height, String? background}) async {
|
||||
const String path = '/avatars/initials';
|
||||
|
||||
final Map<String, dynamic> params = {
|
||||
@@ -166,7 +166,6 @@ class Avatars extends Service {
|
||||
'name': name,
|
||||
'width': width,
|
||||
'height': height,
|
||||
'color': color,
|
||||
'background': background,
|
||||
|
||||
'project': client.config['project'],
|
||||
|
||||
@@ -27,7 +27,8 @@ class Account implements Model {
|
||||
/// User preferences as a key-value object
|
||||
final Preferences prefs;
|
||||
|
||||
Account({ required this.$id,
|
||||
Account({
|
||||
required this.$id,
|
||||
required this.$createdAt,
|
||||
required this.$updatedAt,
|
||||
required this.name,
|
||||
|
||||
@@ -7,7 +7,8 @@ class Continent implements Model {
|
||||
/// Continent two letter code.
|
||||
final String code;
|
||||
|
||||
Continent({ required this.name,
|
||||
Continent({
|
||||
required this.name,
|
||||
required this.code,
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ class ContinentList implements Model {
|
||||
/// List of continents.
|
||||
final List<Continent> continents;
|
||||
|
||||
ContinentList({ required this.total,
|
||||
ContinentList({
|
||||
required this.total,
|
||||
required this.continents,
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ class Country implements Model {
|
||||
/// Country two-character ISO 3166-1 alpha code.
|
||||
final String code;
|
||||
|
||||
Country({ required this.name,
|
||||
Country({
|
||||
required this.name,
|
||||
required this.code,
|
||||
});
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ class CountryList implements Model {
|
||||
/// List of countries.
|
||||
final List<Country> countries;
|
||||
|
||||
CountryList({ required this.total,
|
||||
CountryList({
|
||||
required this.total,
|
||||
required this.countries,
|
||||
});
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ class Currency implements Model {
|
||||
/// Currency plural name
|
||||
final String namePlural;
|
||||
|
||||
Currency({ required this.symbol,
|
||||
Currency({
|
||||
required this.symbol,
|
||||
required this.name,
|
||||
required this.symbolNative,
|
||||
required this.decimalDigits,
|
||||
|
||||
@@ -7,7 +7,8 @@ class CurrencyList implements Model {
|
||||
/// List of currencies.
|
||||
final List<Currency> currencies;
|
||||
|
||||
CurrencyList({ required this.total,
|
||||
CurrencyList({
|
||||
required this.total,
|
||||
required this.currencies,
|
||||
});
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ class Document implements Model {
|
||||
final List $permissions;
|
||||
final Map<String, dynamic> data;
|
||||
|
||||
Document({ required this.$id,
|
||||
Document({
|
||||
required this.$id,
|
||||
required this.$collection,
|
||||
required this.$createdAt,
|
||||
required this.$updatedAt,
|
||||
|
||||
@@ -7,7 +7,8 @@ class DocumentList implements Model {
|
||||
/// List of documents.
|
||||
final List<Document> documents;
|
||||
|
||||
DocumentList({ required this.total,
|
||||
DocumentList({
|
||||
required this.total,
|
||||
required this.documents,
|
||||
});
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@ class Execution implements Model {
|
||||
/// The script execution time in seconds.
|
||||
final double time;
|
||||
|
||||
Execution({ required this.$id,
|
||||
Execution({
|
||||
required this.$id,
|
||||
required this.$createdAt,
|
||||
required this.$updatedAt,
|
||||
required this.$permissions,
|
||||
|
||||
@@ -7,7 +7,8 @@ class ExecutionList implements Model {
|
||||
/// List of executions.
|
||||
final List<Execution> executions;
|
||||
|
||||
ExecutionList({ required this.total,
|
||||
ExecutionList({
|
||||
required this.total,
|
||||
required this.executions,
|
||||
});
|
||||
|
||||
|
||||
@@ -25,7 +25,8 @@ class File implements Model {
|
||||
/// Total number of chunks uploaded
|
||||
final int chunksUploaded;
|
||||
|
||||
File({ required this.$id,
|
||||
File({
|
||||
required this.$id,
|
||||
required this.bucketId,
|
||||
required this.$createdAt,
|
||||
required this.$updatedAt,
|
||||
|
||||
@@ -7,7 +7,8 @@ class FileList implements Model {
|
||||
/// List of files.
|
||||
final List<File> files;
|
||||
|
||||
FileList({ required this.total,
|
||||
FileList({
|
||||
required this.total,
|
||||
required this.files,
|
||||
});
|
||||
|
||||
|
||||
@@ -5,7 +5,8 @@ class Jwt implements Model {
|
||||
/// JWT encoded string.
|
||||
final String jwt;
|
||||
|
||||
Jwt({ required this.jwt,
|
||||
Jwt({
|
||||
required this.jwt,
|
||||
});
|
||||
|
||||
factory Jwt.fromMap(Map<String, dynamic> map) {
|
||||
|
||||
@@ -9,7 +9,8 @@ class Language implements Model {
|
||||
/// Language native name.
|
||||
final String nativeName;
|
||||
|
||||
Language({ required this.name,
|
||||
Language({
|
||||
required this.name,
|
||||
required this.code,
|
||||
required this.nativeName,
|
||||
});
|
||||
|
||||
@@ -7,7 +7,8 @@ class LanguageList implements Model {
|
||||
/// List of languages.
|
||||
final List<Language> languages;
|
||||
|
||||
LanguageList({ required this.total,
|
||||
LanguageList({
|
||||
required this.total,
|
||||
required this.languages,
|
||||
});
|
||||
|
||||
|
||||
@@ -17,7 +17,8 @@ class Locale implements Model {
|
||||
/// Currency code in [ISO 4217-1](http://en.wikipedia.org/wiki/ISO_4217) three-character format
|
||||
final String currency;
|
||||
|
||||
Locale({ required this.ip,
|
||||
Locale({
|
||||
required this.ip,
|
||||
required this.countryCode,
|
||||
required this.country,
|
||||
required this.continentCode,
|
||||
|
||||
@@ -45,7 +45,8 @@ class Log implements Model {
|
||||
/// Country name.
|
||||
final String countryName;
|
||||
|
||||
Log({ required this.event,
|
||||
Log({
|
||||
required this.event,
|
||||
required this.userId,
|
||||
required this.userEmail,
|
||||
required this.userName,
|
||||
|
||||
@@ -7,7 +7,8 @@ class LogList implements Model {
|
||||
/// List of logs.
|
||||
final List<Log> logs;
|
||||
|
||||
LogList({ required this.total,
|
||||
LogList({
|
||||
required this.total,
|
||||
required this.logs,
|
||||
});
|
||||
|
||||
|
||||
@@ -27,7 +27,8 @@ class Membership implements Model {
|
||||
/// User list of roles
|
||||
final List roles;
|
||||
|
||||
Membership({ required this.$id,
|
||||
Membership({
|
||||
required this.$id,
|
||||
required this.$createdAt,
|
||||
required this.$updatedAt,
|
||||
required this.userId,
|
||||
|
||||
@@ -7,7 +7,8 @@ class MembershipList implements Model {
|
||||
/// List of memberships.
|
||||
final List<Membership> memberships;
|
||||
|
||||
MembershipList({ required this.total,
|
||||
MembershipList({
|
||||
required this.total,
|
||||
required this.memberships,
|
||||
});
|
||||
|
||||
|
||||
@@ -9,7 +9,8 @@ class Phone implements Model {
|
||||
/// Country name.
|
||||
final String countryName;
|
||||
|
||||
Phone({ required this.code,
|
||||
Phone({
|
||||
required this.code,
|
||||
required this.countryCode,
|
||||
required this.countryName,
|
||||
});
|
||||
|
||||
@@ -7,7 +7,8 @@ class PhoneList implements Model {
|
||||
/// List of phones.
|
||||
final List<Phone> phones;
|
||||
|
||||
PhoneList({ required this.total,
|
||||
PhoneList({
|
||||
required this.total,
|
||||
required this.phones,
|
||||
});
|
||||
|
||||
|
||||
@@ -4,7 +4,8 @@ part of appwrite.models;
|
||||
class Preferences implements Model {
|
||||
final Map<String, dynamic> data;
|
||||
|
||||
Preferences({ required this.data,
|
||||
Preferences({
|
||||
required this.data,
|
||||
});
|
||||
|
||||
factory Preferences.fromMap(Map<String, dynamic> map) {
|
||||
|
||||
@@ -53,7 +53,8 @@ class Session implements Model {
|
||||
/// Returns true if this the current user session.
|
||||
final bool current;
|
||||
|
||||
Session({ required this.$id,
|
||||
Session({
|
||||
required this.$id,
|
||||
required this.$createdAt,
|
||||
required this.userId,
|
||||
required this.expire,
|
||||
|
||||
@@ -7,7 +7,8 @@ class SessionList implements Model {
|
||||
/// List of sessions.
|
||||
final List<Session> sessions;
|
||||
|
||||
SessionList({ required this.total,
|
||||
SessionList({
|
||||
required this.total,
|
||||
required this.sessions,
|
||||
});
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ class Team implements Model {
|
||||
/// Total number of team members.
|
||||
final int total;
|
||||
|
||||
Team({ required this.$id,
|
||||
Team({
|
||||
required this.$id,
|
||||
required this.$createdAt,
|
||||
required this.$updatedAt,
|
||||
required this.name,
|
||||
|
||||
@@ -7,7 +7,8 @@ class TeamList implements Model {
|
||||
/// List of teams.
|
||||
final List<Team> teams;
|
||||
|
||||
TeamList({ required this.total,
|
||||
TeamList({
|
||||
required this.total,
|
||||
required this.teams,
|
||||
});
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ class Token implements Model {
|
||||
/// Token expiration date in ISO 8601 format.
|
||||
final String expire;
|
||||
|
||||
Token({ required this.$id,
|
||||
Token({
|
||||
required this.$id,
|
||||
required this.$createdAt,
|
||||
required this.userId,
|
||||
required this.secret,
|
||||
|
||||
+2
-1
@@ -13,12 +13,13 @@ dependencies:
|
||||
sdk: flutter
|
||||
cookie_jar: ^3.0.1
|
||||
device_info_plus: ^4.1.2
|
||||
flutter_web_auth_2: ^1.0.1
|
||||
flutter_web_auth_2: ^1.1.2
|
||||
http: ^0.13.5
|
||||
package_info_plus: ^1.4.3+1
|
||||
path_provider: ^2.0.11
|
||||
web_socket_channel: ^2.2.0
|
||||
|
||||
|
||||
dev_dependencies:
|
||||
flutter_lints: ^2.0.1
|
||||
flutter_test:
|
||||
|
||||
Reference in New Issue
Block a user