diff --git a/.fandogh/fandogh.yaml b/.fandogh/fandogh.yaml index 05b34a4..1d5bac1 100644 --- a/.fandogh/fandogh.yaml +++ b/.fandogh/fandogh.yaml @@ -3,11 +3,11 @@ name: app-test spec: allow_http: false disable_default_domains: true - image: app-test:0.0.4 + image: app:1.1.1 image_pull_policy: IfNotPresent path: / replicas: 1 resources: - memory: 50Mi + memory: 150Mi domains: - - name: dev.didvan.app \ No newline at end of file + - name: web.didvan.app \ No newline at end of file diff --git a/lib/services/network/request_helper.dart b/lib/services/network/request_helper.dart index 5e28117..37c1f14 100644 --- a/lib/services/network/request_helper.dart +++ b/lib/services/network/request_helper.dart @@ -90,28 +90,28 @@ class RequestHelper { MapEntry('search', args.search), ]); - static String markStudioItem(int id) => _baseStudioUrl + '/$id/mark'; - static String studioItemComments(int id) => _baseStudioUrl + '/$id/comments'; - static String addStudioItemComment(int id) => + static String markStudio(int id) => _baseStudioUrl + '/$id/mark'; + static String studioComments(int id) => _baseStudioUrl + '/$id/comments'; + static String addStudioComment(int id) => _baseStudioUrl + '/$id/comments/add'; - static String feedbackStudioItemComment(int radarId, int id) => - _baseStudioUrl + '/$radarId/comments/$id/feedback'; - static String studioItemDetails(int id, StudioRequestArgs args) => + static String feedbackStudioComment(int studioId, int id) => + _baseStudioUrl + '/$studioId/comments/$id/feedback'; + static String studioDetails(int id, StudioRequestArgs args) => _baseStudioUrl + '/$id' + _urlConcatGenerator([ MapEntry('page', args.page.toString()), - MapEntry('search', args.search), - MapEntry('order', args.order), MapEntry('type', args.type), + MapEntry('order', args.order), + MapEntry('search', args.search), ]); - static String studioItemOverviews({required StudioRequestArgs args}) => - _baseStudioUrl + + static String studioOverviews({required StudioRequestArgs args}) => + _baseNewsUrl + _urlConcatGenerator([ MapEntry('page', args.page.toString()), - MapEntry('search', args.search), - MapEntry('order', args.order), MapEntry('type', args.type), + MapEntry('order', args.order), + MapEntry('search', args.search), ]); static String _urlConcatGenerator(List> additions) { diff --git a/lib/views/authentication/screens/username.dart b/lib/views/authentication/screens/username.dart index e5a9187..6c5cf8c 100644 --- a/lib/views/authentication/screens/username.dart +++ b/lib/views/authentication/screens/username.dart @@ -39,6 +39,7 @@ class _UsernameInputState extends State { if (value.length < 4) { return 'نام کاربری نمی‌تواند از 4 کاراکتر کمتر باشد'; } + return null; }, onChanged: (value) { state.username = value; diff --git a/lib/views/home/settings/profile/profile.dart b/lib/views/home/settings/profile/profile.dart index 071d6ac..5b666e7 100644 --- a/lib/views/home/settings/profile/profile.dart +++ b/lib/views/home/settings/profile/profile.dart @@ -100,13 +100,15 @@ class _ProfileState extends State { email = value; }, initialValue: state.user.email, - validator: (value) async { + validator: (value) { + if (value.isEmpty) return null; bool emailValid = RegExp( r"^[a-zA-Z0-9.a-zA-Z0-9.!#$%&'*+-/=?^_`{|}~]+@[a-zA-Z0-9]+\.[a-zA-Z]+") .hasMatch(value); if (!emailValid) { return 'ایمیل وارد شده معتبر نمی‌باشد'; } + return null; }, ), // const SizedBox(height: 16), diff --git a/lib/views/home/studio/studio.dart b/lib/views/home/studio/studio.dart index bf7a141..a362ed8 100644 --- a/lib/views/home/studio/studio.dart +++ b/lib/views/home/studio/studio.dart @@ -24,12 +24,6 @@ class Studio extends StatefulWidget { class _StudioState extends State { final FocusNode _focusNode = FocusNode(); - @override - void initState() { - context.read().init(); - super.initState(); - } - @override Widget build(BuildContext context) { return CustomScrollView( diff --git a/lib/views/home/studio/studio_state.dart b/lib/views/home/studio/studio_state.dart index 0008b17..f8e6944 100644 --- a/lib/views/home/studio/studio_state.dart +++ b/lib/views/home/studio/studio_state.dart @@ -48,7 +48,7 @@ class StudioState extends CoreProvier { } final service = RequestService( - RequestHelper.studioItemOverviews( + RequestHelper.studioOverviews( args: StudioRequestArgs( page: page, type: videosSelected ? 'video' : 'podcast', diff --git a/lib/views/widgets/didvan/text_field.dart b/lib/views/widgets/didvan/text_field.dart index 065b6d7..5508be8 100644 --- a/lib/views/widgets/didvan/text_field.dart +++ b/lib/views/widgets/didvan/text_field.dart @@ -18,7 +18,7 @@ class DidvanTextField extends StatefulWidget { final dynamic initialValue; final bool obsecureText; final bool acceptSpace; - final Function(String value)? validator; + final String? Function(String value)? validator; final TextInputType? textInputType; const DidvanTextField({ Key? key, diff --git a/pubspec.yaml b/pubspec.yaml index 8b76c42..8c847b0 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -15,7 +15,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.0.5+5 +version: 1.1.0+1 environment: sdk: ">=2.12.0 <3.0.0"