diff --git a/.gitignore b/.gitignore index e167a73..9d9b1ce 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ /.flutter-plugins /.flutter-plugins-dependencies /.packages -/.env \ No newline at end of file +/.env +/node_modules/ diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..cd6bc42 --- /dev/null +++ b/Makefile @@ -0,0 +1,7 @@ +run-tests: + flutter test + +run-analyse: + flutter analyze + +run-checks: run-analyse run-tests \ No newline at end of file diff --git a/lib/app_router.dart b/lib/app_router.dart index dada825..30cda0b 100644 --- a/lib/app_router.dart +++ b/lib/app_router.dart @@ -45,8 +45,9 @@ class AppRouter { path: '/auth-screen', name: 'authScreen', redirect: (context, state) async { - if (await TokenStorage.haveTokenInStorage()) + if (await TokenStorage.haveTokenInStorage()) { return '/my-profile-screen'; + } return null; }, builder: (context, state) => AuthScreen.builder(context), @@ -59,120 +60,72 @@ class AppRouter { GoRoute( path: 'credentials-screen', name: 'credentialsScreen', - builder: (context, state) => - CredentialsScreen.builder(context, state.extra), + builder: (context, state) => CredentialsScreen.builder(context, state.extra), routes: [ GoRoute( path: 'name-screen', name: 'nameScreen', - builder: (context, state) => - NameScreen.builder(context, state.extra), + builder: (context, state) => NameScreen.builder(context, state.extra), routes: [ GoRoute( path: 'gender-screen', name: 'genderScreen', - builder: (context, state) => - GenderScreen.builder(context, state.extra), + builder: (context, state) => GenderScreen.builder(context, state.extra), routes: [ GoRoute( path: 'date-of-birth-screen', name: 'dateOfBirthScreen', - builder: (context, state) => - DateOfBirthScreen.builder(context, state.extra), + builder: (context, state) => DateOfBirthScreen.builder(context, state.extra), routes: [ GoRoute( path: 'city-of-living-screen', name: 'cityOfLivingScreen', - builder: (context, state) => - CityOfLivingScreen.builder( - context, state.extra), + builder: (context, state) => CityOfLivingScreen.builder(context, state.extra), routes: [ GoRoute( path: 'body-circumferences-screen', name: 'bodyCircumferencesScreen', - builder: (context, state) => - BodyCircumferencesScreen.builder( - context, state.extra), + builder: (context, state) => BodyCircumferencesScreen.builder(context, state.extra), routes: [ GoRoute( path: 'weight-screen', name: 'weightScreen', - builder: (context, state) => - WeightScreen.builder( - context, state.extra), + builder: (context, state) => WeightScreen.builder(context, state.extra), routes: [ GoRoute( path: 'height-screen', name: 'heightScreen', - builder: (context, state) => - HeightScreen.builder( - context, state.extra), + builder: (context, state) => HeightScreen.builder(context, state.extra), routes: [ GoRoute( path: 'blood-pressure-screen', name: 'bloodPressureScreen', - builder: (context, state) => - BloodPressureScreen.builder( - context, state.extra), + builder: (context, state) => BloodPressureScreen.builder(context, state.extra), routes: [ GoRoute( - path: - 'favorite-sports-screen', - name: - 'favoriteSportsScreen', - builder: (context, state) => - FavoriteSportsScreen - .builder(context, - state.extra), + path: 'favorite-sports-screen', + name: 'favoriteSportsScreen', + builder: (context, state) => FavoriteSportsScreen.builder(context, state.extra), routes: [ GoRoute( name: 'allergiesScreen', path: 'allergiesScreen', - builder: (context, - state) => - AllergiesScreen - .builder( - context, - state - .extra), + builder: (context, state) => AllergiesScreen.builder(context, state.extra), routes: [ GoRoute( - name: - 'medicineIntakeScreen', - path: - 'medicine-intake-screen', - builder: (context, - state) => - MedicineIntakeScreen - .builder( - context, - state - .extra), + name: 'medicineIntakeScreen', + path: 'medicine-intake-screen', + builder: (context, state) => MedicineIntakeScreen.builder(context, state.extra), ), GoRoute( - name: - 'favoriteFoodsScreen', - path: - 'favorite-foods-screen', - builder: (context, - state) => - FavoriteFoodsScreen - .builder( - context, - state - .extra), + name: 'favoriteFoodsScreen', + path: 'favorite-foods-screen', + builder: (context, state) => FavoriteFoodsScreen.builder(context, state.extra), routes: [ GoRoute( - path: - 'additional-information-screen', - name: - 'additionalInformationScreen', - builder: (context, - state) => - AdditionalInformationScreen.builder( - context, - state - .extra), + path: 'additional-information-screen', + name: 'additionalInformationScreen', + builder: (context, state) => AdditionalInformationScreen.builder(context, state.extra), ), ], ), @@ -220,14 +173,12 @@ class AppRouter { GoRoute( path: 'blog-post-create-screen', name: 'blogPostCreateScreen', - builder: (context, state) => - BlogPostCreateScreen.builder(context), + builder: (context, state) => BlogPostCreateScreen.builder(context), ), GoRoute( path: 'blog-post-screen', name: 'blogPostScreen', - builder: (context, state) => - BlogPostScreen(blogPostID: state.extra as String), + builder: (context, state) => BlogPostScreen(blogPostID: state.extra as String), routes: [ GoRoute( path: 'blog-post-edit-screen', diff --git a/lib/core/initialization_cubit/initialization_cubit.dart b/lib/core/initialization_cubit/initialization_cubit.dart index 2dabef5..83246b1 100644 --- a/lib/core/initialization_cubit/initialization_cubit.dart +++ b/lib/core/initialization_cubit/initialization_cubit.dart @@ -1,3 +1,4 @@ +import 'package:dart_pusher_channels/dart_pusher_channels.dart'; import 'package:eatvio_app/core/app_export.dart'; import 'package:eatvio_app/core/initialization_cubit/initialization_state.dart'; import 'package:eatvio_app/core/token_storage.dart'; @@ -8,54 +9,58 @@ class InitializationCubit extends Cubit { InitializationCubit({required this.chatRepository}) : super(const InitializationState.loading()); + // final myPrivateChannel = client.privateChannel( + // 'private-new-chat-messages.${wsUrl.userId}', + // authorizationDelegate: EndpointAuthorizableChannelTokenAuthorizationDelegate.forPrivateChannel( + // authorizationEndpoint: Uri.parse('https://mobile-stage.eatvio.ru/broadcasting/auth'), + // headers: { + // 'Authorization': 'Bearer ${await TokenStorage.getTokenFromStorage()}', + // }, + // ), + // ); + // myPrivateChannel.subscribe(); + // myPrivateChannel.bindToAll().listen((event) { + // print(event.name); + // }); + runInitialization() async { try { await TokenStorage.haveTokenInStorage(); - // final wsUrl = await chatRepository.getWebsocket(); - // final options = PusherChannelsOptions.fromHost( - // scheme: 'wss', - // key: wsUrl.key, - // host: wsUrl.host, - // shouldSupplyMetadataQueries: true, - // metadata: PusherChannelsOptionsMetadata.byDefault(), - // port: 443, - // ); - // final client = PusherChannelsClient.websocket( - // options: options, - // connectionErrorHandler: (exception, trace, refresh) { - // refresh(); - // }, - // minimumReconnectDelayDuration: const Duration( - // seconds: 1, - // ), - // defaultActivityDuration: const Duration( - // seconds: 120, - // ), - // activityDurationOverride: const Duration( - // seconds: 120, - // ), - // waitForPongDuration: const Duration( - // seconds: 30, - // ), - // ); - // await client.connect(); - // final myPrivateChannel = client.privateChannel( - // 'private-message-events.${wsUrl.userId}', - // authorizationDelegate: EndpointAuthorizableChannelTokenAuthorizationDelegate.forPrivateChannel( - // authorizationEndpoint: Uri.parse('https://mobile-stage.eatvio.ru/broadcasting/auth'), - // headers: { - // 'Authorization' : 'Bearer ${await TokenStorage.getTokenFromStorage()}', - // }, - // ), - // ); - // myPrivateChannel.subscribe(); - // myPrivateChannel.bindToAll().listen((event) { - // print(event.name); - // }); - emit(const InitializationState.success()); + final wsUrl = await chatRepository.getWebsocket(); + final options = PusherChannelsOptions.fromHost( + scheme: 'wss', + key: wsUrl.key, + host: wsUrl.host, + shouldSupplyMetadataQueries: true, + metadata: PusherChannelsOptionsMetadata.byDefault(), + port: 443, + ); + final client = PusherChannelsClient.websocket( + options: options, + connectionErrorHandler: (exception, trace, refresh) { + refresh(); + }, + minimumReconnectDelayDuration: const Duration( + seconds: 1, + ), + defaultActivityDuration: const Duration( + seconds: 120, + ), + activityDurationOverride: const Duration( + seconds: 120, + ), + waitForPongDuration: const Duration( + seconds: 30, + ), + ); + await client.connect(); + emit(InitializationState.success( + client: client, + )); } catch (e) { - print(e); - emit(InitializationState.error(errorMessage: e.toString())); + emit(InitializationState.error( + errorMessage: e.toString(), + )); } } } diff --git a/lib/core/initialization_cubit/initialization_state.dart b/lib/core/initialization_cubit/initialization_state.dart index 98f881c..43318d0 100644 --- a/lib/core/initialization_cubit/initialization_state.dart +++ b/lib/core/initialization_cubit/initialization_state.dart @@ -1,3 +1,4 @@ +import 'package:dart_pusher_channels/dart_pusher_channels.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; part 'initialization_state.freezed.dart'; @@ -8,7 +9,11 @@ abstract class InitializationState with _$InitializationState { const factory InitializationState.loading() = InitializationStateLoading; - const factory InitializationState.success() = InitializationStateSuccess; + const factory InitializationState.success({ + required PusherChannelsClient client, + }) = InitializationStateSuccess; - const factory InitializationState.error({required String errorMessage}) = InitializationStateError; + const factory InitializationState.error({ + required String errorMessage, + }) = InitializationStateError; } diff --git a/lib/core/initialization_cubit/initialization_state.freezed.dart b/lib/core/initialization_cubit/initialization_state.freezed.dart index 136672f..3364e44 100644 --- a/lib/core/initialization_cubit/initialization_state.freezed.dart +++ b/lib/core/initialization_cubit/initialization_state.freezed.dart @@ -20,7 +20,7 @@ mixin _$InitializationState { TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function() success, + required TResult Function(PusherChannelsClient client) success, required TResult Function(String errorMessage) error, }) => throw _privateConstructorUsedError; @@ -28,7 +28,7 @@ mixin _$InitializationState { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function()? success, + TResult? Function(PusherChannelsClient client)? success, TResult? Function(String errorMessage)? error, }) => throw _privateConstructorUsedError; @@ -36,7 +36,7 @@ mixin _$InitializationState { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function()? success, + TResult Function(PusherChannelsClient client)? success, TResult Function(String errorMessage)? error, required TResult orElse(), }) => @@ -127,7 +127,7 @@ class _$InitializationStateImpl implements _InitializationState { TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function() success, + required TResult Function(PusherChannelsClient client) success, required TResult Function(String errorMessage) error, }) { return $default(); @@ -138,7 +138,7 @@ class _$InitializationStateImpl implements _InitializationState { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function()? success, + TResult? Function(PusherChannelsClient client)? success, TResult? Function(String errorMessage)? error, }) { return $default?.call(); @@ -149,7 +149,7 @@ class _$InitializationStateImpl implements _InitializationState { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function()? success, + TResult Function(PusherChannelsClient client)? success, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -245,7 +245,7 @@ class _$InitializationStateLoadingImpl implements InitializationStateLoading { TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function() success, + required TResult Function(PusherChannelsClient client) success, required TResult Function(String errorMessage) error, }) { return loading(); @@ -256,7 +256,7 @@ class _$InitializationStateLoadingImpl implements InitializationStateLoading { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function()? success, + TResult? Function(PusherChannelsClient client)? success, TResult? Function(String errorMessage)? error, }) { return loading?.call(); @@ -267,7 +267,7 @@ class _$InitializationStateLoadingImpl implements InitializationStateLoading { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function()? success, + TResult Function(PusherChannelsClient client)? success, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -325,6 +325,8 @@ abstract class _$$InitializationStateSuccessImplCopyWith<$Res> { _$InitializationStateSuccessImpl value, $Res Function(_$InitializationStateSuccessImpl) then) = __$$InitializationStateSuccessImplCopyWithImpl<$Res>; + @useResult + $Res call({PusherChannelsClient client}); } /// @nodoc @@ -336,37 +338,61 @@ class __$$InitializationStateSuccessImplCopyWithImpl<$Res> _$InitializationStateSuccessImpl _value, $Res Function(_$InitializationStateSuccessImpl) _then) : super(_value, _then); + + @pragma('vm:prefer-inline') + @override + $Res call({ + Object? client = null, + }) { + return _then(_$InitializationStateSuccessImpl( + client: null == client + ? _value.client + : client // ignore: cast_nullable_to_non_nullable + as PusherChannelsClient, + )); + } } /// @nodoc class _$InitializationStateSuccessImpl implements InitializationStateSuccess { - const _$InitializationStateSuccessImpl(); + const _$InitializationStateSuccessImpl({required this.client}); + + @override + final PusherChannelsClient client; @override String toString() { - return 'InitializationState.success()'; + return 'InitializationState.success(client: $client)'; } @override bool operator ==(Object other) { return identical(this, other) || (other.runtimeType == runtimeType && - other is _$InitializationStateSuccessImpl); + other is _$InitializationStateSuccessImpl && + (identical(other.client, client) || other.client == client)); } @override - int get hashCode => runtimeType.hashCode; + int get hashCode => Object.hash(runtimeType, client); + + @JsonKey(ignore: true) + @override + @pragma('vm:prefer-inline') + _$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl> + get copyWith => __$$InitializationStateSuccessImplCopyWithImpl< + _$InitializationStateSuccessImpl>(this, _$identity); @override @optionalTypeArgs TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function() success, + required TResult Function(PusherChannelsClient client) success, required TResult Function(String errorMessage) error, }) { - return success(); + return success(client); } @override @@ -374,10 +400,10 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function()? success, + TResult? Function(PusherChannelsClient client)? success, TResult? Function(String errorMessage)? error, }) { - return success?.call(); + return success?.call(client); } @override @@ -385,12 +411,12 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function()? success, + TResult Function(PusherChannelsClient client)? success, TResult Function(String errorMessage)? error, required TResult orElse(), }) { if (success != null) { - return success(); + return success(client); } return orElse(); } @@ -434,7 +460,14 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess { } abstract class InitializationStateSuccess implements InitializationState { - const factory InitializationStateSuccess() = _$InitializationStateSuccessImpl; + const factory InitializationStateSuccess( + {required final PusherChannelsClient client}) = + _$InitializationStateSuccessImpl; + + PusherChannelsClient get client; + @JsonKey(ignore: true) + _$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl> + get copyWith => throw _privateConstructorUsedError; } /// @nodoc @@ -508,7 +541,7 @@ class _$InitializationStateErrorImpl implements InitializationStateError { TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function() success, + required TResult Function(PusherChannelsClient client) success, required TResult Function(String errorMessage) error, }) { return error(errorMessage); @@ -519,7 +552,7 @@ class _$InitializationStateErrorImpl implements InitializationStateError { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function()? success, + TResult? Function(PusherChannelsClient client)? success, TResult? Function(String errorMessage)? error, }) { return error?.call(errorMessage); @@ -530,7 +563,7 @@ class _$InitializationStateErrorImpl implements InitializationStateError { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function()? success, + TResult Function(PusherChannelsClient client)? success, TResult Function(String errorMessage)? error, required TResult orElse(), }) { diff --git a/lib/features/blog_post_create/models/blog_post_create_credentials_model.dart b/lib/features/blog_post_create/models/blog_post_create_credentials_model.dart index 71c84d3..e961471 100644 --- a/lib/features/blog_post_create/models/blog_post_create_credentials_model.dart +++ b/lib/features/blog_post_create/models/blog_post_create_credentials_model.dart @@ -11,6 +11,5 @@ class BlogPostCreateCredentialsModel with _$BlogPostCreateCredentialsModel { @Default('active') String status, }) = _BlogPostCreateCredentialsModel; - factory BlogPostCreateCredentialsModel.fromJson(Map json) => - _$BlogPostCreateCredentialsModelFromJson(json); + factory BlogPostCreateCredentialsModel.fromJson(Map json) => _$BlogPostCreateCredentialsModelFromJson(json); } diff --git a/lib/features/chat/presentation/pages/chat_select_screen/chat_select_screen.dart b/lib/features/chat/presentation/pages/chat_select_screen/chat_select_screen.dart index 60b889a..d98ea7f 100644 --- a/lib/features/chat/presentation/pages/chat_select_screen/chat_select_screen.dart +++ b/lib/features/chat/presentation/pages/chat_select_screen/chat_select_screen.dart @@ -1,7 +1,6 @@ import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/models/chat_entry.dart'; import 'package:eatvio_app/features/chat/presentation/pages/chat_select_screen/widgets/chat_entry_widget.dart'; import 'package:flutter/cupertino.dart'; - import 'bloc/chat_select_bloc.dart'; import 'models/chat_select_model.dart'; import 'package:eatvio_app/core/app_export.dart'; diff --git a/lib/features/chat/presentation/pages/chat_select_screen/widgets/chat_entry_widget.dart b/lib/features/chat/presentation/pages/chat_select_screen/widgets/chat_entry_widget.dart index 334aa65..1a8e34a 100644 --- a/lib/features/chat/presentation/pages/chat_select_screen/widgets/chat_entry_widget.dart +++ b/lib/features/chat/presentation/pages/chat_select_screen/widgets/chat_entry_widget.dart @@ -48,7 +48,7 @@ class ChatEntryWidget extends StatelessWidget { ), ), ), - SizedBox(width: 8), + SizedBox(width: 12), Expanded( child: Column( crossAxisAlignment: CrossAxisAlignment.start, diff --git a/lib/locator_service.dart b/lib/locator_service.dart index 2f4ee2f..f2ebc20 100644 --- a/lib/locator_service.dart +++ b/lib/locator_service.dart @@ -15,21 +15,16 @@ import 'package:get_it/get_it.dart'; final sl = GetIt.instance; Future init() async { - // BLoC + // BLoC / Cubit + sl.registerFactory(() => InitializationCubit(chatRepository: sl())); sl.registerFactory(() => ChatRoomCubit(chatRepository: sl())); - sl.registerFactory( - () => InitializationCubit(chatRepository: sl())); sl.registerFactory(() => FeedCubit(feedRepository: sl())); - sl.registerFactory( - () => BlogPostCubit(blogPostRepository: sl())); + sl.registerFactory(() => BlogPostCubit(blogPostRepository: sl())); // Repository - sl.registerLazySingleton( - () => ChatRepository(chatService: sl())); - sl.registerLazySingleton( - () => FeedRepository(feedService: sl())); - sl.registerLazySingleton( - () => BlogPostRepository(blogPostService: sl())); + sl.registerLazySingleton(() => ChatRepository(chatService: sl())); + sl.registerLazySingleton(() => FeedRepository(feedService: sl())); + sl.registerLazySingleton(() => BlogPostRepository(blogPostService: sl())); // Services sl.registerLazySingleton(() => ChatService(sl())); diff --git a/lib/main.dart b/lib/main.dart index 2f81b9f..9d608f2 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -52,8 +52,7 @@ class MyApp extends StatelessWidget { ), ], child: BlocListener( - listener: (BuildContext context, InitializationState state) { - }, + listener: (BuildContext context, InitializationState state) {}, child: BlocBuilder( builder: (context, state) { return KeyboardDismisser( diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json new file mode 100644 index 0000000..d86fe75 --- /dev/null +++ b/node_modules/.package-lock.json @@ -0,0 +1,18 @@ +{ + "name": "eatvio_app", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "node_modules/simple-git-hooks": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/simple-git-hooks/-/simple-git-hooks-2.11.1.tgz", + "integrity": "sha512-tgqwPUMDcNDhuf1Xf6KTUsyeqGdgKMhzaH4PAZZuzguOgTl5uuyeYe/8mWgAr6IBxB5V06uqEf6Dy37gIWDtDg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "simple-git-hooks": "cli.js" + } + } + } +} diff --git a/node_modules/simple-git-hooks/package.json b/node_modules/simple-git-hooks/package.json new file mode 100644 index 0000000..f3e8186 --- /dev/null +++ b/node_modules/simple-git-hooks/package.json @@ -0,0 +1,18 @@ +{ + "name": "simple-git-hooks", + "version": "2.11.1", + "description": "A simple, zero dependency tool for setting up git hooks for small projects", + "author": "Mikhail Gorbunov ", + "main": "simple-git-hooks.js", + "bin": "./cli.js", + "keywords": ["pre-commit","pre-push","git","hook","lint","linter"], + "license": "MIT", + "repository": { + "type": "git", + "url": "https://github.com/toplenboren/simple-git-hooks.git" + }, + "scripts": { + "postinstall": "node ./postinstall.js", + "uninstall": "node ./uninstall.js" + } +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..67e7935 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,26 @@ +{ + "name": "eatvio_app", + "version": "1.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "eatvio_app", + "version": "1.0.0", + "license": "ISC", + "devDependencies": { + "simple-git-hooks": "^2.11.1" + } + }, + "node_modules/simple-git-hooks": { + "version": "2.11.1", + "resolved": "https://registry.npmjs.org/simple-git-hooks/-/simple-git-hooks-2.11.1.tgz", + "integrity": "sha512-tgqwPUMDcNDhuf1Xf6KTUsyeqGdgKMhzaH4PAZZuzguOgTl5uuyeYe/8mWgAr6IBxB5V06uqEf6Dy37gIWDtDg==", + "dev": true, + "hasInstallScript": true, + "bin": { + "simple-git-hooks": "cli.js" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..9b39c56 --- /dev/null +++ b/package.json @@ -0,0 +1,22 @@ +{ + "name": "eatvio_app", + "version": "1.0.0", + "description": "- Flutter (Channel stable, 3.19.0, on Ubuntu 22.04.3 LTS 6.2.0-39-generic, locale en_US.UTF-8) - Android Studio (version 2023.1) - VS Code (version 1.85.0) - Android SDK (version 34.0.0) - устанавливается из Android Studio (Tools->SDK Manager->Android Command Line Tools) - Эмулятор (2 available)", + "main": "index.js", + "directories": { + "lib": "lib", + "test": "test" + }, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "devDependencies": { + "simple-git-hooks": "^2.11.1" + }, + "simple-git-hooks": { + "pre-push": "make run-checks", + "preserveUnused": true + } +} \ No newline at end of file diff --git a/pubspec.yaml b/pubspec.yaml index d3572e0..49e9d72 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: eatvio_app description: A new Flutter project. version: 0.0.0+1 -publish_to: 'none' +publish_to: "none" environment: sdk: ">=3.3.4 <4.0.0" @@ -13,7 +13,7 @@ dependencies: flutter_localizations: sdk: flutter - # BLoC state manager + # BLoC flutter_bloc: ^8.1.6 # local storage shared_preferences: ^2.2.3 @@ -22,17 +22,17 @@ dependencies: # cached_network_image: ^3.3.1 # - flutter_svg: ^2.0.9 + flutter_svg: ^2.0.10 # equatable: ^2.0.5 # - freezed_annotation: ^2.4.1 + freezed_annotation: ^2.4.2 # json_annotation: ^4.9.0 # validators: ^3.0.0 # - isar_flutter_libs: ^3.1.0+1 + isar_flutter_libs: ^3.1.0 # path_provider: ^2.1.3 # @@ -50,7 +50,7 @@ dependencies: # flutter_typeahead: ^5.2.0 # navigation - go_router: ^14.1.4 + go_router: ^14.2.0 # keyboard_dismisser: ^3.0.0 # service generator @@ -58,9 +58,9 @@ dependencies: # di get_it: ^7.7.0 # http request - dio: ^5.4.3+1 + dio: ^5.5.0 # pusher - dart_pusher_channels: ^1.2.2+1 + dart_pusher_channels: ^1.2.2 # photo gallery viewer + dismissible page photo_view: ^0.15.0 dismissible_page: ^1.0.2 @@ -71,7 +71,7 @@ dev_dependencies: build_runner: ^2.4.11 freezed: ^2.5.2 json_serializable: ^6.8.0 - retrofit_generator: ^8.1.0 + retrofit_generator: ^8.1.1 flutter_test: sdk: flutter