flutter 3 changes applied
This commit is contained in:
parent
b92369e600
commit
f841c12f7a
|
|
@ -3,7 +3,7 @@ name: app-test
|
||||||
spec:
|
spec:
|
||||||
allow_http: false
|
allow_http: false
|
||||||
disable_default_domains: true
|
disable_default_domains: true
|
||||||
image: app:2.1.1.17
|
image: app:2.1.1.18
|
||||||
image_pull_policy: IfNotPresent
|
image_pull_policy: IfNotPresent
|
||||||
path: /
|
path: /
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
|
|
||||||
|
|
@ -191,7 +191,7 @@ class CommentState extends State<Comment> {
|
||||||
content: Column(
|
content: Column(
|
||||||
children: [
|
children: [
|
||||||
if (comment.user.id != context.read<UserProvider>().user.id)
|
if (comment.user.id != context.read<UserProvider>().user.id)
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'گزارش محتوای نامناسب',
|
title: 'گزارش محتوای نامناسب',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
state.reportComment(comment.id);
|
state.reportComment(comment.id);
|
||||||
|
|
@ -200,7 +200,7 @@ class CommentState extends State<Comment> {
|
||||||
icon: DidvanIcons.alert_regular,
|
icon: DidvanIcons.alert_regular,
|
||||||
),
|
),
|
||||||
if (comment.user.id == context.read<UserProvider>().user.id)
|
if (comment.user.id == context.read<UserProvider>().user.id)
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'حذف نظر',
|
title: 'حذف نظر',
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
|
||||||
|
|
@ -59,28 +59,28 @@ class _BookmarksState extends State<Bookmarks> {
|
||||||
child: DidvanCard(
|
child: DidvanCard(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MenuItem(
|
MenuOption(
|
||||||
onTap: () => _onCategorySelected('radar'),
|
onTap: () => _onCategorySelected('radar'),
|
||||||
title: 'تحلیلهای رادار',
|
title: 'تحلیلهای رادار',
|
||||||
icon: DidvanIcons.radar_regular,
|
icon: DidvanIcons.radar_regular,
|
||||||
iconSize: 24,
|
iconSize: 24,
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
onTap: () => _onCategorySelected('news'),
|
onTap: () => _onCategorySelected('news'),
|
||||||
title: 'اخبار',
|
title: 'اخبار',
|
||||||
icon: DidvanIcons.news_regular,
|
icon: DidvanIcons.news_regular,
|
||||||
iconSize: 24,
|
iconSize: 24,
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
onTap: () => _onCategorySelected('video'),
|
onTap: () => _onCategorySelected('video'),
|
||||||
title: 'ویدئوها',
|
title: 'ویدئوها',
|
||||||
icon: DidvanIcons.video_regular,
|
icon: DidvanIcons.video_regular,
|
||||||
iconSize: 24,
|
iconSize: 24,
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
onTap: () => _onCategorySelected('podcast'),
|
onTap: () => _onCategorySelected('podcast'),
|
||||||
title: 'پادکستها',
|
title: 'پادکستها',
|
||||||
icon: DidvanIcons.podcast_regular,
|
icon: DidvanIcons.podcast_regular,
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ class _GeneralSettingsState extends State<GeneralSettings> {
|
||||||
appBarData: AppBarData(hasBack: true, title: 'تنظیمات'),
|
appBarData: AppBarData(hasBack: true, title: 'تنظیمات'),
|
||||||
children: [
|
children: [
|
||||||
DidvanCard(
|
DidvanCard(
|
||||||
child: MenuItem(
|
child: MenuOption(
|
||||||
title: 'زمان دریافت اعلان',
|
title: 'زمان دریافت اعلان',
|
||||||
onTap: () => _pickTimeRange(context),
|
onTap: () => _pickTimeRange(context),
|
||||||
icon: DidvanIcons.notification_regular,
|
icon: DidvanIcons.notification_regular,
|
||||||
|
|
@ -71,7 +71,7 @@ class _GeneralSettingsState extends State<GeneralSettings> {
|
||||||
DidvanCard(
|
DidvanCard(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MenuItem(
|
MenuOption(
|
||||||
suffix: DesignConfig.fontFamily == 'Dana-FA'
|
suffix: DesignConfig.fontFamily == 'Dana-FA'
|
||||||
? 'دانا'
|
? 'دانا'
|
||||||
: 'ایران سنس',
|
: 'ایران سنس',
|
||||||
|
|
@ -79,7 +79,7 @@ class _GeneralSettingsState extends State<GeneralSettings> {
|
||||||
onTap: _showFontFamilyBottomSheet,
|
onTap: _showFontFamilyBottomSheet,
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
suffix: _fontScaleSuffix,
|
suffix: _fontScaleSuffix,
|
||||||
title: 'اندازه متن',
|
title: 'اندازه متن',
|
||||||
onTap: _showFontScaleBottomSheet,
|
onTap: _showFontScaleBottomSheet,
|
||||||
|
|
|
||||||
|
|
@ -118,7 +118,7 @@ class _ProfileState extends State<Profile> {
|
||||||
// onChanged: (value) => {},
|
// onChanged: (value) => {},
|
||||||
// ),
|
// ),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'تغییر رمز عبور',
|
title: 'تغییر رمز عبور',
|
||||||
onTap: () => Navigator.of(context).pushNamed(
|
onTap: () => Navigator.of(context).pushNamed(
|
||||||
Routes.authenticaion,
|
Routes.authenticaion,
|
||||||
|
|
|
||||||
|
|
@ -93,13 +93,13 @@ class _ProfilePhotoState extends State<ProfilePhoto> {
|
||||||
padding: const EdgeInsets.only(right: 20),
|
padding: const EdgeInsets.only(right: 20),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'دوربین',
|
title: 'دوربین',
|
||||||
onTap: () => _setProfilePhoto(ImageSource.camera),
|
onTap: () => _setProfilePhoto(ImageSource.camera),
|
||||||
icon: DidvanIcons.camera_regular,
|
icon: DidvanIcons.camera_regular,
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'گالری',
|
title: 'گالری',
|
||||||
onTap: () => _setProfilePhoto(ImageSource.gallery),
|
onTap: () => _setProfilePhoto(ImageSource.gallery),
|
||||||
icon: DidvanIcons.gallery_file_regular,
|
icon: DidvanIcons.gallery_file_regular,
|
||||||
|
|
@ -108,7 +108,7 @@ class _ProfilePhotoState extends State<ProfilePhoto> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'حذف تصویر',
|
title: 'حذف تصویر',
|
||||||
onTap: () => _setProfilePhoto(null),
|
onTap: () => _setProfilePhoto(null),
|
||||||
icon: DidvanIcons.trash_solid,
|
icon: DidvanIcons.trash_solid,
|
||||||
|
|
|
||||||
|
|
@ -33,35 +33,35 @@ class Settings extends StatelessWidget {
|
||||||
DidvanCard(
|
DidvanCard(
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'پیامها',
|
title: 'پیامها',
|
||||||
icon: DidvanIcons.message_regular,
|
icon: DidvanIcons.message_regular,
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
Navigator.of(context).pushNamed(Routes.directList),
|
Navigator.of(context).pushNamed(Routes.directList),
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'ویرایش پروفایل',
|
title: 'ویرایش پروفایل',
|
||||||
icon: DidvanIcons.user_edit_regular,
|
icon: DidvanIcons.user_edit_regular,
|
||||||
suffix: context.read<UserProvider>().user.fullName,
|
suffix: context.read<UserProvider>().user.fullName,
|
||||||
onTap: () => Navigator.of(context).pushNamed(Routes.profile),
|
onTap: () => Navigator.of(context).pushNamed(Routes.profile),
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'تنظیمات',
|
title: 'تنظیمات',
|
||||||
icon: DidvanIcons.setting_regular,
|
icon: DidvanIcons.setting_regular,
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
Navigator.of(context).pushNamed(Routes.generalSettings),
|
Navigator.of(context).pushNamed(Routes.generalSettings),
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'نشان شدهها',
|
title: 'نشان شدهها',
|
||||||
icon: DidvanIcons.bookmark_regular,
|
icon: DidvanIcons.bookmark_regular,
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
Navigator.of(context).pushNamed(Routes.bookmarks),
|
Navigator.of(context).pushNamed(Routes.bookmarks),
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'خروج از حساب کاربری',
|
title: 'خروج از حساب کاربری',
|
||||||
icon: DidvanIcons.sign_out_regular,
|
icon: DidvanIcons.sign_out_regular,
|
||||||
color: Theme.of(context).colorScheme.secondary,
|
color: Theme.of(context).colorScheme.secondary,
|
||||||
|
|
@ -84,13 +84,13 @@ class Settings extends StatelessWidget {
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
MenuItem(
|
MenuOption(
|
||||||
icon: DidvanIcons.didvan_solid,
|
icon: DidvanIcons.didvan_solid,
|
||||||
title: 'معرفی دیدوان',
|
title: 'معرفی دیدوان',
|
||||||
onTap: () => launch('https://didvan.app/#info'),
|
onTap: () => launch('https://didvan.app/#info'),
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
icon: DidvanIcons.support_regular,
|
icon: DidvanIcons.support_regular,
|
||||||
title: 'پیام به پشتیبانی',
|
title: 'پیام به پشتیبانی',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
|
|
@ -101,7 +101,7 @@ class Settings extends StatelessWidget {
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
icon: DidvanIcons.alert_regular,
|
icon: DidvanIcons.alert_regular,
|
||||||
title: 'حریم خصوصی',
|
title: 'حریم خصوصی',
|
||||||
onTap: () =>
|
onTap: () =>
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ class _FloatingNavigationBarState extends State<FloatingNavigationBar> {
|
||||||
for (var i = 0; i < categories.length; i++) ...[
|
for (var i = 0; i < categories.length; i++) ...[
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.only(right: 20),
|
padding: const EdgeInsets.only(right: 20),
|
||||||
child: MenuItem(
|
child: MenuOption(
|
||||||
titleWidget: DidvanChip(label: categories[i].label),
|
titleWidget: DidvanChip(label: categories[i].label),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
|
|
@ -237,7 +237,7 @@ class _FloatingNavigationBarState extends State<FloatingNavigationBar> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
const DidvanDivider(),
|
const DidvanDivider(),
|
||||||
MenuItem(
|
MenuOption(
|
||||||
title: 'گزارش اشکال',
|
title: 'گزارش اشکال',
|
||||||
onTap: () {
|
onTap: () {
|
||||||
Navigator.of(context).pop();
|
Navigator.of(context).pop();
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import 'package:didvan/constants/app_icons.dart';
|
||||||
import 'package:didvan/views/widgets/didvan/text.dart';
|
import 'package:didvan/views/widgets/didvan/text.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class MenuItem extends StatelessWidget {
|
class MenuOption extends StatelessWidget {
|
||||||
final String? title;
|
final String? title;
|
||||||
final Widget? titleWidget;
|
final Widget? titleWidget;
|
||||||
final IconData? icon;
|
final IconData? icon;
|
||||||
|
|
@ -12,7 +12,7 @@ class MenuItem extends StatelessWidget {
|
||||||
final VoidCallback onTap;
|
final VoidCallback onTap;
|
||||||
final Widget? trailing;
|
final Widget? trailing;
|
||||||
final Color? color;
|
final Color? color;
|
||||||
MenuItem({
|
MenuOption({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.onTap,
|
required this.onTap,
|
||||||
this.title,
|
this.title,
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import 'package:didvan/config/design_config.dart';
|
||||||
import 'package:didvan/config/theme_data.dart';
|
import 'package:didvan/config/theme_data.dart';
|
||||||
import 'package:didvan/constants/app_icons.dart';
|
import 'package:didvan/constants/app_icons.dart';
|
||||||
import 'package:didvan/models/enums.dart';
|
import 'package:didvan/models/enums.dart';
|
||||||
import 'package:didvan/models/view/action_sheet_data.dart';
|
|
||||||
import 'package:didvan/services/media/media.dart';
|
import 'package:didvan/services/media/media.dart';
|
||||||
import 'package:didvan/utils/action_sheet.dart';
|
import 'package:didvan/utils/action_sheet.dart';
|
||||||
import 'package:didvan/views/home/studio/studio_details/studio_details_state.dart';
|
import 'package:didvan/views/home/studio/studio_details/studio_details_state.dart';
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ class _DidvanSwitchState extends State<DidvanSwitch> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return MenuItem(
|
return MenuOption(
|
||||||
title: widget.title,
|
title: widget.title,
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(
|
setState(
|
||||||
|
|
|
||||||
18
pubspec.lock
18
pubspec.lock
|
|
@ -105,7 +105,7 @@ packages:
|
||||||
name: collection
|
name: collection
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.15.0"
|
version: "1.16.0"
|
||||||
cross_file:
|
cross_file:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -161,7 +161,7 @@ packages:
|
||||||
name: fake_async
|
name: fake_async
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.2.0"
|
version: "1.3.0"
|
||||||
ffi:
|
ffi:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -440,7 +440,7 @@ packages:
|
||||||
name: js
|
name: js
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.6.3"
|
version: "0.6.4"
|
||||||
lints:
|
lints:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -461,7 +461,7 @@ packages:
|
||||||
name: material_color_utilities
|
name: material_color_utilities
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.1.3"
|
version: "0.1.4"
|
||||||
meta:
|
meta:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -496,7 +496,7 @@ packages:
|
||||||
name: path
|
name: path
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.0"
|
version: "1.8.1"
|
||||||
path_drawing:
|
path_drawing:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -711,7 +711,7 @@ packages:
|
||||||
name: source_span
|
name: source_span
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "1.8.1"
|
version: "1.8.2"
|
||||||
sqflite:
|
sqflite:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -767,7 +767,7 @@ packages:
|
||||||
name: test_api
|
name: test_api
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "0.4.8"
|
version: "0.4.9"
|
||||||
typed_data:
|
typed_data:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -858,7 +858,7 @@ packages:
|
||||||
name: vector_math
|
name: vector_math
|
||||||
url: "https://pub.dartlang.org"
|
url: "https://pub.dartlang.org"
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "2.1.1"
|
version: "2.1.2"
|
||||||
visibility_detector:
|
visibility_detector:
|
||||||
dependency: transitive
|
dependency: transitive
|
||||||
description:
|
description:
|
||||||
|
|
@ -951,5 +951,5 @@ packages:
|
||||||
source: hosted
|
source: hosted
|
||||||
version: "5.3.1"
|
version: "5.3.1"
|
||||||
sdks:
|
sdks:
|
||||||
dart: ">=2.16.0 <3.0.0"
|
dart: ">=2.17.0-0 <3.0.0"
|
||||||
flutter: ">=2.10.0"
|
flutter: ">=2.10.0"
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue