bug fixes
This commit is contained in:
parent
8666a6a740
commit
56a885a6ee
|
|
@ -3,7 +3,7 @@ name: app-dev
|
||||||
spec:
|
spec:
|
||||||
allow_http: false
|
allow_http: false
|
||||||
disable_default_domains: true
|
disable_default_domains: true
|
||||||
image: app-dev:1.5.4
|
image: app-dev:1.5.10
|
||||||
image_pull_policy: IfNotPresent
|
image_pull_policy: IfNotPresent
|
||||||
path: /
|
path: /
|
||||||
replicas: 1
|
replicas: 1
|
||||||
|
|
|
||||||
|
|
@ -58,24 +58,24 @@ class _HashtagState extends State<Hashtag> {
|
||||||
return RadarOverview(
|
return RadarOverview(
|
||||||
radar: item,
|
radar: item,
|
||||||
onCommentsChanged: (_, count) => item.comments = count,
|
onCommentsChanged: (_, count) => item.comments = count,
|
||||||
onMarkChanged: (_, value) => item.marked = value,
|
onMarkChanged: (_, value, __) => item.marked = value,
|
||||||
);
|
);
|
||||||
case 'news':
|
case 'news':
|
||||||
return NewsOverview(
|
return NewsOverview(
|
||||||
news: item,
|
news: item,
|
||||||
onMarkChanged: (_, value) => item.marked = value,
|
onMarkChanged: (_, value, __) => item.marked = value,
|
||||||
);
|
);
|
||||||
case 'podcast':
|
case 'podcast':
|
||||||
return PodcastOverview(
|
return PodcastOverview(
|
||||||
podcast: item,
|
podcast: item,
|
||||||
onMarkChanged: (_, value) => item.marked = value,
|
onMarkChanged: (_, value, __) => item.marked = value,
|
||||||
studioRequestArgs:
|
studioRequestArgs:
|
||||||
const StudioRequestArgs(page: 0, type: 'podcast'),
|
const StudioRequestArgs(page: 0, type: 'podcast'),
|
||||||
);
|
);
|
||||||
case 'video':
|
case 'video':
|
||||||
return VideoOverview(
|
return VideoOverview(
|
||||||
video: item,
|
video: item,
|
||||||
onMarkChanged: (_, value) => item.marked = value,
|
onMarkChanged: (_, value, __) => item.marked = value,
|
||||||
studioRequestArgs:
|
studioRequestArgs:
|
||||||
const StudioRequestArgs(page: 0, type: 'video'),
|
const StudioRequestArgs(page: 0, type: 'video'),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ class _NewsState extends State<News> {
|
||||||
final news = state.news[index];
|
final news = state.news[index];
|
||||||
return NewsOverview(
|
return NewsOverview(
|
||||||
news: news,
|
news: news,
|
||||||
onMarkChanged: (id, value) => state.onMarkChanged(id, value),
|
onMarkChanged: state.onMarkChanged,
|
||||||
newsRequestArgs: NewsRequestArgs(
|
newsRequestArgs: NewsRequestArgs(
|
||||||
page: state.page,
|
page: state.page,
|
||||||
endDate: state.endDate,
|
endDate: state.endDate,
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,6 @@ import 'package:didvan/models/enums.dart';
|
||||||
import 'package:didvan/models/overview_data.dart';
|
import 'package:didvan/models/overview_data.dart';
|
||||||
import 'package:didvan/models/requests/news.dart';
|
import 'package:didvan/models/requests/news.dart';
|
||||||
import 'package:didvan/providers/core.dart';
|
import 'package:didvan/providers/core.dart';
|
||||||
import 'package:didvan/providers/user.dart';
|
|
||||||
import 'package:didvan/services/network/request.dart';
|
import 'package:didvan/services/network/request.dart';
|
||||||
import 'package:didvan/services/network/request_helper.dart';
|
import 'package:didvan/services/network/request_helper.dart';
|
||||||
|
|
||||||
|
|
@ -69,10 +68,11 @@ class NewsState extends CoreProvier {
|
||||||
appState = AppState.failed;
|
appState = AppState.failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> onMarkChanged(int id, bool value) async {
|
Future<void> onMarkChanged(int id, bool value, bool shouldUpdate) async {
|
||||||
news.firstWhere((element) => element.id == id).marked = value;
|
news.firstWhere((element) => element.id == id).marked = value;
|
||||||
notifyListeners();
|
if (shouldUpdate) {
|
||||||
UserProvider.changeNewsMark(id, value);
|
notifyListeners();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool get isFiltering => startDate != null || endDate != null;
|
bool get isFiltering => startDate != null || endDate != null;
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ class _RadarState extends State<Radar> {
|
||||||
final radar = state.radars[index];
|
final radar = state.radars[index];
|
||||||
return RadarOverview(
|
return RadarOverview(
|
||||||
radar: radar,
|
radar: radar,
|
||||||
onMarkChanged: (id, value) => state.changeMark(id, value),
|
onMarkChanged: state.changeMark,
|
||||||
onCommentsChanged: (id, count) =>
|
onCommentsChanged: (id, count) =>
|
||||||
state.onCommentsChanged(id, count),
|
state.onCommentsChanged(id, count),
|
||||||
radarRequestArgs: RadarRequestArgs(
|
radarRequestArgs: RadarRequestArgs(
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import 'package:didvan/models/overview_data.dart';
|
||||||
import 'package:didvan/models/requests/radar.dart';
|
import 'package:didvan/models/requests/radar.dart';
|
||||||
import 'package:didvan/models/view/radar_category.dart';
|
import 'package:didvan/models/view/radar_category.dart';
|
||||||
import 'package:didvan/providers/core.dart';
|
import 'package:didvan/providers/core.dart';
|
||||||
import 'package:didvan/providers/user.dart';
|
|
||||||
import 'package:didvan/services/network/request.dart';
|
import 'package:didvan/services/network/request.dart';
|
||||||
import 'package:didvan/services/network/request_helper.dart';
|
import 'package:didvan/services/network/request_helper.dart';
|
||||||
|
|
||||||
|
|
@ -82,10 +81,11 @@ class RadarState extends CoreProvier {
|
||||||
appState = AppState.failed;
|
appState = AppState.failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> changeMark(int id, bool value) async {
|
Future<void> changeMark(int id, bool value, bool shouldUpdate) async {
|
||||||
radars.firstWhere((element) => element.id == id).marked = value;
|
radars.firstWhere((element) => element.id == id).marked = value;
|
||||||
notifyListeners();
|
if (shouldUpdate) {
|
||||||
UserProvider.changeRadarMark(id, value);
|
notifyListeners();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void onCommentsChanged(int id, int count) {
|
void onCommentsChanged(int id, int count) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:didvan/models/enums.dart';
|
import 'package:didvan/models/enums.dart';
|
||||||
import 'package:didvan/models/overview_data.dart';
|
import 'package:didvan/models/overview_data.dart';
|
||||||
import 'package:didvan/providers/core.dart';
|
import 'package:didvan/providers/core.dart';
|
||||||
import 'package:didvan/providers/user.dart';
|
|
||||||
import 'package:didvan/services/network/request.dart';
|
import 'package:didvan/services/network/request.dart';
|
||||||
import 'package:didvan/services/network/request_helper.dart';
|
import 'package:didvan/services/network/request_helper.dart';
|
||||||
|
|
||||||
|
|
@ -41,16 +40,6 @@ class BookmarksState extends CoreProvier {
|
||||||
|
|
||||||
void onMarkChanged(int id, bool value) {
|
void onMarkChanged(int id, bool value) {
|
||||||
if (value) return;
|
if (value) return;
|
||||||
final type = bookmarks.firstWhere((element) => element.id == id).type;
|
|
||||||
switch (type) {
|
|
||||||
case 'radar':
|
|
||||||
UserProvider.changeRadarMark(id, value);
|
|
||||||
break;
|
|
||||||
case 'news':
|
|
||||||
UserProvider.changeNewsMark(id, value);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
}
|
|
||||||
bookmarks.removeWhere((element) => element.id == id);
|
bookmarks.removeWhere((element) => element.id == id);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ class _FilteredBookmarksState extends State<FilteredBookmarks> {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _onBookmarkChanged(int id, bool value) async {
|
Future<void> _onBookmarkChanged(int id, bool value, bool shouldUpdate) async {
|
||||||
if (value) return;
|
if (value) return;
|
||||||
final state = context.read<FilteredBookmarksState>();
|
final state = context.read<FilteredBookmarksState>();
|
||||||
state.onMarkChanged(id, false);
|
state.onMarkChanged(id, false);
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
import 'package:didvan/models/enums.dart';
|
import 'package:didvan/models/enums.dart';
|
||||||
import 'package:didvan/models/overview_data.dart';
|
import 'package:didvan/models/overview_data.dart';
|
||||||
import 'package:didvan/providers/core.dart';
|
import 'package:didvan/providers/core.dart';
|
||||||
import 'package:didvan/providers/user.dart';
|
|
||||||
import 'package:didvan/services/network/request.dart';
|
import 'package:didvan/services/network/request.dart';
|
||||||
import 'package:didvan/services/network/request_helper.dart';
|
import 'package:didvan/services/network/request_helper.dart';
|
||||||
|
|
||||||
|
|
@ -45,13 +44,6 @@ class FilteredBookmarksState extends CoreProvier {
|
||||||
}
|
}
|
||||||
|
|
||||||
void onMarkChanged(int id, bool value) {
|
void onMarkChanged(int id, bool value) {
|
||||||
if (type == 'radar') {
|
|
||||||
UserProvider.changeRadarMark(id, value);
|
|
||||||
} else if (type == 'news') {
|
|
||||||
UserProvider.changeNewsMark(id, value);
|
|
||||||
} else {
|
|
||||||
UserProvider.changeStudioMark(id, value);
|
|
||||||
}
|
|
||||||
bookmarks.removeWhere((element) => element.id == id);
|
bookmarks.removeWhere((element) => element.id == id);
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,9 +114,13 @@ class _StudioDetailsState extends State<StudioDetails> {
|
||||||
? null
|
? null
|
||||||
: AppBarData(
|
: AppBarData(
|
||||||
trailing: BookmarkButton(
|
trailing: BookmarkButton(
|
||||||
|
itemId: state.studio.id,
|
||||||
|
type: 'video',
|
||||||
value: state.studio.marked,
|
value: state.studio.marked,
|
||||||
onMarkChanged: (value) => widget
|
onMarkChanged: (value) {
|
||||||
.pageData['onMarkChanged'](state.studio.id, value),
|
widget.pageData['onMarkChanged'](
|
||||||
|
state.studio.id, value);
|
||||||
|
},
|
||||||
gestureSize: 48,
|
gestureSize: 48,
|
||||||
),
|
),
|
||||||
isSmall: true,
|
isSmall: true,
|
||||||
|
|
|
||||||
|
|
@ -108,6 +108,8 @@ class _StudioDetailsState extends State<StudioDetails> {
|
||||||
isSmall: true,
|
isSmall: true,
|
||||||
title: state.studio.title,
|
title: state.studio.title,
|
||||||
trailing: BookmarkButton(
|
trailing: BookmarkButton(
|
||||||
|
itemId: state.studio.id,
|
||||||
|
type: 'video',
|
||||||
value: state.studio.marked,
|
value: state.studio.marked,
|
||||||
onMarkChanged: (value) => widget
|
onMarkChanged: (value) => widget
|
||||||
.pageData['onMarkChanged'](state.studio.id, value),
|
.pageData['onMarkChanged'](state.studio.id, value),
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import 'package:didvan/models/overview_data.dart';
|
||||||
import 'package:didvan/models/requests/studio.dart';
|
import 'package:didvan/models/requests/studio.dart';
|
||||||
import 'package:didvan/models/slider_data.dart';
|
import 'package:didvan/models/slider_data.dart';
|
||||||
import 'package:didvan/providers/core.dart';
|
import 'package:didvan/providers/core.dart';
|
||||||
import 'package:didvan/providers/user.dart';
|
|
||||||
import 'package:didvan/services/network/request.dart';
|
import 'package:didvan/services/network/request.dart';
|
||||||
import 'package:didvan/services/network/request_helper.dart';
|
import 'package:didvan/services/network/request_helper.dart';
|
||||||
|
|
||||||
|
|
@ -111,10 +110,11 @@ class StudioState extends CoreProvier {
|
||||||
appState = AppState.failed;
|
appState = AppState.failed;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> changeMark(int id, bool value) async {
|
Future<void> changeMark(int id, bool value, bool shouldUpdate) async {
|
||||||
studios.firstWhere((element) => element.id == id).marked = value;
|
studios.firstWhere((element) => element.id == id).marked = value;
|
||||||
notifyListeners();
|
if (shouldUpdate) {
|
||||||
UserProvider.changeStudioMark(id, value);
|
notifyListeners();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void onCommentsChanged(int id, int count) {
|
void onCommentsChanged(int id, int count) {
|
||||||
|
|
|
||||||
|
|
@ -168,12 +168,14 @@ class AudioPlayerWidget extends StatelessWidget {
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Center(
|
child: Center(
|
||||||
child: BookmarkButton(
|
child: BookmarkButton(
|
||||||
|
itemId: state.studio.id,
|
||||||
|
type: 'podcast',
|
||||||
gestureSize: 48,
|
gestureSize: 48,
|
||||||
color: Theme.of(context).colorScheme.title,
|
color: Theme.of(context).colorScheme.title,
|
||||||
value: podcast.marked,
|
value: podcast.marked,
|
||||||
onMarkChanged: (value) => context
|
onMarkChanged: (value) => context
|
||||||
.read<StudioState>()
|
.read<StudioState>()
|
||||||
.changeMark(podcast.id, value),
|
.changeMark(podcast.id, value, true),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import 'package:didvan/config/design_config.dart';
|
import 'package:didvan/config/design_config.dart';
|
||||||
import 'package:didvan/constants/app_icons.dart';
|
import 'package:didvan/constants/app_icons.dart';
|
||||||
import 'package:didvan/models/view/action_sheet_data.dart';
|
import 'package:didvan/models/view/action_sheet_data.dart';
|
||||||
|
import 'package:didvan/providers/user.dart';
|
||||||
import 'package:didvan/utils/action_sheet.dart';
|
import 'package:didvan/utils/action_sheet.dart';
|
||||||
import 'package:didvan/views/widgets/didvan/icon_button.dart';
|
import 'package:didvan/views/widgets/didvan/icon_button.dart';
|
||||||
import 'package:didvan/views/widgets/didvan/text.dart';
|
import 'package:didvan/views/widgets/didvan/text.dart';
|
||||||
|
|
@ -12,12 +13,16 @@ class BookmarkButton extends StatefulWidget {
|
||||||
final void Function(bool value) onMarkChanged;
|
final void Function(bool value) onMarkChanged;
|
||||||
final bool askForConfirmation;
|
final bool askForConfirmation;
|
||||||
final double gestureSize;
|
final double gestureSize;
|
||||||
|
final String type;
|
||||||
|
final int itemId;
|
||||||
const BookmarkButton({
|
const BookmarkButton({
|
||||||
Key? key,
|
Key? key,
|
||||||
required this.value,
|
required this.value,
|
||||||
required this.onMarkChanged,
|
required this.onMarkChanged,
|
||||||
this.askForConfirmation = false,
|
|
||||||
required this.gestureSize,
|
required this.gestureSize,
|
||||||
|
required this.type,
|
||||||
|
required this.itemId,
|
||||||
|
this.askForConfirmation = false,
|
||||||
this.color,
|
this.color,
|
||||||
}) : super(key: key);
|
}) : super(key: key);
|
||||||
|
|
||||||
|
|
@ -69,6 +74,21 @@ class _BookmarkButtonState extends State<BookmarkButton> {
|
||||||
_value = !_value;
|
_value = !_value;
|
||||||
});
|
});
|
||||||
widget.onMarkChanged(_value);
|
widget.onMarkChanged(_value);
|
||||||
|
switch (widget.type) {
|
||||||
|
case 'radar':
|
||||||
|
UserProvider.changeRadarMark(widget.itemId, _value);
|
||||||
|
break;
|
||||||
|
case 'news':
|
||||||
|
UserProvider.changeNewsMark(widget.itemId, _value);
|
||||||
|
break;
|
||||||
|
case 'podcast':
|
||||||
|
UserProvider.changeStudioMark(widget.itemId, _value);
|
||||||
|
break;
|
||||||
|
case 'video':
|
||||||
|
UserProvider.changeStudioMark(widget.itemId, _value);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,8 @@ class _FloatingNavigationBarState extends State<FloatingNavigationBar> {
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
if (widget.isRadar)
|
if (widget.isRadar)
|
||||||
BookmarkButton(
|
BookmarkButton(
|
||||||
|
itemId: widget.item.id,
|
||||||
|
type: 'radar',
|
||||||
color: DesignConfig.isDark
|
color: DesignConfig.isDark
|
||||||
? Theme.of(context).colorScheme.focusedBorder
|
? Theme.of(context).colorScheme.focusedBorder
|
||||||
: Theme.of(context).colorScheme.focused,
|
: Theme.of(context).colorScheme.focused,
|
||||||
|
|
@ -146,6 +148,8 @@ class _FloatingNavigationBarState extends State<FloatingNavigationBar> {
|
||||||
if (!widget.isRadar) const SizedBox(width: 12),
|
if (!widget.isRadar) const SizedBox(width: 12),
|
||||||
if (!widget.isRadar)
|
if (!widget.isRadar)
|
||||||
BookmarkButton(
|
BookmarkButton(
|
||||||
|
itemId: widget.item.id,
|
||||||
|
type: 'news',
|
||||||
color: DesignConfig.isDark
|
color: DesignConfig.isDark
|
||||||
? Theme.of(context).colorScheme.focusedBorder
|
? Theme.of(context).colorScheme.focusedBorder
|
||||||
: Theme.of(context).colorScheme.focused,
|
: Theme.of(context).colorScheme.focused,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ import 'package:flutter/material.dart';
|
||||||
class NewsOverview extends StatelessWidget {
|
class NewsOverview extends StatelessWidget {
|
||||||
final OverviewData news;
|
final OverviewData news;
|
||||||
final NewsRequestArgs? newsRequestArgs;
|
final NewsRequestArgs? newsRequestArgs;
|
||||||
final void Function(int id, bool value) onMarkChanged;
|
final void Function(int id, bool value, bool shouldUpdate) onMarkChanged;
|
||||||
final bool hasUnmarkConfirmation;
|
final bool hasUnmarkConfirmation;
|
||||||
const NewsOverview({
|
const NewsOverview({
|
||||||
Key? key,
|
Key? key,
|
||||||
|
|
@ -29,7 +29,7 @@ class NewsOverview extends StatelessWidget {
|
||||||
onTap: () => Navigator.of(context).pushNamed(
|
onTap: () => Navigator.of(context).pushNamed(
|
||||||
Routes.newsDetails,
|
Routes.newsDetails,
|
||||||
arguments: {
|
arguments: {
|
||||||
'onMarkChanged': onMarkChanged,
|
'onMarkChanged': (id, value) => onMarkChanged(id, value, true),
|
||||||
'id': news.id,
|
'id': news.id,
|
||||||
'args': newsRequestArgs,
|
'args': newsRequestArgs,
|
||||||
'hasUnmarkConfirmation': hasUnmarkConfirmation,
|
'hasUnmarkConfirmation': hasUnmarkConfirmation,
|
||||||
|
|
@ -79,9 +79,11 @@ class NewsOverview extends StatelessWidget {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
BookmarkButton(
|
BookmarkButton(
|
||||||
|
itemId: news.id,
|
||||||
|
type: 'news',
|
||||||
gestureSize: 32,
|
gestureSize: 32,
|
||||||
value: news.marked,
|
value: news.marked,
|
||||||
onMarkChanged: (value) => onMarkChanged(news.id, value),
|
onMarkChanged: (value) => onMarkChanged(news.id, value, false),
|
||||||
askForConfirmation: hasUnmarkConfirmation,
|
askForConfirmation: hasUnmarkConfirmation,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ import 'package:provider/provider.dart';
|
||||||
|
|
||||||
class PodcastOverview extends StatelessWidget {
|
class PodcastOverview extends StatelessWidget {
|
||||||
final OverviewData podcast;
|
final OverviewData podcast;
|
||||||
final void Function(int id, bool value) onMarkChanged;
|
final void Function(int id, bool value, bool shouldUpdate) onMarkChanged;
|
||||||
final StudioRequestArgs studioRequestArgs;
|
final StudioRequestArgs studioRequestArgs;
|
||||||
final bool hasUnmarkConfirmation;
|
final bool hasUnmarkConfirmation;
|
||||||
const PodcastOverview({
|
const PodcastOverview({
|
||||||
|
|
@ -112,10 +112,13 @@ class PodcastOverview extends StatelessWidget {
|
||||||
const SizedBox(width: 16),
|
const SizedBox(width: 16),
|
||||||
],
|
],
|
||||||
BookmarkButton(
|
BookmarkButton(
|
||||||
|
itemId: podcast.id,
|
||||||
|
type: 'podcast',
|
||||||
askForConfirmation: hasUnmarkConfirmation,
|
askForConfirmation: hasUnmarkConfirmation,
|
||||||
gestureSize: 32,
|
gestureSize: 32,
|
||||||
value: podcast.marked,
|
value: podcast.marked,
|
||||||
onMarkChanged: (value) => onMarkChanged(podcast.id, value),
|
onMarkChanged: (value) =>
|
||||||
|
onMarkChanged(podcast.id, value, false),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import 'package:flutter/material.dart';
|
||||||
class RadarOverview extends StatelessWidget {
|
class RadarOverview extends StatelessWidget {
|
||||||
final OverviewData radar;
|
final OverviewData radar;
|
||||||
final void Function(int id, int count) onCommentsChanged;
|
final void Function(int id, int count) onCommentsChanged;
|
||||||
final void Function(int id, bool value) onMarkChanged;
|
final void Function(int id, bool value, bool shouldUpdate) onMarkChanged;
|
||||||
final bool hasUnmarkConfirmation;
|
final bool hasUnmarkConfirmation;
|
||||||
final RadarRequestArgs? radarRequestArgs;
|
final RadarRequestArgs? radarRequestArgs;
|
||||||
const RadarOverview({
|
const RadarOverview({
|
||||||
|
|
@ -34,7 +34,7 @@ class RadarOverview extends StatelessWidget {
|
||||||
onTap: () => Navigator.of(context).pushNamed(
|
onTap: () => Navigator.of(context).pushNamed(
|
||||||
Routes.radarDetails,
|
Routes.radarDetails,
|
||||||
arguments: {
|
arguments: {
|
||||||
'onMarkChanged': onMarkChanged,
|
'onMarkChanged': (id, value) => onMarkChanged(id, value, true),
|
||||||
'onCommentsChanged': onCommentsChanged,
|
'onCommentsChanged': onCommentsChanged,
|
||||||
'id': radar.id,
|
'id': radar.id,
|
||||||
'args': radarRequestArgs,
|
'args': radarRequestArgs,
|
||||||
|
|
@ -124,9 +124,11 @@ class RadarOverview extends StatelessWidget {
|
||||||
// const Icon(DidvanIcons.evaluation_regular),
|
// const Icon(DidvanIcons.evaluation_regular),
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
BookmarkButton(
|
BookmarkButton(
|
||||||
|
itemId: radar.id,
|
||||||
|
type: 'radar',
|
||||||
gestureSize: 32,
|
gestureSize: 32,
|
||||||
value: radar.marked,
|
value: radar.marked,
|
||||||
onMarkChanged: (value) => onMarkChanged(radar.id, value),
|
onMarkChanged: (value) => onMarkChanged(radar.id, value, false),
|
||||||
askForConfirmation: hasUnmarkConfirmation,
|
askForConfirmation: hasUnmarkConfirmation,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class VideoOverview extends StatelessWidget {
|
class VideoOverview extends StatelessWidget {
|
||||||
final OverviewData video;
|
final OverviewData video;
|
||||||
final void Function(int id, bool value) onMarkChanged;
|
final void Function(int id, bool value, bool shouldUpdate) onMarkChanged;
|
||||||
final bool hasUnmarkConfirmation;
|
final bool hasUnmarkConfirmation;
|
||||||
final StudioRequestArgs studioRequestArgs;
|
final StudioRequestArgs studioRequestArgs;
|
||||||
const VideoOverview({
|
const VideoOverview({
|
||||||
|
|
@ -32,7 +32,7 @@ class VideoOverview extends StatelessWidget {
|
||||||
onTap: () => Navigator.of(context).pushNamed(
|
onTap: () => Navigator.of(context).pushNamed(
|
||||||
Routes.studioDetails,
|
Routes.studioDetails,
|
||||||
arguments: {
|
arguments: {
|
||||||
'onMarkChanged': onMarkChanged,
|
'onMarkChanged': (id, value) => onMarkChanged(id, value, true),
|
||||||
'id': video.id,
|
'id': video.id,
|
||||||
'args': studioRequestArgs,
|
'args': studioRequestArgs,
|
||||||
'hasUnmarkConfirmation': hasUnmarkConfirmation,
|
'hasUnmarkConfirmation': hasUnmarkConfirmation,
|
||||||
|
|
@ -101,9 +101,12 @@ class VideoOverview extends StatelessWidget {
|
||||||
// ),
|
// ),
|
||||||
// const SizedBox(width: 16),
|
// const SizedBox(width: 16),
|
||||||
BookmarkButton(
|
BookmarkButton(
|
||||||
|
itemId: video.id,
|
||||||
|
type: 'video',
|
||||||
gestureSize: 32,
|
gestureSize: 32,
|
||||||
value: video.marked,
|
value: video.marked,
|
||||||
onMarkChanged: (value) => onMarkChanged(video.id, value),
|
onMarkChanged: (value) =>
|
||||||
|
onMarkChanged(video.id, value, false),
|
||||||
askForConfirmation: hasUnmarkConfirmation,
|
askForConfirmation: hasUnmarkConfirmation,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
||||||
import 'package:provider/provider.dart';
|
import 'package:provider/provider.dart';
|
||||||
import 'package:universal_html/html.dart' as html;
|
import 'package:universal_html/html.dart' as html;
|
||||||
import 'package:universal_html/js.dart' as js;
|
|
||||||
|
|
||||||
class Splash extends StatefulWidget {
|
class Splash extends StatefulWidget {
|
||||||
const Splash({Key? key}) : super(key: key);
|
const Splash({Key? key}) : super(key: key);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue