From 94a0e22b15556e46eab6e27be91d749c12fc9beb Mon Sep 17 00:00:00 2001 From: Kherel Date: Sun, 29 Aug 2021 11:50:24 +0200 Subject: [PATCH] update --- assets/translations/en.json | 4 +- assets/translations/ru.json | 3 +- ios/Flutter/AppFrameworkInfo.plist | 2 +- .../Flutter.build/dgph | Bin 0 -> 96 bytes .../Pods-Runner.build/dgph | Bin 0 -> 96 bytes .../flutter_secure_storage.build/dgph | Bin 0 -> 96 bytes .../package_info.build/dgph | Bin 0 -> 96 bytes .../path_provider.build/dgph | Bin 0 -> 96 bytes .../share_plus.build/dgph | Bin 0 -> 96 bytes .../shared_preferences.build/dgph | Bin 0 -> 96 bytes .../url_launcher.build/dgph | Bin 0 -> 96 bytes .../wakelock.build/dgph | Bin 0 -> 96 bytes lib/config/hive_config.dart | 8 +- lib/logic/api_maps/hetzner.dart | 5 +- lib/logic/cubit/jobs/jobs_cubit.dart | 6 + lib/logic/cubit/services/services_cubit.dart | 10 + lib/logic/cubit/services/services_state.dart | 10 + lib/logic/get_it/navigation.dart | 9 + lib/main.dart | 4 +- .../components/brand_switch/brand_switch.dart | 24 ++ .../pages/more/app_settings/app_setting.dart | 5 +- lib/ui/pages/server_details/cpu_chart.dart | 4 +- .../pages/server_details/network_charts.dart | 4 +- lib/ui/pages/services/services.dart | 254 ------------------ pubspec.lock | 57 ++-- pubspec.yaml | 10 +- 26 files changed, 116 insertions(+), 303 deletions(-) create mode 100644 ios/build/Pods.build/Release-iphonesimulator/Flutter.build/dgph create mode 100644 ios/build/Pods.build/Release-iphonesimulator/Pods-Runner.build/dgph create mode 100644 ios/build/Pods.build/Release-iphonesimulator/flutter_secure_storage.build/dgph create mode 100644 ios/build/Pods.build/Release-iphonesimulator/package_info.build/dgph create mode 100644 ios/build/Pods.build/Release-iphonesimulator/path_provider.build/dgph create mode 100644 ios/build/Pods.build/Release-iphonesimulator/share_plus.build/dgph create mode 100644 ios/build/Pods.build/Release-iphonesimulator/shared_preferences.build/dgph create mode 100644 ios/build/Pods.build/Release-iphonesimulator/url_launcher.build/dgph create mode 100644 ios/build/Pods.build/Release-iphonesimulator/wakelock.build/dgph create mode 100644 lib/logic/cubit/services/services_cubit.dart create mode 100644 lib/logic/cubit/services/services_state.dart create mode 100644 lib/ui/components/brand_switch/brand_switch.dart diff --git a/assets/translations/en.json b/assets/translations/en.json index 2705b68a..be579151 100644 --- a/assets/translations/en.json +++ b/assets/translations/en.json @@ -215,7 +215,9 @@ "empty": "No jobs", "createUser": "Create", "serviceTurnOff": "Turn off", - "serviceTurnOn": "Turn on" + "serviceTurnOn": "Turn on", + "jobAdded": "Job added" + }, "validations": { "required": "Required", diff --git a/assets/translations/ru.json b/assets/translations/ru.json index 553d7b01..9fa3fc62 100644 --- a/assets/translations/ru.json +++ b/assets/translations/ru.json @@ -215,7 +215,8 @@ "empty": "Пусто", "createUser": "Создать запись", "serviceTurnOff": "Остановить", - "serviceTurnOn": "Запустить" + "serviceTurnOn": "Запустить", + "jobAdded": "Задача добавленна" }, "validations": { "required": "обязательное поле", diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 6b4c0f78..f2872cf4 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 8.0 + 9.0 diff --git a/ios/build/Pods.build/Release-iphonesimulator/Flutter.build/dgph b/ios/build/Pods.build/Release-iphonesimulator/Flutter.build/dgph new file mode 100644 index 0000000000000000000000000000000000000000..0c4ca337c8210b369b6d77f3095ffbc2091ccb65 GIT binary patch literal 96 zcmZ>95AZP5Gce)yD$P?+uuw2EFf!yYG_f);ure}WXJBB|XJBLx%g-szO)X|%Vs=R_ nV_@bkPR&UxD9S8LOs-^LLE*77XXY0(u(1T>rxY^+wKD(!DHRsg literal 0 HcmV?d00001 diff --git a/ios/build/Pods.build/Release-iphonesimulator/Pods-Runner.build/dgph b/ios/build/Pods.build/Release-iphonesimulator/Pods-Runner.build/dgph new file mode 100644 index 0000000000000000000000000000000000000000..0c4ca337c8210b369b6d77f3095ffbc2091ccb65 GIT binary patch literal 96 zcmZ>95AZP5Gce)yD$P?+uuw2EFf!yYG_f);ure}WXJBB|XJBLx%g-szO)X|%Vs=R_ nV_@bkPR&UxD9S8LOs-^LLE*77XXY0(u(1T>rxY^+wKD(!DHRsg literal 0 HcmV?d00001 diff --git a/ios/build/Pods.build/Release-iphonesimulator/flutter_secure_storage.build/dgph b/ios/build/Pods.build/Release-iphonesimulator/flutter_secure_storage.build/dgph new file mode 100644 index 0000000000000000000000000000000000000000..0c4ca337c8210b369b6d77f3095ffbc2091ccb65 GIT binary patch literal 96 zcmZ>95AZP5Gce)yD$P?+uuw2EFf!yYG_f);ure}WXJBB|XJBLx%g-szO)X|%Vs=R_ nV_@bkPR&UxD9S8LOs-^LLE*77XXY0(u(1T>rxY^+wKD(!DHRsg literal 0 HcmV?d00001 diff --git a/ios/build/Pods.build/Release-iphonesimulator/package_info.build/dgph b/ios/build/Pods.build/Release-iphonesimulator/package_info.build/dgph new file mode 100644 index 0000000000000000000000000000000000000000..0c4ca337c8210b369b6d77f3095ffbc2091ccb65 GIT binary patch literal 96 zcmZ>95AZP5Gce)yD$P?+uuw2EFf!yYG_f);ure}WXJBB|XJBLx%g-szO)X|%Vs=R_ nV_@bkPR&UxD9S8LOs-^LLE*77XXY0(u(1T>rxY^+wKD(!DHRsg literal 0 HcmV?d00001 diff --git a/ios/build/Pods.build/Release-iphonesimulator/path_provider.build/dgph b/ios/build/Pods.build/Release-iphonesimulator/path_provider.build/dgph new file mode 100644 index 0000000000000000000000000000000000000000..0c4ca337c8210b369b6d77f3095ffbc2091ccb65 GIT binary patch literal 96 zcmZ>95AZP5Gce)yD$P?+uuw2EFf!yYG_f);ure}WXJBB|XJBLx%g-szO)X|%Vs=R_ nV_@bkPR&UxD9S8LOs-^LLE*77XXY0(u(1T>rxY^+wKD(!DHRsg literal 0 HcmV?d00001 diff --git a/ios/build/Pods.build/Release-iphonesimulator/share_plus.build/dgph b/ios/build/Pods.build/Release-iphonesimulator/share_plus.build/dgph new file mode 100644 index 0000000000000000000000000000000000000000..0c4ca337c8210b369b6d77f3095ffbc2091ccb65 GIT binary patch literal 96 zcmZ>95AZP5Gce)yD$P?+uuw2EFf!yYG_f);ure}WXJBB|XJBLx%g-szO)X|%Vs=R_ nV_@bkPR&UxD9S8LOs-^LLE*77XXY0(u(1T>rxY^+wKD(!DHRsg literal 0 HcmV?d00001 diff --git a/ios/build/Pods.build/Release-iphonesimulator/shared_preferences.build/dgph b/ios/build/Pods.build/Release-iphonesimulator/shared_preferences.build/dgph new file mode 100644 index 0000000000000000000000000000000000000000..0c4ca337c8210b369b6d77f3095ffbc2091ccb65 GIT binary patch literal 96 zcmZ>95AZP5Gce)yD$P?+uuw2EFf!yYG_f);ure}WXJBB|XJBLx%g-szO)X|%Vs=R_ nV_@bkPR&UxD9S8LOs-^LLE*77XXY0(u(1T>rxY^+wKD(!DHRsg literal 0 HcmV?d00001 diff --git a/ios/build/Pods.build/Release-iphonesimulator/url_launcher.build/dgph b/ios/build/Pods.build/Release-iphonesimulator/url_launcher.build/dgph new file mode 100644 index 0000000000000000000000000000000000000000..0c4ca337c8210b369b6d77f3095ffbc2091ccb65 GIT binary patch literal 96 zcmZ>95AZP5Gce)yD$P?+uuw2EFf!yYG_f);ure}WXJBB|XJBLx%g-szO)X|%Vs=R_ nV_@bkPR&UxD9S8LOs-^LLE*77XXY0(u(1T>rxY^+wKD(!DHRsg literal 0 HcmV?d00001 diff --git a/ios/build/Pods.build/Release-iphonesimulator/wakelock.build/dgph b/ios/build/Pods.build/Release-iphonesimulator/wakelock.build/dgph new file mode 100644 index 0000000000000000000000000000000000000000..0c4ca337c8210b369b6d77f3095ffbc2091ccb65 GIT binary patch literal 96 zcmZ>95AZP5Gce)yD$P?+uuw2EFf!yYG_f);ure}WXJBB|XJBLx%g-szO)X|%Vs=R_ nV_@bkPR&UxD9S8LOs-^LLE*77XXY0(u(1T>rxY^+wKD(!DHRsg literal 0 HcmV?d00001 diff --git a/lib/config/hive_config.dart b/lib/config/hive_config.dart index e704b50c..4e84c848 100644 --- a/lib/config/hive_config.dart +++ b/lib/config/hive_config.dart @@ -22,15 +22,13 @@ class HiveConfig { await Hive.openBox(BNames.users); var cipher = HiveAesCipher(await getEncriptedKey()); - await Hive.openBox(BNames.appConfig, encryptionCipher: cipher); } static Future getEncriptedKey() async { - final FlutterSecureStorage secureStorage = FlutterSecureStorage(); - var containsEncryptionKey = - await secureStorage.containsKey(key: BNames.key); - if (!containsEncryptionKey) { + final secureStorage = FlutterSecureStorage(); + var hasEncryptionKey = await secureStorage.containsKey(key: BNames.key); + if (!hasEncryptionKey) { var key = Hive.generateSecureKey(); await secureStorage.write(key: BNames.key, value: base64UrlEncode(key)); } diff --git a/lib/logic/api_maps/hetzner.dart b/lib/logic/api_maps/hetzner.dart index 0c29a040..dcf3a518 100644 --- a/lib/logic/api_maps/hetzner.dart +++ b/lib/logic/api_maps/hetzner.dart @@ -73,7 +73,6 @@ class HetznerApi extends ApiMap { required User rootUser, required String domainName, }) async { - var client = await getClient(); Response dbCreateResponse = await client.post( @@ -87,12 +86,12 @@ class HetznerApi extends ApiMap { "format": "ext4" }, ); - + var dbPassword = StringGenerators.dbPassword(); var dbId = dbCreateResponse.data['volume']['id']; var data = jsonDecode( - '''{"name":"$domainName","server_type":"cx11","start_after_create":false,"image":"ubuntu-20.04", "volumes":[$dbId], "networks":[], "user_data":"#cloud-config\\nruncmd:\\n- curl https://git.selfprivacy.org/ilchub/selfprivacy-nixos-infect/raw/branch/master/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN=$domainName LUSER=${rootUser.login} PASSWORD=${rootUser.password} HASHED_PASSWORD=${rootUser.hashPassword.hash} SALT=${rootUser.hashPassword.salt} CF_TOKEN=$cloudFlareKey DB_PASSWORD=$dbPassword bash 2>&1 | tee /tmp/infect.log","labels":{},"automount":true, "location": "fsn1"}'''); + '''{"name":"$domainName","server_type":"cx11","start_after_create":false,"image":"ubuntu-20.04", "volumes":[$dbId], "networks":[], ssh_keys:[kherel], "user_data":"#cloud-config\\nruncmd:\\n- curl https://git.selfprivacy.org/ilchub/selfprivacy-nixos-infect/raw/branch/development/nixos-infect | PROVIDER=hetzner NIX_CHANNEL=nixos-21.05 DOMAIN=$domainName LUSER=${rootUser.login} PASSWORD=${rootUser.password} CF_TOKEN=$cloudFlareKey DB_PASSWORD=$dbPassword bash 2>&1 | tee /tmp/infect.log","labels":{},"automount":true, "location": "fsn1"}'''); Response serverCreateResponse = await client.post( '/servers', diff --git a/lib/logic/cubit/jobs/jobs_cubit.dart b/lib/logic/cubit/jobs/jobs_cubit.dart index aebe2ddd..20285342 100644 --- a/lib/logic/cubit/jobs/jobs_cubit.dart +++ b/lib/logic/cubit/jobs/jobs_cubit.dart @@ -1,3 +1,4 @@ +import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; import 'package:selfprivacy/config/get_it_config.dart'; import 'package:selfprivacy/logic/api_maps/server.dart'; @@ -6,6 +7,7 @@ import 'package:selfprivacy/logic/models/jobs/job.dart'; import 'package:equatable/equatable.dart'; import 'package:selfprivacy/logic/models/user.dart'; export 'package:provider/provider.dart'; +import 'package:easy_localization/easy_localization.dart'; part 'jobs_state.dart'; @@ -21,6 +23,10 @@ class JobsCubit extends Cubit { newJobsList.addAll((state as JobsStateWithJobs).jobList); } newJobsList.add(job); + getIt().showSnackBar(SnackBar( + content: Text('jobs.jobAdded'.tr()), + duration: const Duration(seconds: 2), + )); emit(JobsStateWithJobs(newJobsList)); } diff --git a/lib/logic/cubit/services/services_cubit.dart b/lib/logic/cubit/services/services_cubit.dart new file mode 100644 index 00000000..36bc3155 --- /dev/null +++ b/lib/logic/cubit/services/services_cubit.dart @@ -0,0 +1,10 @@ +import 'package:bloc/bloc.dart'; +import 'package:equatable/equatable.dart'; + +part 'services_state.dart'; + +class ServicesCubit extends Cubit { + ServicesCubit() : super(ServicesInitial()); + + +} diff --git a/lib/logic/cubit/services/services_state.dart b/lib/logic/cubit/services/services_state.dart new file mode 100644 index 00000000..e58e02cf --- /dev/null +++ b/lib/logic/cubit/services/services_state.dart @@ -0,0 +1,10 @@ +part of 'services_cubit.dart'; + +abstract class ServicesState extends Equatable { + const ServicesState(); + + @override + List get props => []; +} + +class ServicesInitial extends ServicesState {} diff --git a/lib/logic/get_it/navigation.dart b/lib/logic/get_it/navigation.dart index 92074c93..6d179fa7 100644 --- a/lib/logic/get_it/navigation.dart +++ b/lib/logic/get_it/navigation.dart @@ -2,7 +2,10 @@ import 'package:flutter/material.dart'; import 'package:flutter/widgets.dart'; class NavigationService { + final GlobalKey scaffoldMessengerKey = + GlobalKey(); final GlobalKey navigatorKey = GlobalKey(); + NavigatorState? get navigator => navigatorKey.currentState; void showPopUpDialog(AlertDialog dialog) { @@ -13,4 +16,10 @@ class NavigationService { builder: (_) => dialog, ); } + + void showSnackBar(SnackBar snackBar) { + final state = scaffoldMessengerKey.currentState!; + + state.showSnackBar(snackBar); + } } diff --git a/lib/main.dart b/lib/main.dart index 67199de0..cfd595ae 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -16,11 +16,11 @@ import 'config/localization.dart'; import 'logic/cubit/app_settings/app_settings_cubit.dart'; void main() async { + WidgetsFlutterBinding.ensureInitialized(); await HiveConfig.init(); Bloc.observer = SimpleBlocObserver(); Wakelock.enable(); await getItSetup(); - WidgetsFlutterBinding.ensureInitialized(); await EasyLocalization.ensureInitialized(); runApp(MyApp()); @@ -37,6 +37,8 @@ class MyApp extends StatelessWidget { return AnnotatedRegion( value: SystemUiOverlayStyle.light, // Manually changnig appbar color child: MaterialApp( + scaffoldMessengerKey: + getIt.get().scaffoldMessengerKey, navigatorKey: getIt.get().navigatorKey, localizationsDelegates: context.localizationDelegates, supportedLocales: context.supportedLocales, diff --git a/lib/ui/components/brand_switch/brand_switch.dart b/lib/ui/components/brand_switch/brand_switch.dart new file mode 100644 index 00000000..60c411cf --- /dev/null +++ b/lib/ui/components/brand_switch/brand_switch.dart @@ -0,0 +1,24 @@ +import 'package:flutter/material.dart'; + +import 'package:selfprivacy/config/brand_colors.dart'; + +class BrandSwitch extends StatelessWidget { + const BrandSwitch({ + Key? key, + required this.onChanged, + required this.value, + }) : super(key: key); + + final ValueChanged onChanged; + final bool value; + + @override + Widget build(BuildContext context) { + return Switch( + activeColor: BrandColors.green1, + activeTrackColor: BrandColors.green2, + value: value, + onChanged: onChanged, + ); + } +} diff --git a/lib/ui/pages/more/app_settings/app_setting.dart b/lib/ui/pages/more/app_settings/app_setting.dart index 6959b343..4aa1b2a4 100644 --- a/lib/ui/pages/more/app_settings/app_setting.dart +++ b/lib/ui/pages/more/app_settings/app_setting.dart @@ -7,6 +7,7 @@ import 'package:selfprivacy/ui/components/action_button/action_button.dart'; import 'package:selfprivacy/ui/components/brand_alert/brand_alert.dart'; import 'package:selfprivacy/ui/components/brand_divider/brand_divider.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; +import 'package:selfprivacy/ui/components/brand_switch/brand_switch.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/utils/named_font_weight.dart'; import 'package:easy_localization/easy_localization.dart'; @@ -52,9 +53,7 @@ class _AppSettingsPageState extends State { ), ), SizedBox(width: 5), - Switch( - activeColor: BrandColors.green1, - activeTrackColor: BrandColors.green2, + BrandSwitch( value: Theme.of(context).brightness == Brightness.dark, onChanged: (value) => context .read() diff --git a/lib/ui/pages/server_details/cpu_chart.dart b/lib/ui/pages/server_details/cpu_chart.dart index 88163caa..96ee94ce 100644 --- a/lib/ui/pages/server_details/cpu_chart.dart +++ b/lib/ui/pages/server_details/cpu_chart.dart @@ -51,7 +51,7 @@ class CpuChart extends StatelessWidget { interval: 20, rotateAngle: 90.0, showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (_, __) => const TextStyle( fontSize: 10, color: Colors.purple, fontWeight: FontWeight.bold, @@ -60,7 +60,7 @@ class CpuChart extends StatelessWidget { return bottomTitle(value.toInt()); }), leftTitles: SideTitles( - getTextStyles: (value) => progressTextStyleLight.copyWith( + getTextStyles: (_, __) => progressTextStyleLight.copyWith( color: Theme.of(context).brightness == Brightness.dark ? BrandColors.gray4 : null, diff --git a/lib/ui/pages/server_details/network_charts.dart b/lib/ui/pages/server_details/network_charts.dart index cb352267..44d1c0ba 100644 --- a/lib/ui/pages/server_details/network_charts.dart +++ b/lib/ui/pages/server_details/network_charts.dart @@ -71,7 +71,7 @@ class NetworkChart extends StatelessWidget { interval: 20, rotateAngle: 90.0, showTitles: true, - getTextStyles: (value) => const TextStyle( + getTextStyles: (_, __) => const TextStyle( fontSize: 10, color: Colors.purple, fontWeight: FontWeight.bold, @@ -87,7 +87,7 @@ class NetworkChart extends StatelessWidget { ].reduce(max) * 1.2 / 10, - getTextStyles: (value) => progressTextStyleLight.copyWith( + getTextStyles: (_, __) => progressTextStyleLight.copyWith( color: Theme.of(context).brightness == Brightness.dark ? BrandColors.gray4 : null, diff --git a/lib/ui/pages/services/services.dart b/lib/ui/pages/services/services.dart index 599e7e8f..a36d745d 100644 --- a/lib/ui/pages/services/services.dart +++ b/lib/ui/pages/services/services.dart @@ -8,7 +8,6 @@ import 'package:selfprivacy/logic/models/state_types.dart'; import 'package:selfprivacy/ui/components/brand_button/brand_button.dart'; import 'package:selfprivacy/ui/components/brand_cards/brand_cards.dart'; import 'package:selfprivacy/ui/components/brand_header/brand_header.dart'; -import 'package:selfprivacy/ui/components/brand_icons/brand_icons.dart'; import 'package:selfprivacy/ui/components/brand_text/brand_text.dart'; import 'package:selfprivacy/ui/components/icon_status_mask/icon_status_mask.dart'; import 'package:selfprivacy/ui/components/not_ready_card/not_ready_card.dart'; @@ -64,10 +63,6 @@ class _Card extends StatelessWidget { final ServiceTypes serviceType; @override Widget build(BuildContext context) { - String title; - IconData iconData; - String subtitle; - var isReady = context.watch().state.isFullyInitilized; var changeTab = context.read().onPress; return GestureDetector( @@ -366,252 +361,3 @@ class _ServiceDetails extends StatelessWidget { } } } - - -// class _ServiceDetails extends StatelessWidget { -// const _ServiceDetails({ -// Key? key, -// required this.serviceType, -// required this.icon, -// required this.status, -// required this.title, -// required this.changeTab, -// }) : super(key: key); - -// final ServiceTypes serviceType; -// final IconData icon; -// final StateType status; -// final String title; -// final ValueChanged changeTab; - -// @override -// Widget build(BuildContext context) { -// late Widget child; - -// var config = context.watch().state; -// var domainName = UiHelpers.getDomainName(config); - -// var linksStyle = body1Style.copyWith( -// fontSize: 15, -// color: Theme.of(context).brightness == Brightness.dark -// ? Colors.white -// : BrandColors.black, -// fontWeight: FontWeight.bold, -// decoration: TextDecoration.underline, -// // height: 1.1, -// ); - -// var textStyle = body1Style.copyWith( -// color: Theme.of(context).brightness == Brightness.dark -// ? Colors.white -// : BrandColors.black, -// ); -// switch (serviceType) { -// case ServiceTypes.mail: -// child = RichText( -// text: TextSpan( -// children: [ -// TextSpan( -// text: 'services.mail.bottom_sheet.1'.tr(args: [domainName]), -// style: textStyle, -// ), -// WidgetSpan( -// child: Padding( -// padding: EdgeInsets.only(bottom: 0.8, left: 5), -// child: GestureDetector( -// child: Text( -// 'services.mail.bottom_sheet.2'.tr(), -// style: linksStyle, -// ), -// onTap: () { -// Navigator.of(context).pop(); -// changeTab(2); -// }, -// ), -// ), -// ), -// ], -// )); -// break; -// case ServiceTypes.messenger: -// child = RichText( -// text: TextSpan( -// children: [ -// TextSpan( -// text: 'services.messenger.bottom_sheet.1'.tr(args: [domainName]), -// style: textStyle, -// ) -// ], -// )); -// break; -// case ServiceTypes.passwordManager: -// child = RichText( -// text: TextSpan( -// children: [ -// TextSpan( -// text: 'services.password_manager.bottom_sheet.1' -// .tr(args: [domainName]), -// style: textStyle, -// ), -// WidgetSpan( -// child: Padding( -// padding: EdgeInsets.only(bottom: 0.8, left: 5), -// child: GestureDetector( -// onTap: () => _launchURL('https://password.$domainName'), -// child: Text( -// 'password.$domainName', -// style: linksStyle, -// ), -// ), -// ), -// ), -// ], -// )); -// break; -// case ServiceTypes.video: -// child = RichText( -// text: TextSpan( -// children: [ -// TextSpan( -// text: 'services.video.bottom_sheet.1'.tr(args: [domainName]), -// style: textStyle, -// ), -// WidgetSpan( -// child: Padding( -// padding: EdgeInsets.only(bottom: 0.8, left: 5), -// child: GestureDetector( -// onTap: () => _launchURL('https://meet.$domainName'), -// child: Text( -// 'meet.$domainName', -// style: linksStyle, -// ), -// ), -// ), -// ), -// ], -// )); -// break; -// case ServiceTypes.cloud: -// child = RichText( -// text: TextSpan( -// children: [ -// TextSpan( -// text: 'services.cloud.bottom_sheet.1'.tr(args: [domainName]), -// style: textStyle, -// ), -// WidgetSpan( -// child: Padding( -// padding: EdgeInsets.only(bottom: 0.8, left: 5), -// child: GestureDetector( -// onTap: () => _launchURL('https://cloud.$domainName'), -// child: Text( -// 'cloud.$domainName', -// style: linksStyle, -// ), -// ), -// ), -// ), -// ], -// )); -// break; -// case ServiceTypes.socialNetwork: -// child = RichText( -// text: TextSpan( -// children: [ -// TextSpan( -// text: 'services.social_network.bottom_sheet.1' -// .tr(args: [domainName]), -// style: textStyle, -// ), -// WidgetSpan( -// child: Padding( -// padding: EdgeInsets.only(bottom: 0.8, left: 5), -// child: GestureDetector( -// onTap: () => _launchURL('https://social.$domainName'), -// child: Text( -// 'social.$domainName', -// style: linksStyle, -// ), -// ), -// ), -// ), -// ], -// )); -// break; -// case ServiceTypes.git: -// child = RichText( -// text: TextSpan( -// children: [ -// TextSpan( -// text: 'services.git.bottom_sheet.1'.tr(args: [domainName]), -// style: textStyle, -// ), -// WidgetSpan( -// child: Padding( -// padding: EdgeInsets.only(bottom: 0.8, left: 5), -// child: GestureDetector( -// onTap: () => _launchURL('https://git.$domainName'), -// child: Text( -// 'git.$domainName', -// style: linksStyle, -// ), -// ), -// ), -// ), -// ], -// )); -// break; -// } -// return BrandModalSheet( - // child: Navigator( - // key: navigatorKey, - // initialRoute: '/', - // onGenerateRoute: (_) { - // return materialRoute( -// Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// Padding( -// padding: brandPagePadding1, -// child: Column( -// crossAxisAlignment: CrossAxisAlignment.start, -// children: [ -// SizedBox(height: 13), -// IconStatusMask( -// status: status, -// child: Icon(icon, size: 40, color: Colors.white), -// ), -// SizedBox(height: 10), -// BrandText.h1(title), -// SizedBox(height: 10), -// child, -// ], -// ), -// ) -// ], -// ), -// ); -// }, -// ), -// ); -// } - -// void _launchURL(url) async { -// var _possible = await canLaunch(url); - -// if (_possible) { -// try { -// await launch( -// url, -// forceSafariVC: true, -// enableJavaScript: true, -// ); -// } catch (e) { -// print(e); -// } -// } else { -// throw 'Could not launch $url'; -// } -// } -// } - diff --git a/pubspec.lock b/pubspec.lock index 5f0d5809..48ca09b2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -42,14 +42,14 @@ packages: name: basic_utils url: "https://pub.dartlang.org" source: hosted - version: "3.4.0" + version: "3.5.0" bloc: dependency: transitive description: name: bloc url: "https://pub.dartlang.org" source: hosted - version: "7.0.0" + version: "7.1.0" boolean_selector: dependency: transitive description: @@ -63,21 +63,21 @@ packages: name: build url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.1.0" build_config: dependency: transitive description: name: build_config url: "https://pub.dartlang.org" source: hosted - version: "0.4.7" + version: "1.0.0" build_daemon: dependency: transitive description: name: build_daemon url: "https://pub.dartlang.org" source: hosted - version: "2.1.10" + version: "3.0.0" build_resolvers: dependency: transitive description: @@ -91,14 +91,14 @@ packages: name: build_runner url: "https://pub.dartlang.org" source: hosted - version: "1.12.2" + version: "2.1.1" build_runner_core: dependency: transitive description: name: build_runner_core url: "https://pub.dartlang.org" source: hosted - version: "6.1.12" + version: "7.1.0" built_collection: dependency: transitive description: @@ -154,7 +154,7 @@ packages: name: code_builder url: "https://pub.dartlang.org" source: hosted - version: "3.7.0" + version: "4.1.0" collection: dependency: transitive description: @@ -259,7 +259,7 @@ packages: name: extended_masked_text url: "https://pub.dartlang.org" source: hosted - version: "2.3.0" + version: "2.3.1" fake_async: dependency: transitive description: @@ -294,7 +294,7 @@ packages: name: fl_chart url: "https://pub.dartlang.org" source: hosted - version: "0.35.0" + version: "0.40.0" flutter: dependency: "direct main" description: flutter @@ -306,14 +306,14 @@ packages: name: flutter_bloc url: "https://pub.dartlang.org" source: hosted - version: "7.1.0" + version: "7.2.0" flutter_launcher_icons: dependency: "direct dev" description: name: flutter_launcher_icons url: "https://pub.dartlang.org" source: hosted - version: "0.9.1" + version: "0.9.2" flutter_localizations: dependency: transitive description: flutter @@ -325,7 +325,7 @@ packages: name: flutter_markdown url: "https://pub.dartlang.org" source: hosted - version: "0.6.4" + version: "0.6.5" flutter_secure_storage: dependency: "direct main" description: @@ -343,13 +343,20 @@ packages: description: flutter source: sdk version: "0.0.0" + frontend_server_client: + dependency: transitive + description: + name: frontend_server_client + url: "https://pub.dartlang.org" + source: hosted + version: "2.1.2" get_it: dependency: "direct main" description: name: get_it url: "https://pub.dartlang.org" source: hosted - version: "6.1.1" + version: "7.2.0" glob: dependency: transitive description: @@ -363,7 +370,7 @@ packages: name: graphs url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "2.0.0" hive: dependency: "direct main" description: @@ -594,7 +601,7 @@ packages: name: platform url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.0.2" plugin_platform_interface: dependency: transitive description: @@ -608,7 +615,7 @@ packages: name: pointycastle url: "https://pub.dartlang.org" source: hosted - version: "3.3.0" + version: "3.3.2" pool: dependency: transitive description: @@ -636,7 +643,7 @@ packages: name: provider url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "6.0.0" pub_semver: dependency: transitive description: @@ -664,7 +671,7 @@ packages: name: share_plus_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.4" share_plus_macos: dependency: transitive description: @@ -699,7 +706,7 @@ packages: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.7" shared_preferences_linux: dependency: transitive description: @@ -727,7 +734,7 @@ packages: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" shared_preferences_windows: dependency: transitive description: @@ -879,7 +886,7 @@ packages: name: unicons url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "2.0.1" url_launcher: dependency: "direct main" description: @@ -914,14 +921,14 @@ packages: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.4" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" vector_math: dependency: transitive description: @@ -998,7 +1005,7 @@ packages: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.2.5" + version: "2.2.7" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 44eadcb7..5ce1bc14 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -17,11 +17,11 @@ dependencies: easy_localization: ^3.0.0 either_option: ^2.0.1-dev.1 equatable: ^2.0.3 - fl_chart: ^0.35.0 + fl_chart: ^0.40.0 flutter_bloc: ^7.1.0 flutter_markdown: ^0.6.0 flutter_secure_storage: ^4.1.0 - get_it: ^6.0.0 + get_it: ^7.2.0 hive: ^2.0.0 hive_flutter: ^1.0.0 ionicons: ^0.1.2 @@ -30,9 +30,9 @@ dependencies: nanoid: ^1.0.0 package_info: ^2.0.0 pretty_dio_logger: ^1.1.1 - provider: ^5.0.0 + provider: ^6.0.0 share_plus: ^2.1.4 - unicons: ^1.0.2 + unicons: ^2.0.1 url_launcher: ^6.0.2 wakelock: ^0.5.0+2 basic_utils: ^3.4.0 @@ -40,7 +40,7 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - build_runner: ^1.11.5 + build_runner: ^2.1.1 flutter_launcher_icons: ^0.9.0 hive_generator: ^1.0.0 json_serializable: ^4.0.2