fix some isuues
This commit is contained in:
parent
dfe506bb01
commit
dd04590128
|
|
@ -80,7 +80,7 @@ class _UsernameInputState extends State<UsernameInput> {
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () => launchUrl(
|
..onTap = () => launchUrl(
|
||||||
Uri.parse(
|
Uri.parse(
|
||||||
'https://didvan.app/termsOfUse.html#conditions',
|
'https://didvan.app/terms-of-use#conditions',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
@ -94,7 +94,7 @@ class _UsernameInputState extends State<UsernameInput> {
|
||||||
recognizer: TapGestureRecognizer()
|
recognizer: TapGestureRecognizer()
|
||||||
..onTap = () => launchUrl(
|
..onTap = () => launchUrl(
|
||||||
Uri.parse(
|
Uri.parse(
|
||||||
'https://didvan.app/termsOfUse.html#privacy',
|
'https://didvan.app/terms-of-use#privacy',
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ class _BookmarksState extends State<Bookmarks> {
|
||||||
children: [
|
children: [
|
||||||
MenuOption(
|
MenuOption(
|
||||||
onTap: () => _onCategorySelected(5),
|
onTap: () => _onCategorySelected(5),
|
||||||
title: 'تحلیلهای رادار',
|
title: 'رادارهای استراتژیک',
|
||||||
icon: DidvanIcons.radar_regular,
|
icon: DidvanIcons.radar_regular,
|
||||||
iconSize: 24,
|
iconSize: 24,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ class _FilteredBookmarksState extends State<FilteredBookmarks> {
|
||||||
case 4:
|
case 4:
|
||||||
return 'پادکستها';
|
return 'پادکستها';
|
||||||
case 5:
|
case 5:
|
||||||
return 'تحلیلهای رادار';
|
return 'رادارهای استراتژیک';
|
||||||
case 6:
|
case 6:
|
||||||
return 'سها';
|
return 'سها';
|
||||||
case 7:
|
case 7:
|
||||||
|
|
|
||||||
|
|
@ -136,7 +136,7 @@ class HomeState extends CoreProvier {
|
||||||
CategoryData(id: 2, label: 'دنیای فولاد'),
|
CategoryData(id: 2, label: 'دنیای فولاد'),
|
||||||
CategoryData(id: 3, label: 'ویدیوکست'),
|
CategoryData(id: 3, label: 'ویدیوکست'),
|
||||||
CategoryData(id: 4, label: 'پادکست'),
|
CategoryData(id: 4, label: 'پادکست'),
|
||||||
CategoryData(id: 5, label: 'تحلیلهای راداری'),
|
CategoryData(id: 5, label: 'رادارهای استراتژیک'),
|
||||||
CategoryData(id: 6, label: 'سها'),
|
CategoryData(id: 6, label: 'سها'),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -182,6 +182,11 @@ class HomeState extends CoreProvier {
|
||||||
asset: Assets.risk,
|
asset: Assets.risk,
|
||||||
link: 'https://risk.didvan.app/',
|
link: 'https://risk.didvan.app/',
|
||||||
),
|
),
|
||||||
|
MenuItemType(
|
||||||
|
label: 'اینفوگرافی',
|
||||||
|
asset: Assets.infography,
|
||||||
|
link: Routes.infography,
|
||||||
|
),
|
||||||
MenuItemType(
|
MenuItemType(
|
||||||
label: 'ویدیوکست',
|
label: 'ویدیوکست',
|
||||||
asset: Assets.videocast,
|
asset: Assets.videocast,
|
||||||
|
|
@ -192,11 +197,6 @@ class HomeState extends CoreProvier {
|
||||||
asset: Assets.podcast,
|
asset: Assets.podcast,
|
||||||
link: Routes.podcasts,
|
link: Routes.podcasts,
|
||||||
),
|
),
|
||||||
MenuItemType(
|
|
||||||
label: 'اینفوگرافی',
|
|
||||||
asset: Assets.infography,
|
|
||||||
link: Routes.infography,
|
|
||||||
),
|
|
||||||
];
|
];
|
||||||
|
|
||||||
categories = [
|
categories = [
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,6 @@ import 'package:didvan/views/widgets/didvan/checkbox.dart';
|
||||||
import 'package:didvan/views/widgets/didvan/divider.dart';
|
import 'package:didvan/views/widgets/didvan/divider.dart';
|
||||||
import 'package:didvan/views/widgets/didvan/text.dart';
|
import 'package:didvan/views/widgets/didvan/text.dart';
|
||||||
import 'package:didvan/views/widgets/item_title.dart';
|
import 'package:didvan/views/widgets/item_title.dart';
|
||||||
import 'package:didvan/views/widgets/overview/news.dart';
|
|
||||||
import 'package:didvan/views/widgets/search_field.dart';
|
import 'package:didvan/views/widgets/search_field.dart';
|
||||||
import 'package:didvan/views/widgets/shimmer_placeholder.dart';
|
import 'package:didvan/views/widgets/shimmer_placeholder.dart';
|
||||||
import 'package:didvan/views/widgets/state_handlers/empty_result.dart';
|
import 'package:didvan/views/widgets/state_handlers/empty_result.dart';
|
||||||
|
|
@ -192,6 +191,7 @@ class _InfographyScreenState extends State<InfographyScreen> {
|
||||||
),
|
),
|
||||||
enableEmptyState:
|
enableEmptyState:
|
||||||
context.watch<InfographyScreenState>().contents.isEmpty,
|
context.watch<InfographyScreenState>().contents.isEmpty,
|
||||||
|
topPadding: 16,
|
||||||
onRetry: context.read<InfographyScreenState>().init,
|
onRetry: context.read<InfographyScreenState>().init,
|
||||||
state: context.watch<InfographyScreenState>(),
|
state: context.watch<InfographyScreenState>(),
|
||||||
builder: (context, state) => Expanded(
|
builder: (context, state) => Expanded(
|
||||||
|
|
|
||||||
|
|
@ -76,15 +76,15 @@ class _NewStatisticState extends State<NewStatistic> {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
placeholder,
|
placeholder,
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
height: 8,
|
height: 8,
|
||||||
),
|
),
|
||||||
placeholder,
|
placeholder,
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
height: 8,
|
height: 8,
|
||||||
),
|
),
|
||||||
placeholder,
|
placeholder,
|
||||||
SizedBox(
|
const SizedBox(
|
||||||
height: 8,
|
height: 8,
|
||||||
),
|
),
|
||||||
placeholder,
|
placeholder,
|
||||||
|
|
@ -182,7 +182,7 @@ class _NewStatisticState extends State<NewStatistic> {
|
||||||
}).then((value) => _reset()),
|
}).then((value) => _reset()),
|
||||||
child: StatHeader(
|
child: StatHeader(
|
||||||
header: state.contents[3].header,
|
header: state.contents[3].header,
|
||||||
icon: DidvanIcons.commodity_solid,
|
icon: DidvanIcons.metal_solid,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
|
|
@ -208,7 +208,7 @@ class _NewStatisticState extends State<NewStatistic> {
|
||||||
}),
|
}),
|
||||||
child: StatHeader(
|
child: StatHeader(
|
||||||
header: state.contents[4].header,
|
header: state.contents[4].header,
|
||||||
icon: DidvanIcons.industry_solid,
|
icon: DidvanIcons.commodity_solid,
|
||||||
)),
|
)),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 100,
|
height: 100,
|
||||||
|
|
@ -233,7 +233,7 @@ class _NewStatisticState extends State<NewStatistic> {
|
||||||
}),
|
}),
|
||||||
child: StatHeader(
|
child: StatHeader(
|
||||||
header: state.contents[5].header,
|
header: state.contents[5].header,
|
||||||
icon: DidvanIcons.metal_solid,
|
icon: DidvanIcons.industry_solid,
|
||||||
)),
|
)),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
height: 100,
|
height: 100,
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ class NewStatisticState extends CoreProvier {
|
||||||
label: "ارزهای دیجیتال", asset: Assets.cryptoStatCat, id: 2),
|
label: "ارزهای دیجیتال", asset: Assets.cryptoStatCat, id: 2),
|
||||||
StatMenuItemType(label: "فلزات پایه", asset: Assets.metalStatCat, id: 3),
|
StatMenuItemType(label: "فلزات پایه", asset: Assets.metalStatCat, id: 3),
|
||||||
StatMenuItemType(
|
StatMenuItemType(
|
||||||
label: "کامودیتی ها", asset: Assets.commodityStatCat, id: 4),
|
label: "کامودیتیها", asset: Assets.commodityStatCat, id: 4),
|
||||||
StatMenuItemType(label: "صنعت فولاد", asset: Assets.steelStatCat, id: 5),
|
StatMenuItemType(label: "صنعت فولاد", asset: Assets.steelStatCat, id: 5),
|
||||||
StatMenuItemType(
|
StatMenuItemType(
|
||||||
label: "بازار سرمایه", asset: Assets.stockStatCat, id: 6),
|
label: "بازار سرمایه", asset: Assets.stockStatCat, id: 6),
|
||||||
|
|
@ -60,7 +60,7 @@ class NewStatisticState extends CoreProvier {
|
||||||
label: "ارزهای دیجیتال", asset: Assets.cryptoStatCat, id: 2),
|
label: "ارزهای دیجیتال", asset: Assets.cryptoStatCat, id: 2),
|
||||||
StatMenuItemType(label: "فلزات پایه", asset: Assets.metalStatCat, id: 3),
|
StatMenuItemType(label: "فلزات پایه", asset: Assets.metalStatCat, id: 3),
|
||||||
StatMenuItemType(
|
StatMenuItemType(
|
||||||
label: "کامودیتی ها", asset: Assets.commodityStatCat, id: 4),
|
label: "کامودیتیها", asset: Assets.commodityStatCat, id: 4),
|
||||||
StatMenuItemType(label: "صنعت فولاد", asset: Assets.steelStatCat, id: 5),
|
StatMenuItemType(label: "صنعت فولاد", asset: Assets.steelStatCat, id: 5),
|
||||||
StatMenuItemType(
|
StatMenuItemType(
|
||||||
label: "بازار سرمایه", asset: Assets.stockStatCat, id: 6),
|
label: "بازار سرمایه", asset: Assets.stockStatCat, id: 6),
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ class _StatGeneralScreenState extends State<StatGeneralScreen> {
|
||||||
),
|
),
|
||||||
enableEmptyState:
|
enableEmptyState:
|
||||||
context.watch<StatGeneralScreenState>().contents.isEmpty,
|
context.watch<StatGeneralScreenState>().contents.isEmpty,
|
||||||
|
topPadding: 16,
|
||||||
placeholder: Column(
|
placeholder: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@ class ExchangeCard extends StatelessWidget {
|
||||||
? Theme.of(context).colorScheme.success
|
? Theme.of(context).colorScheme.success
|
||||||
: Theme.of(context).colorScheme.error;
|
: Theme.of(context).colorScheme.error;
|
||||||
|
|
||||||
bool get _hasDiff => exchangeContent.data.d != '0';
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,6 @@ class MetalCard extends StatelessWidget {
|
||||||
? Theme.of(context).colorScheme.success
|
? Theme.of(context).colorScheme.success
|
||||||
: Theme.of(context).colorScheme.error;
|
: Theme.of(context).colorScheme.error;
|
||||||
|
|
||||||
bool get _hasDiff => metalContent.data.d != '0';
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Padding(
|
return Padding(
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'dart:developer';
|
|
||||||
|
|
||||||
import 'package:didvan/config/theme_data.dart';
|
import 'package:didvan/config/theme_data.dart';
|
||||||
import 'package:didvan/views/home/new_statistic/stock/exchange.dart';
|
import 'package:didvan/views/home/new_statistic/stock/exchange.dart';
|
||||||
|
|
@ -105,14 +104,14 @@ class _NewStockState extends State<NewStock> {
|
||||||
// Here, default theme colors are used for activeBgColor, activeFgColor, inactiveBgColor and inactiveFgColor
|
// Here, default theme colors are used for activeBgColor, activeFgColor, inactiveBgColor and inactiveFgColor
|
||||||
ToggleSwitch(
|
ToggleSwitch(
|
||||||
borderWidth: 1,
|
borderWidth: 1,
|
||||||
activeBgColor: [Theme.of(context).colorScheme.surface],
|
activeBgColor: [Theme.of(context).colorScheme.primary],
|
||||||
radiusStyle: true,
|
radiusStyle: true,
|
||||||
borderColor: [Colors.grey.shade600],
|
borderColor: [Theme.of(context).colorScheme.border],
|
||||||
centerText: true,
|
centerText: true,
|
||||||
activeFgColor: Theme.of(context).colorScheme.title,
|
activeFgColor: Theme.of(context).colorScheme.onPrimary,
|
||||||
inactiveBgColor: Theme.of(context).colorScheme.secondCTA,
|
inactiveBgColor: Theme.of(context).colorScheme.surface,
|
||||||
inactiveFgColor: Theme.of(context).colorScheme.disabledText,
|
inactiveFgColor: Theme.of(context).colorScheme.text,
|
||||||
dividerColor: Colors.grey.shade500,
|
dividerColor: Theme.of(context).colorScheme.border,
|
||||||
initialLabelIndex: value,
|
initialLabelIndex: value,
|
||||||
customTextStyles: const [TextStyle(fontWeight: FontWeight.w500)],
|
customTextStyles: const [TextStyle(fontWeight: FontWeight.w500)],
|
||||||
minWidth: 90,
|
minWidth: 90,
|
||||||
|
|
@ -136,6 +135,7 @@ class _NewStockState extends State<NewStock> {
|
||||||
onNewSearch: () => _focusNode.requestFocus(),
|
onNewSearch: () => _focusNode.requestFocus(),
|
||||||
),
|
),
|
||||||
enableEmptyState: context.watch<NewStockState>().contents.isEmpty,
|
enableEmptyState: context.watch<NewStockState>().contents.isEmpty,
|
||||||
|
topPadding: 16,
|
||||||
placeholder: Column(
|
placeholder: Column(
|
||||||
children: [
|
children: [
|
||||||
placeholder2,
|
placeholder2,
|
||||||
|
|
@ -148,21 +148,18 @@ class _NewStockState extends State<NewStock> {
|
||||||
itemCount: state.length,
|
itemCount: state.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
if (state.type == 1) {
|
if (state.type == 1) {
|
||||||
log("I AM 1");
|
|
||||||
return ExchangeCard(
|
return ExchangeCard(
|
||||||
exchangeContent: state.contents[index],
|
exchangeContent: state.contents[index],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.type == 2) {
|
if (state.type == 2) {
|
||||||
log("I AM 2");
|
|
||||||
return ExchangeCard(
|
return ExchangeCard(
|
||||||
exchangeContent: state.contents[index],
|
exchangeContent: state.contents[index],
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.type == 3) {
|
if (state.type == 3) {
|
||||||
log("I AM 3");
|
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
if (index <= (state.length_type3! - 1))
|
if (index <= (state.length_type3! - 1))
|
||||||
|
|
@ -176,7 +173,6 @@ class _NewStockState extends State<NewStock> {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (state.type == 4) {
|
if (state.type == 4) {
|
||||||
log("I AM 4");
|
|
||||||
return MetalCard(metalContent: state.contents[index]);
|
return MetalCard(metalContent: state.contents[index]);
|
||||||
}
|
}
|
||||||
return TotalType3Card(
|
return TotalType3Card(
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ import 'package:didvan/config/theme_data.dart';
|
||||||
import 'package:didvan/routes/routes.dart';
|
import 'package:didvan/routes/routes.dart';
|
||||||
import 'package:didvan/views/home/new_statistic/new_statistics_state.dart';
|
import 'package:didvan/views/home/new_statistic/new_statistics_state.dart';
|
||||||
import 'package:didvan/views/widgets/didvan/text.dart';
|
import 'package:didvan/views/widgets/didvan/text.dart';
|
||||||
import 'package:didvan/views/widgets/state_handlers/state_handler.dart';
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
|
|
|
||||||
|
|
@ -86,9 +86,10 @@ class _EditProfileState extends State<EditProfile> {
|
||||||
hintText: 'انتخاب نام کاربری (اختیاری)',
|
hintText: 'انتخاب نام کاربری (اختیاری)',
|
||||||
onChanged: _onUsernameChanged,
|
onChanged: _onUsernameChanged,
|
||||||
initialValue: state.user.username,
|
initialValue: state.user.username,
|
||||||
|
acceptSpace: false,
|
||||||
),
|
),
|
||||||
Padding(
|
Padding(
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.symmetric(vertical: 8.0),
|
||||||
child: DidvanText(
|
child: DidvanText(
|
||||||
'نام کاربری میتواند شامل کاراکترهای کوچک و بزرگ انگلیسی و اعداد باشد.',
|
'نام کاربری میتواند شامل کاراکترهای کوچک و بزرگ انگلیسی و اعداد باشد.',
|
||||||
style: Theme.of(context).textTheme.labelSmall,
|
style: Theme.of(context).textTheme.labelSmall,
|
||||||
|
|
@ -151,7 +152,8 @@ class _EditProfileState extends State<EditProfile> {
|
||||||
key: UniqueKey(),
|
key: UniqueKey(),
|
||||||
title: 'ذخیره تغییرات',
|
title: 'ذخیره تغییرات',
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
if (_formKey.currentState!.validate()) {
|
if (_formKey.currentState!.validate() &&
|
||||||
|
_usernameIsAvailible) {
|
||||||
state.editProfile(fullName, username, email);
|
state.editProfile(fullName, username, email);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -114,7 +114,7 @@ class ProfilePage extends StatelessWidget {
|
||||||
icon: DidvanIcons.alert_regular,
|
icon: DidvanIcons.alert_regular,
|
||||||
title: 'حریم خصوصی',
|
title: 'حریم خصوصی',
|
||||||
onTap: () => launchUrl(
|
onTap: () => launchUrl(
|
||||||
Uri.parse('https://didvan.app/termsOfUse.html#privacy'),
|
Uri.parse('https://didvan.app/terms-of-use#privacy'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,7 @@ class _DidvanCheckboxState extends State<DidvanCheckbox> {
|
||||||
widget.onChanged(_value);
|
widget.onChanged(_value);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 4),
|
||||||
DidvanText(widget.title),
|
DidvanText(widget.title),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -76,7 +76,7 @@ class MultitypeOverview extends StatelessWidget {
|
||||||
case 'delphi':
|
case 'delphi':
|
||||||
return DidvanIcons.saha_light;
|
return DidvanIcons.saha_light;
|
||||||
case 'infography':
|
case 'infography':
|
||||||
return DidvanIcons.info_circle_light;
|
return DidvanIcons.infography_regular;
|
||||||
default:
|
default:
|
||||||
return DidvanIcons.radar_light;
|
return DidvanIcons.radar_light;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue