258 changed files with 6348 additions and 1446 deletions
@ -0,0 +1,52 @@ |
|||||
|
# Miscellaneous |
||||
|
*.class |
||||
|
*.log |
||||
|
*.pyc |
||||
|
*.swp |
||||
|
.DS_Store |
||||
|
.atom/ |
||||
|
.buildlog/ |
||||
|
.history |
||||
|
.svn/ |
||||
|
migrate_working_dir/ |
||||
|
|
||||
|
# IntelliJ related |
||||
|
*.iml |
||||
|
*.ipr |
||||
|
*.iws |
||||
|
.idea/ |
||||
|
|
||||
|
# The .vscode folder contains launch configuration and tasks you configure in |
||||
|
# VS Code which you may wish to be included in version control, so this line |
||||
|
# is commented out by default. |
||||
|
.vscode/ |
||||
|
|
||||
|
|
||||
|
# Flutter/Dart/Pub related |
||||
|
**/doc/api/ |
||||
|
**/ios/Flutter/.last_build_id |
||||
|
.dart_tool/ |
||||
|
.flutter-plugins |
||||
|
.flutter-plugins-dependencies |
||||
|
.packages |
||||
|
.pub-cache/ |
||||
|
.pub/ |
||||
|
/build/ |
||||
|
|
||||
|
# Symbolication related |
||||
|
app.*.symbols |
||||
|
|
||||
|
# Obfuscation related |
||||
|
app.*.map.json |
||||
|
|
||||
|
# Android Studio will place build artifacts here |
||||
|
/android/app/debug |
||||
|
/android/app/profile |
||||
|
/android/app/release |
||||
|
|
||||
|
# Environment config |
||||
|
/res/config/development.json |
||||
|
|
||||
|
# Business |
||||
|
|
||||
|
business/ |
||||
@ -1,6 +1,6 @@ |
|||||
# This is a generated file; do not edit or check into version control. |
# This is a generated file; do not edit or check into version control. |
||||
path_provider=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider-2.0.15\\ |
path_provider=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider-2.0.15\\ |
||||
path_provider_android=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_android-2.0.27\\ |
path_provider_android=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_android-2.0.27\\ |
||||
path_provider_foundation=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_foundation-2.2.3\\ |
path_provider_foundation=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_foundation-2.2.3\\ |
||||
path_provider_linux=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_linux-2.1.11\\ |
path_provider_linux=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_linux-2.1.11\\ |
||||
path_provider_windows=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_windows-2.1.7\\ |
path_provider_windows=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_windows-2.1.7\\ |
||||
|
|||||
@ -1 +1 @@ |
|||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.0.27\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.1.11\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.1.7\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2023-07-14 11:41:46.248683","version":"3.10.5"} |
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.0.27\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.1.11\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.1.7\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2023-07-17 09:32:14.474983","version":"3.10.5"} |
||||
@ -1,2 +1,2 @@ |
|||||
sdk.dir=%UserProfile%\\AppData\\Local\\Android\\sdk |
sdk.dir=C:\\Users\\eddlevol\\AppData\\Local\\Android\\sdk |
||||
flutter.sdk=D:\\Sdk\\Flutter |
flutter.sdk=D:\\Sdk\\Flutter |
||||
@ -1,3 +1,2 @@ |
|||||
export './interceptors/index.dart'; |
|
||||
export './services/index.dart'; |
export './services/index.dart'; |
||||
export 'account.module.dart'; |
export 'account.module.dart'; |
||||
@ -1 +0,0 @@ |
|||||
export 'oauth.api.interceptor.dart'; |
|
||||
@ -1,21 +0,0 @@ |
|||||
import 'package:json_annotation/json_annotation.dart'; |
|
||||
|
|
||||
part 'auth.g.dart'; |
|
||||
|
|
||||
@JsonSerializable() |
|
||||
class PortalLoginProvider { |
|
||||
PortalLoginProvider({ |
|
||||
required this.id, |
|
||||
required this.name, |
|
||||
this.logo, |
|
||||
}); |
|
||||
@JsonKey(name: 'Id') |
|
||||
String id; |
|
||||
@JsonKey(name: 'Name') |
|
||||
String name; |
|
||||
@JsonKey(name: 'Logo') |
|
||||
String? logo; |
|
||||
|
|
||||
factory PortalLoginProvider.fromJson(Map<String, dynamic> json) => _$PortalLoginProviderFromJson(json); |
|
||||
Map<String, dynamic> toJson() => _$PortalLoginProviderToJson(this); |
|
||||
} |
|
||||
@ -1,22 +0,0 @@ |
|||||
// GENERATED CODE - DO NOT MODIFY BY HAND |
|
||||
|
|
||||
part of 'auth.dart'; |
|
||||
|
|
||||
// ************************************************************************** |
|
||||
// JsonSerializableGenerator |
|
||||
// ************************************************************************** |
|
||||
|
|
||||
PortalLoginProvider _$PortalLoginProviderFromJson(Map<String, dynamic> json) => |
|
||||
PortalLoginProvider( |
|
||||
id: json['Id'] as String, |
|
||||
name: json['Name'] as String, |
|
||||
logo: json['Logo'] as String?, |
|
||||
); |
|
||||
|
|
||||
Map<String, dynamic> _$PortalLoginProviderToJson( |
|
||||
PortalLoginProvider instance) => |
|
||||
<String, dynamic>{ |
|
||||
'Id': instance.id, |
|
||||
'Name': instance.name, |
|
||||
'Logo': instance.logo, |
|
||||
}; |
|
||||
@ -1,6 +0,0 @@ |
|||||
import 'auth.dart'; |
|
||||
|
|
||||
class PortalLoginException implements Exception { |
|
||||
PortalLoginException(this.providers); |
|
||||
List<PortalLoginProvider> providers; |
|
||||
} |
|
||||
@ -1,105 +0,0 @@ |
|||||
import 'dart:convert'; |
|
||||
|
|
||||
import 'package:account/models/auth.dart'; |
|
||||
import 'package:account/models/common.dart'; |
|
||||
import 'package:core/models/auth.dart'; |
|
||||
import 'package:core/models/oauth.dart'; |
|
||||
import 'package:core/services/index.dart'; |
|
||||
import 'package:core/tokens/http.token.dart'; |
|
||||
import 'package:dio/dio.dart'; |
|
||||
|
|
||||
class OAuthService extends AuthService { |
|
||||
OAuthService({ |
|
||||
required this.clientId, |
|
||||
this.clientSecret, |
|
||||
}); |
|
||||
RestService get _restService => find(); |
|
||||
|
|
||||
final String clientId; |
|
||||
final String? clientSecret; |
|
||||
|
|
||||
@override |
|
||||
Future<Token> password(LoginParams params) { |
|
||||
var request = PasswordTokenRequest( |
|
||||
clientId: clientId, |
|
||||
clientSecret: clientSecret, |
|
||||
userName: params.username, |
|
||||
password: params.password); |
|
||||
return _restService.post('/connect/token', |
|
||||
data: request.toFormUrlencodedData(), |
|
||||
options: Options( |
|
||||
extra: { |
|
||||
HttpTokens.ignoreToken: true, |
|
||||
}, |
|
||||
contentType: 'application/x-www-form-urlencoded', |
|
||||
)).then((res) => Token.fromJson(res.data)); |
|
||||
} |
|
||||
|
|
||||
@override |
|
||||
Future<Token> portal(PortalLoginParams params) { |
|
||||
var request = PortalTokenRequest( |
|
||||
clientId: clientId, |
|
||||
clientSecret: clientSecret, |
|
||||
userName: params.username, |
|
||||
password: params.password, |
|
||||
enterpriseId: params.enterpriseId); |
|
||||
return _restService.post('/connect/token', |
|
||||
data: request.toFormUrlencodedData(), |
|
||||
options: Options( |
|
||||
extra: { |
|
||||
HttpTokens.ignoreToken: true, |
|
||||
HttpTokens.ignoreError: true, |
|
||||
}, |
|
||||
contentType: 'application/x-www-form-urlencoded', |
|
||||
)).then((res) => Token.fromJson(res.data)) |
|
||||
.catchError((error) { |
|
||||
var portalProviders = (jsonDecode(error.response.data["Enterprises"]) as List<dynamic>) |
|
||||
.map((e) => PortalLoginProvider.fromJson(e)).toList(); |
|
||||
throw PortalLoginException(portalProviders); |
|
||||
}, test:(error) { |
|
||||
var err = error as dynamic; |
|
||||
if (err?.response?.statusCode == 400 && err?.response?.data != null && |
|
||||
err?.response?.data["Enterprises"] != null) { |
|
||||
return true; |
|
||||
} |
|
||||
return false; |
|
||||
}); |
|
||||
} |
|
||||
|
|
||||
@override |
|
||||
Future<Token> phoneNumber(SmsLoginParams params) { |
|
||||
var request = PhoneNumberTokenRequest( |
|
||||
clientId: clientId, |
|
||||
clientSecret: clientSecret, |
|
||||
phoneNumber: params.phonenumber, |
|
||||
code: params.code); |
|
||||
return _restService.post('/connect/token', |
|
||||
data: request.toFormUrlencodedData(), |
|
||||
options: Options( |
|
||||
extra: { |
|
||||
HttpTokens.ignoreToken: true, |
|
||||
}, |
|
||||
contentType: 'application/x-www-form-urlencoded', |
|
||||
)).then((res) => Token.fromJson(res.data)); |
|
||||
} |
|
||||
|
|
||||
@override |
|
||||
Future<Token> refreshToken(RefreshTokenParams params) { |
|
||||
var request = RefreshTokenRequest( |
|
||||
clientId: clientId, |
|
||||
clientSecret: clientSecret, |
|
||||
refreshToken: params.refreshToken, |
|
||||
); |
|
||||
return _restService.post('/connect/token', |
|
||||
data: request.toFormUrlencodedData(), |
|
||||
options: Options( |
|
||||
contentType: 'application/x-www-form-urlencoded', |
|
||||
)).then((res) => Token.fromJson(res.data)); |
|
||||
} |
|
||||
|
|
||||
@override |
|
||||
Future<UserProfile> getProfile() { |
|
||||
return _restService.get('/connect/userinfo') |
|
||||
.then((res) => UserProfile.fromJson(res.data)); |
|
||||
} |
|
||||
} |
|
||||
@ -1 +0,0 @@ |
|||||
export 'auth.service.oauth.dart'; |
|
||||
@ -0,0 +1 @@ |
|||||
|
C:/Users/eddlevol/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/path_provider_linux-2.1.11/ |
||||
@ -0,0 +1,6 @@ |
|||||
|
# This is a generated file; do not edit or check into version control. |
||||
|
path_provider=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider-2.0.15\\ |
||||
|
path_provider_android=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_android-2.0.27\\ |
||||
|
path_provider_foundation=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_foundation-2.2.4\\ |
||||
|
path_provider_linux=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_linux-2.1.11\\ |
||||
|
path_provider_windows=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_windows-2.1.7\\ |
||||
@ -0,0 +1 @@ |
|||||
|
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.4\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.0.27\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.4\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.1.11\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.1.7\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2023-07-18 08:33:58.742879","version":"3.10.5"} |
||||
@ -0,0 +1,30 @@ |
|||||
|
# Miscellaneous |
||||
|
*.class |
||||
|
*.log |
||||
|
*.pyc |
||||
|
*.swp |
||||
|
.DS_Store |
||||
|
.atom/ |
||||
|
.buildlog/ |
||||
|
.history |
||||
|
.svn/ |
||||
|
migrate_working_dir/ |
||||
|
|
||||
|
# IntelliJ related |
||||
|
*.iml |
||||
|
*.ipr |
||||
|
*.iws |
||||
|
.idea/ |
||||
|
|
||||
|
# The .vscode folder contains launch configuration and tasks you configure in |
||||
|
# VS Code which you may wish to be included in version control, so this line |
||||
|
# is commented out by default. |
||||
|
#.vscode/ |
||||
|
|
||||
|
# Flutter/Dart/Pub related |
||||
|
# Libraries should not include pubspec.lock, per https://dart.dev/guides/libraries/private-files#pubspeclock. |
||||
|
/pubspec.lock |
||||
|
**/doc/api/ |
||||
|
.dart_tool/ |
||||
|
.packages |
||||
|
build/ |
||||
@ -0,0 +1,10 @@ |
|||||
|
# This file tracks properties of this Flutter project. |
||||
|
# Used by Flutter tool to assess capabilities and perform upgrades etc. |
||||
|
# |
||||
|
# This file should be version controlled and should not be manually edited. |
||||
|
|
||||
|
version: |
||||
|
revision: 796c8ef79279f9c774545b3771238c3098dbefab |
||||
|
channel: stable |
||||
|
|
||||
|
project_type: package |
||||
@ -0,0 +1,3 @@ |
|||||
|
## 0.0.1 |
||||
|
|
||||
|
* TODO: Describe initial release. |
||||
@ -0,0 +1 @@ |
|||||
|
TODO: Add your license here. |
||||
@ -0,0 +1,39 @@ |
|||||
|
<!-- |
||||
|
This README describes the package. If you publish this package to pub.dev, |
||||
|
this README's contents appear on the landing page for your package. |
||||
|
|
||||
|
For information about how to write a good package README, see the guide for |
||||
|
[writing package pages](https://dart.dev/guides/libraries/writing-package-pages). |
||||
|
|
||||
|
For general information about developing packages, see the Dart guide for |
||||
|
[creating packages](https://dart.dev/guides/libraries/create-library-packages) |
||||
|
and the Flutter guide for |
||||
|
[developing packages and plugins](https://flutter.dev/developing-packages). |
||||
|
--> |
||||
|
|
||||
|
TODO: Put a short description of the package here that helps potential users |
||||
|
know whether this package might be useful for them. |
||||
|
|
||||
|
## Features |
||||
|
|
||||
|
TODO: List what your package can do. Maybe include images, gifs, or videos. |
||||
|
|
||||
|
## Getting started |
||||
|
|
||||
|
TODO: List prerequisites and provide or point to information on how to |
||||
|
start using the package. |
||||
|
|
||||
|
## Usage |
||||
|
|
||||
|
TODO: Include short and useful examples for package users. Add longer examples |
||||
|
to `/example` folder. |
||||
|
|
||||
|
```dart |
||||
|
const like = 'sample'; |
||||
|
``` |
||||
|
|
||||
|
## Additional information |
||||
|
|
||||
|
TODO: Tell users more about the package: where to find more information, how to |
||||
|
contribute to the package, how to file issues, what response they can expect |
||||
|
from the package authors, and more. |
||||
@ -0,0 +1,4 @@ |
|||||
|
include: package:flutter_lints/flutter.yaml |
||||
|
|
||||
|
# Additional information about this file can be found at |
||||
|
# https://dart.dev/guides/language/analysis-options |
||||
@ -0,0 +1,25 @@ |
|||||
|
package io.flutter.plugins; |
||||
|
|
||||
|
import io.flutter.plugin.common.PluginRegistry; |
||||
|
import io.flutter.plugins.pathprovider.PathProviderPlugin; |
||||
|
|
||||
|
/** |
||||
|
* Generated file. Do not edit. |
||||
|
*/ |
||||
|
public final class GeneratedPluginRegistrant { |
||||
|
public static void registerWith(PluginRegistry registry) { |
||||
|
if (alreadyRegisteredWith(registry)) { |
||||
|
return; |
||||
|
} |
||||
|
PathProviderPlugin.registerWith(registry.registrarFor("io.flutter.plugins.pathprovider.PathProviderPlugin")); |
||||
|
} |
||||
|
|
||||
|
private static boolean alreadyRegisteredWith(PluginRegistry registry) { |
||||
|
final String key = GeneratedPluginRegistrant.class.getCanonicalName(); |
||||
|
if (registry.hasPlugin(key)) { |
||||
|
return true; |
||||
|
} |
||||
|
registry.registrarFor(key); |
||||
|
return false; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,2 @@ |
|||||
|
sdk.dir=C:\\Users\\eddlevol\\AppData\\Local\\Android\\sdk |
||||
|
flutter.sdk=D:\\Sdk\\Flutter |
||||
@ -0,0 +1,14 @@ |
|||||
|
// This is a generated file; do not edit or check into version control. |
||||
|
FLUTTER_ROOT=D:\Sdk\Flutter |
||||
|
FLUTTER_APPLICATION_PATH=D:\C Sharp\Open-Sources\abp-next-admin\apps\flutter\account_core |
||||
|
COCOAPODS_PARALLEL_CODE_SIGN=true |
||||
|
FLUTTER_TARGET=lib\main.dart |
||||
|
FLUTTER_BUILD_DIR=build |
||||
|
FLUTTER_BUILD_NAME=0.0.1 |
||||
|
FLUTTER_BUILD_NUMBER=0.0.1 |
||||
|
EXCLUDED_ARCHS[sdk=iphonesimulator*]=i386 |
||||
|
EXCLUDED_ARCHS[sdk=iphoneos*]=armv7 |
||||
|
DART_OBFUSCATION=false |
||||
|
TRACK_WIDGET_CREATION=true |
||||
|
TREE_SHAKE_ICONS=false |
||||
|
PACKAGE_CONFIG=.dart_tool/package_config.json |
||||
@ -0,0 +1,13 @@ |
|||||
|
#!/bin/sh |
||||
|
# This is a generated file; do not edit or check into version control. |
||||
|
export "FLUTTER_ROOT=D:\Sdk\Flutter" |
||||
|
export "FLUTTER_APPLICATION_PATH=D:\C Sharp\Open-Sources\abp-next-admin\apps\flutter\account_core" |
||||
|
export "COCOAPODS_PARALLEL_CODE_SIGN=true" |
||||
|
export "FLUTTER_TARGET=lib\main.dart" |
||||
|
export "FLUTTER_BUILD_DIR=build" |
||||
|
export "FLUTTER_BUILD_NAME=0.0.1" |
||||
|
export "FLUTTER_BUILD_NUMBER=0.0.1" |
||||
|
export "DART_OBFUSCATION=false" |
||||
|
export "TRACK_WIDGET_CREATION=true" |
||||
|
export "TREE_SHAKE_ICONS=false" |
||||
|
export "PACKAGE_CONFIG=.dart_tool/package_config.json" |
||||
@ -0,0 +1,19 @@ |
|||||
|
//
|
||||
|
// Generated file. Do not edit.
|
||||
|
//
|
||||
|
|
||||
|
// clang-format off
|
||||
|
|
||||
|
#ifndef GeneratedPluginRegistrant_h |
||||
|
#define GeneratedPluginRegistrant_h |
||||
|
|
||||
|
#import <Flutter/Flutter.h> |
||||
|
|
||||
|
NS_ASSUME_NONNULL_BEGIN |
||||
|
|
||||
|
@interface GeneratedPluginRegistrant : NSObject |
||||
|
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry; |
||||
|
@end |
||||
|
|
||||
|
NS_ASSUME_NONNULL_END |
||||
|
#endif /* GeneratedPluginRegistrant_h */ |
||||
@ -0,0 +1,21 @@ |
|||||
|
// |
||||
|
// Generated file. Do not edit. |
||||
|
// |
||||
|
|
||||
|
// clang-format off |
||||
|
|
||||
|
#import "GeneratedPluginRegistrant.h" |
||||
|
|
||||
|
#if __has_include(<path_provider_foundation/PathProviderPlugin.h>) |
||||
|
#import <path_provider_foundation/PathProviderPlugin.h> |
||||
|
#else |
||||
|
@import path_provider_foundation; |
||||
|
#endif |
||||
|
|
||||
|
@implementation GeneratedPluginRegistrant |
||||
|
|
||||
|
+ (void)registerWithRegistry:(NSObject<FlutterPluginRegistry>*)registry { |
||||
|
[PathProviderPlugin registerWithRegistrar:[registry registrarForPlugin:@"PathProviderPlugin"]]; |
||||
|
} |
||||
|
|
||||
|
@end |
||||
@ -0,0 +1,5 @@ |
|||||
|
import 'package:core/modularity/index.dart'; |
||||
|
|
||||
|
class AccountCoreModule extends Module { |
||||
|
|
||||
|
} |
||||
@ -0,0 +1 @@ |
|||||
|
export 'account.core.module.dart'; |
||||
@ -0,0 +1,89 @@ |
|||||
|
import 'package:core/models/abp.dto.dart'; |
||||
|
import 'package:json_annotation/json_annotation.dart'; |
||||
|
|
||||
|
part 'profile.dto.g.dart'; |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class ProfileDto extends ExtensibleObject { |
||||
|
ProfileDto({ |
||||
|
this.userName, |
||||
|
this.email, |
||||
|
this.name, |
||||
|
this.surname, |
||||
|
this.phoneNumber, |
||||
|
this.concurrencyStamp, |
||||
|
this.isExternal = false, |
||||
|
this.hasPassword = false, |
||||
|
super.extraProperties, |
||||
|
}); |
||||
|
String? userName; |
||||
|
String? email; |
||||
|
String? name; |
||||
|
String? surname; |
||||
|
String? phoneNumber; |
||||
|
bool isExternal; |
||||
|
bool hasPassword; |
||||
|
String? concurrencyStamp; |
||||
|
|
||||
|
factory ProfileDto.fromJson(Map<String, dynamic> json) => _$ProfileDtoFromJson(json); |
||||
|
|
||||
|
@override |
||||
|
Map<String, dynamic> toJson() => _$ProfileDtoToJson(this); |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class ChangePasswordInput { |
||||
|
ChangePasswordInput({ |
||||
|
this.currentPassword, |
||||
|
required this.newPassword, |
||||
|
}); |
||||
|
String? currentPassword; |
||||
|
String newPassword; |
||||
|
|
||||
|
factory ChangePasswordInput.fromJson(Map<String, dynamic> json) => _$ChangePasswordInputFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$ChangePasswordInputToJson(this); |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class RegisterDto extends ExtensibleObject { |
||||
|
RegisterDto({ |
||||
|
required this.userName, |
||||
|
required this.emailAddress, |
||||
|
required this.password, |
||||
|
this.appName = 'abp-flutter', |
||||
|
super.extraProperties, |
||||
|
}); |
||||
|
String userName; |
||||
|
String emailAddress; |
||||
|
String password; |
||||
|
String appName; |
||||
|
|
||||
|
factory RegisterDto.fromJson(Map<String, dynamic> json) => _$RegisterDtoFromJson(json); |
||||
|
|
||||
|
@override |
||||
|
Map<String, dynamic> toJson() => _$RegisterDtoToJson(this); |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class UpdateProfileDto extends ExtensibleObject { |
||||
|
UpdateProfileDto({ |
||||
|
this.userName, |
||||
|
this.email, |
||||
|
this.name, |
||||
|
this.surname, |
||||
|
this.phoneNumber, |
||||
|
this.concurrencyStamp, |
||||
|
super.extraProperties, |
||||
|
}); |
||||
|
String? userName; |
||||
|
String? email; |
||||
|
String? name; |
||||
|
String? surname; |
||||
|
String? phoneNumber; |
||||
|
String? concurrencyStamp; |
||||
|
|
||||
|
factory UpdateProfileDto.fromJson(Map<String, dynamic> json) => _$UpdateProfileDtoFromJson(json); |
||||
|
|
||||
|
@override |
||||
|
Map<String, dynamic> toJson() => _$UpdateProfileDtoToJson(this); |
||||
|
} |
||||
@ -0,0 +1,84 @@ |
|||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND |
||||
|
|
||||
|
part of 'profile.dto.dart'; |
||||
|
|
||||
|
// ************************************************************************** |
||||
|
// JsonSerializableGenerator |
||||
|
// ************************************************************************** |
||||
|
|
||||
|
ProfileDto _$ProfileDtoFromJson(Map<String, dynamic> json) => ProfileDto( |
||||
|
userName: json['userName'] as String?, |
||||
|
email: json['email'] as String?, |
||||
|
name: json['name'] as String?, |
||||
|
surname: json['surname'] as String?, |
||||
|
phoneNumber: json['phoneNumber'] as String?, |
||||
|
concurrencyStamp: json['concurrencyStamp'] as String?, |
||||
|
isExternal: json['isExternal'] as bool? ?? false, |
||||
|
hasPassword: json['hasPassword'] as bool? ?? false, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ProfileDtoToJson(ProfileDto instance) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
'userName': instance.userName, |
||||
|
'email': instance.email, |
||||
|
'name': instance.name, |
||||
|
'surname': instance.surname, |
||||
|
'phoneNumber': instance.phoneNumber, |
||||
|
'isExternal': instance.isExternal, |
||||
|
'hasPassword': instance.hasPassword, |
||||
|
'concurrencyStamp': instance.concurrencyStamp, |
||||
|
}; |
||||
|
|
||||
|
ChangePasswordInput _$ChangePasswordInputFromJson(Map<String, dynamic> json) => |
||||
|
ChangePasswordInput( |
||||
|
currentPassword: json['currentPassword'] as String?, |
||||
|
newPassword: json['newPassword'] as String, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ChangePasswordInputToJson( |
||||
|
ChangePasswordInput instance) => |
||||
|
<String, dynamic>{ |
||||
|
'currentPassword': instance.currentPassword, |
||||
|
'newPassword': instance.newPassword, |
||||
|
}; |
||||
|
|
||||
|
RegisterDto _$RegisterDtoFromJson(Map<String, dynamic> json) => RegisterDto( |
||||
|
userName: json['userName'] as String, |
||||
|
emailAddress: json['emailAddress'] as String, |
||||
|
password: json['password'] as String, |
||||
|
appName: json['appName'] as String? ?? 'abp-flutter', |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$RegisterDtoToJson(RegisterDto instance) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
'userName': instance.userName, |
||||
|
'emailAddress': instance.emailAddress, |
||||
|
'password': instance.password, |
||||
|
'appName': instance.appName, |
||||
|
}; |
||||
|
|
||||
|
UpdateProfileDto _$UpdateProfileDtoFromJson(Map<String, dynamic> json) => |
||||
|
UpdateProfileDto( |
||||
|
userName: json['userName'] as String?, |
||||
|
email: json['email'] as String?, |
||||
|
name: json['name'] as String?, |
||||
|
surname: json['surname'] as String?, |
||||
|
phoneNumber: json['phoneNumber'] as String?, |
||||
|
concurrencyStamp: json['concurrencyStamp'] as String?, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$UpdateProfileDtoToJson(UpdateProfileDto instance) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
'userName': instance.userName, |
||||
|
'email': instance.email, |
||||
|
'name': instance.name, |
||||
|
'surname': instance.surname, |
||||
|
'phoneNumber': instance.phoneNumber, |
||||
|
'concurrencyStamp': instance.concurrencyStamp, |
||||
|
}; |
||||
@ -0,0 +1 @@ |
|||||
|
C:/Users/eddlevol/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/path_provider_linux-2.1.11/ |
||||
@ -0,0 +1,11 @@ |
|||||
|
//
|
||||
|
// Generated file. Do not edit.
|
||||
|
//
|
||||
|
|
||||
|
// clang-format off
|
||||
|
|
||||
|
#include "generated_plugin_registrant.h" |
||||
|
|
||||
|
|
||||
|
void fl_register_plugins(FlPluginRegistry* registry) { |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
//
|
||||
|
// Generated file. Do not edit.
|
||||
|
//
|
||||
|
|
||||
|
// clang-format off
|
||||
|
|
||||
|
#ifndef GENERATED_PLUGIN_REGISTRANT_ |
||||
|
#define GENERATED_PLUGIN_REGISTRANT_ |
||||
|
|
||||
|
#include <flutter_linux/flutter_linux.h> |
||||
|
|
||||
|
// Registers Flutter plugins.
|
||||
|
void fl_register_plugins(FlPluginRegistry* registry); |
||||
|
|
||||
|
#endif // GENERATED_PLUGIN_REGISTRANT_
|
||||
@ -0,0 +1,23 @@ |
|||||
|
# |
||||
|
# Generated file, do not edit. |
||||
|
# |
||||
|
|
||||
|
list(APPEND FLUTTER_PLUGIN_LIST |
||||
|
) |
||||
|
|
||||
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST |
||||
|
) |
||||
|
|
||||
|
set(PLUGIN_BUNDLED_LIBRARIES) |
||||
|
|
||||
|
foreach(plugin ${FLUTTER_PLUGIN_LIST}) |
||||
|
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/linux plugins/${plugin}) |
||||
|
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) |
||||
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) |
||||
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) |
||||
|
endforeach(plugin) |
||||
|
|
||||
|
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) |
||||
|
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/linux plugins/${ffi_plugin}) |
||||
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) |
||||
|
endforeach(ffi_plugin) |
||||
@ -0,0 +1,11 @@ |
|||||
|
// This is a generated file; do not edit or check into version control. |
||||
|
FLUTTER_ROOT=D:\Sdk\Flutter |
||||
|
FLUTTER_APPLICATION_PATH=D:\C Sharp\Open-Sources\abp-next-admin\apps\flutter\account_core |
||||
|
COCOAPODS_PARALLEL_CODE_SIGN=true |
||||
|
FLUTTER_BUILD_DIR=build |
||||
|
FLUTTER_BUILD_NAME=0.0.1 |
||||
|
FLUTTER_BUILD_NUMBER=0.0.1 |
||||
|
DART_OBFUSCATION=false |
||||
|
TRACK_WIDGET_CREATION=true |
||||
|
TREE_SHAKE_ICONS=false |
||||
|
PACKAGE_CONFIG=.dart_tool/package_config.json |
||||
@ -0,0 +1,12 @@ |
|||||
|
#!/bin/sh |
||||
|
# This is a generated file; do not edit or check into version control. |
||||
|
export "FLUTTER_ROOT=D:\Sdk\Flutter" |
||||
|
export "FLUTTER_APPLICATION_PATH=D:\C Sharp\Open-Sources\abp-next-admin\apps\flutter\account_core" |
||||
|
export "COCOAPODS_PARALLEL_CODE_SIGN=true" |
||||
|
export "FLUTTER_BUILD_DIR=build" |
||||
|
export "FLUTTER_BUILD_NAME=0.0.1" |
||||
|
export "FLUTTER_BUILD_NUMBER=0.0.1" |
||||
|
export "DART_OBFUSCATION=false" |
||||
|
export "TRACK_WIDGET_CREATION=true" |
||||
|
export "TREE_SHAKE_ICONS=false" |
||||
|
export "PACKAGE_CONFIG=.dart_tool/package_config.json" |
||||
@ -0,0 +1,62 @@ |
|||||
|
name: account_core |
||||
|
description: A new Flutter package project. |
||||
|
version: 0.0.1 |
||||
|
homepage: |
||||
|
publish_to: none |
||||
|
|
||||
|
environment: |
||||
|
sdk: '>=3.0.5 <4.0.0' |
||||
|
flutter: ">=1.17.0" |
||||
|
|
||||
|
dependencies: |
||||
|
flutter: |
||||
|
sdk: flutter |
||||
|
|
||||
|
core: |
||||
|
path: '../core' |
||||
|
json_annotation: ^4.8.1 |
||||
|
|
||||
|
dev_dependencies: |
||||
|
flutter_test: |
||||
|
sdk: flutter |
||||
|
flutter_lints: ^2.0.0 |
||||
|
|
||||
|
build_runner: ^2.4.5 |
||||
|
json_serializable: ^6.7.0 |
||||
|
|
||||
|
# For information on the generic Dart part of this file, see the |
||||
|
# following page: https://dart.dev/tools/pub/pubspec |
||||
|
|
||||
|
# The following section is specific to Flutter packages. |
||||
|
flutter: |
||||
|
|
||||
|
# To add assets to your package, add an assets section, like this: |
||||
|
# assets: |
||||
|
# - images/a_dot_burr.jpeg |
||||
|
# - images/a_dot_ham.jpeg |
||||
|
# |
||||
|
# For details regarding assets in packages, see |
||||
|
# https://flutter.dev/assets-and-images/#from-packages |
||||
|
# |
||||
|
# An image asset can refer to one or more resolution-specific "variants", see |
||||
|
# https://flutter.dev/assets-and-images/#resolution-aware |
||||
|
|
||||
|
# To add custom fonts to your package, add a fonts section here, |
||||
|
# in this "flutter" section. Each entry in this list should have a |
||||
|
# "family" key with the font family name, and a "fonts" key with a |
||||
|
# list giving the asset and other descriptors for the font. For |
||||
|
# example: |
||||
|
# fonts: |
||||
|
# - family: Schyler |
||||
|
# fonts: |
||||
|
# - asset: fonts/Schyler-Regular.ttf |
||||
|
# - asset: fonts/Schyler-Italic.ttf |
||||
|
# style: italic |
||||
|
# - family: Trajan Pro |
||||
|
# fonts: |
||||
|
# - asset: fonts/TrajanPro.ttf |
||||
|
# - asset: fonts/TrajanPro_Bold.ttf |
||||
|
# weight: 700 |
||||
|
# |
||||
|
# For details regarding fonts in packages, see |
||||
|
# https://flutter.dev/custom-fonts/#from-packages |
||||
@ -0,0 +1,11 @@ |
|||||
|
//
|
||||
|
// Generated file. Do not edit.
|
||||
|
//
|
||||
|
|
||||
|
// clang-format off
|
||||
|
|
||||
|
#include "generated_plugin_registrant.h" |
||||
|
|
||||
|
|
||||
|
void RegisterPlugins(flutter::PluginRegistry* registry) { |
||||
|
} |
||||
@ -0,0 +1,15 @@ |
|||||
|
//
|
||||
|
// Generated file. Do not edit.
|
||||
|
//
|
||||
|
|
||||
|
// clang-format off
|
||||
|
|
||||
|
#ifndef GENERATED_PLUGIN_REGISTRANT_ |
||||
|
#define GENERATED_PLUGIN_REGISTRANT_ |
||||
|
|
||||
|
#include <flutter/plugin_registry.h> |
||||
|
|
||||
|
// Registers Flutter plugins.
|
||||
|
void RegisterPlugins(flutter::PluginRegistry* registry); |
||||
|
|
||||
|
#endif // GENERATED_PLUGIN_REGISTRANT_
|
||||
@ -0,0 +1,23 @@ |
|||||
|
# |
||||
|
# Generated file, do not edit. |
||||
|
# |
||||
|
|
||||
|
list(APPEND FLUTTER_PLUGIN_LIST |
||||
|
) |
||||
|
|
||||
|
list(APPEND FLUTTER_FFI_PLUGIN_LIST |
||||
|
) |
||||
|
|
||||
|
set(PLUGIN_BUNDLED_LIBRARIES) |
||||
|
|
||||
|
foreach(plugin ${FLUTTER_PLUGIN_LIST}) |
||||
|
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) |
||||
|
target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) |
||||
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES $<TARGET_FILE:${plugin}_plugin>) |
||||
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) |
||||
|
endforeach(plugin) |
||||
|
|
||||
|
foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) |
||||
|
add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) |
||||
|
list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) |
||||
|
endforeach(ffi_plugin) |
||||
@ -1,6 +1,6 @@ |
|||||
# This is a generated file; do not edit or check into version control. |
# This is a generated file; do not edit or check into version control. |
||||
path_provider=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider-2.0.15\\ |
path_provider=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider-2.0.15\\ |
||||
path_provider_android=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_android-2.0.27\\ |
path_provider_android=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_android-2.0.27\\ |
||||
path_provider_foundation=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_foundation-2.2.3\\ |
path_provider_foundation=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_foundation-2.2.3\\ |
||||
path_provider_linux=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_linux-2.1.11\\ |
path_provider_linux=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_linux-2.1.11\\ |
||||
path_provider_windows=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_windows-2.1.7\\ |
path_provider_windows=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_windows-2.1.7\\ |
||||
|
|||||
@ -1 +1 @@ |
|||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.0.27\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.1.11\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.1.7\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2023-07-16 10:47:15.025132","version":"3.10.5"} |
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.0.27\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.1.11\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.1.7\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2023-07-17 09:32:19.079179","version":"3.10.5"} |
||||
@ -1,2 +1,2 @@ |
|||||
sdk.dir=%UserProfile%\\AppData\\Local\\Android\\sdk |
sdk.dir=C:\\Users\\eddlevol\\AppData\\Local\\Android\\sdk |
||||
flutter.sdk=D:\\Sdk\\Flutter |
flutter.sdk=D:\\Sdk\\Flutter |
||||
@ -0,0 +1,7 @@ |
|||||
|
import 'package:core/core.module.dart'; |
||||
|
import 'package:core/modularity/index.dart'; |
||||
|
|
||||
|
class ComponentsModule extends Module { |
||||
|
@override |
||||
|
List<Module> get dependencies => [CoreModule()]; |
||||
|
} |
||||
@ -1,3 +0,0 @@ |
|||||
class AvatarConfig { |
|
||||
static String baseUrl = 'http://127.0.0.1:8080/blob/avatars'; |
|
||||
} |
|
||||
@ -1 +0,0 @@ |
|||||
export 'avatar.config.dart'; |
|
||||
@ -1,3 +1,3 @@ |
|||||
export './config/index.dart'; |
|
||||
export './pages/index.dart'; |
export './pages/index.dart'; |
||||
export './widgets/index.dart'; |
export './widgets/index.dart'; |
||||
|
export 'components.module.dart'; |
||||
@ -1 +1,2 @@ |
|||||
export 'page.base.dart'; |
export 'page.base.dart'; |
||||
|
export 'widget.base.dart'; |
||||
@ -0,0 +1,8 @@ |
|||||
|
import 'package:core/dependency/index.dart'; |
||||
|
import 'package:get/get.dart'; |
||||
|
|
||||
|
abstract class BaseWidget<Bloc extends GetLifeCycleBase?> extends GetWidget<Bloc> { |
||||
|
const BaseWidget({super.key}); |
||||
|
|
||||
|
Bloc get bloc => Injector.instance.get(tag: tag); |
||||
|
} |
||||
@ -0,0 +1,86 @@ |
|||||
|
import 'package:flutter/material.dart'; |
||||
|
|
||||
|
class BackToTop extends StatefulWidget { |
||||
|
const BackToTop({ |
||||
|
super.key, |
||||
|
required this.controller, |
||||
|
this.bottom, |
||||
|
}); |
||||
|
|
||||
|
final double? bottom; |
||||
|
final ScrollController controller; |
||||
|
|
||||
|
@override |
||||
|
State<StatefulWidget> createState() => _BackToTopState(); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
class _BackToTopState extends State<BackToTop> { |
||||
|
bool shown = false; |
||||
|
|
||||
|
@override |
||||
|
void initState() { |
||||
|
super.initState(); |
||||
|
widget.controller.addListener(isScroll); |
||||
|
} |
||||
|
|
||||
|
void isScroll() { |
||||
|
final bool toShow = widget.controller.offset > MediaQuery.of(context).size.height / 2; |
||||
|
if (toShow ^ shown) { |
||||
|
setState(() { |
||||
|
shown = toShow; |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@override |
||||
|
Widget build(BuildContext context) { |
||||
|
return Positioned( |
||||
|
bottom: MediaQuery.of(context).padding.bottom + (widget.bottom ?? 40), |
||||
|
right: 20, |
||||
|
child: Offstage( |
||||
|
offstage: !shown, |
||||
|
child: GestureDetector( |
||||
|
onTap: () { |
||||
|
widget.controller.animateTo(0, |
||||
|
duration: const Duration(milliseconds: 200), |
||||
|
curve: Curves.easeIn); |
||||
|
}, |
||||
|
child: Container( |
||||
|
height: 48, |
||||
|
width: 48, |
||||
|
alignment: const Alignment(0, 0), |
||||
|
decoration: BoxDecoration( |
||||
|
color: Theme.of(context).highlightColor, |
||||
|
borderRadius: const BorderRadius.all(Radius.circular(20)), |
||||
|
boxShadow: [ |
||||
|
BoxShadow( |
||||
|
color: const Color(0xFF000000).withOpacity(0.1), |
||||
|
blurRadius: 4, |
||||
|
spreadRadius: 0), |
||||
|
]), |
||||
|
child: Column( |
||||
|
children: <Widget>[ |
||||
|
Container( |
||||
|
margin: const EdgeInsets.only(top: 4), |
||||
|
child: Icon( |
||||
|
Icons.vertical_align_top, |
||||
|
size: 20, |
||||
|
color: Theme.of(context).hintColor, |
||||
|
), |
||||
|
), |
||||
|
Container( |
||||
|
margin: const EdgeInsets.only(top: 0), |
||||
|
child: const Text( |
||||
|
'Top', |
||||
|
//style: TextStyle(fontSize: 10, color: Color(0xFFA1A6AA)), |
||||
|
), |
||||
|
) |
||||
|
], |
||||
|
) |
||||
|
), |
||||
|
), |
||||
|
) |
||||
|
); |
||||
|
} |
||||
|
} |
||||
@ -1,4 +1,5 @@ |
|||||
export 'avatar/index.dart'; |
export 'avatar/index.dart'; |
||||
export 'action-button/index.dart'; |
export 'action-button/index.dart'; |
||||
|
export 'back-to-top/index.dart'; |
||||
export 'bottom-button/index.dart'; |
export 'bottom-button/index.dart'; |
||||
export 'empty/index.dart'; |
export 'empty/index.dart'; |
||||
@ -0,0 +1 @@ |
|||||
|
C:/Users/eddlevol/AppData/Local/Pub/Cache/hosted/pub.flutter-io.cn/path_provider_linux-2.1.11/ |
||||
@ -1,6 +1,6 @@ |
|||||
# This is a generated file; do not edit or check into version control. |
# This is a generated file; do not edit or check into version control. |
||||
path_provider=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider-2.0.15\\ |
path_provider=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider-2.0.15\\ |
||||
path_provider_android=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_android-2.0.27\\ |
path_provider_android=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_android-2.0.27\\ |
||||
path_provider_foundation=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_foundation-2.2.3\\ |
path_provider_foundation=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_foundation-2.2.3\\ |
||||
path_provider_linux=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_linux-2.1.11\\ |
path_provider_linux=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_linux-2.1.11\\ |
||||
path_provider_windows=%UserProfile%\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_windows-2.1.7\\ |
path_provider_windows=C:\\Users\\eddlevol\\AppData\\Local\\Pub\\Cache\\hosted\\pub.flutter-io.cn\\path_provider_windows-2.1.7\\ |
||||
|
|||||
@ -1 +1 @@ |
|||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.0.27\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.1.11\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.1.7\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2023-07-16 08:23:33.451996","version":"3.10.5"} |
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"android":[{"name":"path_provider_android","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_android-2.0.27\\\\","native_build":true,"dependencies":[]}],"macos":[{"name":"path_provider_foundation","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_foundation-2.2.3\\\\","shared_darwin_source":true,"native_build":true,"dependencies":[]}],"linux":[{"name":"path_provider_linux","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_linux-2.1.11\\\\","native_build":false,"dependencies":[]}],"windows":[{"name":"path_provider_windows","path":"C:\\\\Users\\\\eddlevol\\\\AppData\\\\Local\\\\Pub\\\\Cache\\\\hosted\\\\pub.flutter-io.cn\\\\path_provider_windows-2.1.7\\\\","native_build":false,"dependencies":[]}],"web":[]},"dependencyGraph":[{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2023-07-19 11:21:40.892667","version":"3.10.5"} |
||||
@ -1,2 +1,2 @@ |
|||||
sdk.dir=%UserProfile%\\AppData\\Local\\Android\\sdk |
sdk.dir=C:\\Users\\eddlevol\\AppData\\Local\\Android\\sdk |
||||
flutter.sdk=D:\\Sdk\\Flutter |
flutter.sdk=D:\\Sdk\\Flutter |
||||
@ -1,2 +1,3 @@ |
|||||
export 'copy.with.dart'; |
export 'copy.with.dart'; |
||||
export 'logging.dart'; |
export 'logging.dart'; |
||||
|
export 'signalr.service.dart'; |
||||
@ -0,0 +1,84 @@ |
|||||
|
import 'dart:async'; |
||||
|
|
||||
|
import 'package:core/models/common.dart'; |
||||
|
import 'package:core/utils/logging.dart'; |
||||
|
|
||||
|
abstract class SignalrService { |
||||
|
|
||||
|
Future<void>? start(); |
||||
|
|
||||
|
Future<void> stop(); |
||||
|
|
||||
|
StreamSubscription<Exception?> onClose(Function(Exception?) listen, { bool Function(Exception?)? filter}); |
||||
|
|
||||
|
StreamSubscription<Exception?> onReconnecting(Function(Exception?) listen, { bool Function(Exception?)? filter}); |
||||
|
|
||||
|
StreamSubscription<String?> onReconnected(Function(String?) listen, { bool Function(String?)? filter}); |
||||
|
|
||||
|
Stream<SignalrMessage> subscribe(String methodName); |
||||
|
|
||||
|
void unsubscribe(String methodName); |
||||
|
|
||||
|
Future<void> send(String methodName, { List<Object>? args }); |
||||
|
|
||||
|
Future<dynamic> invoke(String methodName, { List<Object>? args }); |
||||
|
} |
||||
|
|
||||
|
class NullSignalrService extends SignalrService { |
||||
|
@override |
||||
|
Future invoke(String methodName, {List<Object>? args}) { |
||||
|
logger.warn('signalr - invoke method not implemented!'); |
||||
|
return Future.value(); |
||||
|
} |
||||
|
|
||||
|
@override |
||||
|
StreamSubscription<Exception?> onClose(Function(Exception? p1) listen, {bool Function(Exception? p1)? filter}) { |
||||
|
logger.warn('signalr - onClose method not implemented!'); |
||||
|
Exception? nullValue; |
||||
|
return Stream.value(nullValue).listen(logger.debug); |
||||
|
} |
||||
|
|
||||
|
@override |
||||
|
StreamSubscription<String?> onReconnected(Function(String? p1) listen, {bool Function(String? p1)? filter}) { |
||||
|
logger.warn('signalr - onReconnected method not implemented!'); |
||||
|
String? nullValue; |
||||
|
return Stream.value(nullValue).listen(logger.debug); |
||||
|
} |
||||
|
|
||||
|
@override |
||||
|
StreamSubscription<Exception?> onReconnecting(Function(Exception? p1) listen, {bool Function(Exception? p1)? filter}) { |
||||
|
logger.warn('signalr - onReconnecting method not implemented!'); |
||||
|
Exception? nullValue; |
||||
|
return Stream.value(nullValue).listen(logger.debug); |
||||
|
} |
||||
|
|
||||
|
@override |
||||
|
Future<void> send(String methodName, {List<Object>? args}) { |
||||
|
logger.warn('signalr - send method not implemented!'); |
||||
|
return Future.value(); |
||||
|
} |
||||
|
|
||||
|
@override |
||||
|
Future<void>? start() { |
||||
|
logger.warn('signalr - start method not implemented!'); |
||||
|
return Future.value(); |
||||
|
} |
||||
|
|
||||
|
@override |
||||
|
Future<void> stop() { |
||||
|
logger.warn('signalr - stop method not implemented!'); |
||||
|
return Future.value(); |
||||
|
} |
||||
|
|
||||
|
@override |
||||
|
Stream<SignalrMessage> subscribe(String methodName) { |
||||
|
logger.warn('signalr - subscribe method not implemented!'); |
||||
|
return Stream.value(SignalrMessage(methodName, [])); |
||||
|
} |
||||
|
|
||||
|
@override |
||||
|
void unsubscribe(String methodName) { |
||||
|
logger.warn('signalr - unsubscribe method not implemented!'); |
||||
|
} |
||||
|
|
||||
|
} |
||||
@ -1,107 +0,0 @@ |
|||||
import 'package:json_annotation/json_annotation.dart'; |
|
||||
import 'package:flutter/foundation.dart'; |
|
||||
import 'package:flutter_app_environment/flutter_app_environment.dart' as envlib; |
|
||||
|
|
||||
part 'env.config.g.dart'; |
|
||||
|
|
||||
@JsonSerializable(createToJson: false) |
|
||||
class EnvConfig { |
|
||||
EnvConfig({ |
|
||||
required this.clientId, |
|
||||
this.clientSecret, |
|
||||
required this.authority, |
|
||||
required this.baseUrl, |
|
||||
this.uploadFilesUrl, |
|
||||
this.staticFilesUrl, |
|
||||
this.tenantKey = '__tenant', |
|
||||
this.defaultLanguage = 'en', |
|
||||
this.notifications, |
|
||||
}); |
|
||||
String clientId; |
|
||||
String? clientSecret; |
|
||||
String authority; |
|
||||
String baseUrl; |
|
||||
String? uploadFilesUrl; |
|
||||
String? staticFilesUrl; |
|
||||
String? tenantKey; |
|
||||
String? defaultLanguage; |
|
||||
NotificationConfig? notifications; |
|
||||
|
|
||||
factory EnvConfig.fromJson(Map<String, dynamic> json) => _$EnvConfigFromJson(json); |
|
||||
} |
|
||||
|
|
||||
@JsonSerializable(createToJson: false) |
|
||||
class NotificationConfig { |
|
||||
NotificationConfig({ |
|
||||
this.android, |
|
||||
this.darwin, |
|
||||
this.linux, |
|
||||
}); |
|
||||
AndroidNotification? android; |
|
||||
DarwinNotification? darwin; |
|
||||
LinuxNotification? linux; |
|
||||
|
|
||||
factory NotificationConfig.fromJson(Map<String, dynamic> json) => _$NotificationConfigFromJson(json); |
|
||||
} |
|
||||
|
|
||||
@JsonSerializable(createToJson: false) |
|
||||
class LinuxNotification { |
|
||||
LinuxNotification({ |
|
||||
required this.defaultActionName, |
|
||||
}); |
|
||||
String defaultActionName; |
|
||||
|
|
||||
factory LinuxNotification.fromJson(Map<String, dynamic> json) => _$LinuxNotificationFromJson(json); |
|
||||
} |
|
||||
|
|
||||
@JsonSerializable(createToJson: false) |
|
||||
class AndroidNotification { |
|
||||
AndroidNotification({ |
|
||||
required this.channelId, |
|
||||
required this.channelName, |
|
||||
this.channelDescription, |
|
||||
}); |
|
||||
String channelId; |
|
||||
String channelName; |
|
||||
String? channelDescription; |
|
||||
|
|
||||
factory AndroidNotification.fromJson(Map<String, dynamic> json) => _$AndroidNotificationFromJson(json); |
|
||||
} |
|
||||
|
|
||||
@JsonSerializable(createToJson: false) |
|
||||
class DarwinNotification { |
|
||||
DarwinNotification(); |
|
||||
|
|
||||
factory DarwinNotification.fromJson(Map<String, dynamic> json) => _$DarwinNotificationFromJson(json); |
|
||||
} |
|
||||
|
|
||||
enum Env { |
|
||||
development('DEV', 'Development'), |
|
||||
profile('PROF', 'Profile'), |
|
||||
production('PROD', 'Production'); |
|
||||
|
|
||||
final String name; |
|
||||
final String value; |
|
||||
const Env(this.name, this.value); |
|
||||
|
|
||||
} |
|
||||
|
|
||||
class Environment { |
|
||||
static Future<void> initAsync() async { |
|
||||
var envType = envlib.EnvironmentType.development; |
|
||||
if (kReleaseMode) { |
|
||||
envType = envlib.EnvironmentType.production; |
|
||||
} else if (kProfileMode) { |
|
||||
envType = envlib.EnvironmentType.test; |
|
||||
} |
|
||||
|
|
||||
await envlib.Environment.initFromJson<EnvConfig>( |
|
||||
environmentType: envType, |
|
||||
fromJson: EnvConfig.fromJson, |
|
||||
); |
|
||||
|
|
||||
Environment.current = envlib.Environment<EnvConfig>.instance().config; |
|
||||
} |
|
||||
|
|
||||
static late EnvConfig current; |
|
||||
} |
|
||||
@ -1,51 +0,0 @@ |
|||||
// GENERATED CODE - DO NOT MODIFY BY HAND |
|
||||
|
|
||||
part of 'env.config.dart'; |
|
||||
|
|
||||
// ************************************************************************** |
|
||||
// JsonSerializableGenerator |
|
||||
// ************************************************************************** |
|
||||
|
|
||||
EnvConfig _$EnvConfigFromJson(Map<String, dynamic> json) => EnvConfig( |
|
||||
clientId: json['clientId'] as String, |
|
||||
clientSecret: json['clientSecret'] as String?, |
|
||||
authority: json['authority'] as String, |
|
||||
baseUrl: json['baseUrl'] as String, |
|
||||
uploadFilesUrl: json['uploadFilesUrl'] as String?, |
|
||||
staticFilesUrl: json['staticFilesUrl'] as String?, |
|
||||
tenantKey: json['tenantKey'] as String? ?? '__tenant', |
|
||||
defaultLanguage: json['defaultLanguage'] as String? ?? 'en', |
|
||||
notifications: json['notifications'] == null |
|
||||
? null |
|
||||
: NotificationConfig.fromJson( |
|
||||
json['notifications'] as Map<String, dynamic>), |
|
||||
); |
|
||||
|
|
||||
NotificationConfig _$NotificationConfigFromJson(Map<String, dynamic> json) => |
|
||||
NotificationConfig( |
|
||||
android: json['android'] == null |
|
||||
? null |
|
||||
: AndroidNotification.fromJson( |
|
||||
json['android'] as Map<String, dynamic>), |
|
||||
darwin: json['darwin'] == null |
|
||||
? null |
|
||||
: DarwinNotification.fromJson(json['darwin'] as Map<String, dynamic>), |
|
||||
linux: json['linux'] == null |
|
||||
? null |
|
||||
: LinuxNotification.fromJson(json['linux'] as Map<String, dynamic>), |
|
||||
); |
|
||||
|
|
||||
LinuxNotification _$LinuxNotificationFromJson(Map<String, dynamic> json) => |
|
||||
LinuxNotification( |
|
||||
defaultActionName: json['defaultActionName'] as String, |
|
||||
); |
|
||||
|
|
||||
AndroidNotification _$AndroidNotificationFromJson(Map<String, dynamic> json) => |
|
||||
AndroidNotification( |
|
||||
channelId: json['channelId'] as String, |
|
||||
channelName: json['channelName'] as String, |
|
||||
channelDescription: json['channelDescription'] as String?, |
|
||||
); |
|
||||
|
|
||||
DarwinNotification _$DarwinNotificationFromJson(Map<String, dynamic> json) => |
|
||||
DarwinNotification(); |
|
||||
@ -1 +0,0 @@ |
|||||
export 'env.config.dart'; |
|
||||
@ -1,35 +1,34 @@ |
|||||
import 'package:core/dependency/injector.dart'; |
|
||||
import 'package:core/modularity/module.dart'; |
import 'package:core/modularity/module.dart'; |
||||
import 'package:core/services/index.dart'; |
import 'package:core/services/index.dart'; |
||||
import 'proxy/index.dart'; |
import 'proxy/index.dart'; |
||||
|
|
||||
class CoreModule extends Module { |
class CoreModule extends Module { |
||||
|
|
||||
@override |
@override |
||||
Future<void> configureServicesAsync() async { |
Future<void> configureServicesAsync() async { |
||||
await injectAsync<StorageService>(() async { |
await injectAsync<StorageService>((injector) async { |
||||
if (await GetxStorageService.init()) { |
if (await GetxStorageService.init()) { |
||||
return GetxStorageService(); |
return GetxStorageService(injector); |
||||
} |
} |
||||
return StorageService(); |
return StorageService(injector); |
||||
}, permanent: true); |
}, permanent: true); |
||||
await super.configureServicesAsync(); |
await super.configureServicesAsync(); |
||||
} |
} |
||||
|
|
||||
@override |
@override |
||||
void configureServices() { |
void configureServices() { |
||||
inject(Injector.instance); |
inject<CoreModule>(this, permanent: true); |
||||
inject<CoreModule>(this); |
inject(EnvironmentService(injector), permanent: true); |
||||
inject(ConfigStateService(), permanent: true); |
inject(ConfigStateService(injector), permanent: true); |
||||
inject(ThemeService(), permanent: true); |
inject(ThemeService(injector), permanent: true); |
||||
|
inject(ErrorReporterService(), permanent: true); |
||||
|
|
||||
lazyInject(() => SessionService(), fenix: true); |
lazyInject((injector) => SubscriptionService(injector)); |
||||
lazyInject(() => SubscriptionService(), fenix: true); |
lazyInject((injector) => SessionService(injector), fenix: true); |
||||
lazyInject(() => LanguageService(), fenix: true); |
lazyInject((injector) => LanguageService(injector), fenix: true); |
||||
lazyInject(() => LocalizationService(), fenix: true); |
lazyInject((injector) => LocalizationService(injector), fenix: true); |
||||
lazyInject(() => AbpTenantService(), fenix: true); |
lazyInject((injector) => AbpTenantService(injector), fenix: true); |
||||
lazyInject(() => AbpApiDefinitionService(), fenix: true); |
lazyInject((injector) => AbpApiDefinitionService(injector), fenix: true); |
||||
lazyInject(() => AbpApplicationLocalizationService(), fenix: true); |
lazyInject((injector) => AbpApplicationLocalizationService(injector), fenix: true); |
||||
lazyInject(() => AbpApplicationConfigurationService(), fenix: true); |
lazyInject((injector) => AbpApplicationConfigurationService(injector), fenix: true); |
||||
} |
} |
||||
} |
} |
||||
@ -1 +1,2 @@ |
|||||
export 'injector.dart'; |
export 'injector.dart'; |
||||
|
export 'injector.builder.dart'; |
||||
@ -0,0 +1,5 @@ |
|||||
|
import 'injector.dart'; |
||||
|
|
||||
|
typedef InjectorBuilderFactory<T> = T Function(Injector injector); |
||||
|
|
||||
|
typedef AsyncInjectorBuilderFactory<T> = Future<T> Function(Injector injector); |
||||
@ -1,3 +1,4 @@ |
|||||
export 'api.abp.wrapper.error.interceptor.dart'; |
export 'api.abp.wrapper.error.interceptor.dart'; |
||||
|
export 'api.authorization.interceptor.dart'; |
||||
export 'api.wrapper.result.interceptor.dart'; |
export 'api.wrapper.result.interceptor.dart'; |
||||
export 'api.logger.interceptor.dart'; |
export 'api.logger.interceptor.dart'; |
||||
@ -0,0 +1,627 @@ |
|||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND |
||||
|
|
||||
|
part of 'abp.dto.dart'; |
||||
|
|
||||
|
// ************************************************************************** |
||||
|
// JsonSerializableGenerator |
||||
|
// ************************************************************************** |
||||
|
|
||||
|
LocalizableStringInfo _$LocalizableStringInfoFromJson( |
||||
|
Map<String, dynamic> json) => |
||||
|
LocalizableStringInfo( |
||||
|
resourceName: (json['resourceName'] ?? json['ResourceName']) as String, |
||||
|
name: (json['name'] ?? json['Name']) as String, |
||||
|
values: (json['values'] ?? json['Values']) as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$LocalizableStringInfoToJson( |
||||
|
LocalizableStringInfo instance) => |
||||
|
<String, dynamic>{ |
||||
|
'resourceName': instance.resourceName, |
||||
|
'name': instance.name, |
||||
|
'values': instance.values, |
||||
|
}; |
||||
|
|
||||
|
ExtensibleObject _$ExtensibleObjectFromJson(Map<String, dynamic> json) => |
||||
|
ExtensibleObject( |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ExtensibleObjectToJson(ExtensibleObject instance) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
}; |
||||
|
|
||||
|
EntityDto<TPrimaryKey> _$EntityDtoFromJson<TPrimaryKey>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
) => |
||||
|
EntityDto<TPrimaryKey>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$EntityDtoToJson<TPrimaryKey>( |
||||
|
EntityDto<TPrimaryKey> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
}; |
||||
|
|
||||
|
CreationAuditedEntityDto<TPrimaryKey> |
||||
|
_$CreationAuditedEntityDtoFromJson<TPrimaryKey>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
) => |
||||
|
CreationAuditedEntityDto<TPrimaryKey>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$CreationAuditedEntityDtoToJson<TPrimaryKey>( |
||||
|
CreationAuditedEntityDto<TPrimaryKey> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
}; |
||||
|
|
||||
|
CreationAuditedEntityWithUserDto<TPrimaryKey, TUserDto> |
||||
|
_$CreationAuditedEntityWithUserDtoFromJson<TPrimaryKey, TUserDto>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
TUserDto Function(Object? json) fromJsonTUserDto, |
||||
|
) => |
||||
|
CreationAuditedEntityWithUserDto<TPrimaryKey, TUserDto>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
creator: fromJsonTUserDto(json['creator']), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> |
||||
|
_$CreationAuditedEntityWithUserDtoToJson<TPrimaryKey, TUserDto>( |
||||
|
CreationAuditedEntityWithUserDto<TPrimaryKey, TUserDto> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
Object? Function(TUserDto value) toJsonTUserDto, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
'creator': toJsonTUserDto(instance.creator), |
||||
|
}; |
||||
|
|
||||
|
AuditedEntityDto<TPrimaryKey> _$AuditedEntityDtoFromJson<TPrimaryKey>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
) => |
||||
|
AuditedEntityDto<TPrimaryKey>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
lastModificationTime: json['lastModificationTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['lastModificationTime'] as String), |
||||
|
lastModifierId: json['lastModifierId'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$AuditedEntityDtoToJson<TPrimaryKey>( |
||||
|
AuditedEntityDto<TPrimaryKey> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
'lastModificationTime': instance.lastModificationTime?.toIso8601String(), |
||||
|
'lastModifierId': instance.lastModifierId, |
||||
|
}; |
||||
|
|
||||
|
AuditedEntityWithUserDto<TPrimaryKey, TUserDto> |
||||
|
_$AuditedEntityWithUserDtoFromJson<TPrimaryKey, TUserDto>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
TUserDto Function(Object? json) fromJsonTUserDto, |
||||
|
) => |
||||
|
AuditedEntityWithUserDto<TPrimaryKey, TUserDto>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
creator: fromJsonTUserDto(json['creator']), |
||||
|
lastModifier: fromJsonTUserDto(json['lastModifier']), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
lastModificationTime: json['lastModificationTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['lastModificationTime'] as String), |
||||
|
lastModifierId: json['lastModifierId'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$AuditedEntityWithUserDtoToJson<TPrimaryKey, TUserDto>( |
||||
|
AuditedEntityWithUserDto<TPrimaryKey, TUserDto> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
Object? Function(TUserDto value) toJsonTUserDto, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
'lastModificationTime': instance.lastModificationTime?.toIso8601String(), |
||||
|
'lastModifierId': instance.lastModifierId, |
||||
|
'creator': toJsonTUserDto(instance.creator), |
||||
|
'lastModifier': toJsonTUserDto(instance.lastModifier), |
||||
|
}; |
||||
|
|
||||
|
FullAuditedEntityDto<TPrimaryKey> _$FullAuditedEntityDtoFromJson<TPrimaryKey>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
) => |
||||
|
FullAuditedEntityDto<TPrimaryKey>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
isDeleted: json['isDeleted'] as bool, |
||||
|
deleterId: json['deleterId'] as String?, |
||||
|
deletionTime: json['deletionTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['deletionTime'] as String), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
lastModificationTime: json['lastModificationTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['lastModificationTime'] as String), |
||||
|
lastModifierId: json['lastModifierId'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$FullAuditedEntityDtoToJson<TPrimaryKey>( |
||||
|
FullAuditedEntityDto<TPrimaryKey> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
'lastModificationTime': instance.lastModificationTime?.toIso8601String(), |
||||
|
'lastModifierId': instance.lastModifierId, |
||||
|
'isDeleted': instance.isDeleted, |
||||
|
'deleterId': instance.deleterId, |
||||
|
'deletionTime': instance.deletionTime?.toIso8601String(), |
||||
|
}; |
||||
|
|
||||
|
FullAuditedEntityWithUserDto<TPrimaryKey, TUserDto> |
||||
|
_$FullAuditedEntityWithUserDtoFromJson<TPrimaryKey, TUserDto>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
TUserDto Function(Object? json) fromJsonTUserDto, |
||||
|
) => |
||||
|
FullAuditedEntityWithUserDto<TPrimaryKey, TUserDto>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
creator: fromJsonTUserDto(json['creator']), |
||||
|
lastModifier: fromJsonTUserDto(json['lastModifier']), |
||||
|
deleter: fromJsonTUserDto(json['deleter']), |
||||
|
isDeleted: json['isDeleted'] as bool, |
||||
|
deleterId: json['deleterId'] as String?, |
||||
|
deletionTime: json['deletionTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['deletionTime'] as String), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
lastModificationTime: json['lastModificationTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['lastModificationTime'] as String), |
||||
|
lastModifierId: json['lastModifierId'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> |
||||
|
_$FullAuditedEntityWithUserDtoToJson<TPrimaryKey, TUserDto>( |
||||
|
FullAuditedEntityWithUserDto<TPrimaryKey, TUserDto> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
Object? Function(TUserDto value) toJsonTUserDto, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
'lastModificationTime': |
||||
|
instance.lastModificationTime?.toIso8601String(), |
||||
|
'lastModifierId': instance.lastModifierId, |
||||
|
'isDeleted': instance.isDeleted, |
||||
|
'deleterId': instance.deleterId, |
||||
|
'deletionTime': instance.deletionTime?.toIso8601String(), |
||||
|
'creator': toJsonTUserDto(instance.creator), |
||||
|
'lastModifier': toJsonTUserDto(instance.lastModifier), |
||||
|
'deleter': toJsonTUserDto(instance.deleter), |
||||
|
}; |
||||
|
|
||||
|
ExtensibleEntityDto<TPrimaryKey> _$ExtensibleEntityDtoFromJson<TPrimaryKey>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
) => |
||||
|
ExtensibleEntityDto<TPrimaryKey>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ExtensibleEntityDtoToJson<TPrimaryKey>( |
||||
|
ExtensibleEntityDto<TPrimaryKey> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
}; |
||||
|
|
||||
|
ExtensibleCreationAuditedEntityDto<TPrimaryKey> |
||||
|
_$ExtensibleCreationAuditedEntityDtoFromJson<TPrimaryKey>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
) => |
||||
|
ExtensibleCreationAuditedEntityDto<TPrimaryKey>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ExtensibleCreationAuditedEntityDtoToJson<TPrimaryKey>( |
||||
|
ExtensibleCreationAuditedEntityDto<TPrimaryKey> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
}; |
||||
|
|
||||
|
ExtensibleCreationAuditedEntityWithUserDto<TPrimaryKey, TUserDto> |
||||
|
_$ExtensibleCreationAuditedEntityWithUserDtoFromJson<TPrimaryKey, TUserDto>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
TUserDto Function(Object? json) fromJsonTUserDto, |
||||
|
) => |
||||
|
ExtensibleCreationAuditedEntityWithUserDto<TPrimaryKey, TUserDto>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
creator: fromJsonTUserDto(json['creator']), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> |
||||
|
_$ExtensibleCreationAuditedEntityWithUserDtoToJson<TPrimaryKey, TUserDto>( |
||||
|
ExtensibleCreationAuditedEntityWithUserDto<TPrimaryKey, TUserDto> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
Object? Function(TUserDto value) toJsonTUserDto, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
'creator': toJsonTUserDto(instance.creator), |
||||
|
}; |
||||
|
|
||||
|
ExtensibleAuditedEntityDto<TPrimaryKey> |
||||
|
_$ExtensibleAuditedEntityDtoFromJson<TPrimaryKey>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
) => |
||||
|
ExtensibleAuditedEntityDto<TPrimaryKey>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
lastModificationTime: json['lastModificationTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['lastModificationTime'] as String), |
||||
|
lastModifierId: json['lastModifierId'] as String?, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ExtensibleAuditedEntityDtoToJson<TPrimaryKey>( |
||||
|
ExtensibleAuditedEntityDto<TPrimaryKey> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
'lastModificationTime': instance.lastModificationTime?.toIso8601String(), |
||||
|
'lastModifierId': instance.lastModifierId, |
||||
|
}; |
||||
|
|
||||
|
ExtensibleAuditedEntityWithUserDto<TPrimaryKey, TUserDto> |
||||
|
_$ExtensibleAuditedEntityWithUserDtoFromJson<TPrimaryKey, TUserDto>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
TUserDto Function(Object? json) fromJsonTUserDto, |
||||
|
) => |
||||
|
ExtensibleAuditedEntityWithUserDto<TPrimaryKey, TUserDto>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
creator: fromJsonTUserDto(json['creator']), |
||||
|
lastModifier: fromJsonTUserDto(json['lastModifier']), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
lastModificationTime: json['lastModificationTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['lastModificationTime'] as String), |
||||
|
lastModifierId: json['lastModifierId'] as String?, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> |
||||
|
_$ExtensibleAuditedEntityWithUserDtoToJson<TPrimaryKey, TUserDto>( |
||||
|
ExtensibleAuditedEntityWithUserDto<TPrimaryKey, TUserDto> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
Object? Function(TUserDto value) toJsonTUserDto, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
'lastModificationTime': |
||||
|
instance.lastModificationTime?.toIso8601String(), |
||||
|
'lastModifierId': instance.lastModifierId, |
||||
|
'creator': toJsonTUserDto(instance.creator), |
||||
|
'lastModifier': toJsonTUserDto(instance.lastModifier), |
||||
|
}; |
||||
|
|
||||
|
ExtensibleFullAuditedEntityDto<TPrimaryKey> |
||||
|
_$ExtensibleFullAuditedEntityDtoFromJson<TPrimaryKey>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
) => |
||||
|
ExtensibleFullAuditedEntityDto<TPrimaryKey>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
isDeleted: json['isDeleted'] as bool, |
||||
|
deleterId: json['deleterId'] as String?, |
||||
|
deletionTime: json['deletionTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['deletionTime'] as String), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
lastModificationTime: json['lastModificationTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['lastModificationTime'] as String), |
||||
|
lastModifierId: json['lastModifierId'] as String?, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ExtensibleFullAuditedEntityDtoToJson<TPrimaryKey>( |
||||
|
ExtensibleFullAuditedEntityDto<TPrimaryKey> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
'lastModificationTime': instance.lastModificationTime?.toIso8601String(), |
||||
|
'lastModifierId': instance.lastModifierId, |
||||
|
'isDeleted': instance.isDeleted, |
||||
|
'deleterId': instance.deleterId, |
||||
|
'deletionTime': instance.deletionTime?.toIso8601String(), |
||||
|
}; |
||||
|
|
||||
|
ExtensibleFullAuditedEntityWithUserDto<TPrimaryKey, TUserDto> |
||||
|
_$ExtensibleFullAuditedEntityWithUserDtoFromJson<TPrimaryKey, TUserDto>( |
||||
|
Map<String, dynamic> json, |
||||
|
TPrimaryKey Function(Object? json) fromJsonTPrimaryKey, |
||||
|
TUserDto Function(Object? json) fromJsonTUserDto, |
||||
|
) => |
||||
|
ExtensibleFullAuditedEntityWithUserDto<TPrimaryKey, TUserDto>( |
||||
|
id: fromJsonTPrimaryKey(json['id']), |
||||
|
creator: fromJsonTUserDto(json['creator']), |
||||
|
lastModifier: fromJsonTUserDto(json['lastModifier']), |
||||
|
deleter: fromJsonTUserDto(json['deleter']), |
||||
|
isDeleted: json['isDeleted'] as bool, |
||||
|
deleterId: json['deleterId'] as String?, |
||||
|
deletionTime: json['deletionTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['deletionTime'] as String), |
||||
|
creationTime: DateTime.parse(json['creationTime'] as String), |
||||
|
creatorId: json['creatorId'] as String?, |
||||
|
lastModificationTime: json['lastModificationTime'] == null |
||||
|
? null |
||||
|
: DateTime.parse(json['lastModificationTime'] as String), |
||||
|
lastModifierId: json['lastModifierId'] as String?, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> |
||||
|
_$ExtensibleFullAuditedEntityWithUserDtoToJson<TPrimaryKey, TUserDto>( |
||||
|
ExtensibleFullAuditedEntityWithUserDto<TPrimaryKey, TUserDto> instance, |
||||
|
Object? Function(TPrimaryKey value) toJsonTPrimaryKey, |
||||
|
Object? Function(TUserDto value) toJsonTUserDto, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
'id': toJsonTPrimaryKey(instance.id), |
||||
|
'creationTime': instance.creationTime.toIso8601String(), |
||||
|
'creatorId': instance.creatorId, |
||||
|
'lastModificationTime': |
||||
|
instance.lastModificationTime?.toIso8601String(), |
||||
|
'lastModifierId': instance.lastModifierId, |
||||
|
'isDeleted': instance.isDeleted, |
||||
|
'deleterId': instance.deleterId, |
||||
|
'deletionTime': instance.deletionTime?.toIso8601String(), |
||||
|
'creator': toJsonTUserDto(instance.creator), |
||||
|
'lastModifier': toJsonTUserDto(instance.lastModifier), |
||||
|
'deleter': toJsonTUserDto(instance.deleter), |
||||
|
}; |
||||
|
|
||||
|
ListResultDto<T> _$ListResultDtoFromJson<T>( |
||||
|
Map<String, dynamic> json, |
||||
|
T Function(Object? json) fromJsonT, |
||||
|
) => |
||||
|
ListResultDto<T>( |
||||
|
items: (json['items'] as List<dynamic>).map(fromJsonT).toList(), |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ListResultDtoToJson<T>( |
||||
|
ListResultDto<T> instance, |
||||
|
Object? Function(T value) toJsonT, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'items': instance.items.map(toJsonT).toList(), |
||||
|
}; |
||||
|
|
||||
|
LimitedResultRequestDto _$LimitedResultRequestDtoFromJson( |
||||
|
Map<String, dynamic> json) => |
||||
|
LimitedResultRequestDto( |
||||
|
maxResultCount: json['maxResultCount'] as int?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$LimitedResultRequestDtoToJson( |
||||
|
LimitedResultRequestDto instance) => |
||||
|
<String, dynamic>{ |
||||
|
'maxResultCount': instance.maxResultCount, |
||||
|
}; |
||||
|
|
||||
|
ExtensibleLimitedResultRequestDto _$ExtensibleLimitedResultRequestDtoFromJson( |
||||
|
Map<String, dynamic> json) => |
||||
|
ExtensibleLimitedResultRequestDto( |
||||
|
maxResultCount: json['maxResultCount'] as int?, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ExtensibleLimitedResultRequestDtoToJson( |
||||
|
ExtensibleLimitedResultRequestDto instance) => |
||||
|
<String, dynamic>{ |
||||
|
'maxResultCount': instance.maxResultCount, |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
}; |
||||
|
|
||||
|
ExtensibleListResultDto<T> _$ExtensibleListResultDtoFromJson<T>( |
||||
|
Map<String, dynamic> json, |
||||
|
T Function(Object? json) fromJsonT, |
||||
|
) => |
||||
|
ExtensibleListResultDto<T>( |
||||
|
items: (json['items'] as List<dynamic>).map(fromJsonT).toList(), |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ExtensibleListResultDtoToJson<T>( |
||||
|
ExtensibleListResultDto<T> instance, |
||||
|
Object? Function(T value) toJsonT, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'items': instance.items.map(toJsonT).toList(), |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
}; |
||||
|
|
||||
|
PagedResultDto<T> _$PagedResultDtoFromJson<T>( |
||||
|
Map<String, dynamic> json, |
||||
|
T Function(Object? json) fromJsonT, |
||||
|
) => |
||||
|
PagedResultDto<T>( |
||||
|
totalCount: json['totalCount'] as int, |
||||
|
items: (json['items'] as List<dynamic>).map(fromJsonT).toList(), |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$PagedResultDtoToJson<T>( |
||||
|
PagedResultDto<T> instance, |
||||
|
Object? Function(T value) toJsonT, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'items': instance.items.map(toJsonT).toList(), |
||||
|
'totalCount': instance.totalCount, |
||||
|
}; |
||||
|
|
||||
|
ExtensiblePagedResultDto<T> _$ExtensiblePagedResultDtoFromJson<T>( |
||||
|
Map<String, dynamic> json, |
||||
|
T Function(Object? json) fromJsonT, |
||||
|
) => |
||||
|
ExtensiblePagedResultDto<T>( |
||||
|
totalCount: json['totalCount'] as int, |
||||
|
items: (json['items'] as List<dynamic>).map(fromJsonT).toList(), |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ExtensiblePagedResultDtoToJson<T>( |
||||
|
ExtensiblePagedResultDto<T> instance, |
||||
|
Object? Function(T value) toJsonT, |
||||
|
) => |
||||
|
<String, dynamic>{ |
||||
|
'items': instance.items.map(toJsonT).toList(), |
||||
|
'totalCount': instance.totalCount, |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
}; |
||||
|
|
||||
|
SortedResultRequest _$SortedResultRequestFromJson(Map<String, dynamic> json) => |
||||
|
SortedResultRequest( |
||||
|
sorting: json['sorting'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$SortedResultRequestToJson( |
||||
|
SortedResultRequest instance) => |
||||
|
<String, dynamic>{ |
||||
|
'sorting': instance.sorting, |
||||
|
}; |
||||
|
|
||||
|
PagedResultRequestDto _$PagedResultRequestDtoFromJson( |
||||
|
Map<String, dynamic> json) => |
||||
|
PagedResultRequestDto( |
||||
|
skipCount: json['skipCount'] as int?, |
||||
|
maxResultCount: json['maxResultCount'] as int?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$PagedResultRequestDtoToJson( |
||||
|
PagedResultRequestDto instance) => |
||||
|
<String, dynamic>{ |
||||
|
'maxResultCount': instance.maxResultCount, |
||||
|
'skipCount': instance.skipCount, |
||||
|
}; |
||||
|
|
||||
|
PagedAndSortedResultRequestDto _$PagedAndSortedResultRequestDtoFromJson( |
||||
|
Map<String, dynamic> json) => |
||||
|
PagedAndSortedResultRequestDto( |
||||
|
skipCount: json['skipCount'] as int?, |
||||
|
maxResultCount: json['maxResultCount'] as int?, |
||||
|
sorting: json['sorting'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$PagedAndSortedResultRequestDtoToJson( |
||||
|
PagedAndSortedResultRequestDto instance) => |
||||
|
<String, dynamic>{ |
||||
|
'maxResultCount': instance.maxResultCount, |
||||
|
'skipCount': instance.skipCount, |
||||
|
'sorting': instance.sorting, |
||||
|
}; |
||||
|
|
||||
|
ExtensiblePagedAndSortedResultRequestDto |
||||
|
_$ExtensiblePagedAndSortedResultRequestDtoFromJson( |
||||
|
Map<String, dynamic> json) => |
||||
|
ExtensiblePagedAndSortedResultRequestDto( |
||||
|
skipCount: json['skipCount'] as int?, |
||||
|
maxResultCount: json['maxResultCount'] as int?, |
||||
|
sorting: json['sorting'] as String?, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ExtensiblePagedAndSortedResultRequestDtoToJson( |
||||
|
ExtensiblePagedAndSortedResultRequestDto instance) => |
||||
|
<String, dynamic>{ |
||||
|
'maxResultCount': instance.maxResultCount, |
||||
|
'skipCount': instance.skipCount, |
||||
|
'sorting': instance.sorting, |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
}; |
||||
|
|
||||
|
ExtensiblePagedResultRequestDto _$ExtensiblePagedResultRequestDtoFromJson( |
||||
|
Map<String, dynamic> json) => |
||||
|
ExtensiblePagedResultRequestDto( |
||||
|
skipCount: json['skipCount'] as int?, |
||||
|
maxResultCount: json['maxResultCount'] as int?, |
||||
|
extraProperties: json['extraProperties'] as Map<String, dynamic>?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ExtensiblePagedResultRequestDtoToJson( |
||||
|
ExtensiblePagedResultRequestDto instance) => |
||||
|
<String, dynamic>{ |
||||
|
'maxResultCount': instance.maxResultCount, |
||||
|
'skipCount': instance.skipCount, |
||||
|
'extraProperties': instance.extraProperties, |
||||
|
}; |
||||
@ -0,0 +1,3 @@ |
|||||
|
abstract class IHasConcurrencyStamp { |
||||
|
String? concurrencyStamp; |
||||
|
} |
||||
@ -0,0 +1,342 @@ |
|||||
|
import 'package:core/proxy/volo/abp/localization/models.dart'; |
||||
|
import 'package:json_annotation/json_annotation.dart'; |
||||
|
|
||||
|
part 'environment.g.dart'; |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class Environment { |
||||
|
Environment({ |
||||
|
required this.application, |
||||
|
required this.remoteServices, |
||||
|
required this.auth, |
||||
|
required this.tenant, |
||||
|
required this.localization, |
||||
|
required this.remoteEnvironment, |
||||
|
this.notifications, |
||||
|
}); |
||||
|
ApplicationConfig application; |
||||
|
RemoteServiceConfig remoteServices; |
||||
|
AuthConfig auth; |
||||
|
TenantConfig tenant; |
||||
|
LocalizationConfig localization; |
||||
|
NotificationConfig? notifications; |
||||
|
RemoteEnvironmentConfig remoteEnvironment; |
||||
|
|
||||
|
factory Environment.empty() { |
||||
|
return Environment( |
||||
|
application: ApplicationConfig(name: ''), |
||||
|
remoteServices: RemoteServiceConfig(services: {}), |
||||
|
auth: AuthConfig(authority: '', clientId: ''), |
||||
|
tenant: TenantConfig(tenantKey: ''), |
||||
|
localization: LocalizationConfig(defaultLanguage: ''), |
||||
|
remoteEnvironment: RemoteEnvironmentConfig(url: 'url'), |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
factory Environment.fromJson(Map<String, dynamic> json) => _$EnvironmentFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$EnvironmentToJson(this); |
||||
|
|
||||
|
Environment copyWith({ |
||||
|
ApplicationConfig? application, |
||||
|
RemoteServiceConfig? remoteServices, |
||||
|
AuthConfig? auth, |
||||
|
TenantConfig? tenant, |
||||
|
LocalizationConfig? localization, |
||||
|
NotificationConfig? notifications, |
||||
|
RemoteEnvironmentConfig? remoteEnvironment, |
||||
|
}) { |
||||
|
return Environment( |
||||
|
application: application ?? this.application, |
||||
|
remoteServices: remoteServices ?? this.remoteServices, |
||||
|
auth: auth ?? this.auth, |
||||
|
tenant: tenant ?? this.tenant, |
||||
|
localization: localization ?? this.localization, |
||||
|
notifications: notifications ?? this.notifications, |
||||
|
remoteEnvironment: remoteEnvironment ?? this.remoteEnvironment, |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@JsonEnum() |
||||
|
enum MergeStrategy { |
||||
|
@JsonValue('deepmerge') |
||||
|
deepmerge, |
||||
|
@JsonValue('overwrite') |
||||
|
overwrite; |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class RemoteEnvironmentConfig { |
||||
|
RemoteEnvironmentConfig({ |
||||
|
required this.url, |
||||
|
this.strategy = MergeStrategy.deepmerge, |
||||
|
this.method = 'GET', |
||||
|
this.headers, |
||||
|
}); |
||||
|
String url; |
||||
|
MergeStrategy? strategy; |
||||
|
String? method; |
||||
|
Map<String, String>? headers; |
||||
|
|
||||
|
factory RemoteEnvironmentConfig.fromJson(Map<String, dynamic> json) => _$RemoteEnvironmentConfigFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$RemoteEnvironmentConfigToJson(this); |
||||
|
|
||||
|
RemoteEnvironmentConfig copyWith({ |
||||
|
String? url, |
||||
|
MergeStrategy? strategy, |
||||
|
String? method, |
||||
|
Map<String, String>? headers, |
||||
|
}) { |
||||
|
return RemoteEnvironmentConfig( |
||||
|
url: url ?? this.url, |
||||
|
strategy: strategy ?? this.strategy, |
||||
|
method: method ?? this.method, |
||||
|
headers: headers ?? this.headers, |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class ApplicationConfig { |
||||
|
ApplicationConfig({ |
||||
|
required this.name, |
||||
|
this.framework = 'flutter', |
||||
|
}); |
||||
|
String name; |
||||
|
String? framework; |
||||
|
|
||||
|
factory ApplicationConfig.fromJson(Map<String, dynamic> json) => _$ApplicationConfigFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$ApplicationConfigToJson(this); |
||||
|
|
||||
|
ApplicationConfig copyWith({ |
||||
|
String? name, |
||||
|
}) { |
||||
|
return ApplicationConfig( |
||||
|
name: name ?? this.name, |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class AuthConfig { |
||||
|
AuthConfig({ |
||||
|
required this.authority, |
||||
|
required this.clientId, |
||||
|
this.clientSecret, |
||||
|
}); |
||||
|
String clientId; |
||||
|
String? clientSecret; |
||||
|
String authority; |
||||
|
|
||||
|
factory AuthConfig.fromJson(Map<String, dynamic> json) => _$AuthConfigFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$AuthConfigToJson(this); |
||||
|
|
||||
|
AuthConfig copyWith({ |
||||
|
String? clientId, |
||||
|
String? clientSecret, |
||||
|
String? authority, |
||||
|
}) { |
||||
|
return AuthConfig( |
||||
|
authority: authority ?? this.authority, |
||||
|
clientId: clientId ?? this.clientId, |
||||
|
clientSecret: clientSecret ?? this.clientSecret, |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
String getAuthority() { |
||||
|
return _mapToAuthority(authority); |
||||
|
} |
||||
|
|
||||
|
String _mapToAuthority(String authority) { |
||||
|
return authority.endsWith('/') ? authority : '$authority/'; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class TenantConfig { |
||||
|
TenantConfig({ |
||||
|
this.tenantKey, |
||||
|
}); |
||||
|
String? tenantKey; |
||||
|
|
||||
|
factory TenantConfig.fromJson(Map<String, dynamic> json) => _$TenantConfigFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$TenantConfigToJson(this); |
||||
|
|
||||
|
TenantConfig copyWith({ |
||||
|
String? tenantKey, |
||||
|
}) { |
||||
|
return TenantConfig( |
||||
|
tenantKey: tenantKey ?? this.tenantKey, |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class LocalizationConfig { |
||||
|
LocalizationConfig({ |
||||
|
this.defaultLanguage, |
||||
|
this.useLocalResources = true, |
||||
|
this.supportedLocales = const [], |
||||
|
}); |
||||
|
String? defaultLanguage; |
||||
|
bool? useLocalResources; |
||||
|
List<LanguageInfo>? supportedLocales; |
||||
|
|
||||
|
factory LocalizationConfig.fromJson(Map<String, dynamic> json) => _$LocalizationConfigFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$LocalizationConfigToJson(this); |
||||
|
|
||||
|
LocalizationConfig copyWith({ |
||||
|
String? defaultLanguage, |
||||
|
bool? useLocalResources, |
||||
|
}) { |
||||
|
return LocalizationConfig( |
||||
|
defaultLanguage: defaultLanguage ?? this.defaultLanguage, |
||||
|
useLocalResources: useLocalResources ?? this.useLocalResources, |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
class RemoteServiceConfig { |
||||
|
RemoteServiceConfig({ |
||||
|
required Map<String, RemoteService> services, |
||||
|
}) { |
||||
|
_services = services; |
||||
|
} |
||||
|
late Map<String, RemoteService> _services; |
||||
|
|
||||
|
RemoteService get def => this['default']!; |
||||
|
RemoteService? operator [](String key) => _services[key]; |
||||
|
void operator []=(String key, RemoteService service) => _services[key] = service; |
||||
|
|
||||
|
RemoteServiceConfig copyWith({ |
||||
|
Map<String, RemoteService>? services, |
||||
|
}) { |
||||
|
return RemoteServiceConfig( |
||||
|
services: services ?? _services, |
||||
|
); |
||||
|
} |
||||
|
|
||||
|
String getApiUrl(String? key) { |
||||
|
return _mapToApiUrl(key)(this); |
||||
|
} |
||||
|
|
||||
|
String Function(RemoteServiceConfig) _mapToApiUrl([String? key]) { |
||||
|
return (RemoteServiceConfig services) { |
||||
|
if (key != null) { |
||||
|
return services[key]?.url ?? services.def.url; |
||||
|
} |
||||
|
return services.def.url; |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class RemoteService { |
||||
|
RemoteService({ |
||||
|
required this.url, |
||||
|
this.rootNamespace, |
||||
|
}); |
||||
|
String url; |
||||
|
String? rootNamespace; |
||||
|
|
||||
|
factory RemoteService.fromJson(Map<String, dynamic> json) => _$RemoteServiceFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$RemoteServiceToJson(this); |
||||
|
|
||||
|
RemoteService copyWith({ |
||||
|
String? url, |
||||
|
String? rootNamespace, |
||||
|
}) { |
||||
|
return RemoteService( |
||||
|
url: url ?? this.url, |
||||
|
rootNamespace: rootNamespace ?? this.rootNamespace, |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class NotificationConfig { |
||||
|
NotificationConfig({ |
||||
|
this.serverUrl, |
||||
|
this.android, |
||||
|
this.darwin, |
||||
|
this.linux, |
||||
|
}); |
||||
|
String? serverUrl; |
||||
|
AndroidNotification? android; |
||||
|
DarwinNotification? darwin; |
||||
|
LinuxNotification? linux; |
||||
|
|
||||
|
factory NotificationConfig.fromJson(Map<String, dynamic> json) => _$NotificationConfigFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$NotificationConfigToJson(this); |
||||
|
|
||||
|
NotificationConfig copyWith({ |
||||
|
AndroidNotification? android, |
||||
|
DarwinNotification? darwin, |
||||
|
LinuxNotification? linux, |
||||
|
}) { |
||||
|
return NotificationConfig( |
||||
|
android: android ?? this.android, |
||||
|
darwin: darwin ?? this.darwin, |
||||
|
linux: linux ?? this.linux, |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class LinuxNotification { |
||||
|
LinuxNotification({ |
||||
|
required this.defaultActionName, |
||||
|
}); |
||||
|
String defaultActionName; |
||||
|
|
||||
|
factory LinuxNotification.fromJson(Map<String, dynamic> json) => _$LinuxNotificationFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$LinuxNotificationToJson(this); |
||||
|
|
||||
|
LinuxNotification copyWith({ |
||||
|
String? defaultActionName, |
||||
|
}) { |
||||
|
return LinuxNotification( |
||||
|
defaultActionName: defaultActionName ?? this.defaultActionName, |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class AndroidNotification { |
||||
|
AndroidNotification({ |
||||
|
required this.channelId, |
||||
|
required this.channelName, |
||||
|
this.channelDescription, |
||||
|
}); |
||||
|
String channelId; |
||||
|
String channelName; |
||||
|
String? channelDescription; |
||||
|
|
||||
|
factory AndroidNotification.fromJson(Map<String, dynamic> json) => _$AndroidNotificationFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$AndroidNotificationToJson(this); |
||||
|
|
||||
|
AndroidNotification copyWith({ |
||||
|
String? channelId, |
||||
|
String? channelName, |
||||
|
String? channelDescription, |
||||
|
}) { |
||||
|
return AndroidNotification( |
||||
|
channelId: channelId ?? this.channelId, |
||||
|
channelName: channelName ?? this.channelName, |
||||
|
channelDescription: channelDescription ?? this.channelDescription, |
||||
|
); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@JsonSerializable() |
||||
|
class DarwinNotification { |
||||
|
DarwinNotification(); |
||||
|
|
||||
|
factory DarwinNotification.fromJson(Map<String, dynamic> json) => _$DarwinNotificationFromJson(json); |
||||
|
Map<String, dynamic> toJson() => _$DarwinNotificationToJson(this); |
||||
|
|
||||
|
DarwinNotification copyWith() { |
||||
|
return DarwinNotification( |
||||
|
); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,178 @@ |
|||||
|
// GENERATED CODE - DO NOT MODIFY BY HAND |
||||
|
|
||||
|
part of 'environment.dart'; |
||||
|
|
||||
|
// ************************************************************************** |
||||
|
// JsonSerializableGenerator |
||||
|
// ************************************************************************** |
||||
|
|
||||
|
Environment _$EnvironmentFromJson(Map<String, dynamic> json) => Environment( |
||||
|
application: ApplicationConfig.fromJson( |
||||
|
json['application'] as Map<String, dynamic>), |
||||
|
remoteServices: RemoteServiceConfig( |
||||
|
services: (json['remoteServices'] as Map<String, dynamic>) |
||||
|
.map((key, value) => MapEntry(key, RemoteService.fromJson(value as Map<String, dynamic>)))), |
||||
|
auth: AuthConfig.fromJson(json['auth'] as Map<String, dynamic>), |
||||
|
tenant: TenantConfig.fromJson(json['tenant'] as Map<String, dynamic>), |
||||
|
localization: LocalizationConfig.fromJson( |
||||
|
json['localization'] as Map<String, dynamic>), |
||||
|
remoteEnvironment: RemoteEnvironmentConfig.fromJson( |
||||
|
json['remoteEnvironment'] as Map<String, dynamic>), |
||||
|
notifications: json['notifications'] == null |
||||
|
? null |
||||
|
: NotificationConfig.fromJson( |
||||
|
json['notifications'] as Map<String, dynamic>), |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$EnvironmentToJson(Environment instance) => |
||||
|
<String, dynamic>{ |
||||
|
'application': instance.application, |
||||
|
'remoteServices': instance.remoteServices, |
||||
|
'auth': instance.auth, |
||||
|
'tenant': instance.tenant, |
||||
|
'localization': instance.localization, |
||||
|
'notifications': instance.notifications, |
||||
|
'remoteEnvironment': instance.remoteEnvironment, |
||||
|
}; |
||||
|
|
||||
|
RemoteEnvironmentConfig _$RemoteEnvironmentConfigFromJson( |
||||
|
Map<String, dynamic> json) => |
||||
|
RemoteEnvironmentConfig( |
||||
|
url: json['url'] as String, |
||||
|
strategy: $enumDecodeNullable(_$MergeStrategyEnumMap, json['strategy']) ?? |
||||
|
MergeStrategy.deepmerge, |
||||
|
method: json['method'] as String? ?? 'GET', |
||||
|
headers: (json['headers'] as Map<String, dynamic>?)?.map( |
||||
|
(k, e) => MapEntry(k, e as String), |
||||
|
), |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$RemoteEnvironmentConfigToJson( |
||||
|
RemoteEnvironmentConfig instance) => |
||||
|
<String, dynamic>{ |
||||
|
'url': instance.url, |
||||
|
'strategy': _$MergeStrategyEnumMap[instance.strategy], |
||||
|
'method': instance.method, |
||||
|
'headers': instance.headers, |
||||
|
}; |
||||
|
|
||||
|
const _$MergeStrategyEnumMap = { |
||||
|
MergeStrategy.deepmerge: 'deepmerge', |
||||
|
MergeStrategy.overwrite: 'overwrite', |
||||
|
}; |
||||
|
|
||||
|
ApplicationConfig _$ApplicationConfigFromJson(Map<String, dynamic> json) => |
||||
|
ApplicationConfig( |
||||
|
name: json['name'] as String, |
||||
|
framework: json['framework'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$ApplicationConfigToJson(ApplicationConfig instance) => |
||||
|
<String, dynamic>{ |
||||
|
'name': instance.name, |
||||
|
'framework': instance.framework, |
||||
|
}; |
||||
|
|
||||
|
AuthConfig _$AuthConfigFromJson(Map<String, dynamic> json) => AuthConfig( |
||||
|
authority: json['authority'] as String, |
||||
|
clientId: json['clientId'] as String, |
||||
|
clientSecret: json['clientSecret'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$AuthConfigToJson(AuthConfig instance) => |
||||
|
<String, dynamic>{ |
||||
|
'clientId': instance.clientId, |
||||
|
'clientSecret': instance.clientSecret, |
||||
|
'authority': instance.authority, |
||||
|
}; |
||||
|
|
||||
|
TenantConfig _$TenantConfigFromJson(Map<String, dynamic> json) => TenantConfig( |
||||
|
tenantKey: json['tenantKey'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$TenantConfigToJson(TenantConfig instance) => |
||||
|
<String, dynamic>{ |
||||
|
'tenantKey': instance.tenantKey, |
||||
|
}; |
||||
|
|
||||
|
LocalizationConfig _$LocalizationConfigFromJson(Map<String, dynamic> json) => |
||||
|
LocalizationConfig( |
||||
|
defaultLanguage: json['defaultLanguage'] as String?, |
||||
|
useLocalResources: json['useLocalResources'] as bool?, |
||||
|
supportedLocales: json['supportedLocales'] != null |
||||
|
? (json['supportedLocales'] as List<dynamic>).map((e) => LanguageInfo.fromJson(e)).toList() |
||||
|
: null, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$LocalizationConfigToJson(LocalizationConfig instance) => |
||||
|
<String, dynamic>{ |
||||
|
'defaultLanguage': instance.defaultLanguage, |
||||
|
'useLocalResources': instance.useLocalResources, |
||||
|
'supportedLocales': instance.supportedLocales, |
||||
|
}; |
||||
|
|
||||
|
RemoteService _$RemoteServiceFromJson(Map<String, dynamic> json) => |
||||
|
RemoteService( |
||||
|
url: json['url'] as String, |
||||
|
rootNamespace: json['rootNamespace'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$RemoteServiceToJson(RemoteService instance) => |
||||
|
<String, dynamic>{ |
||||
|
'url': instance.url, |
||||
|
'rootNamespace': instance.rootNamespace, |
||||
|
}; |
||||
|
|
||||
|
NotificationConfig _$NotificationConfigFromJson(Map<String, dynamic> json) => |
||||
|
NotificationConfig( |
||||
|
serverUrl: json['serverUrl'] as String?, |
||||
|
android: json['android'] == null |
||||
|
? null |
||||
|
: AndroidNotification.fromJson( |
||||
|
json['android'] as Map<String, dynamic>), |
||||
|
darwin: json['darwin'] == null |
||||
|
? null |
||||
|
: DarwinNotification.fromJson(json['darwin'] as Map<String, dynamic>), |
||||
|
linux: json['linux'] == null |
||||
|
? null |
||||
|
: LinuxNotification.fromJson(json['linux'] as Map<String, dynamic>), |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$NotificationConfigToJson(NotificationConfig instance) => |
||||
|
<String, dynamic>{ |
||||
|
'serverUrl': instance.serverUrl, |
||||
|
'android': instance.android, |
||||
|
'darwin': instance.darwin, |
||||
|
'linux': instance.linux, |
||||
|
}; |
||||
|
|
||||
|
LinuxNotification _$LinuxNotificationFromJson(Map<String, dynamic> json) => |
||||
|
LinuxNotification( |
||||
|
defaultActionName: json['defaultActionName'] as String, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$LinuxNotificationToJson(LinuxNotification instance) => |
||||
|
<String, dynamic>{ |
||||
|
'defaultActionName': instance.defaultActionName, |
||||
|
}; |
||||
|
|
||||
|
AndroidNotification _$AndroidNotificationFromJson(Map<String, dynamic> json) => |
||||
|
AndroidNotification( |
||||
|
channelId: json['channelId'] as String, |
||||
|
channelName: json['channelName'] as String, |
||||
|
channelDescription: json['channelDescription'] as String?, |
||||
|
); |
||||
|
|
||||
|
Map<String, dynamic> _$AndroidNotificationToJson( |
||||
|
AndroidNotification instance) => |
||||
|
<String, dynamic>{ |
||||
|
'channelId': instance.channelId, |
||||
|
'channelName': instance.channelName, |
||||
|
'channelDescription': instance.channelDescription, |
||||
|
}; |
||||
|
|
||||
|
DarwinNotification _$DarwinNotificationFromJson(Map<String, dynamic> json) => |
||||
|
DarwinNotification(); |
||||
|
|
||||
|
Map<String, dynamic> _$DarwinNotificationToJson(DarwinNotification instance) => |
||||
|
<String, dynamic>{}; |
||||
@ -1,7 +1,9 @@ |
|||||
export 'abp.dto.dart'; |
export 'abp.dto.dart'; |
||||
|
export 'abp.entity.dart'; |
||||
export 'abp.error.dart'; |
export 'abp.error.dart'; |
||||
export 'auth.dart'; |
export 'auth.dart'; |
||||
export 'common.dart'; |
export 'common.dart'; |
||||
|
export 'environment.dart'; |
||||
export 'oauth.dart'; |
export 'oauth.dart'; |
||||
export 'session.dart'; |
export 'session.dart'; |
||||
export 'theme.dart'; |
export 'theme.dart'; |
||||
|
|||||
@ -0,0 +1,20 @@ |
|||||
|
import 'package:dio/dio.dart'; |
||||
|
|
||||
|
class RequestOptions { |
||||
|
RequestOptions({ |
||||
|
CancelToken? cancelToken, |
||||
|
this.sendTimeout, |
||||
|
this.receiveTimeout, |
||||
|
this.headers, |
||||
|
}) { |
||||
|
this.cancelToken = cancelToken ?? CancelToken(); |
||||
|
} |
||||
|
late CancelToken? cancelToken; |
||||
|
late Duration? sendTimeout; |
||||
|
late Duration? receiveTimeout; |
||||
|
late Map<String, dynamic>? headers; |
||||
|
|
||||
|
void cancel() { |
||||
|
cancelToken?.cancel(); |
||||
|
} |
||||
|
} |
||||
@ -1,17 +1,22 @@ |
|||||
|
import 'package:core/dependency/injector.dart'; |
||||
import 'package:core/models/abp.dto.dart'; |
import 'package:core/models/abp.dto.dart'; |
||||
import 'package:core/proxy/volo/abp/localization/models.dart'; |
import 'package:core/proxy/volo/abp/localization/models.dart'; |
||||
import 'package:core/services/rest.service.dart'; |
import 'package:core/services/rest.service.dart'; |
||||
import 'package:get/get.dart'; |
|
||||
|
|
||||
class LanguageService { |
class LanguageService { |
||||
RestService get _restService => Get.find(); |
LanguageService(Injector injector): |
||||
|
_restService = injector.get<RestService>(); |
||||
|
final RestService _restService; |
||||
|
|
||||
Future<ListResultDto<LanguageInfo>> getList() { |
Future<ListResultDto<LanguageInfo>> getList() { |
||||
return _restService.get('/api/abp/localization/languages') |
return _restService.request<ListResultDto<LanguageInfo>>( |
||||
.then((res) { |
method: HttpMethod.GET, |
||||
|
url: '/api/abp/localization/languages', |
||||
|
transformer: (res) { |
||||
return ListResultDto<LanguageInfo>( |
return ListResultDto<LanguageInfo>( |
||||
items: (res.data['items'] as List<dynamic>).map((e) => LanguageInfo.fromJson(e)).toList(), |
items: (res.data['items'] as List<dynamic>).map((e) => LanguageInfo.fromJson(e)).toList(), |
||||
); |
); |
||||
}); |
} |
||||
|
); |
||||
} |
} |
||||
} |
} |
||||
@ -1,15 +1,21 @@ |
|||||
|
|
||||
|
import 'package:core/dependency/injector.dart'; |
||||
import 'package:core/proxy/volo/abp/http/modeling/index.dart'; |
import 'package:core/proxy/volo/abp/http/modeling/index.dart'; |
||||
import 'package:core/services/rest.service.dart'; |
import 'package:core/services/rest.service.dart'; |
||||
import 'package:get/get.dart'; |
|
||||
|
|
||||
class AbpApiDefinitionService { |
class AbpApiDefinitionService { |
||||
final RestService _restService = Get.find(); |
AbpApiDefinitionService(Injector injector): |
||||
|
_restService = injector.get<RestService>(); |
||||
|
final RestService _restService; |
||||
|
|
||||
Future<ApplicationApiDescriptionModel> getByModel(ApplicationApiDescriptionModelRequestDto model) { |
Future<ApplicationApiDescriptionModel> getByModel(ApplicationApiDescriptionModelRequestDto model) { |
||||
return _restService.get('/api/abp/api-definition', |
return _restService.request( |
||||
|
method: HttpMethod.GET, |
||||
|
url: '/api/abp/api-definition', |
||||
queryParameters: { |
queryParameters: { |
||||
'includeTypes': model.includeTypes |
'includeTypes': model.includeTypes |
||||
}).then((res) => ApplicationApiDescriptionModel.fromJson(res.data)); |
}, |
||||
|
transformer: (res) => ApplicationApiDescriptionModel.fromJson(res.data), |
||||
|
); |
||||
} |
} |
||||
} |
} |
||||
@ -1,16 +1,20 @@ |
|||||
|
import 'package:core/dependency/injector.dart'; |
||||
import 'package:core/proxy/volo/abp/asp-net-core/mvc/application-configurations/index.dart'; |
import 'package:core/proxy/volo/abp/asp-net-core/mvc/application-configurations/index.dart'; |
||||
import 'package:core/services/rest.service.dart'; |
import 'package:core/services/rest.service.dart'; |
||||
import 'package:get/get.dart'; |
|
||||
|
|
||||
class AbpApplicationConfigurationService { |
class AbpApplicationConfigurationService { |
||||
RestService get _restService => Get.find(); |
AbpApplicationConfigurationService(Injector injector): |
||||
|
_restService = injector.get<RestService>(); |
||||
|
final RestService _restService; |
||||
|
|
||||
Future<ApplicationConfigurationDto> get(ApplicationConfigurationRequestOptions options) { |
Future<ApplicationConfigurationDto> get(ApplicationConfigurationRequestOptions options) { |
||||
return _restService.get('/api/abp/application-configuration', |
return _restService.request( |
||||
|
method: HttpMethod.GET, |
||||
|
url: '/api/abp/application-configuration', |
||||
queryParameters: { |
queryParameters: { |
||||
'includeLocalizationResources': options.includeLocalizationResources |
'includeLocalizationResources': options.includeLocalizationResources |
||||
}).then((res) { |
}, |
||||
return ApplicationConfigurationDto.fromJson(res.data); |
transformer: (res) => ApplicationConfigurationDto.fromJson(res.data), |
||||
}); |
); |
||||
} |
} |
||||
} |
} |
||||
@ -1,16 +1,22 @@ |
|||||
import 'package:get/get.dart'; |
import 'package:core/dependency/injector.dart'; |
||||
|
|
||||
import 'models.dart'; |
import 'models.dart'; |
||||
import 'package:core/services/rest.service.dart'; |
import 'package:core/services/rest.service.dart'; |
||||
|
|
||||
class AbpApplicationLocalizationService { |
class AbpApplicationLocalizationService { |
||||
RestService get _restService => Get.find(); |
AbpApplicationLocalizationService(Injector injector): |
||||
|
_restService = injector.get<RestService>(); |
||||
|
final RestService _restService; |
||||
|
|
||||
Future<ApplicationLocalizationDto> get(ApplicationLocalizationRequestDto input) { |
Future<ApplicationLocalizationDto> get(ApplicationLocalizationRequestDto input) { |
||||
return _restService.get('/api/abp/application-localization', |
return _restService.request( |
||||
|
method: HttpMethod.GET, |
||||
|
url: '/api/abp/application-localization', |
||||
queryParameters: { |
queryParameters: { |
||||
'cultureName': input.cultureName, |
'cultureName': input.cultureName, |
||||
'onlyDynamics': input.onlyDynamics |
'onlyDynamics': input.onlyDynamics |
||||
}).then((res) => ApplicationLocalizationDto.fromJson(res.data)); |
}, |
||||
|
transformer: (res) => ApplicationLocalizationDto.fromJson(res.data) |
||||
|
); |
||||
} |
} |
||||
} |
} |
||||
@ -1,18 +1,26 @@ |
|||||
|
import 'package:core/dependency/injector.dart'; |
||||
import 'package:core/services/rest.service.dart'; |
import 'package:core/services/rest.service.dart'; |
||||
import 'package:get/get.dart'; |
|
||||
|
|
||||
import 'models.dart'; |
import 'models.dart'; |
||||
|
|
||||
class AbpTenantService { |
class AbpTenantService { |
||||
RestService get _restService => Get.find(); |
AbpTenantService(Injector injector): |
||||
|
_restService = injector.get<RestService>(); |
||||
|
final RestService _restService; |
||||
|
|
||||
Future<FindTenantResultDto> findTenantById(String id) { |
Future<FindTenantResultDto> findTenantById(String id) { |
||||
return _restService.get('/api/abp/multi-tenancy/tenants/by-id/$id') |
return _restService.request( |
||||
.then((res) => FindTenantResultDto.fromJson(res.data)); |
method: HttpMethod.GET, |
||||
|
url: '/api/abp/multi-tenancy/tenants/by-id/$id', |
||||
|
transformer: (res) => FindTenantResultDto.fromJson(res.data), |
||||
|
); |
||||
} |
} |
||||
|
|
||||
Future<FindTenantResultDto> findTenantByName(String name) { |
Future<FindTenantResultDto> findTenantByName(String name) { |
||||
return _restService.get('/api/abp/multi-tenancy/tenants/by-name/$name') |
return _restService.request( |
||||
.then((res) => FindTenantResultDto.fromJson(res.data)); |
method: HttpMethod.GET, |
||||
|
url: '/api/abp/multi-tenancy/tenants/by-name/$name', |
||||
|
transformer: (res) => FindTenantResultDto.fromJson(res.data), |
||||
|
); |
||||
} |
} |
||||
} |
} |
||||
@ -0,0 +1,5 @@ |
|||||
|
import 'package:core/models/index.dart'; |
||||
|
|
||||
|
abstract class ApplicationInitialService { |
||||
|
Future<Application> initialApp(); |
||||
|
} |
||||
@ -0,0 +1,49 @@ |
|||||
|
import 'package:core/dependency/injector.dart'; |
||||
|
import 'package:core/models/environment.dart'; |
||||
|
import 'package:core/proxy/volo/abp/localization/models.dart'; |
||||
|
import 'package:core/utils/index.dart'; |
||||
|
|
||||
|
import 'service.base.dart'; |
||||
|
|
||||
|
class EnvironmentService extends ServiceBase { |
||||
|
EnvironmentService(super._injector); |
||||
|
|
||||
|
static EnvironmentService get to => Injector.instance.get<EnvironmentService>(); |
||||
|
|
||||
|
final InternalStore<Environment> _store = InternalStore<Environment>(state: Environment.empty()); |
||||
|
|
||||
|
Stream<Environment> get createOnUpdateStream { |
||||
|
return _store.sliceUpdate((state) => state); |
||||
|
} |
||||
|
|
||||
|
setState(Environment environment) { |
||||
|
_store.set(environment); |
||||
|
} |
||||
|
|
||||
|
Stream<Environment> getEnvironment$() { |
||||
|
return _store.sliceState((state) => state); |
||||
|
} |
||||
|
|
||||
|
Environment getEnvironment() { |
||||
|
return _store.state; |
||||
|
} |
||||
|
|
||||
|
Stream<String> getApiUrl$(String? key) { |
||||
|
return _store.sliceState((state) => state.remoteServices).map((services) => services.getApiUrl(key)); |
||||
|
} |
||||
|
String getApiUrl(String? key) { |
||||
|
return _store.state.remoteServices.getApiUrl(key); |
||||
|
} |
||||
|
|
||||
|
Stream<String> getAuthority$() { |
||||
|
return _store.sliceState((state) => state.auth).map((auth) => auth.getAuthority()); |
||||
|
} |
||||
|
|
||||
|
String getAuthority() { |
||||
|
return _store.state.auth.getAuthority(); |
||||
|
} |
||||
|
|
||||
|
List<LanguageInfo> getSupportedLocales() { |
||||
|
return _store.state.localization.supportedLocales ?? []; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,14 @@ |
|||||
|
import 'package:rxdart/rxdart.dart'; |
||||
|
|
||||
|
class ErrorReporterService { |
||||
|
final Subject<Exception> _reporter$ = BehaviorSubject<Exception>(); |
||||
|
final BehaviorSubject<List<Exception>> _errors$ = BehaviorSubject<List<Exception>>.seeded([]); |
||||
|
|
||||
|
Stream<Exception> getReporter$() => _reporter$; |
||||
|
Stream<List<Exception>> getErrors$() => _errors$; |
||||
|
|
||||
|
void reportError(Exception exception){ |
||||
|
_reporter$.add(exception); |
||||
|
_errors$.add([..._errors$.value, exception]); |
||||
|
} |
||||
|
} |
||||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue